You unpack the distribution files using the commands
gunzip < larceny-X.Y-sunosZ-bin.tar.gz | tar xf - gunzip < larceny-X.Y-src.tar.gz | tar xf - gunzip < larceny-X.Y-doc.tar.gz | tar xf -which create a directory called "larceny" in your current working directory. In that directory you will find the following files:
larceny.bin Run-time system larceny.heap Heap image with all libraries, FFI, and compiler twobit.heap Heap image with some libraries and compiler r5rs.heap Heap image with R5RS libraries and an interpreter Scripts/larceny Shell script that runs larceny.heap Scripts/twobit Shell script that runs twobit.heapIf you unpacked the source code there will be many other files and directories as well.
The scripts and heap images are discussed in the following section.
You should decide where you want to install Twobit and Larceny; say you want to install them in /usr/local/bin and /usr/local/lib/larceny. Copy the files Scripts/larceny and Scripts/twobit to /usr/local/bin and edit the definition of the variable LARCENY_PATH at the head of each file to point to the correct directory:
LARCENY_PATH=/usr/local/lib/larcenyThen, move or copy larceny.bin, larceny.heap, twobit.heap, and r5rs.heap to /usr/local/lib/larceny.
You should now be able to run Larceny by typing "
at the Unix prompt, and similarly you should be able to run the Twobit
compiler by typing "
twobit". You can also bring up just
the interpreter with the command "
larceny" script instead of the "
twobit" script. The difference between these two scripts is that
larcenyruns the heap image named "larceny.heap" while
twobitruns the heap image named "twobit.heap".
Both of these heap images contain the Twobit compiler and the
compile-file procedure that is used to compile files
of Scheme code, but they differ in other ways.
In "larceny.heap", every expression is compiled before it is evaluated, but the internals of the Twobit compiler are hidden (except for compilation switches).
In "twobit.heap", some of the libraries that are present in "larceny.heap" are missing, and the internals of Twobit are exposed: every top-level name in Twobit is bound in the interaction environment and may be changed interactively, with immediate effect. Since compiler development can be a risky business, "twobit.heap" uses the interpreter for evaluation -- the interpreter is unaffected by changes to Twobit.
Running "twobit.heap" is probably not useful unless you are doing compiler development, in which case you will need the source code as well as the binaries.
Larceny vX.Y (precise:SunOS5:split) (lth DD-MMM-YY HH:MM:SS) >You can enter a Scheme expression at the prompt; it will be evaluated and its results printed as soon as it has been read.
(debug)There is some help available on-line in the debugger. (The debugger is pretty much a prototype; you don't need to tell us how bad it is.)
(standard-code) ; this name will change in a future versionAfter this expression has been evaluated, the compiler will generate slower code.
To make the compiler generate faster code, you can promise not to redefine standard procedures and not to redefine any top-level procedure while it is running. To make this promise, evaluate
(fast-safe-code) ; this name will change in a future versionTo make
compile-filegenerate faster code, you can promise that none of the top-level variables that are defined within a file of Scheme code are redefined or assigned outside of that file unless they are redefined or assigned within the file. To make this promise, evaluate
For more information about compiler switches, see the developer documentation.
make setup make larceny.bin(If you do this repeatedly, you only need to run "make setup" once.) Now replace the distributed version of larceny.bin with the newly-compiled file.
Larceny has been tested on SunOS 4.1.4 and SunOS 5.6. At times in the past, Larceny was compiled on both SunOS 5.3 and SunOS 5.5. It should still compile without trouble on SunOS 5.5, but there are some incompatibilities between 5.3 and 5.5/5.6, and we don't know if Larceny will still compile on SunOS 5.3. Please report both problems and success stories.