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


Groups > comp.lang.forth > #14964

Re: Is this example in the Forth200x draft 11.1 correct?

From Bernd Paysan <bernd.paysan@gmx.de>
Newsgroups comp.lang.forth
Subject Re: Is this example in the Forth200x draft 11.1 correct?
Date 2012-08-14 23:22 +0200
Organization 1&1 Internet AG
Message-ID <1876345.Lf2Sq2lVPB@sunwukong.fritz.box> (permalink)
References (9 earlier) <56da5322-7809-4416-b938-cc310a468e4b@wk9g2000pbc.googlegroups.com> <2409423.AByEuxd1Oh@sunwukong.fritz.box> <374b6df5-0559-43b8-87fe-29d40d73fc0d@vg10g2000pbc.googlegroups.com> <1567369.KTIXEJGLlc@sunwukong.fritz.box> <a0edee19-e7b4-4da1-9a5c-3114090bb664@nj2g2000pbc.googlegroups.com>

Show all headers | View raw


Hugh Aguilar wrote:
> I remember being very unimpressed by NEXTNAME because it introduced
> another state. I don't actually remember how EXECUTE-PARSING works,
> but I knew at one time and I remember thinking that it was overly
> complicated as most everything in Forth-200x seems to be.

There is a compatible implementation, which is not that easy.  But if 
you know how to implement EVALUATE, EXECUTE-PARSING is totally easy: Do 
exactly the same things, but instead of calling INTERPRET, do EXECUTE on 
the xt.

That's how we implement it in Gforth.  And then we define evaluate as

: evaluate ['] interpret execute-parsing ;

I.e. execute-parsing is a factor of evaluate.  We have another for 
files, because quite often, you want to read files with your own 
interpreter, too.  So we do the same thing there - instead of doing 
INTERPRET on each line, we execute an xt for each line, and expose that 
factor to the user.

> If nothing else, the name EXECUTE-PARSING is ugly compared to :NAME.

Propose a better name.  It hasn't so much traction that a better name 
can't be adopted.  A usual procedure during standardization is to select 
another name.

My take on this would be EVAL-WITH, and for the file INCLUDED-WITH.

-- 
Bernd Paysan
"If you want it done right, you have to do it yourself"
http://bernd-paysan.de/

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


Thread

Is this example in the Forth200x draft 11.1 correct? "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-08-03 16:23 -0400
  Is this example in the Forth200x draft 11.1 correct? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-03 13:49 -0700
  Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-03 23:07 +0200
    Re: Is this example in the Forth200x draft 11.1 correct? "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-08-03 18:28 -0400
      Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-04 02:49 +0200
        Re: Is this example in the Forth200x draft 11.1 correct? "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-08-04 04:33 -0400
          Re: Is this example in the Forth200x draft 11.1 correct? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-04 04:37 -0500
  Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-06 21:27 -0700
    Re: Is this example in the Forth200x draft 11.1 correct? Howerd <howerdo@yahoo.co.uk> - 2012-08-07 00:04 -0700
    Re: Is this example in the Forth200x draft 11.1 correct? "Rod Pemberton" <do_not_have@notemailnot.cmm> - 2012-08-07 05:05 -0400
      Re: Is this example in the Forth200x draft 11.1 correct? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-07 14:18 +0000
        Re: Is this example in the Forth200x draft 11.1 correct? Alex McDonald <blog@rivadpm.com> - 2012-08-07 09:39 -0700
          Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-07 20:20 +0200
            Re: Is this example in the Forth200x draft 11.1 correct? Alex McDonald <blog@rivadpm.com> - 2012-08-07 12:31 -0700
              Re: Is this example in the Forth200x draft 11.1 correct? Alex McDonald <blog@rivadpm.com> - 2012-08-07 13:26 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-08 00:49 +0200
            Re: Is this example in the Forth200x draft 11.1 correct? Alex McDonald <blog@rivadpm.com> - 2012-08-07 12:33 -0700
          Re: Is this example in the Forth200x draft 11.1 correct? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-08 07:21 +0000
          Re: Is this example in the Forth200x draft 11.1 correct? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-08 01:12 -0700
            Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-08 19:11 +0200
        Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-07 19:29 -0700
        Re: Is this example in the Forth200x draft 11.1 correct? Elizabeth D Rather <erather@forth.com> - 2012-08-07 22:01 -0500
          Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-07 20:07 -0700
            Re: Is this example in the Forth200x draft 11.1 correct? Elizabeth D Rather <erather@forth.com> - 2012-08-07 23:03 -0500
          Re: Is this example in the Forth200x draft 11.1 correct? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-08 07:42 +0000
            Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-08 18:12 -0700
              Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-08 18:59 -0700
              Re: Is this example in the Forth200x draft 11.1 correct? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-09 02:30 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-09 09:48 +0000
                Re: Is this example in the Forth200x draft 11.1 correct? Percy <percival.andrews@gmail.com> - 2012-08-10 06:33 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? "David N. Williams" <williams@umich.edu> - 2012-08-10 09:58 -0400
                Re: Is this example in the Forth200x draft 11.1 correct? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-10 15:39 +0000
                Re: Is this example in the Forth200x draft 11.1 correct? "David N. Williams" <williams@umich.edu> - 2012-08-10 16:15 -0400
                Re: Is this example in the Forth200x draft 11.1 correct? percival.andrews@gmail.com - 2012-08-10 16:42 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? Coos Haak <chforth@hccnet.nl> - 2012-08-11 01:51 +0200
                Re: Is this example in the Forth200x draft 11.1 correct? George Hubert <georgeahubert@yahoo.co.uk> - 2012-08-11 06:25 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-11 09:12 +0000
                Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-13 14:28 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-14 00:51 +0200
                Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-13 16:24 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-14 03:25 +0200
                Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-14 07:54 -0700
                Re: Is this example in the Forth200x draft 11.1 correct? Bernd Paysan <bernd.paysan@gmx.de> - 2012-08-14 23:22 +0200
                Re: Is this example in the Forth200x draft 11.1 correct? hughaguilar96@yahoo.com - 2012-08-16 00:37 -0700
      Re: Is this example in the Forth200x draft 11.1 correct? Hugh Aguilar <hughaguilar96@yahoo.com> - 2012-08-07 19:30 -0700

csiph-web