On May 31, 2009, at 5:07 AM, Grant Rettke wrote:

On Thu, May 14, 2009 at 3:07 AM, Eduardo Cavazos <[email protected]> wrote:
Sometimes your hacking data at the REPL and get the live system in a state that takes alot of work to reproduce. It would be nice if the user could "rewind" back to any previous state of the repl; this state would include
the global environment.

Interesting. Had anyone replied to this? Has this been done in other languages?

The "state of the repl" and "the global environment" can be one of many
things.  Is it the names of bindings in the repl, or their locations,
or their values, or their memory content?  What about other things that
could-but-should-not (also should-but-could-not) be rewound?

[Aside: in a previous incarnation of ikarus (when it ran only on the
powerpc), it used to have (save-continuation k filename) where it would
grab everything in the heap (and everything was in the heap) reachable
by k and stores it in a file.  Later, you start ikarus with the saved
heap and you're back where you were.  This was actually the only way I
could upgrade ikarus: load an exiting heap, mock around with it, and
save it again.  Bootstrapping was "in-core": you just load the new
version of the compiler and run-time procedures (overwriting existing
ones), save the heap, and you have a new version.  This is how many
smalltalk and lisp systems worked in the early days, so, it was not
revolutionary or anything; as a matter of fact, it was backwards.

To cut the story short, the next ikarus did not have that misfeature.
Everything has to be built from sources, and everything built from
source has to be sealed and only a small part of it exposed so that
I don't accidentally trip on data that's ikarus's and not mine.
Bootstrapping should not depend on whether the build script is running
compiled, interpreted, debugged, optimized, in ikarus, or outside of
it (given enough compat libraries).  This was hard to do, but in the
end, it relieved most of the headache in the previous system and it
allows me to do things that I could not possibly have done before.

In short, I've had enough trouble already with "live" systems (where
you cannot easily restore the system to some desired state, as the
assumption is in the original post) to give them much consideration
anymore.  Nowadays, I just put everything in a script and run it
from the terminal and if it prints "Happy Happy Joy Joy", I know
everything is good. :-)]

Aziz,,,

Reply via email to