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


Groups > comp.lang.forth > #14965

Re: ALSO - anything better?

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: ALSO - anything better?
Date 2012-08-15 12:57 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2012Aug15.145730@mips.complang.tuwien.ac.at> (permalink)
References (2 earlier) <k05i42$re0$1@speranza.aioe.org> <xOidnehCtoggA7vNnZ2dnUVZ_tadnZ2d@supernews.com> <k077jg$tp6$1@speranza.aioe.org> <bpydnZ0uzdQa_LrNnZ2dnUVZ_tadnZ2d@supernews.com> <k0cu9r$m6o$1@speranza.aioe.org>

Show all headers | View raw


"Ed" <invalid@nospam.com> writes:
>Apparently LMI cross-compiled with *three* (context current forth).
>The commercial Nautilus cross-compiler was, I believe, fig-Forth
>which had a similar limited search order.
>
>Whether one searches by stacking vocabs, or explicitly executing
>them as required, the result should be the same.  No?

No.  See below.

>Stacking vocabs has the same issue as too many items on the
>data stack - it's difficult to keep track.

And yet we use a stack, and not two registers plus a constant (which
would be the equivalent of "context current forth").

And while the number of stack items manipulated within a word should
be three or less, there can be many more items on the stack during
execution that belong to parent or child words and that you don't have
to think about when programming one word.

Likewise, on the search order stack there is usually only one or two
items that I care about, and it's trivial to keep track of that; I
have never felt a need for search order equivalents of SWAP and OVER
(and there are no words for that), another reason why keeping track of
the search order stack is a non-problem.

>  And then there's the
>support words to save/restore search order etc.

Likewise, I have never felt the need to save and restore the search
order.  That's the advantage of the stack design: I just push the
wordlist I want searched on the stack, and when I am done with that, I
remove it with PREVIOUS.  No need for saving and restoring the search
order.

The only case where you need to remove the rest of the search order
(and therefore save and restore the old search order) is if you are
using names that are not in any wordlist that you know is guaranteed
to be on the stack, and you want a guarantee that this name is not
found.  I have not encountered such a need, and the only possible
occasion currently coming to mind is when a system is turnkeyed (and
then you don't want to save and restore the old search order).

- 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 2012: http://www.euroforth.org/ef12/

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


Thread

16.6.2.0715 ALSO Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-31 05:33 -0700
  Re: 16.6.2.0715 ALSO anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-07-31 14:43 +0000
    Re: 16.6.2.0715 ALSO Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-31 08:08 -0700
      Re: 16.6.2.0715 ALSO "David N. Williams" <williams@umich.edu> - 2012-07-31 11:35 -0400
  Re: 16.6.2.0715 ALSO Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-07-31 11:03 -0500
  ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-08 16:28 +1000
    Re: ALSO - anything better? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-08 01:22 -0700
      Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-08 10:33 +0000
      Re: ALSO - anything better? Alex McDonald <blog@rivadpm.com> - 2012-08-08 03:52 -0700
        Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-11 22:13 +1000
          Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-11 12:15 +0000
            Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-13 21:22 +1000
              Re: ALSO - anything better? Alex McDonald <blog@rivadpm.com> - 2012-08-13 04:44 -0700
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-14 18:46 +1000
              Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-13 10:03 -0500
          Re: ALSO - anything better? Spam@ControlQ.com - 2012-08-11 11:31 -0400
            Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-11 16:01 +0000
              Re: ALSO - anything better? Spam@ControlQ.com - 2012-08-12 16:02 -0400
            Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-11 11:37 -0500
          Re: ALSO - anything better? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-11 08:04 -1000
            Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-12 13:26 +1000
              Re: ALSO - anything better? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-11 21:55 -1000
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-14 17:18 +1000
                Re: ALSO - anything better? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-13 21:53 -1000
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-14 19:25 +1000
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-14 19:40 +1000
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-15 12:57 +0000
                Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-15 10:09 -0500
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-15 15:12 +0000
                Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-15 10:21 -0500
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-15 16:26 +0000
                Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-15 12:08 -0500
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-15 17:38 +0000
                Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-15 13:10 -0500
                Re: ALSO - anything better? mhx@iae.nl - 2012-08-15 13:49 -0700
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-16 12:34 +0000
                Re: ALSO - anything better? mhx@iae.nl (Marcel Hendrix) - 2012-08-16 20:13 +0200
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-17 14:07 +0000
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-16 14:08 +1000
                Re: ALSO - anything better? Alex McDonald <blog@rivadpm.com> - 2012-08-16 02:30 -0700
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-16 11:51 +0000
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-18 03:09 +1000
                Re: ALSO - anything better? Alex McDonald <blog@rivadpm.com> - 2012-08-17 17:13 -0700
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-19 14:13 +1000
                Re: ALSO - anything better? Alex McDonald <blog@rivadpm.com> - 2012-08-19 09:57 -0700
                Re: ALSO - anything better? stephenXXX@mpeforth.com (Stephen Pelc) - 2012-08-16 10:28 +0000
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-16 12:38 +0000
                Re: ALSO - anything better? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-16 11:07 -0500
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-17 22:12 +1000
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-16 12:45 +0000
                Re: ALSO - anything better? "Ed" <invalid@nospam.com> - 2012-08-18 03:14 +1000
                Re: ALSO - anything better? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-17 17:31 +0000
                Re: ALSO - anything better? Alex McDonald <blog@rivadpm.com> - 2012-08-17 17:14 -0700
                Re: ALSO - anything better? BruceMcF <agila61@netscape.net> - 2012-08-18 10:16 -0700
                Re: ALSO - anything better? "David N. Williams" <williams@umich.edu> - 2012-08-18 15:41 -0400
              Re: ALSO - anything better? BruceMcF <agila61@netscape.net> - 2012-08-15 12:14 -0700

csiph-web