How to Use the RScheme Library
What is the RScheme Library?
RScheme is divided into three main sections:
- the
base system , - the
packages , and - the
library .
The first two come as part of the generic source distribution. The last is a separate source distribution, although it may be included in some binary distributions.
The
The
The
What is in the Library?
See the RScheme Library Table of Contents for
a complete listing. The dependencies between the modules in the
library are drawn here, except for
rs.util.msgs and rs.util.properties
which almost everything depends on.
Installing the Library
First, obtain the library distribution (e.g., from the 0.7.3.3-b25 build)
Unpack it into a convenient location. RScheme by default will look for modules it doesn't already know about in ~/lib/rs/modules. So here's a good way to install it:
$ mkdir -p ~/lib/rs $ cd ~/lib/rs $ tar xvzf /tmp/rs-0.7.3.3-b25-lib.tar.gz $ ln -s rs-0.7.3.3-b25-lib modules
Setting up a soft link from ~/lib/rs/modules to the actual library tree is a convenient way to switch out which version of the library you're point to.
Some of the modules will be immediately usable once the library has been installed like this. The Library Table of Contents indicates which modules require glue code. Those that do not should be usable right away.
Compiling the Library
For best results, the library can be loaded into a fast-loading
RScheme image. The Makefile that is included loads a large portion of
the library (though not all) and produces a fast-loading image
(.fas). In fact, the fshell executable
looks make install target of the library produces (only
if that image is not found does fshell load
[resource]/fshell.orig.fas.)
Continuing with the example above...
$ cd ~/lib/rs/rs-0.7.3.3-b25-lib $ ./configure --with-rs=/usr/local/lib/rs/0.7.3.3-b25u/bin/fshell $ make $ make install
Performing this step incorporates in the dynamic C code generator
which is located in the library module rs.backend.c. The
dynamic C code generator allows define-glue to be used
interactively and in new loaded modules, which is important for many
of the other library components such as
rs.sys.compression, which defines interfaces to
the native zlib library.
By the way, if you wind up trying to load something that needs define-glue but the dynamic C code generator isn't available, this is the error you get:
error: special-form description `*not-available*' unknown