[self-interest] Hi, Self for Linux compiling Self to LLVM ...

Russell Allen mail at russell-allen.com
Mon Sep 5 01:45:58 UTC 2011

Hi Mildred,

On Sat, 3 Sep 2011 10:12:51 +0200, Mildred Ki'Lya wrote:
> Hi,
> I am becoming very interested in the Self language, that I just
> discovered fully. This is my dream language, the one that I tried to
> imagine over and over again. At least, it appears as such. I
> downloaded the version for linux but the user interface in the VM is
> absolutely awful. The text overlap and it is close to unusability. Am
> I doing things wrong or is that the current state of the VM?

The issue with morphic on the Linux VM is that it is using the very old 
X font handling mechanism (X Core Fonts), which the modern distros are 
all deprecating in favour of the less old Xft.

So the font the Linux VM is looking for isn't available (because its 
been moved to Xft) and its defaulting to a font with the wrong metrics 
(hence the overlapping etc)

Fixing this requires updating the VM primitives and the font handling 
code on the Self side. I just haven't done it yet :)

(Anyone who is interested in doing this, please get in touch!)

In the meantime, all I can suggest is either trying an older distro, or 
the Mac version if you have access to one.

> I am working in my spare time in a compiler for the Lisaac language.
> The Lisaac language tried to mimic Self (poorly in my very recent
> opinion) using Eiffel concepts like static typing. You can find it at
> https://github.com/mildred/Lysaac [1]

Interesting. I haven't played much with Lisaac. It is still being 

> I started reading out Self documentation because while implementing
> inheritance in Lisaac, I find it poorly defined. I wanted to
> understand the source of the prototype based inheritance. Doing so, I
> discovered a completely new and interesting world. Since very
> recently, my new goal is to create a very simple compiler for Self
> (that I hope compatible with current Self code) that targets LLVM. I
> don't plan on doing complicated optimization, just to have a compiler
> to get started. Then bootstrap the compiler by rewriting it in Self,
> and then, finally, improving on it. My dream is to get a system where
> the Self VM could be written in the same dialect of Self. Not in
> C/C++/Whatever, and not inĀ  restricted dialect.

If you haven't already, you should look at the (unfinished) Klein 
system at https://github.com/AdamSpitz/klein and talk to Adam Spitz. It 
has a very similar aim (Self written in Self) but without the use of 

Another option is the path taken by Squeak and PyPy, which define a new 
language which is a subset of the main language (eg Slang and RPython) 
but which can be easily statically compiled.  This is less ambitious 
than what Adam was after but has a great track record.

(Speaking of which, doing a Self VM in PyPy itself could be a very 
interesting exercise)

> So, right now, I'm lookinf for parsers for Self, but I might do it
> myself. I don't think the syntax is that complicated.

There are a couple of edge cases which might be tricky. There is 
already a parser for Self written in Self, but it is a little tricky to 
file in because it requires the parseKit module from Klein. Basically 
you have to read in the applications/parseKit/parseKit.self file from 
the Klein tree and then the applications/selfParser/selfParser.self file 
from the main Self tree.

Otherwise, a port of Alex Warth's OMeta to Self ( 
http://www.tinlizzie.org/ometa/ ) would be a really useful addition.

- Russell

> Mildred
> --
> Mildred Ki'Lya
> http://mildred.fr [2]

More information about the Self-interest mailing list