[self-interest] OSes (was: Patterns in Self)

Jecel Assumpcao Jr jecel at merlintec.com
Tue Dec 5 20:48:53 UTC 2000

On Mon, 04 Dec 2000, Thierry Deval wrote:

> I have to agree for the usefulness of a "Self"-contained language,
> this has been one of the driving force for popular languages like
> C/C++ or Forth.   

I would call C/C++ "stand alone" languages in that they are a great
replacement/complement for assembly. Forth certainly is self-contained
(as you explained below).

> Of course, these languages had sufficiently low-level features to be
> able to contruct the machine-code bytestream and even develop some
> code optimizing logic. But I don't see why we couldn't do it in any
> other language like Self. BTW, Self already relies on VM-like
> bytecodes, so why couldn't we implement the logic of the bytecode to
> machine-code translator in Self ?   

In my previous message, I quoted some problems Craig Chambers saw with
this. But none is really hard to solve, in my opinion.

> Regarding the implementation of a Self-in-Self compiler, I like
> Forth's approach (back from Forth83) : meta-compiling.   

Sorry... I haven't upgraded from Forth79 yet ;-)

> They first built a small assembler/code-generator which could then
> parse the System sources and build a new runnable environment in a
> separate Dictionary. (a parallel World in Self) The new Dictionary was
> then saved as a runnable, executable image... This could also be used
> for cross-compiling... All of this needed only a small compliant Forth
> micro-kernel and the sources, for bootstrap; the micro-kernel could
> have been written in any other language, or even in Forth...     

Here is a good page about this:


Of course, *real* Forth programmers prefer to directly type in the
binary inside some debugger, though sometimes they regret it later:


> Having Self rely on itSelf is the necessary step to have a SelfOS,
> with proper HAL and device driver Objects, probably with a well laid
> OS/Device framework of building blocks. (did we talk about
> architecture lately ;-)

Well, Smalltalk was an OS for many years before it was ever written in
itself. But things evolve much faster when you have this. Here is an
old drawing of the architecture for Self/R:


The box marked "Event System" is one of the most interesting parts - I
really should have a page explaining it. I did send an email to the
Squeak mailing list a while ago proposing they adopt something similar
but now that they are finally rewritting the event code they have
adopted a much more conventional design.

-- Jecel

More information about the Self-interest mailing list