GNU Smalltalk 3.0 released

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

GNU Smalltalk 3.0 released

Paolo Bonzini
GNU Smalltalk 3.0 will shortly be available at

   ftp://ftp.gnu.org/gnu/smalltalk/smalltalk-3.0.tar.gz

Unlike other Smalltalk environments, GNU Smalltalk
emphasizes Smalltalk's rapid prototyping features rather than the
graphical and easy-to-use nature of the programming environment.

The release was tested on the following systems:

* i686-pc-linux-gnu
* x86_64-pc-linux-gnu
* powerpc-apple-darwin8.9.0
* powerpc-unknown-linux-gnu
* sparc-unknown-linux-gnu
* ia64-hp-linux-gnu
* s390-ibm-linux-gnu
* hppa-hp-linux-gnu

Useful URLs:
* Downloading: http://smalltalk.gnu.org/download
* Mailing list: http://smalltalk.gnu.org/community/ml
* FAQ: http://smalltalk.gnu.org/faq
* Issue tracking: http://smalltalk.gnu.org/project/issues
* Wiki: http://smalltalk.gnu.org/wiki/main-page


Thanks to Stephen Compall, Thomas Girard, Robin Redeker for help
and testing of this release!


NEWS FROM 2.3.6 TO 3.0

(Changes from the last release candidate, 2.95h, are listed later.)

Important changes:

* A completely new syntax for defining classes is now present.  This is
detailed in the manual (see the tutorial section) and the entire source
code of the system uses the new syntax.

* A different startup sequence is used which improves the possibility to
customize GNU Smalltalk, both site-wide and per-user.  The details are
in the manual, the main changes are these: the `~/.stinit' and
`~/.stpre' files are now named `~/.st/init.st' and `~/.st/pre.st'; files
requested with the `-K' command-line option are sought for in the
`~/.st' directory too; kernel files may be overridden by placing them in
`~/.st/kernel'; a site-wide customization file can be placed in
`/usr/local/share/smalltalk/site-pre.st'.

The kernel path is stored in the image and not changed when the image is
loaded.  In addition, `Directory systemKernel' and `Directory
localKernel' are not used anymore, and just return the same as
`Directory kernel'.

Finally, Smalltalk programs have access to the aforementioned `~`/.st'
directory as `Directory userKernel' (name subject to change).  A
`packages.xml' file, as well as `.star' files (see later) can be put there.

* Several classes not meant to be accessed by the user have been moved
to an internal Kernel namespace.  This also removes them from the
automatically generated documentation.

* GNU Smalltalk now needs InfoZIP to be installed on the machine where
it is compiled, in order to use the new single-file package facility.
In the future, this dependency may be removed.

* The tool for automatic documentation generator, that has been used by
the GNU Smalltalk distribution for a long time, is now installed as gst-doc.


Backwards-incompatible changes:

* If you want to return a specific CObject class from a C call-out, it
is suggested that you stop using "returning: ClassName type", as in

        <cCall: 'dupwin' returning: NCWindow type args: #(#self )>!

and instead use

        <cCall: 'dupwin' returning: #{NCWindow} args: #(#self )>!
                                    ^^^^^^^^^^^

The source code conversion tool might silently produce an incorrect
output if you use the former syntax.

* The ABI for external usage has changed.  libgst.a does not know
anymore how to parse options, but exports functions to achieve the same
effect as options.

* The #writeStream and #streamContents: method were moved down from
SequenceableCollection to ArrayedCollection, since they did not really
work on variable-sized collections such as OrderedCollections.

* The database access library has been replaced by a new DBI-like
library, contributed by Mike Anderson, with bindings to PostgreSQL (also
contributed by Mike), SQLite (by Daniele Sciascia) and MySQL.

* In general, GNU Smalltalk is able to load files with the old syntax.
In some cases, however, it will be necessary to either convert them
using the gst-convert tool, or load the Parser package before them.
This is the case if you get a "not yet implemented" error while loading
the files.


Packages improvements:

* All packages in the distribution are now installed in the new ".star"
format (for SmallTalk ARchive).

".star" files include at the top a package.xml file (whose format is the
same as the <package> tag of packages.xml).  The name of ".star" file
should be the same as the name of the package if the package.xml file
has a <name> tag.

* In install mode, gst-package automatically creates a ".star" file.
gst-package also accepts ".star" files on the command line; in this
case, install mode will simply copy the file instead of rebuilding it
from scratch.

* gst-package supports preparing a standard skeleton for package
tarballs, using the --prepare option.

* Packages can specify a "testing-only" subpackage that is loaded when
running tests (e.g. with "gst-load --test" or "gst-sunit --package"),
but not when loading the package normally.  This is done with a <test>
tag nested into <package>.


