Squeak (file system & project structure) newbie questions

Jecel Assumpcao Jr jecel at merlintec.com
Mon Oct 24 02:38:27 UTC 2005


Unnsse wrote on Date: Sun, 23 Oct 2005 17:01:50 -0700
> What is an image, by the way? Is it the actual virtual machine or is  
> it synonymous
> with Java .class files that get loaded by a ClassLoader, in a JVM?

There really isn't anything like it on the Java side. It is like the
"core" files that Unix generates when a task runs into some serious
error or receives a certain signal. You can restart the program from
that point later on (in a debugger for the case of an error). Or think
of the "sleep mode" in most laptops. Other languages that normally work
this way are Forth and APL and it is a popular option for Lisp.

The problem with images is that they are self contained and isolated
worlds. So if you have one and I have one it isn't easy to move stuff
from one to the other.

> Why aren't images placed along with the .pr files (do the .pr files  
> contain images)?

Project files are an attempt to attack the problem I mentioned above.
They contain a small fraction of an image that can be saved separately
from the rest and then loaded into an entirely different image. The
great advantage is that they can include an arbitrary set of objects so
it is easy to send some drawing you have made or some sound you
recorded.

Most people on this list don't use projects (which the eToys people
love) but prefer more limited alternatives that are closer to
traditional systems (code only).

The oldest system was just pointing to some class or group of classes in
a browser and selecting "file out" from the menu to generate a .st file.
>From another image you can select this file and do "file in".

After that the change set system was created which grouped code into
logical units other than classes. Normally you would start out with a
new, empty change set and then just work normally with all new code
getting recorded there. You can save it as a .cs file (with the same
format as a .st one) and then install it or file it in some other image.

These are all source code formats and some experiments were done with
binary formats (other Smalltalks have them, like Parcels in VisualWorks
for example) but I suppose there is not much this would get you that
projects don't do better. There is also the options of combining one or
more change sets into a single zip file for convenience.

Currently, the most popular option is Monticello which keeps track of
packages and versions.

A better option is to skip files entirely and instead have live images
talking to each other and negotiating transfer of objects between them,
which is where Craig's Spoon project is going. So if you think images
are strange, you haven't seen anything yet ;-)

-- Jecel



More information about the Squeak-dev mailing list