我正试着用“通用Lisp:符号计算的温柔入门”一书来学习Common。此外,我正在使用SBCL,Emacs,和泥。
在第九章的最后,作者展示了运球工具。他展示了以下情况:


我试图复制作者提出的命令。考虑到输入,唯一的区别是我放置了一个不同的位置来保存文件。在我的环境中,我做到了:
CL-USER> (dribble "/home/pedro/miscellaneous/misc/symbolic-computation/teste-tool.log")
; No value
CL-USER> (cons 2 nil)
(2)
CL-USER> '(is driblle really working?)
(IS DRIBLLE REALLY WORKING?)
CL-USER> "is dribble useful at all?"
"is dribble useful at all?"
CL-USER> (dribble)
; No value该文件确实是创建的:
$ readlink -f teste-tool.log
/home/pedro/miscellaneous/misc/symbolic-computation/teste-tool.log注意,在我输入时,我没有在REPL中得到诸如“现在记录在文件中--位置--”之类的消息。但这可能因Lisp实现不同而有所不同。
令人惊讶的是,不幸的是,文件是空的。因此,运球不像预期的那样有效。
我做错什么了吗?
发布于 2021-06-05 06:44:25
中工作。
➜ sbcl
This is SBCL 2.0.1.debian, an implementation of ANSI Common Lisp.
More information about SBCL is available at <http://www.sbcl.org/>.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
* (dribble "dribble-test.lisp")
* (* 8 5)
40
* "Will this work?"
"Will this work?"
* (dribble)
* %这一点可以证实:
➜ cat dribble-test.lisp
* (* 8 5)
40
* "Will this work?"
"Will this work?"
* (dribble)中选择函数或表达式或区域来完成的。
要在Slime中实际保存和查看历史记录,请参阅
,甚至可以从独立Repls合并历史记录
https://stackoverflow.com/questions/67845647
复制相似问题