More fun with VMs [was: Re: Bug: Use of == ...]

Dan Ingalls Dan at SqueakLand.org
Tue Feb 14 20:25:21 UTC 2006


stéphane ducasse <ducasse at iam.unibe.ch>  wrote...

>this is really nice to see coming back to real life :).
>Can you tell us a bit more about this new VM?
>How does it relate to pepsi?

This one doesn't relate to pepsi (for folks not aware of it, "pepsi" refers to one of Ian Piumarta's designs for a small dynamic kernel), but I hope that it has prepared me to do some related experiments.  As you know, I am at Sun now where "curly brace" languages are still the rule, but I want to keep experimenting with dynamic systems, thin clients, and the like.

I got inspired by a project that Helge Horch did, reviving an old St-78 image on top of Java (not the one he showed at ESUG).  The thing actually runs very nicely (much faster than the original Notetaker), and fits in a .jar file that is under 200k including both image and interpreter.  I think Helge will release this in the not-too-distant future, but he likes things to be really right, and he's currently over-busy, so it may be a few months yet.  It is a gem, both for this compactness and performance, and also because, language-wise, it is a living Smalltalk-76.

Helge preserved all the 16-bit oops, object table, and reference-counting aspects of St-78 VM, but I was inspired by the performance and simplicity of riding on top of Java.  It blew my mind that with this modest attachment, you could have Smalltalk live on a web page.

So, in order to learn Java, and the Java development environments, I am writing a Squeak in Java.  The image I am using is the Mini2.1 -- the one with browser, debugger and decompiler with temp names, all in 600k.  The interpreter runs now (15,000 bytecodes executed), and I am currently working on BitBlt (the story of my life ;-).  The interpreter is not just a transcription of the Squeak reference interpreter.  Instead (like Helge's), it uses Java objects for the objects, and thus can let Java take care of all the storage management.  I've figured out a way to preserve enumeration and mutation, so it ought to be a pretty compatible implementation when it's done.

I don't know where this will go.  I think it would be fun to take that base and strip it down to just the kernel and then hook it up to some modern web-based graphics, network and database APIs.  For now my goal is to get the original artifact going.  Then, hopefully we could all have fun taking it in other directions.

	- Dan



More information about the Squeak-dev mailing list