Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Other stack-oriented programming languages

26 views
Skip to first unread message

Mauro DiNuzzo

unread,
Mar 11, 2010, 4:25:09 PM3/11/10
to
Does anybody know why other stack-oriented languages (e.g. those listed in
concatenative.org) are currently not supported by a newsgroup like this?

I know Postscript has an active newsgroup, but most of the issues involve
its graphics, rather than programming, capabilities.

Does Forth is the only stack-oriented language which is used for real
applications?

Thanks a lot.


M

Mauro DiNuzzo

unread,
Mar 11, 2010, 4:29:33 PM3/11/10
to
Pardonne moi, another question:

Where can I find a list of words which are thought to be required by a
stack-oriented languages?
I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc), but
also the control/flow word (such as IF).

I am particularly interested in the latter. What is required besides
conditional execution and loops?

Thank you very much.


"Mauro DiNuzzo" <pic...@alice.it> wrote in message
news:Rcdmn.134300$813....@tornado.fastwebnet.it...

MarkWills

unread,
Mar 11, 2010, 4:55:26 PM3/11/10
to
On Mar 11, 9:29 pm, "Mauro DiNuzzo" <pico...@alice.it> wrote:
> Pardonne moi, another question:
>
> Where can I find a list of words which are thought to be required by a
> stack-oriented languages?
> I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc), but
> also the control/flow word (such as IF).
>
> I am particularly interested in the latter. What is required besides
> conditional execution and loops?
>
> Thank you very much.
>
> "Mauro DiNuzzo" <pico...@alice.it> wrote in message

>
> news:Rcdmn.134300$813....@tornado.fastwebnet.it...
>
> > Does anybody know why other stack-oriented languages (e.g. those listed in
> > concatenative.org) are currently not supported by a newsgroup like this?
>
> > I know Postscript has an active newsgroup, but most of the issues involve
> > its graphics, rather than programming, capabilities.
>
> > Does Forth is the only stack-oriented language which is used for real
> > applications?
>
> > Thanks a lot.
>
> > M
>
>

Well, for Forth, I would suggest the best place to start is the
official ANS standard documents, which lists the *required* and the
optional words.

There are various sources on the web where the ANS standard can be
viewed/downloaded, I normally go here:

http://forthworks.com/standards/DPANS/

Not sure if that version is up to date or not. Others here will know
the definitive source.

The core (required) words are in section 6.1

Basically, the core words are considered the minium words that must be
implemented to produced compliant ANS Forth system.

Hope this helps, and welcome to comp.lang.forth

Mark

Elizabeth D Rather

unread,
Mar 11, 2010, 5:02:18 PM3/11/10
to
Mauro DiNuzzo wrote:
> Pardonne moi, another question:
>
> Where can I find a list of words which are thought to be required by a
> stack-oriented languages?
> I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc),
> but also the control/flow word (such as IF).
>
> I am particularly interested in the latter. What is required besides
> conditional execution and loops?
>
> Thank you very much.

Depends on what you mean by "required". That's heavily influenced by
the scope of applications the language is intended to address.
Postscript, for example, has been mainly targeted at low-level document
preparation (e.g. on printers), and therefore has a rather different set
of requirements and needs for optimization than Forth, which was
originally targeted at online control, data acquisition, and analysis (a
much more general set of requirements).

One approach to getting an answer would be to look at the CORE wordset
in ANS Forth, which constitutes the words the Technical Committee deemed
"required" for general Forth programming. And you could compare that
list with whatever minimal sets other stack-oriented languages cite.

Another approach might be to look at the beginners' Forth tutorials,
such as my book "Forth Application Techniques" available from
www.forth.com or Amazon and compare what tutorial writers consider the
"survival skills" with equivalents in other languages.

Cheers,
Elizabeth

> "Mauro DiNuzzo" <pic...@alice.it> wrote in message
> news:Rcdmn.134300$813....@tornado.fastwebnet.it...
>> Does anybody know why other stack-oriented languages (e.g. those
>> listed in concatenative.org) are currently not supported by a
>> newsgroup like this?
>>
>> I know Postscript has an active newsgroup, but most of the issues
>> involve its graphics, rather than programming, capabilities.
>>
>> Does Forth is the only stack-oriented language which is used for real
>> applications?
>>
>> Thanks a lot.
>>
>>
>> M
>


--
==================================================
Elizabeth D. Rather (US & Canada) 800-55-FORTH
FORTH Inc. +1 310.999.6784
5959 West Century Blvd. Suite 700
Los Angeles, CA 90045
http://www.forth.com

"Forth-based products and Services for real-time
applications since 1973."
==================================================

MarkWills

unread,
Mar 11, 2010, 5:02:51 PM3/11/10
to

I think, rather than a measure of the particular languages (e.g.
factor) unpopularity, it is probably a measure of usenet's
unpopularity these days. Sadly newsgroups are slowly becoming a thing
of the past. It used to be that all ISPs had a news server, not so any
more.

