lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Feb 11, 2010 at 8:04 PM, Florian Weimer <fw@deneb.enyo.de> wrote:
> Matz attributes much of the success of Ruby (compared to Smalltalk) to
> the decision to give up the image.  I find this a remarkable insight,
> and I think it's likely true.

I wonder if this is an all-or-nothing situation. When working on
UnderC (which was my educational C++ interpreter) I realized that we
are constrained by our production model; the compiler generates an
executable for both working and production versions, the difference is
just debug/optimization flags.  In the UnderC case, it was very
liberating to have an incremental compilation model (functions used
indirect references so it was possible to recompile individual
functions)

Incremental compilation has always been one of the opportunities of
dynamic languages.  In Lua, it isn't always so simple because the
function you wish to recompile may have upvalues, and some clever
environment hacking is needed to preserve the semantics.

When all your scripts have loaded, you have an image, which can be
interrogated and modified. Any changes to the scripts are mirrored in
the image.[1]  The challenge is to keep the image running as long as
possible, to operate 'live' on the patient.  This model is
particularly suited for event-driven applications like GUIs and Web
apps.

But the image itself is not persistent, that's important.

steve d.

[1] this is the hard bit, and isn't always possible.