3

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
kelvin
  • 1,421
  • 13
  • 28
guenchi
  • 61
  • 6

2 Answers2

0

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)
Samir
  • 183
  • 1
  • 6
  • > (load "chez.init") > (require 'new-catalog) Exception in call-with-output-file: failed for /usr/local/lib/chez/slibcat: no such file or directory – guenchi Oct 27 '17 at 21:26
  • you need to configure chez.init up to your system variables, srfi-96 can help understanding the required: https://srfi.schemers.org/srfi-96/srfi-96.html – Samir Oct 28 '17 at 13:31
  • 1
    would you tell me how to configure the slib with chez scheme? thx – guenchi Oct 28 '17 at 19:28
0

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")
kelvin
  • 1,421
  • 13
  • 28