I did a quick google on Factor. There certainly seemed to be quite a
lot of sites dedicated to it, and it is certainly a very current,
active language, but yes, no newsgroups. I don't actually know how one
creates a news group. Mailing lists/groups ala Google Groups or Yahoo
Groups are of course simple to set up. I guess people are instead
using Forums on dedicated web sites rather than newsgroups.

It's a shame, because I like the 'format' of newsgroups. I quite like
Google's browser based newsgroup reader, which I use. I find it better
than any newsgroup software I have tried.

Mark

Hugh Aguilar

unread,
Mar 11, 2010, 6:02:35 PM3/11/10
to
On Mar 11, 2:29 pm, "Mauro DiNuzzo" <pico...@alice.it> wrote:
> Where can I find a list of words which are thought to be required by a
> stack-oriented languages?
> I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc), but
> also the control/flow word (such as IF).

Factor is a popular stack-oriented language. It relies heavily on
quotations for accessing the stack, such as with the word DIP and so
forth. There is more than one way to skin a cat, or access a stack.
Factor has stack manipulation words such as you described above, but
it is phasing them out. DUPD has been gone for some time, and even
TUCK is now gone or at least obsolescent.

Doug Hoffman

unread,
Mar 11, 2010, 6:21:07 PM3/11/10
to
On Mar 11, 6:02 pm, Hugh Aguilar <hughaguila...@yahoo.com> wrote:

> Factor is a popular stack-oriented language. It relies heavily on
> quotations for accessing the stack, such as with the word DIP and so
> forth. There is more than one way to skin a cat, or access a stack.
> Factor has stack manipulation words such as you described above, but
> it is phasing them out. DUPD has been gone for some time, and even
> TUCK is now gone or at least obsolescent.

I've tried but I've found it difficult to get my head around Factor.
My failing surely. Forth seems much easier to comprehend in the
whole, at least for me.

-Doug

Hugh Aguilar

unread,
Mar 11, 2010, 7:03:16 PM3/11/10
to
On Mar 11, 4:21 pm, Doug Hoffman <glide...@gmail.com> wrote:
> I've tried but I've found it difficult to get my head around Factor.
> My failing surely. Forth seems much easier to comprehend in the
> whole, at least for me.

I found it difficult to get my head around Factor too. I like
quotations; they are much more convenient that using ['] the way that
we do in Forth (see my EACH function in list.4th for a typical example
of a function that takes an xt as a parameter). On the other hand
though, Factor's use of quotations for simple stack manipulation is
somewhat jarring for me --- that seems to be an example of taking a
good idea too far.

Factor also uses a lot of terminology that I don't understand. I have
difficulty in getting my mind around the concept of dynamic OOP (my
experience with OOP has just been static OOP such as in C++ or
SwiftForth). The documentation is primarily a reference, and it
assumes that the person already knows what he is doing (not a good
description of me!). It is for these reasons that I have put Factor on
the back-burner and gotten interested in Common Lisp instead. Common
Lisp is where most of the concepts in Factor came from, so what I
learn there will carry over to Factor. The advantage of Common Lisp is
that we have abundant literature available, so I have a better chance
of learning the concepts there.

I'm okay at writing simple programs in Factor (symtab and LC53 being
examples), but I'm not very good at taking advantage of the dynamic
OOP aspects of the language. That is my failing --- better educated
programmers would likely learn Factor with greater facility.

Andreas

unread,
Mar 12, 2010, 5:46:18 AM3/12/10
to
schrieb Mauro DiNuzzo:

You may also google for RPN Programming

Anton Ertl

unread,
Mar 12, 2010, 9:18:15 AM3/12/10
to
"Mauro DiNuzzo" <pic...@alice.it> writes:
>Does anybody know why other stack-oriented languages (e.g. those listed in
>concatenative.org) are currently not supported by a newsgroup like this?

If you mean a comp.lang.* newsgroup, it takes quite a bit of effort to
get one of these. Anyone interested in such a language may have found
it easier to get an alt.* newsgroup, a mailing list, or a web forum
going. Or they may prefer mailing lists or web fora to Usenet anyway.
And once the community has a communication medium, the network effect
will work for that medium and against others.

>I know Postscript has an active newsgroup, but most of the issues involve
>its graphics, rather than programming, capabilities.

That probably reflects how people use the language.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2009: http://www.euroforth.org/ef09/

Doug Hoffman

unread,
Mar 12, 2010, 11:11:16 AM3/12/10
to

Same here. I've heard good things about Factor and I suspect that I
just need to put more effort into learning it. I do like the
integrated editor and tight cross-platform approaches.

-Doug

Hugh Aguilar

