Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #39434

Re: COMPILE, and :NONAME

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: COMPILE, and :NONAME
Date 2015-05-29 22:47 +0200
Organization A noiseless patient Spider
Message-ID <mkaj74$f1b$1@dont-email.me> (permalink)
References <mk9jkt$j67$1@dont-email.me> <2015May29.152552@mips.complang.tuwien.ac.at> <mk9sli$lep$1@dont-email.me> <2015May29.164556@mips.complang.tuwien.ac.at>

Show all headers | View raw


Anton Ertl wrote:
> But of course, if you have an intelligent COMPILE, (in contrast to
> Bernd Paysan's "smart COMPILE,")

This is not my idea, this is originally Stephen Pelc's idea.  I like the 
idea, and you did show some considerably sympathy more than 10 years ago, 
too.

https://www.complang.tuwien.ac.at/forth/header-ideas.html

I took up the idea after you made that posting which suggested a new header 
structure, that includes that compile,-field, but also had a separate 
compilation semantics field, but didn't find time to implement it until 
2011.  When implementing it, it became obvious that you also need a TO-
action (or action pair, one for interpretation, one for compilation), and 
that the compilation semantics action in Gforth better can be represented by 
a NAME>INT and NAME>COMP action pair; which might also be a unified xt with 
EXECUTE for NAME>INT and COMPILE, for NAME>COMP, as I do it for the TO 
action.

So the original credit goes to Stephen Pelc (or someone else at MPE), 
followed by Anton Ertl, and I'm only third in the chain.  For me, 
"intelligent COMPILE," is what we had in Gforth 20 years ago, with a 
deferred COMPILE, and a CASE statement to do different things for a small 
list of doers, and allowed to implement the primitive-centric version of 
Gforth.  Ugly, maybe "intelligent", but certainly not "smart".

http://dict.leo.org/#/search=smart&searchLoc=0&resultOrder=basic&multiwordShowSingle=on

(look at the adjective translations).  "Smart" is also "elegant" and 
"proper".

In Stephen Pelc's approach, COMPILE, does perform the compilation semantics  
- which normally is appending the execution semantics, and therefore 
normally not different from the standard's COMPILE, - and where it *is* 
different, only one case of standard words have well-specified properties: 
IMMEDIATE words.  In his approach, there's a fairly small set of clearly 
different concepts. That's not exactly what you want, but it's IMHO a good 
idea.  And that's why I defend his idea.

IMHO, your idea is too much about preserving backwards compatibility to 
something you read into the standard (not something that really exists 
outside Gforth), without evidence that people did put that deliberately and 
as an informed decision into the standard.  The latter is necessary, because 
standards come by votes.  Only an informed decision can result in a valid 
vote, everything else is an accident.

Your concept "breaks symmetry" at two points:

* You distinguish between named and unnamed words

* You distinguish between text interpreter and the usage of xts.

Both are related.

Stephen Pelc showed that unifying that works remarkable well.  It is hard to 
identify real code breakage (unlike e.g. his source tokenizer, where we have 
not only academic examples of broken code, but broken real-world code), and 
we made sure that the Forth-2012 is sufficiently ambiguous to fully allow 
his apprach.  This approach is standard, with the limitation that you can't 
do

: immediate ['] execute set-compiler ;

So the old immediate/state concept is a wart here.  But at least it is a 
legacy concept we can declare obsolescent.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
net2o ID: kQusJzA;7*?t=uy@X}1GWr!+0qqp_Cn176t4(dQ*
http://bernd-paysan.de/

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 12:48 +0100
  Re: COMPILE, and :NONAME Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2015-05-29 14:15 +0100
    Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 15:23 +0100
  Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-29 13:25 +0000
    Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 15:22 +0100
      Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-29 14:45 +0000
        Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 17:09 +0100
          Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 17:13 +0100
          Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-29 17:21 +0000
            Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 19:36 +0100
        Re: COMPILE, and :NONAME Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-29 22:47 +0200
          Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-29 23:23 +0100
            Re: COMPILE, and :NONAME Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-30 02:03 +0200
              Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-30 20:58 +0100
            Re: COMPILE, and :NONAME anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2015-05-30 11:56 +0000
              Re: COMPILE, and :NONAME albert@spenarnc.xs4all.nl (Albert van der Horst) - 2015-05-30 13:34 +0000
              Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-05-30 20:54 +0100
                Re: COMPILE, and :NONAME foxaudioresearch@gmail.com - 2015-06-01 17:34 -0700
                Re: COMPILE, and :NONAME "Alex McDonald" <blog@rivadpm.com> - 2015-06-02 15:54 +0100
              Re: COMPILE, and :NONAME Bernd Paysan <bernd.paysan@gmx.de> - 2015-05-30 23:45 +0200

csiph-web