- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
运行 #'cl-state-machine-examples/tamagochi:run
完全没问题,
但是生成的可执行信号SIMPLE-ERROR
是这样的:
建成:https://github.com/ageldama/cl-state-machine/releases/tag/fail-sbcl-slot-value
然后我得到:
$ ./tamagochi.exe
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {10005384C3}>:
When attempting to set the slot's value to 5 (SETF of SLOT-VALUE), the slot
MONEY is missing from the object
#<CL-STATE-MACHINE-EXAMPLES/TAMAGOCHI::TAMAGOCHI-STATUS {1001B7B9B3}>.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit from the current thread.
((:METHOD SLOT-MISSING (T T T T)) #<unused argument> #<CL-STATE-MACHINE-EXAMPLES/TAMAGOCHI::TAMAGOCHI-STATUS {1001B7B9B3}> MONEY SETF 5) [fast-method]
0]
使用:
Uname -a : Linux arch-desktop 5.3.11-arch1-1 #1 SMP PREEMPT Tue, 122019 年 11 月 22:19:48 +0000 x86_64 GNU/Linux
https://github.com/ageldama/cl-state-machine/releases/tag/fail-sbcl-slot-value
两者都是为了: - sbcl-1.5.0-x86-64-linux 和 sbcl-1.5.9-x86-64-linux/
构建日志是:
This is SBCL 1.5.9, 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.
WARNING: redefining UIOP/PACKAGE:FIND-PACKAGE* in DEFUN
...CUT...
WARNING: redefining UIOP/BACKWARD-DRIVER:VERSION-COMPATIBLE-P in DEFUN
[undoing binding stack and other enclosing state... done]
[performing final GC... done]
[defragmenting immobile space... (fin,inst,fdefn,code,sym)=1062+946+18321+18719+25423... done]
[saving current Lisp image into /home/jhyun/P/cl-state-machine/tamagochi.exe:
writing 0 bytes from the read-only space at 0x50000000
writing 432 bytes from the static space at 0x50100000
writing 27852800 bytes from the dynamic space at 0x1000000000
writing 2011136 bytes from the immobile space at 0x50300000
writing 12144640 bytes from the immobile space at 0x52100000
done]
提前致谢!
最佳答案
我的猜测是您的 keyword->symbol
函数实习到错误的包中,因为那里的 read
是从另一个包执行的:
(defun keyword->symbol (kw-or-symbol)
(with-input-from-string (s-in (string kw-or-symbol))
(read s-in)))
我会使用 intern
来创建符号:
(defun keyword->symbol (kw-or-symbol)
(intern (symbol-name kw-or-symbol)
#.*package*))
#.*package*
构造在读取时给出 *package*
的值,即。 e.当读取上面的函数形式时。
关于common-lisp - SBCL 内置可执行文件 : "When attempting to set the slot' s value to XXX (SETF of SLOT-VALUE), 对象中缺少插槽 YYY”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59123553/
我是一名优秀的程序员,十分优秀!