GNU Smalltalk is strange, once you’ve gotten accustomed to Squeak or VisualWorks.
GNU Smalltalk is not graphical and it actually does use files. As a result of using regular files, it uses a weird exclamation point syntax to separate logical items.
Installing on Ubuntu is easy:
sudo apt-get install gnu-smalltalk
Here’s a sample file, which is the bank account example from the tutorial. Incidentally, this page tells you to use:
Smalltalk snapshot: 'myimage.im' !
to save an image, but that no longer works. Instead, you should use:
ObjectMemory snapshot: 'myimage.im' !
The Ubuntu package is not without its problems. Looking at the FTP server, the Ubuntu package installs version 2.1.8, which is a fairly old version from June of 2004, while there is a 2.2 version that dates to November of 2005. I also could not get the graphical environment, called Blox, to work:
marc@tbird:~/gst$ gst-blox Loading package BloxTK Object: DLD error: requested module blox-tk was not found SystemExceptions.CInterfaceError(Exception)>>#signal SystemExceptions.CInterfaceError class(Exception class)>>#signal: DLD class>>#addModule: optimized [] in PackageLoader class>>#primFileInPackage: Set(HashedCollection)>>#do: PackageLoader class>>#primFileInPackage: optimized [] in PackageLoader class>>#fileInPackages: OrderedCollection(SequenceableCollection)>>#do: PackageLoader class>>#fileInPackages: PackageLoader class>>#fileInPackage: UndefinedObject>>#executeStatements /usr/share/gnu-smalltalk/browser/Run.st:44: invalid scope resolution marc@tbird:~/gst$ gst -V -K blox-tk/Blox.st Processing /usr/share/gnu-smalltalk/blox-tk/Blox.st Object: FileStream error: could not open BloxBasic.st SystemExceptions.FileError(Smalltalk.Exception)>>#signal SystemExceptions.FileError class(Smalltalk.Exception class)>>#signal: [] in Smalltalk.FileStream class(Smalltalk.FileDescriptor class)>>#open:mode: [] in Smalltalk.FileStream class(Smalltalk.FileDescriptor class)>>#fopen:mode:ifFail: Smalltalk.FileStream(Smalltalk.FileDescriptor)>>#fileOp:with:with:ifFail: Smalltalk.FileStream class(Smalltalk.FileDescriptor class)>>#fopen:mode:ifFail: VFS.RealFileHandler>>#open:mode:ifFail: Smalltalk.FileStream class(Smalltalk.FileDescriptor class)>>#open:mode: Smalltalk.FileStream class>>#fileIn: optimized [] in Smalltalk.UndefinedObject>>#executeStatements Smalltalk.Array(Smalltalk.SequenceableCollection)>>#do: Smalltalk.UndefinedObject>>#executeStatements marc@tbird:~/gst$ gst -V -K blox-tk/BloxBasic.st Processing /usr/share/gnu-smalltalk/blox-tk/BloxBasic.st 'C function tclInit not defined' 'C function Tcl_Eval not defined' 'C function Tcl_GetStringResult not defined' 'C function bloxIdle not defined'
So I went ahead and built the 2.2 version and lo and behold, I got Blox to work (it’s not as pretty as VisualWorks or Squeak but at least it gives you a Transcript, Workspace, Hierarchy Browser, etc.).
For the benefit of others, here’s gnu-smalltalk-2.2-1_i386.deb, (which I created with CheckInstall). Enjoy.