[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] GNU Smalltalk 2.3 released

From: Paolo Bonzini
Subject: [Help-smalltalk] GNU Smalltalk 2.3 released
Date: Tue, 05 Dec 2006 13:33:04 +0100
User-agent: Thunderbird (Macintosh/20061025)

GNU Smalltalk 2.3 is now available from the GNU FTP server:

This version includes a lot of small improvements and bugfixes, thanks to the numerous reports from the users.

This version includes an important license change. GNU Smalltalk now adds an explicit exception to the GNU GPL license, explicitly allowing the programs running under the virtual machine to use a GPL-incompatible license. This exception is used both by the virtual machine and by the library bindings included in GNU Smalltalk. This clears gray areas when a Smalltalk program is using functions in the external library bindings via dynamic linking and the foreign function call interface (C call-outs).

Other changes include:

* C call-outs returning #void now return self rather than nil. Performance of code heavily using C call-outs has improved.

* FileStreams can now use pwrite for more efficient operation on files opened for read/write, and will do fewer gratuitous lseek operations. pread will also be used by FileStream>>#copyFrom:to:. The number of system calls issued when generating the documentation, for example, is reduced by a third.

* Fixed many bugs including:.

** Fixed miscompilation of methods containing both -0.0 and 0.0 (positive and negative floating-point zero).

** Fixed bug in File>>#touch, which did not work really. Other methods were added to modify a file's atime and mtime.

** Fixed bug in SortedCollection. After #removeAtIndex:, adds would leave the collection unordered.

** Fixed crash when a forked process performed an explicit return.

* Introduced a method to efficiently convert a WriteStream into a ReadStream. It is called #readStream and makes WriteStream more polymorphic with String.

* Introduced two more class shapes, #character and #utf32, that can be used for String and UnicodeString (see later).

* More reliable detection of at-end-of-file condition for pipes, TTYs, and so on (especially on Mac OS X), and of sockets closed by the peer. Due to incompatibilities between various OSes, you are advised to test end-of-stream conditions *before* rather than after reading a character from stdin. In 2.2, either way would work, but serious bugs were present on Mac OS X unless stdin was redirected from a file.

* (GTK bindings) Moved gdk_draw_ functions to GdkDrawable.

* New goodie to parse the command line. Look at the documentation for the Getopt class and for SystemDictionary>>#arguments:do:.

* New example, lazy collections. When loaded, #select:, #reject: and #collect: do not create a new collection unless necessary. Idioms like

        (a select: [ :each | ... ]) do: [ : each | ... ]


        a := a select: [ :each | ... ].
        a := a reject: [ :each | ... ].
        a := a select: [ :each | ... ].
        ^a size

can be much faster when this example is loaded.

* New examples of how to subclass CompiledMethod to perform "true delegation" or interpreting foreign bytecode sets.

* Regular expressions are now included in the default image. The interface is now definitive and is similar to 2.2. The concrete classes for RegexResults are in a private namespace (since the user need not instantiate them anyway). Right now, regular expressions are only usable for String objects (see Unicode support below). This may change in the future.

* The backtraces now omit again the internal methods in the exception handling system.

* The class above which super-send bytecodes start searching is now embedded in the bytecode stream. This provides the infrastructure to implement 'here' as in Smalltalk/X or 'self.Foo b' to execute the Foo>>#b method (these possible extensions have not been implemented).

* The header files compile cleanly with a C++ compiler. For the occasion, the preferred name of the old `mst_Object' has changed to `gst_object'.

* Various speedups.

Unicode support:

* Characters above 127 are no longer used to represent extended ASCII characters. Instead, they are only used to represent a byte in the encoding of the Unicode characters from 128 on. To create them use the Blue Book method Character class>>#value:.

To represent Unicode characters above 127, instead, use the (ANSI Smalltalk) Character class>>#codePoint: method. Note that these characters *cannot* be shown on a stream or on the Transcript with #nextPut: (use #display: instead) nor compared with #== (use #= instead).

Character literals like $+ or $A are guaranteed to create normal "Character" objects, for which you can safely use #nextPut:. Right now, these are valid only for characters between 0 and 127. To create Character literals for unicode characters, use the new syntax to express characters using their Unicode code point. This may be extended in the future to support Unicode character literals.

A ``safe'' way to obtain the character whose encoding is between 128 and 255 is this (which requires the Iconv module to be loaded):

        ##('<your character>' asUnicodeString first)

(This snippet has no shortcut by design because, in general, converting a Character to a UnicodeCharacter is not a well-defined operation).

* New UnicodeCharacter and UnicodeString classes. These new classes can also be passed to and received from C functions. See the manual for more information.

* New syntax $<13> to express characters using their Unicode code point. As anticipated, this syntax will create instances of the new UnicodeCharacter class when the number is > 127.

* Part of the I18N module was separated into the Iconv module, which provides support for printing Unicode characters and strings correctly.

Other goodies:

* NCurses bindings, contributed by Brad Watson.

Happy smalltalking!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]