Installation
2.1 Supported Schemes
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.
2.2 Installing
($
means a shell prompt, >
means a Scheme prompt.)
2.2.1 Chicken
Sassy is available as an egg, so the easiest way to install (and compile) Sassy is to do:
$ chicken-setup sassy
If you don't want to compile Sassy (it can take a while), see below.
2.2.2 Scheme48
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
Then:
> ,config ,load sassy-48.scm > ,open sassy
2.2.3 Other Schemes
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.
Then:
> (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)
2.2.4 Caveats
The Scheme48 init file sets
char->integer
andinteger->char
tochar->ascii
andascii->char
.The SCM init file sets
eval
to something that looks more like R5RSeval
, but isn't actually compliant. It also changes the number of arguments tomake-hash-table
.
2.3 Sassy and GNU Emacs
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.
2.4 Porting Sassy
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:
-- procedure: file-exists? file -> boolean
-- procedure: delete-file file
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.