[CM] Saving entire state of the intrepreter?

Iain Duncan iainduncanlists at gmail.com
Wed Aug 12 15:05:11 PDT 2020


I figured it might be potentially useful to describe what I'm hoping to do.
I want to make a sequencing engine capable of sequencing deferred
function calls, which is not hard to do when the interpreter is loaded as I
can store lists in some structure that the clock part traverses. But I'd
like it to be possible for a user at a repl to do something like insert an
anonymous function on the timeline in order to make closures around other
bits of state and have them captured for execution in a loop or whatever.
So the tricky bit is how to store this such that one could close the
session and reopen it, restoring those anon functions in their lists. So I
guess this would mean being able to restore the environment and any
function defs in that env.  I think in common lisp this is called saving
lisp images?

One possibility I thought of in case storing state like that just not
practical would be to have some mechanism where the repl events could be
replayed from a log, but I would think the ability to save the interpreter
would be better.

thanks
iain

On Wed, Aug 12, 2020 at 11:50 AM Iain Duncan <iainduncanlists at gmail.com>
wrote:

> Thanks Bill, I'd certainly be interested in hearing your thoughts on it.
>
> iain
>
> On Wed, Aug 12, 2020 at 11:48 AM <bil at ccrma.stanford.edu> wrote:
>
>> There isn't a built-in way to save s7's state.  I don't know
>> how CL does it (unexec?), but I read recently (emacs 27 NEWS,
>> I think) that emacs has abandoned unexec (does it use pdumper?).
>>
>> To write out everything in s7 as a scheme file -- I need to
>> think about it -- it doesn't immediately strike me as impossible...
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20200812/ca3b85f6/attachment.html>


More information about the Cmdist mailing list