Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have some way to save the REPL state of Common Lisp or Scheme?

Have some way to save the REPL state of Common Lisp or Scheme?

Thanks

like image 678
Luiz Siqueira Neto Avatar asked Oct 18 '10 14:10

Luiz Siqueira Neto


1 Answers

Most Scheme implementations compile to either C or some other intermediary format, so I know of none that provide for saving the current image state. Most will compile binaries though, so if that's what you're really after read your implementation manual.

Common Lisp, on the other hand, usually provided this in an implementation-defined way. SBCL has the previously mentioned save-lisp-and-die function, and CCL has save-application. These are the only two Lisps I use, so if you're using another implementation, be sure to check the documentation.

If you'd like a how-to to see how this is done, here's one for SBCL. For CCL, check out the Apple Current Converter example. The tutorial there finishes with example steps on how to save out the resulting app bundle.

Edit: here's another, easier example for SBCL.

like image 74
Shaun Avatar answered Sep 28 '22 18:09

Shaun