Re: [stack] S-K Construction of Dip?

Manfred Von Thun <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <C24BF573.8BC%[email protected]>


On 3/4/07 9:12 AM, "William Tanksley, Jr" <[email protected]> wrote:
> 
> Manfred Von Thun <[email protected] <mailto:m.vonthun%40latrobe.edu.au>
> > wrote:
> 
> Thank you for the prompt and clear answers. To cut to the chase: I
> agree that the language "L" is both flat and concatenative, and that L
> is not enormously different from Joy.

Indeed, not enormously. But see below.

[..]

> However...
> 
> My first reaction was that although I confess that I have researched
> flatness for its own sake, I suspect that there are higher principles
> in language design than perfect flatness, and I believe that L's
> design compromises some of them. I don't think that's a bad thing --
> but I did believe that unless I point out the problems, the obvious
>> > I don¹t know what you mean by an unbalanced foyer. If you mean something
>> > like unbalanced parentheses, then you should get the warning in this L
>> > (whereas it
>> > would be an errorr in Joy):
>> > ³Incomplete program? more than one foyer remaining. See top foyer?²
> 
> Again, I was talking about Joy. Joy is not flat; it doesn't depend on
> your perspective. L _is_ flat; again, it doesn't depend on your
> perspective.

See your own comment above. You agree that L is concatenative (and flat),
and that Joy is concatenative (but not flat). I thought it was clear that
they
accept the same programs ­ more or less, perhaps. If so, then flatness is
in the eye of the beholder.

It seems we need a definition of identity between two programming languages.
(And keep in mind that any single language might have several very different
implementations.) Here is one attempt at a definition:

L1 is a sublanguage of L2 if and only if
For all programs P, if P is a correct program in L1, then P is a correct
program in L2,
and for all inputs I, program P with input I produces the same output in L1
and in L2.

L1 is identical with L2 if and only if they are sublanguages of each other.

I claim that Joy and L are identical in this sense ­ apart from the trivial
sense
that an incomplete Joy program (as Joy is currently implemented) produces
an error message (³end of input file, incomplete program²), whereas L
would not consider it to be incomplete. But surely this is a trivial
difference,
and is easily removed,

[..]
> 
>>> > > One thing I'm not clear on, though. Are these foyers available at
>>> > > runtime?
> 
>> > Yes, in the L-definition of runtime. This is not your definition, I know.
> 
> I think it is my definition as well -- what am I missing
> 
In most languages there is scantime, parsetime and runtime. In L there
are only scantime and runtime.
> 
> 
> 
>> > But
>> > L has a right to make its own definition. In L one would define your notion
>> > of runtime as: executing the content of the topmost foyer using the
>> > ONLY remaining foyer below as its stack. But the executions of topmost
>> > foyers would be exactly the same if there are further foyers below.
> 
> Nope, that's runtime. We're good.
> 
>>> > > In practical terms: if I split a Joy definition into two
>>> > > parts (cutting in the middle of a quotation), giving each part of the
>>> > > definition its own name, and then I define a function which contains
>>> > > the two parts one after the other, is the resulting definition
>>> > > equivalent to the original? For example:
> 
>> > Since when does being able to give names to the parts have anything to
>> > do with cuttability or flatness?
> 
> It doesn't -- names help clarify things. I assume syntax to assign
> names for the sake of clarity. If asked the same question about my 01
> language, I would assume the same thing.
> 
>>> > >DEFINE
>>> > >  Csucc   ==  [dup [i] dip] dip i.
>>> > >DEFINE
>>> > >  CsuccA == [dup [i];
>>> > >  CsuccB ==  dip] dip i;
>>> > >  CsuccC == CsuccA CsuccB.
> 
>>> > > Is CsuccC exactly the same as Csucc? Would it still be the same if
>>> > > CsuccC were defined in a DEFINE block apart from CsuccA or CsuccB?
> 
>> > I have not said anything about definitions in L, and your example does
>> > show that if L is to be of interest at all, then L needs to use a different
>> > style of definitions. Thank you.
> 
> Interesting. How would they differ?

Note the ³.² at the end of these definitions. If ³.² is to be allowed inside
a definition,
then a different notation might be needed, something like:

DEFINE a == ...; b == ...; c == ... END_DEF
> 
[..]
> 
>> > Thanks for the discussion, Billy. I hope I have cleared up a few things.
> 
> You certainly did! I hope I make more sense now that we're on the same page.
> 
>> >   - Manfred
> 
> -Billy
>  
 - Manfred    


[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.