Thursday, June 22, 2006

Little Smalltalk for Minix 3

I've compiled Little Smalltalk version 4.5 to run under Minix 3. This version of Little Smalltalk is written in C and modified by Andy Valencia and Kyle Hayes to add additional functionality. From the Little Smalltalk site:
Little Smalltalk is a sort of fun experiment in building a minimal smalltalk system. The source code for the interpreter is less than 1800 lines of code. The image consists of less than 4000 objects. It runs in almost no memory. In short, it's small, it's reasonably fast, it's easy to understand, and easy to modify.

This version, thanks to Kyle, includes a Class Browser with a web based GUI. Using your browser, connect to the running Little Smalltalk instance and you can browse classes and methods. You can even modify methods through the web interface on the fly.

I modified the source slightly to compile under Minix. I'll revisit the changes in a week or so to tidy it up so it still builds and runs under the original platforms. In the meantime though you can download:

To build from source, make sure you have GNU gcc installed and in your PATH:
export PATH=/usr/gnu/i386-pc-minix/bin:/usr/gnu/bin:$PATH

Run 'gmake' from within the lst-4.5 directory to create the 'st' executable, and then from within the 'ImageBuilder' directory to create the Smalltalk image.

To run, from within the lst-4.5 directory, run 'st'. To start the web based class browser follow this example (key in the red text):
$ ./st
3227 objects in image
-> File fileIn: 'classbrowser.st'.
method inserted: subclass:variables:classVariables:
method inserted: from:to:
method inserted: position:
...
method inserted: showErrorOn:
method inserted: start
method inserted: startOn:
file in completed
-> HTTPClassBrowser new start.
Socket: 3
IP: 0.0.0.0
Port: 6789

If you now visit http://machinename:6789/ you will be able to access the class browser. There being no GUI web browser for Minix you'll probably want to do this from some other machine, replacing 'machinename' with the name or ip address of the Minix machine. It does work with Lynx running under Minix but the text based interface is not pleasant as it uses frames. Also note that the class browser is listening on any incoming ip address so make sure port 6789 is not accessable from people you don't trust.

It's not Squeak, but it's still fun to play with.

Categories: , ,

2 Comments:

Anonymous Anonymous said...

Glad you ported it. What parts were particularly Linux-specific? I want to make it as generic as possible.

I now have a 64-bit laptop and will be trying to port LST 4.5 to that sometime soon.

Someday I want to add a transcript window and object inspectors. That will be a while though.

Best,
Kyle

2:30 PM  
Blogger Chris Double said...

Thanks Kyle. It was mainly the socket routines if I recall correctly. Minix doesn't have some defines, etc. I'll package up a patch and send them on.

Chris.

6:40 PM  

Post a Comment

<< Home