RE: [stack] POP-11: another concatenative language
Billy Tanksley — 2002-01-04 01:52:06
Serguey Zefirov — 2002-01-04 12:54:50
Hello Billy,
пятница, 4 января 2002 г., you wrote:
BT> I'm an idiot -- I don't believe it took me so long to remember POP-11. It's
BT> a classic concatenative language, with several alternative syntaxes. Very
BT> similar to Joy and Postscript in many ways.
BT> We should look at it.
Robin Popplestone (author of POP-11) had published several papers
about stack language type-checking.
Here are the papers:
A Type Operational Semantics Based on Grammatical Characterisation of
an Abstract Machine
http://citeseer.nj.nec.com/164821.html
Specifying Types by Grammars: A Polymorphic Static Type Checker
Operating at a Stack Machine Level
http://citeseer.nj.nec.com/73738.html
...This report describes an experimental type-checker for the POP-11
language, which, being an open-stack language like Forth or
PostScript, has acted as a forcing-frame for the grammatical
approach...
And the message from Robin Popplestone about type checking open stack
languages:
http://www.poplog.org/talk/comp.lang.pop/1993/msg00430.html
Here he noted the absense of the principal type.
Best regards,
Serguey Zefirov mailto:
sz@...
Manfred von Thun — 2002-01-24 03:50:13
On Fri, 4 Jan 2002, Serguey Zefirov wrote:
> Hello Billy,
>
> ïÿòíèöà, 4 ÿíâàðÿ 2002 ã., you wrote:
>
> BT> I'm an idiot -- I don't believe it took me so long to remember POP-11. It's
> BT> a classic concatenative language, with several alternative syntaxes. Very
> BT> similar to Joy and Postscript in many ways.
>
> BT> We should look at it.
When our aging DEC10 was retired a lot of documentation was thrown out,
and I rescued some POP11 documentation about libraries. There were
some intersting things there - all about 1968-1972, from memory.
When POP2 arrived and become commercial it was far too expensive
to consider getting a copy just for me here, and so I lost interest.
But Billy's posting prompted me to look at it on the web. It is free
now, and includes Prolog, ML and Common Lisp as packages.
I found a superbly written introduction:
http://www.cs.bham.ac.uk/research/poplog/primer/START.html
But I did not see any postfix notation, and so far I don't understand
how POP2 or POPLOG can be seen as concatenative. I don't think
the presence of a stack makes a language concatenative. But I
remain to be persuaded otherwise.
>
> Robin Popplestone (author of POP-11) had published several papers
> about stack language type-checking.
>
> Here are the papers:
> A Type Operational Semantics Based on Grammatical Characterisation of
> an Abstract Machine
> http://citeseer.nj.nec.com/164821.html
> Specifying Types by Grammars: A Polymorphic Static Type Checker
> Operating at a Stack Machine Level
> http://citeseer.nj.nec.com/73738.html
> ...This report describes an experimental type-checker for the POP-11
> language, which, being an open-stack language like Forth or
> PostScript, has acted as a forcing-frame for the grammatical
> approach...
>
> And the message from Robin Popplestone about type checking open stack
> languages:
> http://www.poplog.org/talk/comp.lang.pop/1993/msg00430.html
> Here he noted the absense of the principal type.
I shall look at those, thank you.
> Serguey Zefirov mailto:sz@...
Billy Tanksley — 2002-01-24 18:07:36
Someone asked (off the list) why I called POP-11 a concatenative language,
when it's actually a language environment including several languages, none
of which are concatenative. Actually, Poplog is the name of the
environment; POP-11 is the concatenative language it's built on.
http://www.poplog.org/docs/primer/
Clearly, pop-11 was designed without an understanding of concatenativity;
however, it's still a stack-based language, with all the power thereof.
-Billy
Louis Madon — 2002-01-24 23:57:30
On Friday, January 25, 2002, at 04:07 AM, Billy Tanksley wrote:
> Someone asked (off the list) why I called POP-11 a concatenative
> language,
> when it's actually a language environment including several languages,
> none
> of which are concatenative. Actually, Poplog is the name of the
> environment; POP-11 is the concatenative language it's built on.
>
> http://www.poplog.org/docs/primer/
>
> Clearly, pop-11 was designed without an understanding of
> concatenativity;
> however, it's still a stack-based language, with all the power thereof.
>
Though Manfred made a good point, stack-based does not necessarily imply
concatenative. Indeed, POP-11 doesn't look concatenative to me at all,
ie you do not create programs by juxtaposing simpler elements. The
syntax seems to have variables and formal arguments and it looks infix
(I've only looked at it for about 5 seconds though ...). I dunno, maybe
you could make a case for it being concatenative at the semantic level.
Louis.
Billy Tanksley — 2002-01-25 00:25:52
From: Louis Madon [mailto:
madonl@...]
>On Friday, January 25, 2002, at 04:07 AM, Billy Tanksley wrote:
>> Clearly, pop-11 was designed without an understanding of
>> concatenativity;
>> however, it's still a stack-based language, with all the
>> power thereof.
>Though Manfred made a good point, stack-based does not
>necessarily imply
>concatenative. Indeed, POP-11 doesn't look concatenative to me at all,
>ie you do not create programs by juxtaposing simpler elements. The
>syntax seems to have variables and formal arguments and it looks infix
>(I've only looked at it for about 5 seconds though ...). I
>dunno, maybe you could make a case for it being concatenative at the
>semantic level.
None of the programs written in it are concatenative. This is clear. The
language clearly has many features which a non-concatenative language needs
and a concatenative one doesn't. But does the language lack something which
it would need in order to be concatenative?
What?
I postulate that if the language has all the features of a concatenative
language, it is in fact concatenative, regardless of what other features it
may have. I do agree, of course, that forcing programmers to name
parameters with every function declaration is unneeded and
non-concatenative; but in the same sense that Joy's function definitions are
non-concatenative, that is, it's a local problem.
>Louis.
-Billy
Louis Madon — 2002-01-25 11:53:59
On Friday, January 25, 2002, at 10:25 AM, Billy Tanksley wrote:
>
> None of the programs written in it are concatenative. This is clear.
> The
> language clearly has many features which a non-concatenative language
> needs
> and a concatenative one doesn't. But does the language lack something
> which
> it would need in order to be concatenative?
>
> What?
>
> I postulate that if the language has all the features of a concatenative
> language, it is in fact concatenative, regardless of what other
> features it
> may have. I do agree, of course, that forcing programmers to name
> parameters with every function declaration is unneeded and
> non-concatenative; but in the same sense that Joy's function
> definitions are
> non-concatenative, that is, it's a local problem.
>
So you seem to be saying that by overlooking enough detail, POP-11 can
be considered "concatenative". That same argument would probably work
for quite a few languages: consider Haskell: it has a 'do' notation that
works in a concatenative way and if you use that notation over a
stack-monad it would even be stack-based. So by your postulate, is
Haskell a concatenative language too?
There is no doubt that many languages have some form of concatenativity
and we should try to learn from them, but I think it is a stretch to say
they _are_ concatenative. It would be more accurate to consider them
multi-paradigm.
(eg. python has all the features needed for functional programming, yet
it is not generally considered a functional language. ie. for
classification, what a language _doesn't_ have can be as important as
what it does have).
I think the only languages I would classify as "concatenative" right now
are Joy, Forth, Postscript as well as some more specialized languages
like that in the dc calculator on unix.
Louis.
[Non-text portions of this message have been removed]
Billy Tanksley — 2002-01-25 18:42:30
From: Louis Madon [mailto:
madonl@...]
>On Friday, January 25, 2002, at 10:25 AM, Billy Tanksley wrote:
>> None of the programs written in it are concatenative. This
>> is clear.
>> The
>> language clearly has many features which a non-concatenative
>> language
>> needs
>> and a concatenative one doesn't. But does the language lack
>> something which it would need in order to be concatenative?
>So you seem to be saying that by overlooking enough detail, POP-11 can
>be considered "concatenative".
If you want to say it that way, yes. I think, though, that the important
thing is that one of POP-11's central distinguishing features is its open
stack.
>That same argument would probably work
>for quite a few languages: consider Haskell: it has a 'do'
>notation that
>works in a concatenative way and if you use that notation over a
>stack-monad it would even be stack-based. So by your postulate, is
>Haskell a concatenative language too?
That's not its outstanding feature, but it's definitely worth noting,
especially since Haskell has been relatively well-researched. It's quite
likely that by listing Haskell as containing concatenative features we'll
find someone who knows of research which touches on them.
> There is no doubt that many languages have some form of
>concatenativity
>and we should try to learn from them, but I think it is a
>stretch to say
>they _are_ concatenative. It would be more accurate to consider them
>multi-paradigm.
POP-11 is certainly multi-paradigm (that's one of its primary purposes).
However, one of its primary paradigms is concatenativity, and this is
especially impressive considering that concatenativity was not "known" at
the time it was designed.
>(eg. python has all the features needed for functional
>programming, yet
>it is not generally considered a functional language.
Mainly because its functional features are so *slow*. Speed them up, and
you'd get a lot more people using them exclusively, and producing purely
functional Python (in spite of the fact that Python is not by any possible
stretch a purely functional language).
>ie. for
>classification, what a language _doesn't_ have can be as important as
>what it does have).
I'm pretty sure you meant to say that the other way around.
>I think the only languages I would classify as "concatenative"
>right now
>are Joy, Forth, Postscript as well as some more specialized languages
>like that in the dc calculator on unix.
You're drawing the same line I'm drawing, but in a different place. Forth
has a feature which makes it non-concatenative: the ability for words to
parse ahead of themselves (thus applying themselves to parameters).
But in reality, Forth is concatenative almost 100% of the time, both in
theory and practice.
>Louis.
-Billy
e1_t — 2002-01-29 10:51:27
> >I think the only languages I would classify as "concatenative"
> >right now
> >are Joy, Forth, Postscript as well as some more specialized
languages
> >like that in the dc calculator on unix.
>
> You're drawing the same line I'm drawing, but in a different
place. Forth
> has a feature which makes it non-concatenative: the ability for
words to
> parse ahead of themselves (thus applying themselves to parameters).
>
That's a consequence of Forth being the only programming language
(that I know of anyway) that provides the programmer with full access
to it's internals. This was more true with older implementations of
Forth than it is now but it's mostly still the case (at least with
those Forths that were written in Forth or assembler).
Also, I'm not completely sure but from what I know Charles Moore's
ColorForth doesn't have a word like PARSE or WORD nor does it give
you access to some form of an input buffer and I don't think it
allows you to parse ahead.
I could be wrong though.
Ivan