- New help system, browsable in the UI and via the HTTP server (
/responder/help
). In the UI listener, invokehandbook
to read the documentation root, and invoke\ foo help
to look at documentation for the wordfoo
. - Sequences:
- Association list words
assoc*
,set-assoc
,acons
andremove-assoc
are gone. - The
repeated
virtual sequence type is gone. Instead, the<array>
word takes an initial element in addition to an initial size. - The
fill
word to create a new string with an initial character repeated a certain number of times has been renamed to<string>
. - Add a new
interleave ( seq quot between -- )
combinator that applies a quotation to each element of a sequence, calling another quotation in between each pair. - Add a new
<=> ( obj1 obj2 -- n )
word for comparing two objects using an intrinsic order. For numbers this is the standard order, for strings this is lexicographic order, and for words, this compares word names. - The
natural-sort ( seq -- seq )
word replacesnumber-sort
,string-sort
andword-sort
.
- Association list words
- Hashtables:
hash* ( key hash -- [[ key value ]] )
is nowhash* ( key hash -- value ? )
hash-clear
is nowclear-hash
hash-each
,hash-each-with
,hash-all?
,hash-all-with?
,hash-subset
,hash-subset-with
now pass the key and value separately on the stack to the given quotation, instead of passing a cons cell- Literal syntax change:
H{ [[ key value ]] ... }
is nowH{ { key value } }
- Math:
- The
sum
andproduct
words have been moved tocontrib/math/
. - The
mod
word is now supported for ratios and floating point numbers. - The
truncate
,floor
andceiling
words are now supported for floating point numbers. - The NaN, positive infinity and negative infinity floating point numbers now parse and unparse as
0.0/0.0
,1.0/0.0
, and-1.0/0.0
respectively. - The NaN value is now equal to itself under
=
. - Negative and postive zero are no longer equal under
=
. However, the newzero?
word tests if the top of the stack is a zero, and it tests for both positive and negative zero.
- The
- Streams:
stream-format ( string style stream -- )
now takes a hashtable rather than an association list for specifying style information.stream-write
andstream-terpri
are now generic words, and there is a newwith-nested-stream
generic word. You can wrap your output streams in a<plain-writer>
to avoid implementing these.
- C library interface:
- Some alien word changes:
<foo> ==> "foo" <c-object> <foo-array> ==> "foo" <c-array>
- Support for binding to Objective C libraries is now included.
- Normal usage of Objective C classes and methods is done using the
OBJC-CLASS:
andOBJC-MESSAGE:
parsing words. See the example inexamples/cocoa-speech.factor
. - Objective C runtime introspection functions and structures are defined in the
objective-c
vocabulary.
- Normal usage of Objective C classes and methods is done using the
- Added a pair of words for between Factor strings and C strings,
alien>string
andstring>alien
.
- Some alien word changes:
- AMD64 compiler backend.
- Fixed some problems with compilation of inlined recursive words.
- Fixed invalid OpenGL calls which caused problems on Windows machines with ATI drivers, and Linux machines with the MesaGL implementation.
- The listener looks different now. An expandable top area is used for browsing objects, words and help, and the stack display has been shrunk to a single status line at the bottom of the window.
- A left click on a presentation now invokes the default command. A right click shows a menu of possibilities.
- Source files are no longer loaded in the stage-2 bootstrap. Since stage-2 bootstrap runs in the interpreter, this reduces bootstrap time by a few minutes. Instead, all source files, including the compiler backend, are loaded in stage-1 bootstrap, and thus boot images are now CPU-specific. Boot images can be created as follows:
USE: image
"x86" make-image
"ppc" make-image
"amd64" make-image
- All libraries in
contrib/
have been tested and updated for recent language changes, and you can runcontrib/load.factor
to load all of them at once (Trent Buck) - Updated
contrib/x11/
with many more examples (Eduardo Cavazos) - Added splay tree library in
contrib/splay-trees.factor
(Mackenzie Straight) - Improved AJAX support in
contrib/httpd/
. The "prototype" JavaScript library is now included (Chris Double)
No comments:
Post a Comment