[stack] Re: Concatenative Research

"Ruurd" <[email protected]> Mon, 07 Feb 2011 21:54:36 -0000
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Hi all,

IMHO, the mission statement of Joy seems to have been the removal of names. In that it has succeeded. The latest addition has been condnestrec, making explicit recursion unnecessary in all cases.

Also the impossibility of rewriting is not as bad as it looks.
Suppose I DEFINE fib == [small] [] [pred dup pred] [+] binrec.
Because all quotations are hardcoded, this can be rewritten to
DEFINE fib == binrec(small; ;pred dup pred; +).

But only if fib is at top level in the first place, like in: 10 fib. 

This new binrec( does not take parameters from the stack but from
elsewhere (static memory, not the code stream); otherwise it behaves the same as binrec. Furthermore the parameters to binrec( are not quotations anymore, just terms.

And that makes further quotation lifting possible.

It requires an n-token lookahead m-pass translator, but I think it can be done (I have not tried yet).

And yes, it is not rewriting within the language Joy; rather it is rewriting to another, while preserving the semantics of Joy.

rw

--- In [email protected], John Nowak <john@...> wrote:
> The essence of Joy, in my opinion, is simple equational reasoning. Manfred talks a lot about Joy's "exceptionally simple algebra". That seems to be the whole point of it. The problem, however, is that the algebra just doesn't work because you can't safely manipulate programs. A language where there is not a single program manipulation you can always safely perform doesn't strike me as having a particularly simple algebra. Moreover, the side conditions you need to prove to be able to manipulate something are, in general, whole program semantic properties. At least with the lambda calculus, things like required alpha conversions are simple, local, syntactic issues.
> 
> - jn
>