live icon indicating copy to clipboard operation
live copied to clipboard

mit

Open amirouche opened this issue 3 years ago • 6 comments

  • [x] hello schemer
  • [ ] hello schemer star
  • [ ] custom prefix installation
  • [x] docker
  • [x] checksum

amirouche avatar Nov 28 '21 16:11 amirouche

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 avatar Nov 29 '21 08:11 amirouche

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

amirouche avatar Nov 29 '21 12:11 amirouche

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.

lassik avatar Nov 29 '21 14:11 lassik

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

amirouche avatar Nov 29 '21 16:11 amirouche

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

amirouche avatar Nov 29 '21 16:11 amirouche

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

amirouche avatar Dec 03 '21 21:12 amirouche