Other major changes:

* Added #from: to Collection, which constructs an instance of the class
based on a conveniently specified Array.  This allows one to construct
Dictionaries or LookupTables using

        Dictionary from: { 1->2. 3->4 }

Another methods meant to be used with the { ... } syntax is #join.  For
example

         { 'hello'. a. '!' } join

returns a string and is the same as using #, repeatedly, but is more
efficient.

* All collection classes support #readStream, though the default
implementation (which uses generators) could be slow.

* Continuations and generators have moved to the base image.  More
complex examples of continuations still reside in the Continuations package.

* Directory entries are passed to #allFilesMatching:do:'s block argument
if they match aPattern.  As before, the function descends in all the
directories, even those that do not match aPattern.

* Evaluated code now puts undeclared variables in a private namespace
(so that you do not have to declare temporaries) and defers the
resolution of undefined variable bindings until the time of their first
access.

Unfortunately, this slows down evaluated code noticeably; you can get
back the performance by putting code in a method or an Eval (in the
latter case, you will have to declare temporaries explicitly, or the
code will still use the slower deferred variable binding).

* Flushing a socket tries to push data all the way down to the network.
  This usually removes the need for TCP_NODELAY option.  If you have
applications that want to use #flush to send data to the OS, but not to
the network, we're all ears.

* Image load uses copy-on-write memory mapped files.  This means that,
as long as a loaded object is not touched, the operating system will map
it to the same physical memory, for different copies of the GNU
Smalltalk virtual machine that loaded the same image.

* Processes that are garbage collected before they terminate execution
(e.g.  because they are waiting on a semaphore that is also garbage
collected) are appropriately terminated.

* Saving the image breaks hard links.  This was done to work around a
Linux kernel bug, and might change in future versions.

* Since they are not portable outside Unix systems, the `archive'
virtual filesystems (deb, lslR, mailfs, patchfs, uar, urar, uzoo, ulha,
ucpio, utar) are now available only if the VFSAddOns package is loaded.
  Without the package, only #uzip is available and it will only support
extracting from ZIP files.

* Startup time and quit time were improved widely (the time for running
a simple "Hello, World" program is about one fifth of 2.3.x).

* SUnit scripts can declare variables (using a "variable=value" syntax)
that can be accessed from within a testsuite.

* The "<category: 'bar'>" pragma can be used to set the category of a
method.

* The graphical browser can now be started just by typing "gst-blox".

* The image is now installed in /usr/local/var/lib/smalltalk (which in
most distributions will map to /var/lib/smalltalk).

* The MySQL driver was updated to support MySQL 4.x authentication.
Tests can be run by configuring with
--enable-mysql-tests=USER:PASSWORD:DB (the given user, password and
database should already exists when `make check' is run; the default is
"root:root:test").

* The XML package has been split in five smaller packages,
XML-SAXDriver, XML-DOM, XML-SAXParser, XML-NodeBuilder and
XML-XMLParser.  The previous name XML can still be used.  In the future
it may load a different but compatible (e.g. Expat-based) parser.

* When declaring a C function, the #returning: argument now supports
specifying CPtr and CArray types, the same way it is done in CStruct and
CUnion declarations.  For example, since you can specify an "int *" as
"#{CInt}", an "int **" (pointer to pointer to Integer, i.e. pointer to
CInt) would be written "#(#ptr #{CInt})".

Conversion from Array to CType is generally available using the CType
class>>#from: method.

* The zlib bindings' WriteStream decorator supports partial flushing.
Class PipeStream is distributed independently as it is not used anymore
by the zlib bindings.


New goodies:

* A new package DebugTools provides a generic Debugger class that can be
used to control an inferior Smalltalk process.  It is used by the
textual MiniDebugger as well as the debugger that is part of the GUI.

* Complex numbers support added (package Complex).

* GNUPlot bindings

* JSON reader/writer contributed by Robin Redeker.

* MD5 packages renamed to Digest, SHA1 support added.

* New DBI-like library replacing the old one, contributed by Mike Anderson.

----------------------------------------------------------------------

NEWS FROM 2.95h to 3.0

* On Alpha, GNU Smalltalk now uses the -mieee C compiler flag.

* Works around a bug in lrint for ia64 and other 64-bit platforms.

* Generational garbage collection enabled on ia64.  Builds on ia64.

* Improved error recovery in interactive mode.

* Provides a public PackageNotAvailable exception.

* Added a #terminateOnQuit method to exit a process when
ObjectMemory>>#quit is called.

* Merged some parts of the wiki into the manual.

* Fixed several bugs.

* Added Collection>>#readStream.

* Does not close stdin/stdout/stderr on output (flushing it instead).

