Re: [stack] Concatenative Research
"William Tanksley, Jr" <[email protected]> Mon, 31 Jan 2011 13:30:47 -0800
| Newsgroups | gmane.comp.lang.concatenative |
|---|---|
| Message-ID | <[email protected]> |
Justin <[email protected]> wrote: > "William Tanksley, Jr" <wtanksleyjr@...> wrote: >> Naturally, I reduced this to the single-bit case: a language with only >> two words, "0" and "1". "0" pushes some quotations on the stack, and >> "1" pops and executes things from the stack. I'm currently using the >> "k" combinator for "1", and usually "0" is something like "[], [cake], >> [k]". (See Kerby's definitions of common combinators on >> http://tunes.org/~iepos/joy.html#cakek for explanations.) > If "1" executes things from the stack, then it's undefined on an empty stack. And if it behaves differently on an empty stack than it does otherwise, you'll lose the concatenative property. How do you get around this? That's a runtime error, not a syntax error. And any word that takes ANY parameters behaves differently on different stacks; that's the purpose of taking parameters. :-) >> Your typechecker may well be useful, and your theory looks in line >> with what little I know. What license is your code under? > Merely copyrighted, till I decide between a BSD-style and GPL-style licence. Recommendations? I picked GPL at random. If you decide on BSD I'll happily switch to that. >> My code's at https://bitbucket.org/wtanksleyjr/tworing, under GPL. >> Python, just like yours. > I was using Haskell at first, but my type inferencer is conspicuously > stateful, and I couldn't figure out how to type it. A Haskell programmer. You're smarter than I am, then. :-) -Wm