leah blogs

August 2004

10aug2004 · Slate

The programming language Slate was recently released in it’s version 0.3.

Slate is mainly influenced by Self, BETA, Joy, Forth and Lisp. It is quite unique though: It’s the first language to implement Prototypes with Multiple Dispatch (PMD). In fact, one of it’s authors—Lee Salzman— even wrote a thesis on it (available on the Slate homepage).

One interesting thing about it is the way it’s implemented. While versions before 0.3 had Common Lisp code attached to get it running, version 0.3 is self-hosting using mobius, a VM implemented in Slate itself by translating Slate to C. The VM is still quite slow (the Lisp versions weren’t fast, either), but it looks really promising; after all, the whole this is written in itself, except for some really tiny pieces of C to interface with Unix.). Very cool

Now, a tiny snippet of an example program to show how it looks like:

g@(LifeGame traits) init
"Load up #cells to be randomized."
[
  g cells doWithIndex: [| :each :index |
    g cells at: index put: 0].
  g cells size / 4 timesRepeat: [
    g cells at: (g random: g cells size) put: 1
  ].
  g
].

Very Smalltalk-like (not to say Selfish :-P), but once you get a bit used to it, it’s very easy to read.

It comes with some elisp for Emacs support, so let the hacking begin!

NP: Bob Dylan—When the Ship Comes In

Copyright © 2004–2022