Uri Guttman <[EMAIL PROTECTED]> writes:
> >>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:
>
> DS> At 12:48 AM 10/24/00 +0100, Simon Cozens wrote:
> >> On Mon, Oct 23, 2000 at 05:18:15PM -0400, Uri Guttman wrote:
> >> > basically the emitted machine code for TIL is very simplified C
> >> > routine calls and their argument setup and return. all the routine calls
> >> > are to perl ops with just the minimal stack glue code in between them.
> >>
> >> OK, you're re-inventing .NET.
>
> DS> No, we're re-inventing wheels *far* older than that... :-P
>
> see, there are advantages to being an old fart. we can remember further
> back what crap we are reinventing this time around the wheelhouse.
Not *that* old, but...
TIL was the "technology" (back in the days when they called
"technology" either "algorithm" or "data structure" or "design" or
"hype") of the Forth language. Byte Books published in the early 80's
a book called something like _Threaded Interpretive Languages_, which
showed precisely how to build a Forth interpreter.
What Uri's aiming at is a bit more like HP's RPL (reverse polish lisp,
as used on all their programmable calculators, notable an HP48 or 49
or even the HP29 (?)); all words go through an additional level of
indirection, so you can redefine them after compilation.
There is some research on optimisation of Forth using "peephole
optimisation" techniques. The idea is mostly to get rid of the PUSHes
at the end of one word immediately followed by POPs at the beginning
of the next. But I'm not sure the idea is applicable for an
indirected TIL.
Another advantage of a TIL that you seem to lose by compiling Perl to
it is the ease of defining new words. Forth-like systems are
programmed by compiling myriads of very small "words", in gradually
increasing levels. Perl code is not like that. So almost all the
things you'll be threading will be words from the Perl core (rather
than words defined in the program).
[...]
> inline threaded code is something whose time has come again.
Agreed. But does it have to do it here? :-(
--
Ariel Scolnicov |"GCAAGAATTGAACTGTAG" | [EMAIL PROTECTED]
Compugen Ltd. |Tel: +972-2-5713025 (Jerusalem) \ We recycle all our Hz
72 Pinhas Rosen St. |Tel: +972-3-7658514 (Main office)`---------------------
Tel-Aviv 69512, ISRAEL |Fax: +972-3-7658555 http://3w.compugen.co.il/~ariels