Putting the 9 in S9FES
Scheme 9 from Empty Space (s9fes) is a work-in-progress implementation of Scheme, only experimentally ported to Plan 9. The compilation is simple enough, issuing ‘mk’ in the root source directory. However, properly making use of all of the libraries it comes with requires five minutes of configuration.
For the sake of organisation,
term% mkdir $home/path/to/s9fes/sys # a rose by any other name... term% cp $home/path/to/s9fes/s9.^(scm image) $home/path/to/s9fes/sys term% mkdir $home/lib/s9fes
then making use of such, we do the following because s9fes uses environment variables, in the spirit of modern UNIX, to find its essential files (i.e., libraries and images):
term% echo '#!/bin/rc s9inst=$home/path/to/s9fes for(i in lib contrib sys) bind -a $s9inst/$i $home/lib/s9fes S9FES_LIBRARY_PATH=$home/lib/s9fes $s9inst/s9' > $home/bin/rc/s9 term% chmod +x $home/bin/rc/s9
and invoke the script s9 for actual use. Aside from the creation of lib/s9fes, which is a trade-off for organisation, this configuration is noninvasive and upgrade withstanding, for use until the Plan 9 port is finalised.
N.B.: In the above script, it might be necessary to define LIBDIR=$S9FES_LIBRARY_PATH – on modern UNIX systems, $S9FES_LIBRARY_PATH is a colon-separated list of paths containing scm and image files for s9fes, while $LIBDIR is the specific system-wide copy of s9fes/lib. On Plan 9, however, we don’t require the distinction due to the use of binds (and all library file names have to be distinct anyways, due to the way they are loaded from within s9fes).
To post a comment you need to login first.