Factor 0.79 released
Sunday, November 6, 2005
Factor 0.79 is now out after two months of development.
- Incompatible changes:
-
The
iftecombinator has been renamed toif. -
Syntax changes:
{ 1 2 3 } ! arrays V{ 1 2 3 } ! vectors H{ [[ key value ]] ... } ! hashtables C{ 1.02 -7.44 } ! complex numbers T{ class slots ... } ! tuple
-
- Compiler:
- New basic block optimizer performs more aggressive dead load and store elimination.
- Stack shuffles are compiled more efficiently.
- Pushing literals on either side of a stack shuffle is now compiled more efficiently.
- Fixed a problem with relocation of compiled code on PowerPC.
- Fixed various FFI issues on Mac OS X.
- User interface:
- Graphics rendering is now done using OpenGL and text rendering is done via FreeType. SDL_gfx and SDL_ttf libraries are no longer required.
- Added expandable outliners. Used by the inspector,
.s,usage.,uses.,vocabs., and various other words. - Added word completion to the listener pane; press
TAB. - Added word navigation shortcuts to the listener pane; press
C+LEFTandC+RIGHTto move a word at a time, andC+BACKSPACEandC+DELETEto delete the previous and next word, respectively. - Added mouse-over help for presentations.
- Previously-entered output is now clickable in the listener.
- New, better-looking widget theme.
- Collections:
- Faster
map,2eachand2map. - Arrays are now better supported and should be used instead of vectors where resizing is not desired.
- Some new sequence words that do not bounds check:
nth-unsafeandset-nth-unsafe. These should only be used in special circumstances, such as inner loops (each,mapand so on use them). - New
replace-slice ( new from to seq -- seq )word replaces a slice of a sequence with another sequence. - Hashtables did not obey the rule that equal objects must have equal hashcodes, so using hashtables as hashtable keys did not work.
- New
mismatch ( seq seq -- i )word returns first index where two sequences differ, or -1 if they have equal elements. - New
drop-prefix ( seq seq -- seq seq )word returns a pair of sequences which have the same elements as the two input sequences, with the common prefix removed.
- Faster
Everything else:
-
On Mac OS X, signal 11 errors caused by stack under/overflow no longer trigger the OS X crash reporter dialog.
-
Easier exception handling. The
cleanup ( try cleanup -- )word encapsulates the following idiom:[ A ] [ B rethrow ] catch [ A ] [ B ] cleanupThe
recover ( try recover -- )word encapsulates the following idiom:[ A ] [ [ B ] when* ] catch [ A ] [ B ] recoverThe
catch ( try -- error/f )word no longer takes a quotation that receives the error caught; rather, it just pushes the error that was caught on the stack. That is, the old way:[ A ] [ B ] catchBecomes:
[ A ] catch BHowever, most uses of
catchcan be replaced bycleanupandrecover. -
The distinct
ttype is gone. Now, thetobject is just a symbol. -
A new
with-server ( port ident quot -- )combinator takes care of listening on a network socket, logging client connections, spawning client handler threads, and error handling. The quotation is called for each client, in a new scope with the client socket as the default stream. -
New
1+,1-words are a bit faster than1 +and1 -since there is one less generic dispatch involved. -
On Windows, FFI errors would raise a signal 11 instead of reporting a nice message.
Contributed code:
- The HTTP server and client has been moved from
library/httpd/tolibrary/contrib/. - Intel 8080 CPU and Space Invaders emulator in
contrib/space-invaders(Chris Double) - AOL Instant Messenger chat client library in
contrib/aim(Doug Coleman) - Cairo graphics library binding in
contrib/cairo. (Sampo Vuori) - Advanced math library with quaternions, matrices, polynomials,
statistics and various functions in
contrib/math/. (Doug Coleman) - Dimensioned units in
contrib/units/. (Doug Coleman) - X11 binding in
contrib/x11/(Eduardo Cavazos)