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

"William Tanksley, Jr" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
Manfred Von Thun <[email protected]> wrote:
> "William Tanksley, Jr" <[email protected]> wrote:
> > 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.

But they do not accept the same programs. L accepts many more programs
than Joy does. L may even be more expressive than Joy (although I
haven't examined it to see whether it actually is).

> 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:

In computation theory, one formal definition of a language is the set
of all texts that are legal in the language.

> 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,

A text that produces a syntax error is by definition not a "correct
program" (your words). Thus there exist correct programs in L which
are not correct programs in Joy. This is your definition of
sublanguage -- Joy is a sublanguage of L, and not the other way
around.

> >> > 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.

That's the case for Forth as well. I'm pretty sure that I'm okay with
that; anyone must agree that runtime is runtime.

> >> > 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

Actually, I questioned before whether "." was truly needed as part of
the flat language. It seems to me that everything "." is doing is
semantic, not syntactic; therefore it can be a function rather than
being syntax. I believe I suggested using the phrase "quotation i"
instead of "." (using my definition of "quotation", feel free to use
your own name for the function that takes the top lobby, converts it
to a quotation, and places it on the stack).

>  - Manfred

-Billy
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.