Closed bentxt closed 1 year ago
That's strange...
~/Workspace/ol.git$ sudo make uninstall
rm -rf /usr/bin/ol
rm -rf /usr/bin/olvm
rm -rf /usr/lib/libol.so
rm -rf /usr/lib/ol/repl
rm -rf /usr/lib/ol
rm -rf /usr/include/ol
rm -rf /usr/share/man/man1/ol.1.gz
~/Workspace/ol.git$ sudo make install
# install Ol executable(s) to /usr/bin:
Installing main binary...
install -d /usr/bin
install ol /usr/bin/ol
Installing ol virtual machine binary...
install -d /usr/bin
install vm /usr/bin/olvm
Installing libol.so...
install libol.so /usr/lib/libol.so
Installing headers...
install -d /usr/include/ol
install -m 644 includes/ol/vm.h /usr/include/ol/vm.h
install -m 644 includes/ol/ol.h /usr/include/ol/ol.h
# and libraries to /usr/lib/ol:
Installing basic libraries...
cd libraries && find * -type d -exec install -d "{}" "/usr/lib/ol/{}" \;
cd libraries && find * -type f -exec install -m 644 "{}" "/usr/lib/ol/{}" \;
# install Ol binary REPL to /usr/lib/ol:
Installing REPL...
install -d /usr/lib/ol
install -m 644 repl /usr/lib/ol/repl
Installing man page...
install -d /usr/share/man/man1
gzip <ol.1 >/usr/share/man/man1/ol.1.gz
Ok.
~/Workspace/ol.git$ ./ol
Welcome to Otus Lisp 2.3.9-3574-5707caf6
type ',help' to help, ',quit' to end session.
> (import (scheme srfi-170))
> ;; Library (scheme srfi-170) added
> ;; Imported (scheme srfi-170)
>
I'll recheck with fresh new VM.
It works under fresh new VM without any changes.
@bentxt, try to make uninstall; make install
.
OR
./ol --home=`pwd`/libraries
in the Ol repository to test.
In Scheme we generally use (import (srfi 170))
. RnRS reserves the (import (scheme <...>))
library namespace for itself. What's the rationale for diverging from this convention?
What's the rationale
Historical reasons. I haven't seen any srfi location standard, but you'r right I think... Hmmmm.
(srfi srfi-1)
(srfi 1)
srfi-1
(srfi 1)
(srfi 1)
(srfi :101)
(runtime srfi-1)
srfi/1
(srfi 1)
Which one is better? ))
It's kind of obscure, but R7RS section 5.6.1 Library Syntax says:
Libraries whose first identifier is
scheme
are reserved for use by this report and future versions of this report. Libraries whose first identifier issrfi
are reserved for libraries implementing Scheme Requests for Implementation.
This is the (srfi 1)
form that all R7RS implementations now use. (Guile was the last holdout, but (import (srfi 1))
now works in Guile 3.0.9.)
,(import (srfi 1))
with the comma. It should work.chicken-install r7rs && csi -R r7rs
and (import (srfi 1))
.chez-srfi
. The syntax then is (import (srfi :1))
. The is :
a hack due to a limitation in the R6RS standard that library name parts cannot be numbers.Libraries whose first identifier is
srfi
are reserved for libraries implementing Scheme Requests for Implementation.
Ah, I see!
Thank you. I'll update provided Ol's srfi implementations according to R7RS.
Excellent. Thank you very much!
(import (scheme srfi-170))
works fine.
(import (srfi 170))
works fine.
Closing. Feel free to open new one if needed.
In a gitter thread in Jan 19 2023
Unfortunately I cannot import this
The import works for other srfis.