Squeak forth and Logo

SmallSqueak smallsqueak at rogers.com
Thu Apr 27 17:56:29 UTC 2006


Dan,

> PS:  About Forth...

    I forgot to tell you about the ForthVM plugin.

> I love Forth -- it's in many ways like St-72, and yet totally different.
> St-72 has automatic storage management and is really safe.
> Forth does not have automatic and is pretty fragile.
> I tried a couple of Forth variants with Smalltalk's nice structure,
> but lack of garbage collection made it really hard to live the same way.

    Joy, Forth's Functional  Cousin:

        http://www.latrobe.edu.au/philosophy/phimvt/joy.html

    has GC, using this:

        http://www.hpl.hp.com/personal/Hans_Boehm/gc


> Helge Horch made a pretty nice run at an OO Forth, if you are interested.

    Actually, I found it here:

        http://www.rx-core.org/

    This engine is used in RetroForth:

        http://retroforth.org

    Doesn't Retro-Forth sounds like "Back To The Future"
    or "Forward To The Past" ;-)

    In fact, the rx-core was developed from earlier versions
    of RetroForth in a refactoring process.

    Out of the box, librx.dll is a whoppy 8704 bytes librx.dll
    for Windows (there are versions for x86 BSD and Linux)

    This librx source (in x86 assembly) was further modularised,
    (using assembly code refactoring browser aka notepad.exe ;-)
    and assembled with Flat Assembler:

        http://flatassembler.net/

    resulted in a ForthVM plugin 5120 byte.
    (the file rx.forth used to bootstrap the engine is now
    external, read by the plugin loader and feed to the
    Forth kernel in the initializing step, instead of being
    embedded in the kernel)

> St-72 is slow, and Forth rips.

    This ForthVM can handle inline words defined in
    _m_a_c_h_i_n_e_c_o_d_e_ , something like this:

inline
: dup [ $fc4689 3, $fc768d 3, ] ;
: 1+ [ $40 1, ] ;
: 1- [ $48 1, ] ;
: swap [ $0687 2, ] ;
: drop [ $ad 1, ] ;
: nip [ $04c683 3, ] ;
: 2drop [ $adad 2, ] ;
: and [ $0623 2, ] nip ;
: or [ $060b 2, ] nip ;
: xor [ $0633 2, ] nip ;

    Cheers,

    SmallSqueak

    P.S: Please note that I am only a Forth newbie,
            reading "Starting Forth":

                http://home.vianetworks.nl/users/mhx/sf.html

            and "Thinking Forth"

                http://thinking-forth.sourceforge.net/

----- Original Message ----- 
From: "Dan Ingalls" <Dan at SqueakLand.org>
To: "The general-purpose Squeak developers list"
<squeak-dev at lists.squeakfoundation.org>
Sent: Saturday, April 15, 2006 12:24 PM
Subject: Re: Squeak forth and Logo


> "SmallSqueak" <smallsqueak at rogers.com>  wrote...
>
> >...
> >   That "small" talk was printed in "Higher-Order and Symbolic
Computation"
> >   (12/1999, pp 221-236):
> >
> >       http://www.brics.dk/~hosc/local/HOSC-12-3-pp221-236.pdf
> >
> >   So much for Guy's "small" talk and his "growable language".
> >
> >   Now back to the real Smalltalk's, perhaps Smalltalk 72 is the most
> >   growable of them all ?
> >
> >   Dan had an image of Smalltalk 72 running inside Squeak.
> >
> >   Is there a real VM for Smalltalk 72 with source available some where?
> >
> >   Any pointer is very much appreciated. It would be interesting to see
> >   the trio plugins for Smalltalk 72 VM running atop a couple of other VM
> >   (Forth is one of them ;-)
>
> Hi, PhiHo  -
>
> It's on my list to revive the St-72 that I did in squeak.  I believe it
will "just run" if you load it into Squeak 3.4 (it's on SqueakMap).  Even if
it doesn't, all the code is there if you are interested plus, as I say, I'll
put out a revised version for 3.9 "pretty soon".
>
> I always feel the need to mention that the greatest strength of St-72 was
also its greatest weakness:  By including syntax in the purview of
programming, it (a) ran slowly because of parsing as it went, and (b) it was
possible to write all sorts of ambiguous programs.  Oh, and did I mention
(c) there were modularity problems with free variables.
>
> That said, Smalltalk-72 got us off the launch pad -- it gave us a
completely malleable and interactive system that was truly object-oriented.
That's why I bother to keep it available.  Plus, when we moved to St-76, I
made the statement to Alan that we could always do St-72 in St-76, so it's a
completion thing ;-).
>
> - Dan
>
> PS:  About Forth...
> I love Forth -- it's in many ways like St-72, and yet totally different.
St-72 has automatic storage management and is really safe.  Forth does not
have automatic and is pretty fragile.  St-72 is slow, and Forth rips.  I
tried a couple of Forth variants with Smalltalk's nice structure, but lack
of garbage collection made it really hard to live the same way.  Helge Horch
made a pretty nice run at an OO Forth, if you are interested.
>




More information about the Squeak-dev mailing list