Hi, Harry.

Harry Ohlsen <harryo / zip.com.au> wrote: 
> On Fri, 6 Dec 2002 07:57, Mark Probert wrote:
> 
>> Most of all, it is a -lot- of fun to use!
>>
>> $ cat ex1.rb
>> require 'Atlast'
>> t = Atlast.new
>>
>> t.eval(": linear ( a b -- )  create swap , , does> dup >r @ * r> 4 + @
>> + ;") t.eval("3 17 linear aline") 
> 
> Ah, yes, I can see how that's so much more intuitive than ...
> 
>    def linear(x)
>        3 * x + 17
>    end
> 
hmmmmm.

Not quite.  The colon definition of linear is more like a lambda
function in lisp, it defines a series of functions, for "a*x + b".
The binding of a and b happens in the "linear aline" part.  I think
you can do this in Ruby using closures.

> Only ribbing you, there, but you have to admit the FORTH code tends to
> obscure what's going on just a little :-). 
> 
Beauty is in the eye ... ;-)

> It reminds me of Postscript code
> 
Postscript was based on FORTH.

> I seem to recall reading a rumour that the boot code for Sun
> workstations was written in FORTH, but never found out whether that was
> true. 
Type L1-A

4 5 + .
: 2*  2 * . ;
7 2*

-laugh-

It is (was) FORTH.  I think there is an open firmware project
that is based on FORTH.
 
-mark.