Re: [stack] the concatenative wikipedia article

"pml060912" <[email protected]>
Newsgroups gmane.comp.lang.concatenative
Message-ID <[email protected]>
--- In [email protected], "William Tanksley, Jr"
<wtanksleyjr@...> wrote:
>
> pml060912 <pml540114@...> wrote:
.
.
.
> > Well, where does Furphy fit in this breakdown?
> > (http://users.beagle.com.au/peterl/furphy.html)
> > Although it does have quotation, as I mentioned elsewhere that's just
> > syntactic sugar. The fundamental constructs are Reverse Polish naming
> > and concatenation, which can use the complementary keywords FREEZE and
> > THAW to defer and invoke evaluation/execution - and those can be built
> > from the return stack manipulation keywords R> and >R already found in
> > Forth. That looks fairly associative/flat to me.
> 
> Furphy is a fascinating language; I had no idea it had such an
> interesting loop system. I'd say that Furphy probably is
> flat/completely associative; but note that I'm not sure what to do
> with the "Reverse Polish naming" system.
.
.
.
> Unfortunately, Furphy is a foreign language to me, so I can't
> understand the discussion of FREEZE and THAW.

The discussion is mainly aimed at describing what is going on behind
the scenes and how to use the constructs in coding. Your comments
imply that I need to work on that part of the page. You might find it
easier to think of them in terms of continuations - FREEZE sets one up
and THAW uses it.

 I think the use of
> "Reverse Polish Naming" is blocking my understanding -- I can't tell
> when a word I don't recognize is intended to be a definition versus
> when it's simply unfamiliar to me.

I can see how that would matter for following someone else's code, not
so much for the coding process itself. I was thinking of addressing it
with compiler warning messages and a prettyprinting standard for
coding (it would be easy for the compiler to generate that as part of
a log).

In my examples I've tried to separate code that way, so each
"paragraph" (maybe only one line) either ends with a definition or is
the last one (which will be run). Maybe I need to be clearer and
double check that there is always an "and run" paragraph for each
example or a clear indication that I'm not providing one (technically,
I am - a null one).

 With all due respect, I'm pretty
> sure that Reverse Polish Naming isn't a good idea; it's way too easy
> to mess a file's semantics up by pre-defining one of the words it
> intends to define. I'd far rather make definitions explicit.

This comes as part of the larger problem of making typos - the low to
zero amount of syntax means that the compiler doesn't enforce/catch
things as much as many languages would. But I want to stay with the
Forth spirit of trusting and enabling the programmer, so I think
warnings for each new word are enough. Also, I don't want to introduce
"special" handling that would bring back modes or the equivalent,
except as syntactic sugar like the quotation system, to keep the
fundamentals simple and consistent. So I'll give some thought to
syntactic sugar for naming, i.e. something that could be handled by a
preprocessor even though actual implementation would use immediate
keywords to integrate it with the compiler - suggestions welcome.
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.