Self and Smalltalk (was: a small arrows prototype)

Jecel Assumpcao Jr
Fri, 14 May 1999 14:32:18 -0300

RE01 Rice Brian T. EM2 wrote:
> [good reasons for choosing Squeak as a prototype platform.]
> i agree.  however, i will also readily point out the limitations and
> complications of the language, though they are slight.  i'll just say that
> i'd rather have Self in the situation that Smalltalk enjoys.

A quick update on the status of Self: this is the year the language
came back from the dead!

In January Gordon Cichon did a partial port of Self 4.0 from the
Sparc to Linux Intel ( but is now too
busy to finish it. Then Marko Mikulicic started his OpenSelf
implementation on the PC (
and before that the JSelf project to run Self on Java VMs was
created ( Also, there were two
partial implementations in Smalltalk

And what was known as "Merlin OS" is now just "Self/R" (where "R"
is for reflective) and is intended to be a *very* portable compiler
running initially on Linux Intel and the Merlin 6. It won't ever be
as portable as Squeak since it uses machine language instead of C,
but I expect in increase in performance to be worth that.

So "Merlin" now only refers to the hardware project, and in the
case of Merlin 6 is a low cost computer with a Self CPU built in
an FPGA. Since the hardware is reprogrammable, someone could convert
it into a LISP Machine if they wanted to (I'd love to see that).

As some of you know, Self 4.0 is fully compatible with GNU Smalltalk
thanks to the work of Mario Wolczko. One project I have for the
future is to change that so Self is compatible with Squeak sources
instead. If I'm lucky, someone else will do this before I get around
to it. Anyway, programming in Squeak now might turn out to be a great
way to run it in Self later.

> btw, has anyone heard of a method of representing infinite-size quantities
> with objects?  in smalltalk, i attempted to create an empty "TransFinite"
> class and create empty "Finite" and "Infinite" sub-classes respectively,
> which is simple.  however, if i try to 'force' inheritance from Finite upon
> the Magnitude class, then the system stack overflows (for obvious reasons).
> does anyone know of a simple way to make this sort of thing happen?

I don't know what you mean by "forcing inheritance", so didn't
quite get your problem. While it probably isn't what you want, a
way to represent infinite sets or collections with objects is to
use a "helper" object to access them indirectly (called Stream in
Smalltalk-80 and Generator in Little Smalltalk). Then the helper
object can have an algorithm for creating the elements on demand
instead of retrieving them from memory. Due to object encapsulation,
the application will never know the difference.

> (the goal is to represent higher-order infinities and compare them and
> reason about them.  i have the feeling that such a system might easily help
> out an ordinary system like Self, Smalltalk, Lisp, or Scheme in the ways of
> reflection.)

Streams are no good for this, but the Generators could be compared
and manipulated in limited ways. But I think we are talking about
different things...

I am a big LISP/Scheme fan, and the only thing I miss about LISP
is the ability to manipulate code (Scheme doesn't have that either,
if I remember correctly). You can *generate* code in Self/Smalltalk
if you are willing to work at the source text level and I have been
pleasently surprised at how well this works in practice. Of course,
it might be that none of this will be needed for Arrows.

-- Jecel