Re: [stack] Barebone implementation of concatenative language in c or c++

"William Tanksley, Jr" <[email protected]> Wed, 12 May 2010 12:02:47 -0700
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
The smallest possible number of required functions is 2... You need a data
pseudo-combinator and an execution combinator. But this isn't helpful :-). I
wrote a language that does that, and it's not in any way useful. If you want
to look, it's at http://bitbucket.org/wtanksleyjr/tworing, but be warned...
It's not pretty.

There are a lot of one-day Forth implementations out there, but most of them
don't try to have just a minimal number of words; that gets really difficult
without garbage collection.

minForth looks like it might be a consideration for you... But I'd still
look at FICL, which is really well-tested. Rainbow Forth is _really_ simple
(most of the Machine Forth derivatives are), but the need to trust machine
code and read assembly might be too much.

Hmm, someone did some research... Check out
http://groups.google.com/group/comp.lang.forth/msg/10872cb68edcb526?pli=1 for
some answers to the question (although it doesn't link to any source).

Most of what I see is designed to be minimal and usable, not to be simply
minimal.

-Wm

blazeski <[email protected]> wrote:

> I'm really grateful for suggested implementations, and I'm sure that those
> are useful even in production environment. However I'm looking for a toy
> implementation so I could quickly understand what happens under the hood of
> stack languages. Something designed for pedagogical purposes not for speed
> or efficiency. Something small enough that could be written over the weekend
> from scratch and contains just the bare minimum of the stack operations so
> it could be called interpreter.
>  Or if you can't think of something like that what are the bare minimum of
> operators so I could call a language concatenative:
> For example from reading Brent Kerby Theory of concatenative combinators
> http://tunes.org/~iepos/joy.html if I implement : swap, dup, zap, unit,
> cat, cons, i, dip + (numbers and symbols) would that be enough to have a
> primitive joy like language?
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>


[Non-text portions of this message have been removed]