Sassy ships with support for the following Scheme interpreters (with the indicated minimal version number):
PLT Scheme: mzscheme (>= v299.400)
Chicken: csi (>= v2.2 with libffi support, and syntax-case and numbers eggs installed)
Gauche: gosh (>= v0.8.5)
Scheme48: scheme48 (v1.3)
SCM: scm (v5e1 with SLIB v3a2)
Guile: guile (>= v1.7.91)
Sassy was developed on GNU/Linux, though since Sassy is embedded in Scheme, Sassy should (theoretically) run everywhere Scheme does. If you are running Scheme on a non *nix box, (Windows, for instance), you may want to grab the .zip archive instead of the .tar.gz.
$ means a shell prompt,
> means a Scheme prompt.)
Sassy is available as an egg, so the easiest way to install (and compile) Sassy is to do:
$ chicken-setup sassy
Users report that it is sometimes necessary to use the
-split option when building Sassy for Chicken on machines with low memory. For example, using
> (compile sassy-chicken.scm -o sassy.so -s -O2 -d1 -split 8 -C -time -C -Os)
The setup file for building Sassy for Chicken is
sassy.setup in Sassy’s distribution directory. If you don’t want to compile Sassy (it can take a while), see below.
Starting with version 0.2, Sassy now includes module definitions for Scheme48’s module system.
First unpack the archive, change directories, and load scheme48 with a fairly large heap:
$ tar xfz sassy-0.2.tar.gz; cd sassy-0.2 $ scheme48 -h 6000000
> ,config ,load sassy-48.scm > ,open sassy
To start up Sassy, unpack Sassy’s distribution directory and enter it:
$ tar xfz sassy-0.2.tar.gz $ cd sassy-0.2
Now you have to edit one line in the file
sassy.scm. At the top
of the file, un-comment the line that loads the initialization file
for the Scheme interpreter you want to use, and comment out the
others. Then quit your editor and start the Scheme interpreter. Gauche
users should start gosh with
gosh -I. in order to add the
current directory to gosh’s load-path.
> (load "sassy.scm")
Loading all the source files may take a few seconds. When your Scheme prompt returns, Sassy is loaded and ready to go.
If you want to run the test-suite:
> (load "tests/run-tests.scm") > (sassy-run-tests 'all)
The Scheme48 init file sets
The SCM init file sets
eval to something that looks more like R5RS
eval, but isn’t actually compliant. It also changes the number of arguments to
A minor mode with some syntax highlighting exists for editing sassy files under GNU Emacs. See the file
sassy.el in the top level of Sassy’s distribution directory.
Sassy is written in R5RS Scheme with the addition of the following:
SRFI 1: List Library (make-list filter)
SRFI 9: Defining Record Types (define-record-type)
SRFI 23: Error reporting mechanism (error)
SRFI 56: Binary I/O (this SRFI was withdrawn by its author. However Sassy’s output modules and test-suite make use of write-byte and read-byte)
SRFI 60: Integers as Bits (logand logior lognot ash bit-field logcount)
SRFI 69: Basic hash tables (make-hash-table hash-table? hash-table-ref hash-table-set! alist->hash-table hash-table-values)
Sassy makes use of bignum and floating-point arithmetic (when you write floating-point data) and the optional
(interaction-environment) to perform macro-expansion.
The included output modules also need:
Most (good) Scheme implementations provide a version of the underlying functionality if they don’t provide the SRFI itself. You only need to write wrappers that implement the specified interfaces for just the functions or syntax listed above.