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


Groups > comp.lang.forth > #54450

Re: Recognizers and LOCATE

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups comp.lang.forth
Subject Re: Recognizers and LOCATE
Date 2017-01-27 08:37 +0000
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Message-ID <2017Jan27.093738@mips.complang.tuwien.ac.at> (permalink)
References (4 earlier) <o6b428$nj6$1@dont-email.me> <2017Jan26.122402@mips.complang.tuwien.ac.at> <cdWdnSHgZ-G1dxTFnZ2dnUU7-S_NnZ2d@supernews.com> <2017Jan26.163930@mips.complang.tuwien.ac.at> <QK2dnd0vUbLHsxfFnZ2dnUU7-TvNnZ2d@supernews.com>

Show all headers | View raw


Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> Andrew Haley <andrew29@littlepinkcloud.invalid> writes:
>>>The problem that you can't ask a recognizer "Would you recognize this
>>>string?" isn't specific to LOCATE, but it is an example of the way
>>>that new language features can interact with existing practice in
>>>adverse ways.
>> 
>> Reality check!  Look at existing practice for the language feature
>> that the recognizer proposal intends to standardize: interpreter
>> hooks for recognizing things like FP numbers, dot-parsing, etc.
>> They provide no way for interacting with LOCATE or other language
>> features; actually, LOCATE reports an error even for integers which
>> are typically hard-coded in systems.  Apparently no users, not even
>> you, found it worthwhile to complain about this adverse way of
>> feature interaction
>
>Well, no, of course not.  Who would say LOCATE 2 ?

Right, and that despite the possibility in Forth to define, e.g.,

: 2 dup ;

>But in the example
>I cited there is no way for the reader to be able to tell that what
>they're looking at is not a name in the dictionary.  I suppose you
>could argue that the same is true for dot parsers, but then that's a
>black mark against dot parsers, IMO.  Having said that, dot parsers
>aren't being proposed for standardization and their syntax seems to me
>to be quite distinctive and therefore quite benign.

And I expect the same to be true of all successful recognizers, and
the existing system-specific recognizers demonstrate this. You are
proposing to complicate the proposal for a "need" that will probably
never materialize.  A perfect example of Chuck Moore's "Don't
anticipate, solve the problem you've got".

>> (or maybe you did, and the system implementors ignored you).
>
>It's not a problem yet because the use of special "recognizers" for
>dot-parsers etc. is very constrained.

You can hook anything into SwiftForth's NOT-DEFINED and into VFX's n
interpreter hooks, so they are not constrained at all, and certainly
not in the form of strings that they can recognize.

>Standardization is a very high bar.  It's worth examining how a
>feature might work out in practice

We know how the feature works out in practice, because the feature is
present in all Forth systems.  Your predictions are pure fantasy.

And in any case, LOCATE can be implemented to work for recognizers as
currently proposed.

>> As it happens, extending LOCATE to work for recognizers turned out to
>> be not that hard (see
>> <http://git.savannah.gnu.org/cgit/gforth.git/diff/debugs.fs?id=e677b987ce7c96ec0510005b43badbae00e873a7>),
>> probably quite a bit easier than doing it for the n interpreter hooks
>> in VFX (if it is possible to do it with that interface at all), and as
>> a result the only system that has the capability you asked for
>
>There's no need for recognizers to work with LOCATE if there are no
>(user-definable) recognizers.  Therefore any system without
>recognizers has the capability that I asked for.

Ex falso quodlibet.  All popular systems have recognizers, just not
the proposed-standard interface for them.

>I suppose there's some magic hook in recognize, but surely any side
>effect in the recognizer would still happen, would it not?

Sure.  What side effects do you have in mind?  And does anybody care?

- 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 2016: http://www.euroforth.org/ef16/

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


Thread

Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-24 12:38 -0600
  Recognizers and LOCATE JennyB <jennybrien@googlemail.com> - 2017-01-24 10:56 -0800
    Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-01-24 22:25 +0000
      Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-25 03:16 -0600
        Re: Recognizers and LOCATE JennyB <jennybrien@googlemail.com> - 2017-01-25 08:37 -0800
          Re: Recognizers and LOCATE Alex <alex@rivadpm.com> - 2017-01-25 14:22 -0500
            Re: Recognizers and LOCATE Alex <alex@rivadpm.com> - 2017-01-25 14:26 -0500
            Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-01-25 11:49 -0800
              Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-26 03:33 -0600
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-01-26 10:14 -0800
                Re: Recognizers and LOCATE JennyB <jennybrien@googlemail.com> - 2017-01-26 11:04 -0800
            Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-01-26 01:24 +0000
              Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-26 06:26 -0600
                Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-03-12 00:47 +0000
                Re: Recognizers and LOCATE albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-03-12 17:01 +0100
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-03-13 12:31 -0700
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-03-14 04:51 -0500
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-03-14 12:48 -0700
              Re: Recognizers and LOCATE Alex <alex@rivadpm.com> - 2017-01-27 17:18 +0000
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-01-27 09:28 -0800
                Re: Recognizers and LOCATE Alex <alex@rivadpm.com> - 2017-01-27 17:35 +0000
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-01-28 04:29 -0800
        Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-01-25 21:07 +0000
          Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-26 11:24 +0000
            Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-26 06:23 -0600
              Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-26 15:39 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-26 11:14 -0600
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-27 08:37 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-27 03:26 -0600
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-27 11:37 +0000
                Re: Recognizers and LOCATE stephen@mpeforth.com (Stephen Pelc) - 2017-01-27 17:28 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-28 04:22 -0600
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-01-28 04:35 -0800
                Re: Recognizers and LOCATE JennyB <jennybrien@googlemail.com> - 2017-01-28 07:03 -0800
                Re: Recognizers and LOCATE Matthias Trute <matthias.trute@gmail.com> - 2017-01-28 07:42 -0800
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-28 17:25 +0000
                Re: Recognizers and LOCATE peter.m.falth@gmail.com - 2017-01-28 08:05 -0800
                Re: Recognizers and LOCATE JennyB <jennybrien@googlemail.com> - 2017-01-28 09:27 -0800
                Re: Recognizers and LOCATE albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-28 19:18 +0100
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-29 04:35 -0600
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-29 16:59 +0000
                Re: Recognizers and LOCATE albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-29 19:40 +0100
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-31 17:01 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-31 04:12 -0600
                Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-03-12 01:25 +0000
                Re: Recognizers and LOCATE minforth@arcor.de - 2017-03-12 01:30 -0800
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-12 10:07 +0000
                Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-03-15 23:30 +0000
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-16 11:59 +0000
                Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-03-17 21:46 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-03-12 06:51 -0500
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-03-12 13:05 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-03-12 12:04 -0500
  Re: Recognizers and LOCATE albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-24 20:41 +0100
  Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-26 11:52 +0000
    Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-26 08:20 -0600
      Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-26 16:26 +0000
        Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-26 11:27 -0600
          Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-27 09:10 +0000
            Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-27 09:59 -0600
              Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-27 16:16 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-28 04:35 -0600
                Re: Recognizers and LOCATE albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-28 19:41 +0100
                Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-29 16:18 +0000
                Re: Recognizers and LOCATE Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-01-31 04:21 -0600
                Re: Recognizers and LOCATE Bernd Paysan <bernd@net2o.de> - 2017-03-12 01:07 +0000
    Re: Recognizers and LOCATE albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-26 21:08 +0100
      Re: Recognizers and LOCATE anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-01-27 10:13 +0000

csiph-web