我是 lisp 的初学者,有一个问题。 当我直接在 REPL 中编写一些代码时(没有任何 .lisp 文件!),我如何保存我的解释器的工作/状态以便下次恢复它并继续工作?
(我正在使用 ECL)
谢谢!抱歉我的英语不好 ;)
最佳答案
来自ECL manual :
Tratidionally, Common Lisp implemenations have provided a function to save the dump all data from a running Lisp process into a file. The result was called the Lisp image and could be shipped to other version compatible implementations.Nowadays, having less control of the systems it runs in, a Lisp implementation must work very hard to dump memory images and be able to load and execute them afterwards.
ECL has chosen to avoid this process entirely. Instead, we conceive five different portable models for building and shippin your programs. The models, described in Table 1.1, enumerate the different kinds of files that ECL can portably produce. To get one or more of the products mentioned in the table, you may resort to a low level API described in Part III. However, we recommend a simpler way based on using System Definition Files to describe the structure of your project and let ECL build the desired target for you. This approach is described in the following sections.
(强调我的)看来,您对 ECL 的运气不佳。然而,CLISP , CCL , 和 SBCL支持此功能,因此如果您需要它并且可以选择切换...请尝试其中一个。
关于image - 保存 lisp 状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7686246/