* Fixed crash in SmallInteger>>#divExact:

* Compiles (again) on Mac OS X 10.3.x.


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: GNU Smalltalk 3.0 released

Isaac Gouy
After a basic

./configure prefix=/opt/gst
make

I measured the benchmarks game programs with 3.0 and noticed much
longer times compared to 2.3.6

I assume I've made some mistake in the configure and build - any
suggestions on what I might need to add to ./configure?

Maybe I should be using a different command line with 3.0?

Here's an example measurement
http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=nbody&lang=gst&id=0#log


3.0
nbody,gst, ,200000, 60.484s 3940KB
nbody,gst, ,2000000, 604.918s 3940KB

2.3.6
nbody,gst, ,200000, 18.161s 6904KB
nbody,gst, ,2000000, 184.036s 6900KB


/opt/gst/bin/gst -QI /opt/gst/var/lib/smalltalk/gst.im
../../Include/smalltalk/gst/platform.gst ../nbody.gst -a 200000





      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Paolo Bonzini
Isaac Gouy wrote:
> After a basic
>
> ./configure prefix=/opt/gst
> make
>
> I measured the benchmarks game programs with 3.0 and noticed much
> longer times compared to 2.3.6

I don't recall if 2.3.6 was compiled with --enable-jit.

Also, you have to wrap the main body in a class or an

Eval [
     ...
]

block instead of just having the bang-separated

     ... !

This is listed in the NEWS file (and the announcement) as:

"Evaluated code now puts undeclared variables in a private namespace (so
that you do not have to declare temporaries) and defers the resolution
of undefined variable bindings until the time of their first access.

Unfortunately, this slows down evaluated code noticeably; you can get
back the performance by putting code in a method or an Eval (in the
latter case, you will have to declare temporaries explicitly, or the
code will still use the slower deferred variable binding)."

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Isaac Gouy

--- Paolo Bonzini <[hidden email]> wrote:

> Isaac Gouy wrote:
> > After a basic
> >
> > ./configure prefix=/opt/gst
> > make
> >
> > I measured the benchmarks game programs with 3.0 and noticed much
> > longer times compared to 2.3.6
>
> I don't recall if 2.3.6 was compiled with --enable-jit.

iirc 2.3.6 was compiled with --enable-jit and I think you're saying
that  will still work with 3.0


> Also, you have to wrap the main body in a class or an
>
> Eval [
>      ...
> ]
>
> block instead of just having the bang-separated
>
>      ... !
>
> This is listed in the NEWS file (and the announcement) as:
>
> "Evaluated code now puts undeclared variables in a private namespace
> (so
> that you do not have to declare temporaries) and defers the
> resolution
> of undefined variable bindings until the time of their first access.
>
> Unfortunately, this slows down evaluated code noticeably; you can get
> back the performance by putting code in a method or an Eval (in the
> latter case, you will have to declare temporaries explicitly, or the
> code will still use the slower deferred variable binding)."
>
> Paolo
>



      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Tomi Neste
Isaac Gouy <[hidden email]> kirjoitti Tue, 08 Jan 2008 18:32:50 +0200:

>
> --- Paolo Bonzini <[hidden email]> wrote:
>
>> Isaac Gouy wrote:
>> > After a basic
>> >
>> > ./configure prefix=/opt/gst
>> > make
>> >
>> > I measured the benchmarks game programs with 3.0 and noticed much
>> > longer times compared to 2.3.6
>>
>> I don't recall if 2.3.6 was compiled with --enable-jit.
>
> iirc 2.3.6 was compiled with --enable-jit and I think you're saying
> that  will still work with 3.0
>
>
>> Also, you have to wrap the main body in a class or an
>>
>> Eval [
>>      ...
>> ]
>>
>> block instead of just having the bang-separated
>>
>>      ... !
>>
>> This is listed in the NEWS file (and the announcement) as:
>>
>> "Evaluated code now puts undeclared variables in a private namespace
>> (so
>> that you do not have to declare temporaries) and defers the
>> resolution
>> of undefined variable bindings until the time of their first access.
>>
>> Unfortunately, this slows down evaluated code noticeably; you can get
>> back the performance by putting code in a method or an Eval (in the
>> latter case, you will have to declare temporaries explicitly, or the
>> code will still use the slower deferred variable binding)."
>>
>> Paolo
>>
>
>
>
>       ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk

Should --enable-jit work with 3.0?
I recently tried that on Linux/ia32 and got some compile time errors. I  
can post a more detailed report if this is considered a bug.

--
tomppa


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Paolo Bonzini
In reply to this post by Isaac Gouy
Isaac Gouy wrote:

