Squeak forth and Logo

goran at krampe.se goran at krampe.se
Thu Apr 27 18:49:24 UTC 2006


Hi!

"SmallSqueak" <smallsqueak at rogers.com> wrote:
> Dan,
> 
> > PS:  About Forth...
> 
>     I forgot to tell you about the ForthVM plugin.

It is funny, I have been toying with Forths too in my spare time, and
with ideas around mixing with Squeak in various ways.

I also like retroforth, and I have been studying the code a little bit.
I started looking for minimal forths and read a lot about eForth and its
derivatives - since eForth is built from 31 IIRC (some claim you only
need 13) primitive words written in small machine code snippets - and
the rest is just written in itself. So essentially, emulating eForth
comes down to just implementing those primitives.

First I was thinking of implementing it straight up in Squeak, just as
an interesting gimmick. Then I realized that Exupery offers some
interesting intermediate levels that can be used to gain the full force
of Exupery. :)

But eForth is AFAIK not one of the current forths that have a prospering
community (like Retro), and having a forth inside Squeak can be done
with several purposes, of which eForth only fits one (the fun of it).
The other purposes would be:

1. To offer a low level for speed. eForth is not fast.
2. To offer the stack based programming paradigm, hopefully mixed with
Smalltalk in a neat way. No point in emulating any specific forth in
this case, just borrowing the concepts and execution model.
3. To make Squeak a really slick IDE for forth programming. And then
deploying "natively" in whatever forth we are "emulating". In this case
a popular Forth, or a fast one (or both) is preferable. Retro covers
many platforms and seems popular, but perhaps not blazingly fast (yet).

A few other interesting things in this area:

- FuelVM. This is actually a VM written in C (IIRC) that takes forth
code as its "bytecodes". Interesting stuff, but I don't think it is
developed right now.
- Retroforth's friends: Reva, HelForth (they cross pollinate a lot)
- Factor by Slava Pestov (factorcode.org). This is actually a very good
general source of inspiration for new cool ideas to possibly bring to
Squeak. It is forthish, but has GC and OO in full and lots of other neat
stuff.

>     P.S: Please note that I am only a Forth newbie,

Me too, but I have been fascinated by forth since I was around 12 years
old. Almost got myself a Jupiter Ace. ;) It was the first language I
learned in which I could make first class constructions - evolve the
language - much like we can in Smalltalk (or Lisp/Scheme of course).

regards, Göran



More information about the Squeak-dev mailing list