Go back to last state

后端 未结 2 859
不知归路
不知归路 2021-01-25 10:15

Is there a way to go back to last state of the runtime? In short, save the runtime and reload it. But the core image is too big (I\'m making a small game :-), so I come up with

相关标签:
2条回答
  • 2021-01-25 10:25

    How this works depends on the Common Lisp implementation. Consult the manual:

    • Clozure Common Lisp -> Saving Applications
    • SBCL -> Saving a Core Image
    • LispWorks -> Save Image
    • CLISP -> Saving an Image

    • several other implementations ...

    0 讨论(0)
  • 2021-01-25 10:41

    You might want to try implementing Alex Warth's Worlds (chapter 4 of his thesis). This would allow you to "sprout" a new World, run your computation in it, and either periodically commit the changes in the child world to the parent world, or abort and roll back to the parent's state. This is like an infinite undo, but you can sprout multiple worlds/chains of undo.

    0 讨论(0)
提交回复
热议问题