> --- Paolo Bonzini <[hidden email]> wrote:
>
>> Isaac Gouy wrote:
>>> After a basic
>>>
>>> ./configure prefix=/opt/gst
>>> make
>>>
>>> I measured the benchmarks game programs with 3.0 and noticed much
>>> longer times compared to 2.3.6
>> I don't recall if 2.3.6 was compiled with --enable-jit.
>
> iirc 2.3.6 was compiled with --enable-jit and I think you're saying
> that  will still work with 3.0

I prefer to have 3.0 compiled without JIT because most people won't use
it.  It's more fair.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Paolo Bonzini
In reply to this post by Tomi Neste

> Should --enable-jit work with 3.0?
> I recently tried that on Linux/ia32 and got some compile time errors. I
> can post a more detailed report if this is considered a bug.

I more or less fixed it in one of the last 2.95, but some bugs are
there.  It does not pass the testsuite.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Isaac Gouy
In reply to this post by Paolo Bonzini

--- Paolo Bonzini <[hidden email]> wrote:

> Isaac Gouy wrote:
> > --- Paolo Bonzini <[hidden email]> wrote:
> >
> >> Isaac Gouy wrote:
> >>> After a basic
> >>>
> >>> ./configure prefix=/opt/gst
> >>> make
> >>>
> >>> I measured the benchmarks game programs with 3.0 and noticed much
> >>> longer times compared to 2.3.6
> >> I don't recall if 2.3.6 was compiled with --enable-jit.
> >
> > iirc 2.3.6 was compiled with --enable-jit and I think you're saying
> > that  will still work with 3.0
>
> I prefer to have 3.0 compiled without JIT because most people won't
> use
> it.  It's more fair.

The Ruby guys have been toiling to implement JIT and you want to show
GST without JIT?




      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page.
http://www.yahoo.com/r/hs


_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re: GNU Smalltalk 3.0 released

Isaac Gouy
In reply to this post by Tomi Neste

--- Tomi Neste <[hidden email]> wrote:

-snip-
> Should --enable-jit work with 3.0?
> I recently tried that on Linux/ia32 and got some compile time errors.
> I can post a more detailed report if this is considered a bug.

Fails for me too.


./configure --prefix=/opt/gst --enable-jit
make

...
/bin/sh ./libtool --tag=CC --mode=link gcc  -g -O2 -Wall
-Wno-strict-aliasing -Wno-switch -fno-gcse -fstrict-aliasing
-Wdeclaration-after-statement -Wno-format -Wpointer-arith
-Wno-pointer-sign -Wwrite-strings    -o gst-tool -export-dynamic
gst-tool.o libgst/libgst.la -lm
gcc -g -O2 -Wall -Wno-strict-aliasing -Wno-switch -fno-gcse
-fstrict-aliasing -Wdeclaration-after-statement -Wno-format
-Wpointer-arith -Wno-pointer-sign -Wwrite-strings -o .libs/gst-tool
gst-tool.o -Wl,--export-dynamic  libgst/.libs/libgst.so -ldl -lreadline
/usr/lib/libgmp.so /opt/smalltalk-3.0/sigsegv/src/.libs/libsigsegv.so
-lc -lm  -Wl,--rpath -Wl,/opt/gst/lib
creating gst-tool
./gst --no-user-files --kernel-dir="/opt/smalltalk-3.0/kernel"
--image="/opt/smalltalk-3.0/gst.im" -iQ /dev/null
BlockClosure new "<-0x4df20da0>" did not understand selector #value:

(ip 22)OrderedCollection(SequenceableCollection)>>#do:
(ip 28)Array(SequenceableCollection)>>#replaceFrom:to:with:
(ip 18)OrderedCollection(Collection)>>#asArray
(ip 4)Class class(Behavior)>>#parseVariableString:
(ip 4)Class class(Behavior)>>#parseInstanceVariableString:
(ip 4)Class class(Behavior)>>#instanceVariableNames:
(ip 0)<bottom>
BlockClosure new "<-0x4df20da0>", 1, 1, 8, BlockClosure new
"<-0x4df20da0>"

/opt/smalltalk-3.0/kernel/Class.st:38: Aborted
(ip 22)OrderedCollection(SequenceableCollection)>>#do:
(ip 28)Array(SequenceableCollection)>>#replaceFrom:to:with:
(ip 18)OrderedCollection(Collection)>>#asArray
(ip 4)Class class(Behavior)>>#parseVariableString:
(ip 4)Class class(Behavior)>>#parseInstanceVariableString:
(ip 4)Class class(Behavior)>>#instanceVariableNames:
(ip 0)<bottom>
make[2]: *** [gst.im] Aborted
make[2]: Leaving directory `/opt/smalltalk-3.0'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/smalltalk-3.0'
make: *** [all] Error 2



      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 



_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk