Re: [stack] Re: Jon Purdy: Why Concatenative Programming Matters

Robbert van Dalen <[email protected]> Thu, 22 Mar 2012 18:43:37 +0100
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
> iepos proved that although you can produce a parsed combinator
> language with only one complete combinator (in the literature usually
> called X), this is an illusion caused by the availability of arbitrary
> nesting.

can you give an example of a flat - two combinator - base?
does such flat base mean that you can cut an valid expression anywhere to produce two valid expressions? 

> > i believe the real challenge is to find two combinators that have the most 'impact'.
> 
> Sure, but what does that *mean*? It's a very tough question and may in
> fact have no answer. I've built most of an evolutionary algorithm to
> test bases against each other to try to find the "best" one. Figuring
> how to measure bestness is TOUGH. I've come up with some measures, but
> none of them are great. (My fitness function builds an array of
> fitness metrics and randomly compares them.)

what's the meaning of life? 
the only we can say for certain, is that we - humans - are more likely to reproduce in 'hostile' environment than any other species.

for zeroone to survive it must be a meme that easily sticks to a programming brain. 
zeroone certainly sticks as a name :). 
as a concept, zeroone is also interesting.

> Yes, although either a base forms ALL functionality or it isn't
> complete. (Well, iepos does explain some alternate definitions of
> "complete" that have some interesting results.)

yes, i also only consider complete combinator bases - but that they are also capable in generating short programs for small problems.
or, even better - short programs for big problems.

> But there might be some other measures of "functionality"; for
> example, would a base be "better" if it provided short bitstrings with
> known meanings (i.e. commonly used combinators)? The base I use now is
> defined so that "drop" is "01".

so

101    and   001

reduce to empty?

> What if "nip" or "swap" could be
> provided as a short bitstring as well, thus allowing selection of a
> single item out of stack junk?

can this be done with only 2 combinators?
can you give an example

> And what about quotations -- how hard
> or easy is it to express an enquoted version of "0" and "1", and might
> a language be better if it provided a complete basis, plus a short way
> to express quotations of its constituent combinators, plus concat to
> build arbitrary quotations?

again, can quotations be encoded with only 2 combinators, without nesting?

> The latter language would be easy to build
> a Joylike language on, and the automatically produced zeroone code
> would be decent (unlike a language where the enquoted combinators were
> long and complex).

i think you should stick to flat, otherwise all the nice properties of flatness are lost.
and then you'll just end up with an alternative Joy (which happens to be encoded in bitstrings). 

> (Technically,
> zeroone is more of an abstract machine language than it is a language;
> there's no names or anything like that. Tworing might eventually
> include at least an assembler, already includes a superoptimizer, and
> might include a high level language based on zeroone.)

how does the super optimizer, runtime and other components relate to each other?
does the super optimizer choose the set of combinators?
is the high level language independent of the choosen set of combinators?
when and how do you fix the a sequence of combinators  (like 01 = drop)? is that encoded by the fitness functions.

etc.

cheers,

R.