Double-clickable app proposal

Ian Piumarta piumarta at prof.inria.fr
Tue Feb 3 22:13:53 UTC 1998


> Though I don't know all the details, I'm pretty sure that Python creates
> double-clickable apps in just this way.  I remember a command in Python
> called "freeze" that would "pickle" (serialize) the state of a set of
> Python objects and concatenate it on the end of an executable (or maybe
> just prepare it to be compiled into an executable -- I'm fuzzy on the
> details) to create a standalone application file.

Might this be related to the gnu "undump" (I think that's what it's
called, but it's all part of my ancient history ;) facility?  This is
used, for example, to bootstrap Emacs.  Emacs starts life as an "empty"
(glorified) lisp interpreter into which a whole bunch of lisp is loaded
to define the basic editing functionality.  The bootstrap then calls
"undump" which writes something (almost but not quite entirely un)like a
"core" file -- except that this "core" file has the rather interesting
property that it can be rerun like a regular program, and it continues
execution from an arbitrary function (specified at dump time).

Can you say "snapshot for Unix binaries"? ;)

The only problem with adapting this for use with Squeak (in Unix) would
be restoring the X display state, but I'm not sure that it would be too
difficult.  The net effect would be that the entire running process (VM
plus the entire state of the object memory) is saved as a binary image
than can be started "in one" like a monolithic application (with no
separate image file -- although issuing a snapshot from the UI would
still create a regular snapshot from such a restarted "frozen" process).

I've used precisely this technique in the (distant) past in lisp systems,
for making executable "snapshots" that include the lisp VM and an
initialised heap all in the same binary file, and it works rather well.

Note that I'm *not* advocating this approach for Squeak -- it's far more
adapted to the kinds of system (like Emacs and similar lispy things) that
bootstrap themselves by loading a significant amount of low-level code
just in order to get into a usable/useful state (because this would be an
unacceptable overhead if it were necessary each time the program
started).  I think that simply saving an "interpreter name" in the start
of the image (as "#!SqueakVM", for example) is a *far* better approach.

(I won't [and indeed couldn't] try to speak for any other architecture on
this topic.)

Ian





More information about the Squeak-dev mailing list