Installation and Setup

In order to install and run Slate 0.3, you will need a C compiler, a make utility, an archiver and compression utility (such as tar and gzip, or WinZIP). These are most likely available in your distribution if you are running Linux or one of the BSD flavors. There is no requirement to use GNU make: the makefile is quite simple and is likely to be properly handled by any make utility around. However, using GCC for your C compiler will put you on the safe side. Other compilers like VC++ can produce erroneous binaries when certain optimizations are turned on. Windows users may choose to install either a Cygwin environment (http://www.cygwin.com/) or a (lighter) MinGW environment (http://mingw.org/) to get started with Slate.

The Slate VM's use of the C library is minimal, so compiling Slate on various other platforms should not be too difficult. The Slate Mailing list archives for August 2004 (http://lists.tunes.org/archives/slate/2004-August/thread.html) contains several success and problem reports as well as hints for the production of the VM executable on various platforms.

In any case, please bear in mind that Slate is still alpha software. While the level of bugs is quite low, there still are missing features and rough edges at places.

Here is a step-by-step list of actions to perform in order to get Slate up and running on your computer

  1. Download the current snapshot of Slate available at http://slate.tunes.org/downloads/slate-current.tar.gz. Current snapshots are regularly made from the CVS source tree when the stability of the tree is acceptable and a number of fixes or new features is available. Bugs found in the releases (such as 0.3) are fixed in such snapshots. More patient or less adventurous people may wish to rely on released snapshots only and download the 0.3 snapshot available at http://slate.tunes.org/downloads/slate-0.3.tgz instead.

  2. Download the VM source files and bootstrap image for Slate. These files are available at http://slate.tunes.org/downloads/alpha/. You will need the files called vm.c and vm.h, which are the C code of the VM generated from Slate, and one bootstrap image. Bootstrap images depend on the endianness of your computer. Users of little endian (resp. big endian) architectures should download the file named little.image (resp. big.image)

  3. Unfold the Slate archive (slate-current.tar.gz in out example). On an Unix-like system, the command you need is:

    $ tar xzf slate-current.tar.gz
    $

    This will create a directory called slate-current.

  4. Go into this new directory and copy the 3 other files you downloaded. Now is the time to compile the VM.

    $ make
    gcc -O3 -fomit-frame-pointer -DNDEBUG=1 -s -Isrc/mobius/vm/platform -I.   -c -o vm.o vm.c
    vm.c: In function `PSInterpreter_apply_to_arity_withOptionals_':
    vm.c:2965: warning: assignment from incompatible pointer type
    gcc -O3 -fomit-frame-pointer -DNDEBUG=1 -s -Isrc/mobius/vm/platform -I. -o vm src/mobius/vm/platform/boot.o src/mobius/vm/platform/file.o vm.o -lm

    The warning is already known and understood; it does not impede the execution of the VM.

  5. At this step, the virtual machine executable is built. The next step is to run the bootstrap image, which executes code at startup to unfold all methods and objects in the system. You should expect this step to take a little time.

    $ ./vm little.image
    Slate: Growing heap to 4711472 bytes.
    Hi, there!
    Slate 1> 
  6. The final step is to save the generated image under the name of your choice.

    Slate 1> saveImageNamed: 'bubibim.image'.
    Slate 2> quit.

    This will save the image and bring you back to the shell. To start Slate, you just have to execute the VM with the name of the image just generated. This will restore the state of all objects in the system to what it was when the saveImageNamed: method was invoked.

    $ ./vm bubibim.image
    True
    Slate: Growing heap to 5447500 bytes.
    Slate 2> quit.

Note

The subjective dispatch, including subjects and layers, is not yet included in Slate 0.3.

Refer to the file README in the top-level directory of the Slate distribution for instructions if and when you need to build a new VM.