New alphas up

Brian Rice water at tunes.org
Fri Jan 14 18:54:55 PST 2005


The new features are all image-side:

1) Slate's lexer now recognizes Floats with variable radixes (bases), 
so 16r0.1 = 0.5 for example.
2) "_@(Number traits) readFrom: s" implements a quick way to get a 
number from a string (OR arbitrary stream with string-y content). 
Notes:
- It will raise an error (beyond normal parsing errors) if the object 
returned is not like the one requested. So if you ask for an Integer 
and get a Float, there's an error to continue from. Whether this needs 
a default restart or to become a warning, I am unsure. Suggestions are 
welcome.
- I do not want this to be an as: method since it only eats the next 
applicable data and not the whole thing, or may not return anything at 
all if there's nothing that counts.
- I am also considering readFrom: methods for arbitrary literals and 
objects, but this was requested first and was easy to implement.
3) extlib.slate has been removed from the bootstrap. It caused issues 
since there are now BigIntegers created for its initialization, which 
the Bootstrap will not handle (by design; we don't want entanglement 
with non-primitives).
4) Various small fixes.

On another note, there is now a src/lib/wordarray.slate which 
implements WordArray BigEndian and WordArray LittleEndian on top of 
ByteArrays and detects endianness automatically for you (so you can 
just call newSize: from WordArray itself and get the right type). Of 
course its elements are extracted into BigIntegers so it conses more 
than ordinarily.

--
Brian T. Rice
LOGOS Research and Development
http://tunes.org/~water/




More information about the Slate mailing list