【问题标题】:How to load the slib library in chez scheme?如何在 chez 方案中加载 slib 库?
【发布时间】:2023-03-10 09:35:02
【问题描述】:

如何在chez scheme中加载slib库?

或任何其他用于 chez 方案的 Web 服务器库?

slim 的说明书上写着:

  1. 配置方案实现以定位 SLIB 目录和实现目录。
  2. 安排每个 Scheme 实现加载其 SLIB 初始化文件。
  3. 为每个方案实施构建 SLIB 目录。

我不知道具体怎么做第 3 步和第 4 步。

如果我在文档 slib 中运行“chez”,这就是我得到的结果:

> (load "require.scm")
Exception: variable slib:features is not bound
Type (debug) to enter the debugger.
> (load "chez.init")
> (require 'http)
Exception in call-with-output-file: failed for /usr/local/lib/chez/slibcat: no such file or directory
> (require 'http-cgi)
Exception in call-with-output-file: failed for /usr/local/lib/chez/slibcat: no such file or directory
Type (debug) to enter the debugger.
> (load "http-cgi.scm")
Exception in call-with-output-file: failed for /usr/local/lib/chez/slibcat: no such file or directory

【问题讨论】:

    标签: scheme lisp chez-scheme


    【解决方案1】:

    首先,获取zip文件。

    然后,作为根:

    • 创建目录/usr/local/lib/chez
    • 将压缩文件复制到/usr/local/lib
    • 解压压缩包
    • 开始切斯
    (load "/usr/local/lib/slib/chez.init")
    (require 'new-catalog)
    

    作为普通用户:

    (load "/usr/local/lib/slib/chez.init")
    

    【讨论】:

      【解决方案2】:

      你有这个错误

      Exception in call-with-output-file: failed for /usr/local/lib/chez/slibcat: no such file or directory" 
      

      因为您没有先启动 SLib 目录 您可以通过在 repl 中首先运行它来做到这一点:

      (require 'new-catalog)
      

      【讨论】:

      • > (load "chez.init") > (require 'new-catalog) call-with-output-file 中的异常:/usr/local/lib/chez/slibcat 失败:没有这样的文件或目录
      • 你需要配置chez.init到你的系统变量,srfi-96可以帮助理解需要:srfi.schemers.org/srfi-96/srfi-96.html
      • 您能告诉我如何使用 chez 方案配置 slib 吗?谢谢
      猜你喜欢
      • 2013-11-06
      • 2012-01-04
      • 1970-01-01
      • 2012-08-30
      • 2020-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-24
      相关资源
      最近更新 更多