[Monetdb-developers] RFC: New Integer Atoms: byte & word

Niels Nes Niels.Nes at cwi.nl
Thu Dec 8 19:06:29 CET 2005


On Thu, Dec 08, 2005 at 06:23:12PM +0100, Martin Kersten wrote:
> 
> 
> Stefan Manegold wrote:
> >Dear MonetDB developers,
> >
> >I'm almost done with the first steps of adding two new integer atoms to
> >MonetDB:
> >
> >a) a tiny (8-bit) integer.
> Signed or unsigned?
> name: tint
All integers in MonetDB are signed, ie for consistency it should be signed.
I prefer bte over tint.
> 
> Why not using int8, which also allows for nibbles int4, int2
> >
> >b) a machine-word sized integer that grows with the system, i.e., 32-bit on
> >   32-bit systems and 64-bit on 64-bit systems.
> >
> >(a) is supposed to replace "chr" wherever "chr" is not used as a character 
> >type,
> >but as a (tiny) 1-byte integer.
> please keep 'chr', I don't mind if we use 'char' instead
Stefan did suggest to removed 'chr', but only to replace using 'chr' wherever it
is not used as character but as 1-byte int.

> >
> >(b) is supposed to be the MIL pendant of the C type "var_t" and can/should
> >be used, e.g., for BUN counts of BATs which are limited to 32-bit on 32-bit
> >systems, but can grow to 64-bit on 64-bit systems.
> >
> >For now, I chose the following names, sticking to the 3-letter "design", 
> >and
> >picking combinations that do not yet exist in the code base:
> use full words, there is (implicit) design reason for it, but at a few 
> places we may have to look a little further.
> For the cpu cycles freaks, you might use 'tiny' instead of 'bte',
> because 'bit' starts alsi with a 'b'
> >
> >	a)	"bte"	(read "byte")
> >	b)	"wrd"	(read "word")
> >
> >In a first checking (hopefully sometime next week), I will only add these 
> >new
> >atoms (and add the proper functionality & new signatures where necessary),
> >but not change any existing MIL proc/command signatures.
> >
> >In a second check-in (maybe also already next week?), I plan to change (at
> >least) the signature(s) of "count(BAT[any,any]) : int" & "count(int) : lng"
> >to a single "count(BAT[any,any]) : wrd".
> Introduction of more atomary types leads to more coercions and
> signatures in M5. It may actually force me to introduce the union type
> property to keep things readable. But, if we have a union type 
> constructor, why not making it a first class citizen?
> 
> command bat.insert(b:bat[:any_1{type=void,int},:any_2{type=str,chr}....

Niels
> >
> >Maybe, I/we should later also consider to replace "chr" by "bte" in the 
> >enum
> >module.
> >
> >
> >Well, so far so good. 
> >
> >I would be grateful, if you could comment on these plans.
> >
> >Especially, I'd like to hear, whether there are better(?) suggestions for
> >the names "bte" & "wrd".
> >Further, did I miss any places, where we should/must use "bte" iso. "chr" 
> >and/or "wrd" iso. "int"/"lng"?
> >
> >
> >Thank you very much in advance!
> >
> >Stefan
> >
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers

-- 

Niels Nes, Centre for Mathematics and Computer Science (CWI)
Kruislaan 413, 1098 SJ Amsterdam, The Netherlands
room C0.02,  phone ++31 20 592-4098, fax ++31 20 592-4312
url: http://www.cwi.nl/~niels   e-mail: Niels.Nes at cwi.nl




More information about the developers-list mailing list