unread,
Mar 12, 2010, 4:03:35 PM3/12/10
to
On Mar 12, 9:11 am, Doug Hoffman <glide...@gmail.com> wrote:
> Same here. I've heard good things about Factor and I suspect that I
> just need to put more effort into learning it. I do like the
> integrated editor and tight cross-platform approaches.

Factor is making rapid progress. The development environment has
improved a lot within the time that I have been working with the
language. There are also more people on the mailing list now, and they
are using Factor for bigger and more professional projects than what
we used to hear about. Give Factor another year or two, and there will
be more Factor programmers than Forth programmers in the world. This
is why I think that Forth should focus on micro-controllers. I don't
think that we can compete with Factor in regard to desktop software.
On the other hand though, Factor will never be able to compete against
Forth in regard to micro-controller firmware.

P.M.Lawrence

unread,
Mar 13, 2010, 7:06:45 AM3/13/10
to
On Mar 12, 8:29 am, "Mauro DiNuzzo" <pico...@alice.it> wrote:
> Pardonne moi, another question:
>
> Where can I find a list of words which are thought to be required by a
> stack-oriented languages?
> I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc), but
> also the control/flow word (such as IF).
>
> I am particularly interested in the latter. What is required besides
> conditional execution and loops?

Strictly speaking, you can get away with a single construct for
conditional return, if you can end words with tail recursion or if new
words default to ending with tail recursion rather than returns. You
can build up ordinary stack manipulation words (not return stack
manipulation words) from variables with ! and @.

>
> Thank you very much.
>
> "Mauro DiNuzzo" <pico...@alice.it> wrote in message


>
> news:Rcdmn.134300$813....@tornado.fastwebnet.it...
>
> > Does anybody know why other stack-oriented languages (e.g. those listed in
> > concatenative.org) are currently not supported by a newsgroup like this?
>
> > I know Postscript has an active newsgroup, but most of the issues involve
> > its graphics, rather than programming, capabilities.
>
> > Does Forth is the only stack-oriented language which is used for real
> > applications?
>
> > Thanks a lot.
>
> > M
>
>

Concatenative languages are covered at http://tech.groups.yahoo.com/group/concatenative.
P.M.Lawrence.

jo...@by.co.uk

unread,
Mar 16, 2010, 7:54:01 AM3/16/10
to
On Thu, 11 Mar 2010 22:29:33 +0100, "Mauro DiNuzzo" <pic...@alice.it>
wrote:

>Pardonne moi, another question:
>
>Where can I find a list of words which are thought to be required by a
>stack-oriented languages?
>I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc), but
>also the control/flow word (such as IF).
>
>I am particularly interested in the latter. What is required besides
>conditional execution and loops?
>
>Thank you very much.
>
>

I'm suprised no one has mentioned the Loeliger book.
It's a bit old now of course but chapter one begins
"What is a TIL ?"
Followed by chapter two:
"How a TIL works"

It then goes on using very simple flow charts and diagrams to design
a Forth oriented TIL for the Z80 processor explaining the inner/outer
interpreters and each word as it goes.

I suspect this might help if you can get your hands on a copy.

Threaded Interpretive Languages
R.G. Loeliger
ISBN 0-07-038360-X

john.

Ian Osgood

unread,
Mar 16, 2010, 3:49:46 PM3/16/10
to
On Mar 11, 2:29 pm, "Mauro DiNuzzo" <pico...@alice.it> wrote:
> Pardonne moi, another question:
>
> Where can I find a list of words which are thought to be required by a
> stack-oriented languages?
> I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc), but
> also the control/flow word (such as IF).
>
> I am particularly interested in the latter. What is required besides
> conditional execution and loops?
>
> Thank you very much.

It might also be instructive to see how Chuck Moore pared down his
machine Forth instruction sets and personal colorForth development
system.

http://www.colorforth.com/forth.html

stack: dup drop over, push pop (>r r>) (colorforth: nip swap)
words: call ret jump (tail recursion)
flow: if -if for-next (a simple countdown loop)
data: @ ! @+ !+ @r !r lit (colorforth: +!)
math: + invert and xor 2* 2/ (colorforth: * / */)

Chuck has also found that having at least one accumulator register is
a convenient addition to a minimal stack instruction set.

Uwe Kloß

unread,
Mar 16, 2010, 9:21:36 PM3/16/10
to
Mauro DiNuzzo schrieb:

> Pardonne moi, another question:
>
> Where can I find a list of words which are thought to be required by a
> stack-oriented languages?
> I mean the standard stack manipulation words (e.g. DUP, SWAP, OVER etc),
> but also the control/flow word (such as IF).
>
> I am particularly interested in the latter. What is required besides
> conditional execution and loops?
If you go down to the very basics, not even those are needed.
Given explicit access to the return stack you can implement
conditional and unconditional jumps (absolute addresses) and
branches (relative addresses) and then you can build upon that.

So basically _required_ are >R and R>.
And the usual set of arthmetic +,-,... ofcourse.

--
Grüße,
Uwe

0 new messages