小编Oli*_*Cox的帖子

SBCL 中不存在“UIOP”包,有人可以帮我找到吗?

我想知道您是否可以帮助解决我在 SBCL 中遇到的错误。我正在做一个教程,第一课就是将脚本加载到 LISP 中。这是名为 hello.lisp 的脚本:

(defun hello ()    
      "say hello to USER"    
      (format t "hello ~a" (uiop:getenv "USER")))    
(hello)
Run Code Online (Sandbox Code Playgroud)

但是当我运行命令:(加载“hello.lisp”)时,出现以下错误:

debugger invoked on a SB-C::INPUT-ERROR-IN-LOAD in thread
#<THREAD "main thread" RUNNING {1000510083}>:
  READ error during LOAD:

    Package UIOP does not exist.

      Line: 3, Column: 36, File-Position: 74

      Stream: #<SB-INT:FORM-TRACKING-STREAM for "file /home/oliver/Programs/hello.lisp" {10015403F3}>

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Abort loading file "/home/oliver/Programs/hello.lisp". …
Run Code Online (Sandbox Code Playgroud)

lisp sbcl common-lisp

4
推荐指数
1
解决办法
760
查看次数

如何避免 Common Lisp 中 (read) 中的包/字符错误?

当我尝试使用输入字符串时,出现一些令人惊讶的错误(read)。上下文:我正在构建一种迷你语言,输入使用 {、}、: 等字符分隔。

下面是发生的情况,我运行(read)并输入{9.I:{8.II:hello}{8.III:hi}}(来自我的迷你语言的示例输入字符串)。

然后我得到 2 个错误:

1:

too many colons in "{8.II"

2:

Package HELLO}{8.III does not exist.

似乎函数中发生了一些额外的事情(read)让我绊倒。有人能指出我正确的方向吗?

lisp sbcl common-lisp

1
推荐指数
1
解决办法
85
查看次数

标签 统计

common-lisp ×2

lisp ×2

sbcl ×2