Functional Forth?

William Tanksley, Jr — 2007-09-20 00:41:57

http://wiki.forthfreak.net/index.cgi?FunForth

Functional Forth. Written in a few lines of Forth. Speaks for itself.
I didn't know that was possible.

-Billy "fun fact 0=1" (a punny line out of context -- taken from ML source code)

Chris Double — 2007-09-20 01:43:58

On 9/20/07, William Tanksley, Jr <wtanksleyjr@...> wrote:
> http://wiki.forthfreak.net/index.cgi?FunForth
>
> Functional Forth. Written in a few lines of Forth. Speaks for itself.
> I didn't know that was possible.

That's pretty neat. With a few changes to make it compatible with 4p
you can write some very Joy like code:

C{ dup * } { 1 2 3 4 } lmap .list
=> { 1 4 9 16 }

4p is a forth with some interesting control words:

http://maschenwerk.de/4p/control-flow.txt

Chris.
--
http://www.bluishcoder.co.nz

Chris Double — 2007-09-20 02:18:31

A good discussion with examples about it on comp.lang.forth:

< http://groups.google.com/group/comp.lang.forth/browse_thread/thread/8bd3fc4fded00e0c/9c9419a3a6700cff#9c9419a3a6700cff
>

or

http://tinyurl.com/yqfnuv

Joy gets mentioned as well.

Chris.
--
http://www.bluishcoder.co.nz

Don Groves — 2007-09-20 04:21:54

On Sep 19, 2007, at 19:41 , William Tanksley, Jr wrote:

> http://wiki.forthfreak.net/index.cgi?FunForth
>
> Functional Forth. Written in a few lines of Forth. Speaks for itself.
> I didn't know that was possible.

Forth is one of the most malleable languages in existence due to
everything
being exposed and modifiable. I remember a comp.lang.forth response from
Elizabeth Rather of Forth, Inc. to someone who disliked Forth's
postfix syntax:
"Why don't you just change it then?"
--
Don Groves

"Computers are like Old Testament gods; lots of rules and no mercy."
-- Joseph Campbell