Re: [stack] Re: Concatenative macros?
"stevan apter" <[email protected]>
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
----- Original Message ----- From: "William Tanksley, Jr" <[email protected]> To: <[email protected]> Sent: Thursday, February 08, 2007 11:54 PM Subject: Re: [stack] Re: Concatenative macros? > stevan apter <[email protected]> wrote: > > > Construct 'i': > > > 00101 0011 1 = > > > [] q k = > > > i > > > i think this should be > > 00101 0011 1 1 = > > [] q k k > > [A] [] q k k = > [[A]] [A] k k = > A k > > Too many k's. > > What might be messing things up is how you treat the [A B] term in the > result of 'q'. In this quotation, [A] is [], which means that A must > be nothing. It's kind of (severely) wierd, but that's how it works. > Does your interpreter act that way? it does now. that wasn't at all clear (to me) from the description of 'q'. [B] [A] q == [[B]] [A B] shouldn't that be [B] [A] q == [[B]] [A B] if A is not [] [[B]] B if A is [] ? did i read right past that in brent's original explanation? O["";"[1][0]q"] [[1]][[0][1]] O["";"[1][]q"] [[1]][1] O["";"[][0]q"] [[]][[0][]] do i have this right, or should B = [] produce analogous behavior? in any case, kudos to both you and brent. this is fascinating. > > > i've posted an interpreter for 01 at: > > http://www.nsl.com/k/01.k > > You are amazing. :-) > > -Billy >