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


Groups > comp.lang.forth > #134576

Re: Recognizer proposal

Date 2026-02-12 11:35 +1100
Subject Re: Recognizer proposal
Newsgroups comp.lang.forth
References <2026Feb9.084944@mips.complang.tuwien.ac.at> <nnd$1c958fc8$24a55a72@293ae8f8b50e0c83> <mv19avFqi4mU1@mid.individual.net> <698bcb8b$1@news.ausics.net> <nnd$4b4385df$6fc207a6@bc51f1c3df4eeea6>
From dxf <dxforth@gmail.com>
Message-ID <698d205a$1@news.ausics.net> (permalink)
Organization Ausics - https://newsgroups.ausics.net

Show all headers | View raw


On 12/02/2026 12:34 am, Hans Bezemer wrote:
> On 11-02-2026 01:21, dxf wrote:
>> On 11/02/2026 4:48 am, jkn wrote:
>>> ...
>>> I have no skin in this game at all - I am basically an observer of both the language,
>>> and this newsgroup. But it seems strange to me that in a language that is so
>>> self-describedly flexible as Forth, the operation of the inner interpreter should
>>> not itself be open to flexibility.
>>
>> IIRC recognizers was a c.l.f invention.  Each forth, it was noted, had its own way
>> of integrating floating-point into the system - fp being an 'optional extension'
>> of Forth-94.  Typically integration was achieved through hooks the system designer
>> had purposely built into system.  Forth-94 had already defined how the forth
>> interpreter should handle fp numbers.  Parsing words F# etc were not an option.
>>
>> WIBN (wouldn't it be nice) it was argued if these hooks into the interpreter could
>> be made portable.  It caught the imagination of sufficient users (in forth there's
>> little distinction between user and system-designer) and the rest is history.
>> Recognizers were sufficiently complicated prompting more justification than fp (1)
>> in order to sell it.  It was 'a solution in search of a problem'.  From that came
>> the idea that forth should be able to parse *anything* - however unlikely or little
>> used.
>>
>> (1) While fp integration prompted recognizers, recognizers were never a complete
>> solution.  Integrating fp into a system often requires more than simply making the
>> interpreter recognize fp numbers.  System-specific hooks remain.
>>
> 
> Extending the functionality of already defined words (in previous wordsets) was always a weak point of ANS-94. I don't know if other language standards use this, but I don't feel comfortable with "redefining" or "extending" words.
> 
> BTW, S" is one of the few examples of words that are not stateless (contrary to CHAR and [CHAR], ' and ['], ." and .( etc.).
> 
> They could have spared us a lot of trouble defining S( - or whatever. But consistency has never been Forth's strong point, unfortunately. It's always trends that are aborted half way, because the maintenance efforts are getting out of hand.
> 
> This discrepancy between pragmatism and "a brave new world" becomes painfully clear when reading section 12.3.7:
> 
> "If the Floating-Point word set is present in the dictionary and the current base is DECIMAL, the input number-conversion algorithm shall be extended to recognize floating-point numbers."
> 
> Which means you have to do an overhaul of the text interpreter. Which is a HORRIBLE requirement!
> 
> And its rationale:
> 
> "A.12.3.7 Text interpreter input number conversion. The Technical Committee has more than once received the suggestion that the text interpreter in Standard Forth systems should treat numbers that have an embedded decimal point, but no exponent, as floating-point numbers rather than double cell numbers. This suggestion, although it has merit, has always been voted down because it would break too much existing code; many existing implementations put the full digit string on the stack as a double number and use other means to inform the application of the location of the decimal point."
> 
> It would have been better if such requirement had NOT existed and (as ugly as it is) S" 12.34e" >FLOAT had remained the only accepted way to enter an FP number - OR a word like F% or F# had been brought into existence for the time being.

I would say by the time ANS-TC began its deliberations the die had already been cast.
The 'Standard Floating Point Extension' published in 1985 by the Forth Vendors Group
(LMI and Micromotion with input from several vendors) required input in the form:

  If the floating point extension word set has been overlaid onto a 
  83-Standard Forth system, a string of the following form will be 
  compiled or interpreted as a real number:

                  nnnn.nnnExx

  The "E" signifier is mandatory to force the conversion of a real 
  number.  The presence of numeric digits before or after the "E" 
  is not required by this specification but may be mandatory in 
  some implementations.  A "-" sign may precede both the mantissa 
  and the exponent, a leading "+" sign is also permissible on the 
  exponent. A decimal point is optional and occur anywhere in the 
  mantissa.  For example, all of the following numbers are legal:

                  -.0001E5
                  100.0E+0
                  1000.E-15

After Forth-83 which split vendors, ANS-TC wasn't going to do anything that drew the
ire of an existing user base.  One only has to look at the flack Forth-94 received
when a section of existing locals users didn't get what they were expecting.

> I still think that meddling with the text interpreter is a big no-no and an invitation to disaster. Never leave to a computer that which a programmer can signify as his intent. Although I'm still not dancing on the table, that is at least one of the characteristics of Alberts proposal (and it leaves the text interpreter largely intact!)

I get it but IMO f/p isn't something one simply LOADs - even if Forth-94 sold it that
way as a nod to minimalists.  With the exception of folks like me (and perhaps you)
who want to be able to load a variety of f/p packs, f/p is there when one boots forth.
What the eyes don't see, the heart doesn't grieve.

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


Thread

Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-09 07:49 +0000
  Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-10 13:36 +0100
    Re: Recognizer proposal jkn <jkn+nin@nicorp.co.uk> - 2026-02-10 17:48 +0000
      Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-11 11:21 +1100
        Re: Recognizer proposal jkn <jkn+nin@nicorp.co.uk> - 2026-02-11 09:05 +0000
          Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-11 12:46 +0100
          Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-11 13:36 +0100
            Re: Recognizer proposal jkn <jkn+nin@nicorp.co.uk> - 2026-02-11 20:49 +0000
          Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-11 18:37 +0000
            Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-13 12:25 +0100
        Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-11 14:34 +0100
          Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-12 11:35 +1100
            Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-12 07:24 +0000
              Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-12 10:59 +0100
                Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-12 10:13 +0000
                Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-13 13:22 +0100
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-13 13:07 +0100
              Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-12 20:59 +1100
            Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-13 12:35 +0100
              Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-13 13:30 +0100
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-13 13:44 +0100
          Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-12 07:35 +0000
            Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-12 10:55 +0100
              Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-13 08:27 +0000
                Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-13 13:43 +0100
                Re: Recognizer proposal Gerry Jackson <do-not-use@swldwa.uk> - 2026-02-13 23:50 +0000
                Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-14 12:53 +1100
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-15 13:33 +0100
                Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-16 12:18 +1100
                Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-19 13:42 +0100
                Evolution of Forths  was Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-19 14:38 +0100
                Re: Evolution of Forths was Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-20 12:33 +1100
                Re: Evolution of Forths was Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-20 11:58 +0100
                Re: Evolution of Forths was Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-24 10:45 +1100
                Re: Evolution of Forths was Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-21 16:35 +0100
                Re: Evolution of Forths was Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-24 13:13 +1100
          Re: Recognizer proposal Paul Rubin <no.email@nospam.invalid> - 2026-02-25 20:25 -0800
            Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-26 06:53 +0000
            Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-26 13:09 +0100
              Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-27 20:24 +1100
              Re: Recognizer proposal Gerry Jackson <do-not-use@swldwa.uk> - 2026-02-27 09:25 +0000
                Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-27 14:48 +0000
              Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-27 19:21 +0100
                Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-28 10:15 +1100
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-28 15:34 +0100
                Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-28 17:56 +0100
                Re: Recognizer proposal Paul Rubin <no.email@nospam.invalid> - 2026-02-28 22:45 -0800
                Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-03-01 07:54 +0000
                Re: Recognizer proposal Paul Rubin <no.email@nospam.invalid> - 2026-03-01 14:17 -0800
                Re: Recognizer proposal antispam@fricas.org (Waldek Hebisch) - 2026-03-02 00:21 +0000
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-03-02 12:36 +0100
                Re: Recognizer proposal Paul Rubin <no.email@nospam.invalid> - 2026-03-04 16:48 -0800
                Re: Recognizer proposal antispam@fricas.org (Waldek Hebisch) - 2026-03-02 00:17 +0000
            Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-02-26 07:32 -0600
            Re: Recognizer proposal Stephen Pelc <stephen@vfxforth.com> - 2026-03-02 13:23 +0000
              Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-03-03 13:47 +0100
                Re: Recognizer proposal Stephen Pelc <stephen@vfxforth.com> - 2026-03-03 14:39 +0000
                Re: Recognizer proposal Paul Rubin <no.email@nospam.invalid> - 2026-03-04 16:52 -0800
                Re: Recognizer proposal Stephen Pelc <stephen@vfxforth.com> - 2026-03-06 10:54 +0000
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-03-06 12:22 +0100
                Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-03-07 17:58 +0100
              Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-03-03 18:33 +0100
      Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-11 13:54 +0100
        Re: Recognizer proposal jkn <jkn+nin@nicorp.co.uk> - 2026-02-11 13:09 +0000
          Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-11 15:59 +0100
            Re: Recognizer proposal jkn <jkn+nin@nicorp.co.uk> - 2026-02-11 20:46 +0000
        Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-11 16:30 +0000
          Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-12 12:07 +0100
            Re: Recognizer proposal Lars Brinkhoff <lars.spam@nocrew.org> - 2026-02-12 13:00 +0000
            Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-12 12:55 +0000
              Re: Recognizer proposal Hans Bezemer <the.beez.speaks@gmail.com> - 2026-02-13 14:17 +0100
            Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-13 13:28 +0100
              Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-14 01:23 +1100
            Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-02-16 22:07 -0600
              Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-17 21:25 +1100
                Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-02-17 08:16 -0600
                Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-21 15:32 +0000
              Re: Recognizer proposal Stephen Pelc <stephen@vfxforth.com> - 2026-02-17 14:13 +0000
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-17 20:21 +0100
                Re: Recognizer proposal dxf <dxforth@gmail.com> - 2026-02-18 13:08 +1100
    Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-11 12:29 +0100
  Re: Recognizer proposal minforth <minforth@gmx.net> - 2026-02-18 11:14 +0100
    Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-21 15:40 +0000
      Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-02-24 02:43 -0600
        Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-03-08 18:15 -0500
          Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-03-09 07:49 +0000
            Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-03-09 10:37 +0100
              Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-03-10 07:35 +0000
                Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-03-10 12:06 +0100
                Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-03-11 09:48 -0500
            Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-03-09 16:48 -0500
              Re: Recognizer proposal Krishna Myneni <krishna.myneni@ccreweb.org> - 2026-03-11 09:45 -0500
  Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-18 12:33 +0100
    Re: Recognizer proposal anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2026-02-21 15:48 +0000
      Re: Recognizer proposal albert@spenarnc.xs4all.nl - 2026-02-25 14:11 +0100
  Re: Recognizer proposal NN <november.nihal@gmail.com> - 2026-03-19 19:23 +0000
    Re: Recognizer proposal thresh3@fastmail.com (Lev) - 2026-03-19 23:13 +0000

csiph-web