scheme-live / live

Scheme library collection with yearly stable releases
https://scheme-live.github.io/live/
MIT License
16 stars 1 forks source link

mit #30

Open amirouche opened 2 years ago

amirouche commented 2 years ago
amirouche commented 2 years ago

hello-schemer-star does not work. It does not find (live hello) library, see:

% scheme-live mit run local/bin/hello-schemer
++ mit-scheme --batch-mode --prepend-library /home/amirouche/src/scheme/live/git/local/lib/ --load /home/amirouche/src/scheme/live/git/local/tmp/hello-schemer.MrQAwg.scm --eval '(exit 0)' --
Hello schemer!
% scheme-live mit run local/bin/hello-schemer-star
++ mit-scheme --batch-mode --prepend-library /home/amirouche/src/scheme/live/git/local/lib/ --load /home/amirouche/src/scheme/live/git/local/tmp/hello-schemer-star.9CSnsF.scm --eval '(exit 0)' --
;Unregistered import libraries: ((live hello))
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

2 error>
End of input stream reached.%
amirouche commented 2 years ago

MIT scheme has .sld files in the source tree, but I do not know how to use them.

lassik commented 2 years ago

Try ,help in the REPL. It shows this:

;,(import . import-sets)
;    Imports IMPORT-SETS into the current REPL environment.
;    Syntax is identical to that defined by R7RS section 5.2.

So you can type stuff like this: ,(import (scheme base)) -- note the comma.

You may have to (load "foo.sld") before importing foo. I'm not sure whether (or how) MIT Scheme finds R7RS libraries in the load path.

amirouche commented 2 years ago

Apparantly it is possible to turn a set of libraries into a package, that is done in mit-scheme test suite.

amirouche commented 2 years ago

I think, mit-scheme cli requires .sld to be compiled and part of a package, merely compiling the .sld is not enough.

amirouche commented 2 years ago

mit-scheme works, except it can not run the json tests suite, in branch amirouche-json, on ubuntu 20.04, try:

scheme-live mit install
scheme-live mit check