[Openmcl-devel] "Smalltalk Model" related questions

Dan Knapp dankna at accela.net
Tue Jun 1 21:59:39 UTC 2004


Sebastian,

   None of your questions, actually, are specific to OpenMCL.  The 
following
information holds for most Lisps.

   A Lisp image captures the entire state of a running Lisp process 
(except,
ordinarily, for open files and tcp connections).  In technical terms, 
it is a
copy of the contents of the heap.  Loading a saved Lisp image 
automatically
creates all the packages, functions, variables, and whatnot which 
existed at
the time it was saved.

   Because the image comprises the *entire* heap, you cannot load an 
image
into an already-running Lisp; if you could, you would lose all the 
packages,
functions, and variables which were in the already-running Lisp, 
because they
would be replaced with the saved ones.  Instead, you load it at the 
time you
invoke the Lisp process.

   Many Lisp implementations (all of them?) use a saved image, containing
the entire standard library, to boot themselves with.  Saved images can 
also
be created as a means of preloading some large library or a user
customization.


   It is sometimes possible to retrieve the source code for a function by
using the standard, portable function function-lambda-expression, ie,
(function-lambda-expression #'foo).  However, implementations are
permitted to discard the source code if it is inconvenient for them to
keep it around, and most (all?) implementations discard it at the time
a function is compiled.

   This is in no way as powerful as Smalltalk's development environment,
which is integrated with its runtime system.

   There is no way, without writing code which inspects the internals of
the system, to look up functions or methods by the classes of their
parameters.

   There's not particularly a Lisp equivalent of the Smalltalk way of 
doing
things; I'm not aware of any language not a dialect of Smalltalk which 
has
a system like that.  However, there are two different Emacs packages,
iLisp and Slime, which provide some level of integration.  Slime is the 
one
which aspires to do the sort of thing you're talking about.  You could 
look
into those.


-- Dan Knapp




More information about the Openmcl-devel mailing list