2
votes

How to load the slib library in chez scheme?

Or any other web server library for chez scheme?

On the manual of slim it says:

  1. Configure the Scheme implementation(s) to locate the SLIB directory and implementation directories.
  2. Arrange for each Scheme implementation to load its SLIB initialization file.
  3. Build the SLIB catalog for each Scheme implementation.

I don't know how to do specially the steps 3 and 4.

This is what I get if I run "chez" in the document slib:

> (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
2

2 Answers

0
votes

you have this error

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

as you didn't initiate SLib Catalog first you can do this by running this first in repl:

(require 'new-catalog)
0
votes

Firstly, obtain the zip file.

Then, as root:

  • Create the directory /usr/local/lib/chez
  • Copy the zip file into /usr/local/lib
  • Unzip the zip file
  • Start Chez
(load "/usr/local/lib/slib/chez.init")
(require 'new-catalog)

As a normal user:

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