[ Note build instructions have changed. Updated build instructions are here]
Brian Rice has announced an alpha release of the 0.3 version of the Slate programming language. This is the first release that contains the C based VM rather than the Common Lisp hosted system.
Using the latest source for Slate you can generate the C VM source code from inside the Common Lisp hosted system. The steps to do this are:
From Common Lisp (I used SBCL on Linux):
(load "slate.lisp") './src/init.slate' fileIn. './src/mobius/init.slate' fileIn. './src/mobius/c/init.slate' fileIn. './src/mobius/vm/init.slate' fileIn. Compiler generateVM: 'vm'. Compiler buildImage: 'vm.image' &littleEndian: True. Changing
the 'True' to 'False' on the last line generates a big endian image
file. Compiling the generated C files with boot.c included with the
announcement linked to earlier will give you a 'slate' executable.
Running this, passing the image name as an argument, will present you
with the Slate top level.
Slate is a prototype based object oriented programming language with
multi-method dispatch. It draws influences from Self, Smalltak, Dylan,
and CLOS I believe.
The C based VM is only an alpha release and doesn't include a lot of
the functionality in the Lisp based system yet. Also note that the
documentation on the web site is slightly out of date. The most notable
differences that I hit were:
1) 'value', 'value:' and 'values:' have been renamed to 'do', 'applyWith:' and 'applyTo:' respectively.
2) You can't specialize dispatch on SmallInteger instances. So the following will not work:
n@1 fact [ 1 ].
n@(SmallInteger traits) fact [ n * ((n - 1) fact) ].
The first line will be accepted but not work as expected in the C
VM. In the Lisp system it works fine. A couple of the examples in the
manual use this and they won't work on the C VM as a result.
11:48:42 AM
|