• Re: Recognizer proposal

    From Stephen Pelc@stephen@vfxforth.com to comp.lang.forth on Tue Feb 17 14:13:02 2026
    From Newsgroup: comp.lang.forth

    On 17 Feb 2026 at 05:07:48 CET, "Krishna Myneni" <krishna.myneni@ccreweb.org> wrote:

    Make what you will about it. In my experience, for-profit companies tend
    to be conservative about introducing new features, especially if they
    think customers won't want it.

    Revisions to the kForth-64 code to support recognizers are in progress.

    --
    Krishna Myneni

    We are not really conservative about new features, but we are really, really conservative about breaing clients' existing code. In other words, changing
    how things work is much more dangerous than adding new operations.

    Breaking client code leads to screams and immediate angry calls and
    emails. We make great efforts not to break an app with over one million
    lines of Forth source code. We do not have access to most client code.

    Stephen
    --
    Stephen Pelc, stephen@vfxforth.com
    Wodni & Pelc GmbH
    Vienna, Austria
    Tel: +44 (0)7803 903612, +34 649 662 974 http://www.vfxforth.com/downloads/VfxCommunity/
    free VFX Forth downloads
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Tue Feb 17 08:16:43 2026
    From Newsgroup: comp.lang.forth

    On 2/17/26 4:25 AM, dxf wrote:
    On 17/02/2026 3:07 pm, Krishna Myneni wrote:
    On 2/12/26 5:07 AM, Hans Bezemer wrote:
    On 11-02-2026 17:30, Anton Ertl wrote:
    ...
    BTW, if you have questions about "INTERPRET", please direct them to Forth Inc. https://www.forth.com/starting-forth/11-forth-compiler- defining-words/


    A simple search on "Swift Forth recognizers" returns this

    https://www.forth.com/recognizers/

    Make what you will about it. In my experience, for-profit companies tend to be conservative about introducing new features, especially if they think customers won't want it.
    ...

    OTOH had FI been dead against it for whatever reason it's doubtful the proposal would have gotten as far as it has. Some proposals end up permanently on death row never quite reaching the chopping block. Long
    ago I put up a draft proposal on c.l.f for UPC >UPPER to gauge its chance
    of success. The response from vendors present could be summed up as 'not interested'. By now most everyone understands what's involved and lobbies privately and strategically or not at all. I say 'most' because watching
    the ones that don't can be quite amusing ;-)



    I'll qualify my statement about companies being conservative as mostly applicable to small companies. Obviously companies like Microsoft,
    Apple, and Google will simply force large scale changes on users. But
    smaller companies can't do that.

    Regarding advancing the proposal process, one has to stay with it for an extended time. The recognizer proposal is now greater than 10 years old
    before it is getting close to a call for votes. My IEEE fp proposal was retired by the committe, partly due to me not having time to pursue it,
    but I recently changed its status back to informal proposal with the
    intent to improve the rationale and strengthen it.

    --
    KM

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Tue Feb 17 20:21:43 2026
    From Newsgroup: comp.lang.forth

    In article <10n1t1e$1qn3f$1@dont-email.me>,
    Stephen Pelc <stephen@vfxforth.com> wrote:
    On 17 Feb 2026 at 05:07:48 CET, "Krishna Myneni" <krishna.myneni@ccreweb.org> >wrote:

    Make what you will about it. In my experience, for-profit companies tend
    to be conservative about introducing new features, especially if they
    think customers won't want it.

    Revisions to the kForth-64 code to support recognizers are in progress.

    --
    Krishna Myneni

    We are not really conservative about new features, but we are really, really >conservative about breaing clients' existing code. In other words, changing >how things work is much more dangerous than adding new operations.

    Breaking client code leads to screams and immediate angry calls and
    emails. We make great efforts not to break an app with over one million
    lines of Forth source code. We do not have access to most client code.

    I introduced PREFIX (mini recognizers) and nobody could notice.
    It changed implementation of numbers, and made possible a $ prefix,
    and normal strings. However all previous programs kept on working.

    Giving out day by day updates, where a serious client is obliged to
    validate the whole compiler again, is a nono by my book.


    Stephen

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Wed Feb 18 13:08:00 2026
    From Newsgroup: comp.lang.forth

    On 18/02/2026 1:13 am, Stephen Pelc wrote:
    On 17 Feb 2026 at 05:07:48 CET, "Krishna Myneni" <krishna.myneni@ccreweb.org> wrote:

    Make what you will about it. In my experience, for-profit companies tend
    to be conservative about introducing new features, especially if they
    think customers won't want it.

    Revisions to the kForth-64 code to support recognizers are in progress.

    --
    Krishna Myneni

    We are not really conservative about new features, but we are really, really conservative about breaing clients' existing code. In other words, changing how things work is much more dangerous than adding new operations.
    ...

    But surely you have broken clients' code e.g. floating-point output. Presumably
    it was justified as 'short-term pain for long-term gain'. Similarly Forth-94, dual-xt etc etc. AFAICS it comes down to what one personally feels to be the right thing. If the will exists, customer reaction is a matter of management.

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From minforth@minforth@gmx.net to comp.lang.forth on Wed Feb 18 11:14:11 2026
    From Newsgroup: comp.lang.forth

    Am 09.02.2026 um 08:49 schrieb Anton Ertl:
    A more fleshed-out version of the current recognizer proposal is
    online: <https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1614>

    After many years this proposal is in transition from being fluid to
    solid, so if you want major upheavals, I doubt that your input will be
    acted upon (but you might still want to give it). OTOH, if you find
    any mistakes, missing parts or unclear parts, now is the time when
    your input will be most effective. In either case, please report any feedback by clicking on the Reply button on the web page above.


    Thank you for your editorial review of the proposal!

    This is not the time or place for criticism. Everyone must decide for themselves whether this flavour of recognisers is useful for their applications.

    At least it shows that things are moving again in Forth!
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Feb 18 12:33:05 2026
    From Newsgroup: comp.lang.forth

    In article <2026Feb9.084944@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    A more fleshed-out version of the current recognizer proposal is
    online: ><https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1614>

    After many years this proposal is in transition from being fluid to
    solid, so if you want major upheavals, I doubt that your input will be
    acted upon (but you might still want to give it). OTOH, if you find
    any mistakes, missing parts or unclear parts, now is the time when
    your input will be most effective. In either case, please report any >feedback by clicking on the Reply button on the web page above.

    After the header Solution:
    "As before the text interpreter parses a white-space-delimited string. "
    2]

    What does that mean in the context of:

    "We gaan naar Rome" TYPE

    ?
    Are there one or four delimiters in this string?

    In section 3.4.1 parsing

    "
    And the number in >IN is changed to index immediately past that
    delimiter, thus removing the parsed characters and the delimiter from
    the parse area."

    S'"1 2 DROP" EVALUATE
    runs into problems with this.
    This requires moving >IN moved past the non-existing delimiter.

    Wouldn't it be better to simplify this to :

    "
    And the number in >IN is changed to index immediately past the word parsed"
    1]

    In view of the requirement that WORD / PARSE-NAME is required to skip
    leading delimiters this change is harmless in my opinion.

    In other parsing situations (recognizers) it is no use to restrict
    those recognizers to take care of a delimiter that is not relevant.
    For strings only the " delimiter is relevant:

    "crc.frt" R/W OPEN-FILE

    Naturally the string recognizer returns the filename, and leaves >IN
    pointer after the " , instead of after the first blank character after
    " .


    P.S.
    1] Maybe still including the clarification
    "thus removing the parsed characters"
    but it is now largely superfluous.
    2] I would rather see:
    "
    A recognizer leaves >N pointing after the part of the input stream
    that has been recognized. "
    How logical does that sound!
    (It is in fact a tautology. The position of >IN defines for all
    practical purposes what has been recognized.)

    - anton
    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Thu Feb 19 13:42:57 2026
    From Newsgroup: comp.lang.forth

    On 14-02-2026 02:53, dxf wrote:
    On 14/02/2026 10:50 am, Gerry Jackson wrote:
    On 13/02/2026 12:43, Hans Bezemer wrote:
    On 13-02-2026 09:27, Anton Ertl wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    On 12-02-2026 08:35, Anton Ertl wrote:
    [...] small implementations
    pick and choose from the standard requirements anyway, even among the >>>>>> requirements for CORE words.  The CORE wordset has only been a
    goalpost for peoplle who implement Forth as an exercise.
    ...
    I don't think that people who are "implementing Forth as an exercise" >>>>> can be bothered to make it "a standard compiler".

    The point is not standard conformance, but a goalpost: To have
    something to direct the work, and also to have something that tells
    the implementor when the project is complete.

    And although wordsets build modularity (which I welcome) it becomes
    useless when it requires you to patch wordsets already implemented.

    Who is "you" in this sentence?  Given that you write "implemented",
    you seem to argue that the standard requires the system implementor to >>>> implement the base word, and then to patch it.  This is not the case. >>>> The system implementor who has decided to implement the FILE words in
    addition to the CORE words can implement the FILE version of S" from
    the start, without any patching.

    Note also that the FILE version of S" conforms to the requirements for >>>> the CORE version of S", and that's generally the case for the extended >>>> versions of words.  E.g., the specification of CORE's POSTPONE
    includes

    | An ambiguous condition exists if name is not found.

    so it does not specify what "POSTPONE 123" means.  The proposed
    recognizer version of POSTPONE specifies that.

    - anton

    I could have used "one" - wouldn't have changed the meaning. Nice "Whataboutism"! The argument was (and is) what use has a standard for a toy compiler?

    There's another point I think you're missing. I just looked on at my Forth test suite on GitHub and 78 people have found it useful enough to give it a star. I've no idea whether they are all developing their own "toy" system but I would guess most are, and their system has to have some testing. I suggest that the easiest way is to use an existing test suite. As far as I know there is only one, so that automatically leads them to make their system (at least partially) standard compliant. An unexpected (and unintended) consequence of having a test suite.

    Cart before horse but I agree. First-time creators will generally pick some standard or system because it's the easiest way. All the thinking has been done for one and there's a wealth of existing source from which to choose or use as a guide. It's a rare lion that hasn't undertaken internship as a camel.
    Moore appears to have been a rebel, lone wolf, from the beginning for whom conformity was anathema, stagnation.


    Read what you're saying: "SOME standard or system". Not necessarily an ANS-kind of system. I think a newbie will rather rip something from the
    web that works and use that as a template than take a paper standard and
    try to replicate that one.

    If I dig into my own history - I took the Forth-79 standard, took the
    most essential parts from it and started from there - AKA it wasn't even
    a FULL Forth-79 system. The move to ANS started several versions later.

    So no - I don't swallow the argument "a CORE wordset is useful for bare implementations". I even wonder if they take a look at all. Or if they
    even care. If I may believe the presentations of recent Forth
    experiments, not at all.

    Hans Bezemer

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Thu Feb 19 14:38:07 2026
    From Newsgroup: comp.lang.forth

    In article <nnd$0ad3ab77$499f67d9@7973d9f3cc5a9d2e>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 14-02-2026 02:53, dxf wrote:
    Cart before horse but I agree. First-time creators will generally pick some >> standard or system because it's the easiest way. All the thinking has been >> done for one and there's a wealth of existing source from which to choose or >> use as a guide. It's a rare lion that hasn't undertaken internship as a camel.
    Moore appears to have been a rebel, lone wolf, from the beginning for whom >> conformity was anathema, stagnation.


    Read what you're saying: "SOME standard or system". Not necessarily an >ANS-kind of system. I think a newbie will rather rip something from the
    web that works and use that as a template than take a paper standard and
    try to replicate that one.

    Maybe, maybe not. If you don't know anything about Forth and want to
    learn e.g. Haskell, and consider Forth as an exercise it is possible
    that you start with the CORE description.


    If I dig into my own history - I took the Forth-79 standard, took the
    most essential parts from it and started from there - AKA it wasn't even
    a FULL Forth-79 system. The move to ANS started several versions later.

    I was used to fig-Forth, and scanned the fig-Forth documentation and
    ocr-ed it. Contributed to Z80, using blocks-in-files for CPM, later MSDOS. These were used for real programs. Around 1990 for a campaign of the
    socialist party (SP), millions of addresses where printed for personal
    letters, based on street databases. Pallets of chain printing stickers.

    So no - I don't swallow the argument "a CORE wordset is useful for bare >implementations". I even wonder if they take a look at all. Or if they
    even care. If I may believe the presentations of recent Forth
    experiments, not at all.

    So once the ISO93 came along, I adapted an MSDOS Forth, then evolved
    it to 32 bits, then ported to Windows and linux, then evolved it to 64 bits. Practical additions are the file wordset, and standard in/standard out,
    the latter not guided by a standard.
    All the way I was concerned with compatibility and programs keep running.
    In practice that meant all the stuff from fig-Forth needed for
    programming in practice, was kept.
    It was accidental that the CORE set was a part of this.

    The DEC Alpha came along. This means changing the assembler source, to
    wit only the pieces written in assembly, not the headers, not the documentation, not the test. That was done within 14 days wall clock
    time (not 8 working hours!).

    All programs that work in this model, kept working on the DEC Alpha.

    Willem Ouwerkerk c.s. developed many Forths for small SBC (8051, etc.)
    This was done with a so called metacompiler. Once you get used to
    this tool, it is comparitively easy to port to new microprocessors.
    In this development path, the first thing you do is to write a
    Forth assembler for the new processor, then insert the uP-dependant
    stuff into the metacompiler tool.
    In this way the meta sources determine what is present, possibly
    a bit idiosyncratic.

    I consider my assembler sources more valuable than an open source
    metacompiler system, so I choose that route.



    Hans Bezemer


    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Fri Feb 20 12:33:23 2026
    From Newsgroup: comp.lang.forth

    On 20/02/2026 12:38 am, albert@spenarnc.xs4all.nl wrote:
    ...
    Willem Ouwerkerk c.s. developed many Forths for small SBC (8051, etc.)
    This was done with a so called metacompiler. Once you get used to
    this tool, it is comparitively easy to port to new microprocessors.
    In this development path, the first thing you do is to write a
    Forth assembler for the new processor, then insert the uP-dependant
    stuff into the metacompiler tool.
    In this way the meta sources determine what is present, possibly
    a bit idiosyncratic.

    I consider my assembler sources more valuable than an open source metacompiler system, so I choose that route.

    Not only was native assembler easier for me as I mentioned, it was
    considerably faster. Running the F83 metacompiler on a 4MHz Z80 was
    painfully slow. On top of this I'd have needed to modify it to do
    dictionary segmenting - my prime motivation in creating a forth.
    Even the ubiquitous M80 CP/M assembler proved too slow and I invested
    in an SLR Systems assembler. Given the number of compiles I did in
    development it was easily the best money I ever spent on software.
    Not that I wasn't forced to learn new stuff. Macros, code segmentation,
    etc gave me enough headaches. Looking back it seems crazy. No regrets
    however as I began to realize this was more my niche than writing
    applications. That said, if one doesn't write apps there's no way to
    evaluate the effectiveness of a given forth. How many forths never got
    past creation because the author's interest waned. For these the list
    of words in ANS etc suffices. But the forth one uses is something else.
    It's the difference between a living tree and what comprises trees.
    Standards are an obsession with the latter and kind of misses the point.

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Feb 20 11:58:48 2026
    From Newsgroup: comp.lang.forth

    In article <6997b9e1$1@news.ausics.net>, dxf <dxforth@gmail.com> wrote:
    On 20/02/2026 12:38 am, albert@spenarnc.xs4all.nl wrote:
    ...
    Willem Ouwerkerk c.s. developed many Forths for small SBC (8051, etc.)
    This was done with a so called metacompiler. Once you get used to
    this tool, it is comparitively easy to port to new microprocessors.
    In this development path, the first thing you do is to write a
    Forth assembler for the new processor, then insert the uP-dependant
    stuff into the metacompiler tool.
    In this way the meta sources determine what is present, possibly
    a bit idiosyncratic.

    I consider my assembler sources more valuable than an open source
    metacompiler system, so I choose that route.

    Not only was native assembler easier for me as I mentioned, it was >considerably faster. Running the F83 metacompiler on a 4MHz Z80 was >painfully slow. On top of this I'd have needed to modify it to do
    dictionary segmenting - my prime motivation in creating a forth.
    Even the ubiquitous M80 CP/M assembler proved too slow and I invested
    in an SLR Systems assembler. Given the number of compiles I did in >development it was easily the best money I ever spent on software.
    Not that I wasn't forced to learn new stuff. Macros, code segmentation,
    etc gave me enough headaches. Looking back it seems crazy. No regrets >however as I began to realize this was more my niche than writing >applications. That said, if one doesn't write apps there's no way to >evaluate the effectiveness of a given forth. How many forths never got
    past creation because the author's interest waned. For these the list
    of words in ANS etc suffices. But the forth one uses is something else.
    It's the difference between a living tree and what comprises trees.
    Standards are an obsession with the latter and kind of misses the point.


    All tools running on windows/linux are fast,
    The metacompilers do not run on the sbc and take at most seconds.

    Especially assemblers, building ciforth is in the milliseconds.
    (What they say in a blink of an eye).

    ~/PROJECT/ciforths/ciforth: time fasm ci86.lina64.fas -m256000
    flat assembler version 1.70.02 (256000 kilobytes memory)
    2 passes, 56376 bytes.

    real 0m0.030s
    user 0m0.014s
    sys 0m0.012s

    fasm eliminates a separate link step, that make no sense anyway
    for assemblers.
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sat Feb 21 16:35:33 2026
    From Newsgroup: comp.lang.forth

    On 20-02-2026 02:33, dxf wrote:
    On 20/02/2026 12:38 am, albert@spenarnc.xs4all.nl wrote:
    ...
    Willem Ouwerkerk c.s. developed many Forths for small SBC (8051, etc.)
    This was done with a so called metacompiler. Once you get used to
    this tool, it is comparitively easy to port to new microprocessors.
    In this development path, the first thing you do is to write a
    Forth assembler for the new processor, then insert the uP-dependant
    stuff into the metacompiler tool.
    In this way the meta sources determine what is present, possibly
    a bit idiosyncratic.

    I consider my assembler sources more valuable than an open source
    metacompiler system, so I choose that route.

    Not only was native assembler easier for me as I mentioned, it was considerably faster. Running the F83 metacompiler on a 4MHz Z80 was painfully slow. On top of this I'd have needed to modify it to do
    dictionary segmenting - my prime motivation in creating a forth.
    Even the ubiquitous M80 CP/M assembler proved too slow and I invested
    in an SLR Systems assembler. Given the number of compiles I did in development it was easily the best money I ever spent on software.
    Not that I wasn't forced to learn new stuff. Macros, code segmentation,
    etc gave me enough headaches. Looking back it seems crazy. No regrets however as I began to realize this was more my niche than writing applications. That said, if one doesn't write apps there's no way to evaluate the effectiveness of a given forth. How many forths never got
    past creation because the author's interest waned. For these the list
    of words in ANS etc suffices. But the forth one uses is something else.
    It's the difference between a living tree and what comprises trees.
    Standards are an obsession with the latter and kind of misses the point.


    You're hitting the nail on the head: if making a Forth compiler is the
    only goal, then what use is it to make it "standards compatible". A
    Forth compiler is no different from any other program: if the goal is
    "just making it work" then essentially the purpose is fulfilled once
    it's done.

    But useful programs (if only in the eye of the beholder) are USED. They
    live. They fail. They develop (as you stated - often beyond standards).

    IMHO opinion standards are only useful if they have to be transferred -
    from person to person or from platform to platform. I can't say I
    haven't benefited from that idea in one way or another. But like you
    said - let's keep its true value realistic and pragmatic.

    Hans Bezemer
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Sat Feb 21 15:32:05 2026
    From Newsgroup: comp.lang.forth

    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    I'll qualify my statement about companies being conservative as mostly >applicable to small companies. Obviously companies like Microsoft,
    Apple, and Google will simply force large scale changes on users. But >smaller companies can't do that.

    From what I read about Microsoft, they have (or had, at earlier times)
    a lot of red tape in their process for applying changes to the Windows
    kernel, in order to avoid breaking existing software from ISVs. They
    may not be particularly concerned with little-used software by one
    ISV, but they want (or wanted?) to avoid breaking widely-used software
    at all costs. It's the ecosystem that keeps Windows going. Of
    course, these days Microsoft seems to focus more on cloud and AI, and
    they may be less interested in the Windows Ecosystem.

    Apple apparently can rely on a dedicated user base that even is
    willing to put up with stuff like "You are holding it wrong". So they
    can be and have been much more adventurous in breaking old stuff;
    their users will always find reasons to praise such behaviour.

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Sat Feb 21 15:40:21 2026
    From Newsgroup: comp.lang.forth

    minforth <minforth@gmx.net> writes:
    This is not the time or place for criticism.

    I think it is time for criticism, particularly meaning 2 of <https://en.wiktionary.org/wiki/criticism> (meaning 1 is not clear to
    me). Concerning the place, giving your feedback on <https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1623>
    would be ideal, because that provides the versions of the proposal and
    the feedback in one place.

    Everyone must decide for
    themselves whether this flavour of recognisers is useful for their >applications.

    Yes, and system implementors have to decide whether the want to
    implement it.

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Sat Feb 21 15:48:10 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl writes:
    In article <2026Feb9.084944@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    A more fleshed-out version of the current recognizer proposal is
    online: >><https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1614>

    After many years this proposal is in transition from being fluid to
    solid, so if you want major upheavals, I doubt that your input will be >>acted upon (but you might still want to give it). OTOH, if you find
    any mistakes, missing parts or unclear parts, now is the time when
    your input will be most effective. In either case, please report any >>feedback by clicking on the Reply button on the web page above.

    After the header Solution:
    "As before the text interpreter parses a white-space-delimited string. "
    2]

    What does that mean in the context of:

    "We gaan naar Rome" TYPE

    ?
    Are there one or four delimiters in this string?

    '"We' is parsed by the text interpreter and passed to a recognizer.
    The committee has decided not to standardize the string recognizer,
    but if it had, the specification would probably have been that
    REC-STRING recognizes '"We' as the beginning of a string and returns a translation with the translation token SCAN-TRANSLATE-STRING. The
    various actions of SCAN-TRANSLATE-STRING parse (right away) until the corresponding closing " is found; in this case they would parse 'gaan
    naar Rome"'. At run-time a descriptor for the string 'We gaan naar
    Rome' is pushed.

    For more details, look at

    https://net2o.de/gforth/Default-recognizers.html#index-rec_002dstring-_0028-c_002daddr-u-_002d_002d-translation-_0029-gforth_002dexperimental

    and the follow the links to TRANSLATE-STRING and SCAN-TRANSLATE-STRING

    In section 3.4.1 parsing

    "
    And the number in >IN is changed to index immediately past that
    delimiter, thus removing the parsed characters and the delimiter from
    the parse area."

    S'"1 2 DROP" EVALUATE
    runs into problems with this.

    I have no idea what this code is supposed to mean (it's not standard
    code), and what problems you see with this code.

    This requires moving >IN moved past the non-existing delimiter.

    Wouldn't it be better to simplify this to :

    "
    And the number in >IN is changed to index immediately past the word parsed" >1]

    The result would be that after parsing

    s" foo"

    IN would point to the second ", not behind it. After parsing

    ( a comment )

    IN would point to the ), not behind it.

    In view of the requirement that WORD / PARSE-NAME is required to skip
    leading delimiters this change is harmless in my opinion.

    If you had pointed that out when PARSE-NAME was proposed for
    standardization, one could have changed the proposal such that it
    would not consume the trailing delimiter. Unfortunately, nobody
    pointed it out at the time, and if you wanted to propose such a change
    now, you would have to provide very good arguments that there are no
    programs around that rely on this behaviour.


    "crc.frt" R/W OPEN-FILE

    Naturally the string recognizer returns the filename, and leaves >IN
    pointer after the " , instead of after the first blank character after
    " .

    In this case, the string recognizer does no parsing at all, and
    returns a translation where the actions do not parse (the translation
    coming out of rec-string performs parsing in its translation actions).

    The text interpreter parses and consumes the space after the ".

    A recognizer leaves >N pointing after the part of the input stream
    that has been recognized. "
    How logical does that sound!
    (It is in fact a tautology. The position of >IN defines for all
    practical purposes what has been recognized.)

    Actually it has been discussed whether recognizers should change >IN,
    and the consensus among the participants was that recognizers should
    not change >IN. There have been suggestions of specifying that in the standard, but given that nobody would want to enforce it, it was
    decided that this should go into the rationale (note to myself: put it
    in the rationale). I don't remember the exact reason (I bowed out of
    that discussion), but IIRC it has to do with using recognizers in
    various other tools.

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Mon Feb 16 12:18:49 2026
    From Newsgroup: comp.lang.forth

    On 15/02/2026 11:33 pm, albert@spenarnc.xs4all.nl wrote:
    In article <698fd57e$1@news.ausics.net>, dxf <dxforth@gmail.com> wrote:
    On 14/02/2026 10:50 am, Gerry Jackson wrote:
    ...
    There's another point I think you're missing. I just looked on at my Forth test suite on GitHub and 78 people have found it useful enough to
    give it a star. I've no idea whether they are all developing their own "toy" system but I would guess most are, and their system has to have
    some testing. I suggest that the easiest way is to use an existing test suite. As far as I know there is only one, so that automatically leads
    them to make their system (at least partially) standard compliant. An unexpected (and unintended) consequence of having a test suite.

    Cart before horse but I agree. First-time creators will generally pick some >> standard or system because it's the easiest way. All the thinking has been >> done for one and there's a wealth of existing source from which to choose or >> use as a guide. It's a rare lion that hasn't undertaken internship as a camel.
    Moore appears to have been a rebel, lone wolf, from the beginning for whom >> conformity was anathema, stagnation.


    You have to test also the words you define yourself. The best is to
    come up with complete test for each word, in combination with the specification and the definition.
    This is an example from ciforth:

    worddoc( {LOGIC},{0=},{zero_equals},{n --- ff},{ISO,FIG},
    {Leave a true flag forthvar({ff}) is the number forthvar({n})
    is equal to zero, otherwise leave a false flag.
    It may be aliased to forthcode({NOT}) , which inverts a flag.
    },{{=},{0<}},
    { {0 0= .},{_T_},
    { 1 0= .},{0},
    { -1 0= .},{0} },
    enddoc)
    CODE_HEADER({0=},{ZEQU}) dnl ZEQU is the name used in the assembler file.
    POP AX _C{S2}
    AND AX,AX
    SETZ AL
    MOVZX AX,AL
    NEG AX
    _PUSH
    _C

    Stack effect, properties, specifications, also's , tests and
    code.

    (Macro _PUSH has inside a _NEXT. )

    In my case the path wasn't particularly arduous as I used 'knowns' throughout - a
    Fig-Forth slowly and methodically modified to match Forth-83/94 using Laxen/Perry
    sources as a guide. The Hayes' ANS core test suite was handy as a final check. I never had the problem of dealing with a mass of untested code e.g. had I started
    from scratch. I won't say it was 'a piece of cake' at the beginning. Modifying
    very low-level code typically leaves you with a system that never even starts.


    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Feb 24 10:45:17 2026
    From Newsgroup: comp.lang.forth

    On 20/02/2026 9:58 pm, albert@spenarnc.xs4all.nl wrote:
    In article <6997b9e1$1@news.ausics.net>, dxf <dxforth@gmail.com> wrote:
    On 20/02/2026 12:38 am, albert@spenarnc.xs4all.nl wrote:
    ...
    Willem Ouwerkerk c.s. developed many Forths for small SBC (8051, etc.)
    This was done with a so called metacompiler. Once you get used to
    this tool, it is comparitively easy to port to new microprocessors.
    In this development path, the first thing you do is to write a
    Forth assembler for the new processor, then insert the uP-dependant
    stuff into the metacompiler tool.
    In this way the meta sources determine what is present, possibly
    a bit idiosyncratic.

    I consider my assembler sources more valuable than an open source
    metacompiler system, so I choose that route.

    Not only was native assembler easier for me as I mentioned, it was
    considerably faster. Running the F83 metacompiler on a 4MHz Z80 was
    painfully slow. On top of this I'd have needed to modify it to do
    dictionary segmenting - my prime motivation in creating a forth.
    Even the ubiquitous M80 CP/M assembler proved too slow and I invested
    in an SLR Systems assembler. Given the number of compiles I did in
    development it was easily the best money I ever spent on software.
    Not that I wasn't forced to learn new stuff. Macros, code segmentation,
    etc gave me enough headaches. Looking back it seems crazy. No regrets
    however as I began to realize this was more my niche than writing
    applications. That said, if one doesn't write apps there's no way to
    evaluate the effectiveness of a given forth. How many forths never got
    past creation because the author's interest waned. For these the list
    of words in ANS etc suffices. But the forth one uses is something else.
    It's the difference between a living tree and what comprises trees.
    Standards are an obsession with the latter and kind of misses the point.


    All tools running on windows/linux are fast,
    The metacompilers do not run on the sbc and take at most seconds.

    Especially assemblers, building ciforth is in the milliseconds.
    (What they say in a blink of an eye).

    Metacompilers have an air of cleverness but come with so many hurdles that frankly if there's an alternate tool I'll use that. I don't blame William Payne (8051 FigForth) in the least for hiring Nautilus Systems to write his metacompilers, or C.H. Ting for translating Bill Muench's metacompiler-based eForth to MASM. I figure there's enough masochism in Forth already without looking for more ;-)


    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Feb 24 13:13:51 2026
    From Newsgroup: comp.lang.forth

    On 22/02/2026 2:35 am, Hans Bezemer wrote:
    ...
    IMHO opinion standards are only useful if they have to be transferred - from person to person or from platform to platform. I can't say I haven't benefited from that idea in one way or another. But like you said - let's keep its true value realistic and pragmatic.

    The standard is useful to me to the extent there's a bunch of words I don't have to adjust or translate in order to get some code I encounter working without having to tear my hair out. OTOH were I follower that depended on standards for features and portability in the way users of other languages
    do, I would be less satisfied. The standard Forth offers is akin to a Swiss cheese whose holes increase in size as individual forths attempt to fill the gaps.

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Tue Feb 24 02:43:54 2026
    From Newsgroup: comp.lang.forth

    On 2/21/26 9:40 AM, Anton Ertl wrote:
    minforth <minforth@gmx.net> writes:
    This is not the time or place for criticism.

    I think it is time for criticism, particularly meaning 2 of <https://en.wiktionary.org/wiki/criticism> (meaning 1 is not clear to
    me). Concerning the place, giving your feedback on <https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1623>
    would be ideal, because that provides the versions of the proposal and
    the feedback in one place.

    Everyone must decide for
    themselves whether this flavour of recognisers is useful for their
    applications.

    Yes, and system implementors have to decide whether the want to
    implement it.


    My initial study of the recognizer proposal, and first steps to
    implement it in kForth-64, have led to a few observations:

    1. To first order, implementing essential recognizers, minus the ability
    to set them, amounted to a refactoring of existing code in the Forth interpreter/compiler. I began by factoring out the word INTERPRET, which appeared in Starting Forth by Brodie, from the interpreter/compiler code
    and, from there, identifying the parts of it which mapped to REC-NAME, REC-NUMBER, and REC-FLOAT.

    2. It was a simple matter to factor words, REC-NAME, REC-NUMBER, and
    REC-FLOAT (kForth doesn't have locals so REC-LOCAL wasn't necessary at
    the present time) from INTERPRET though the return values aren't yet consistent with the proposal. One has to first understand the non-obviously-named TRANSLATE-XXX words.

    3. It took me a little while to wrap my head around what TRANSLATE-XXX
    words were doing, but finally figured out that they were data structures providing execution semantics for different values of STATE. For
    recognizing words, TRANSLATE-NAME mapped to code used by the kForth interpreter called ExecutionMethod(), changed recently to GetExecutionSemantics().

    The next step is to replace GetExecutionSemantics() by TRANSLATE-NAME.
    This is a bit more complex in kForth, which allows deferred execution (essentially noname compilation) during interpretation, but it is
    possible for the recognizer REC-NAME to provide a TRANSLATE-NAME
    compatible with the recognizer proposal.


    This is where I stand after a week of studying and gradually
    transforming kForth to implement recognizers. For me, the process
    requires repeating all system tests prior to each commit. It's a tedious process but necessary to keep a working Forth system while the revisions
    are made -- I could use a stable older version of kForth-64 for running
    my applications, but the applications provide additional checks on
    whether the revisions have broken anything.

    --
    Krishna

    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Feb 25 14:11:35 2026
    From Newsgroup: comp.lang.forth

    In article <2026Feb21.164810@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@spenarnc.xs4all.nl writes:
    <SNIP>
    "We gaan naar Rome" TYPE

    ?
    Are there one or four delimiters in this string?

    '"We' is parsed by the text interpreter and passed to a recognizer.
    Okay nice deflection. The answer is there are four space delimiters.
    IMHO pretty insane. None of them has the function of a delimiter.

    With prefixes this is done:
    Get `` "We ''. The prefix " is found. " takes care of all else,
    and leaves >IN at the space after the second " or at the
    character after that, what is pretty inconsequential.
    The reason that we cut at the space is, that no word, and therefore no
    prefix can contain blank space. So the first space is a preliminary
    delimiter. Once PREFIX-" executes takes over the second " is the
    actual delimiter. Whether you demand PREFIX-" to skip a blank delimiter
    is in fact inconsequential.

    <SNIP>
    S" 1 2 DROP" EVALUATE
    runs into problems with this.

    I have no idea what this code is supposed to mean (it's not standard
    code), and what problems you see with this code.
    You commented on the first erroneous code.
    I have corrected it, now.

    This requires moving >IN moved past the non-existing delimiter.

    Note that there is no delimiter in the evaluate string after DROP.
    The primitive description of parsing has to be lawyered up to
    keep correct.


    Wouldn't it be better to simplify this to :

    "
    And the number in >IN is changed to index immediately past the word parsed" >>1]

    The result would be that after parsing

    s" foo"

    IN would point to the second ", not behind it. After parsing

    ( a comment )

    IN would point to the ), not behind it.

    In view of the requirement that WORD / PARSE-NAME is required to skip >>leading delimiters this change is harmless in my opinion.

    If you had pointed that out when PARSE-NAME was proposed for
    standardization, one could have changed the proposal such that it
    would not consume the trailing delimiter. Unfortunately, nobody
    pointed it out at the time, and if you wanted to propose such a change
    now, you would have to provide very good arguments that there are no
    programs around that rely on this behaviour.

    WORD suggest that it be used in the implementation of Forth itself.
    Now you suggest that PARSE-NAME is used in the implementation of Forth
    itself. For the objective observer it is just another word that can be implemented as described. That PARSE-NAME eats a space is inconsequential.
    In ciforth both WORD and PARSE-NAME are loadable extensions and follow the standard to a t.



    "crc.frt" R/W OPEN-FILE

    Naturally the string recognizer returns the filename, and leaves >IN >>pointer after the " , instead of after the first blank character after
    " .

    In this case, the string recognizer does no parsing at all, and
    returns a translation where the actions do not parse (the translation
    coming out of rec-string performs parsing in its translation actions).

    Okay, the recognizer does no parsing at all, so it is of no use
    handling strings that contains spaces. The most important issue since
    BASIC did beat Forth in the 80's remains unresolved.


    The text interpreter parses and consumes the space after the ".

    A recognizer leaves >N pointing after the part of the input stream
    that has been recognized. "
    How logical does that sound!
    (It is in fact a tautology. The position of >IN defines for all
    practical purposes what has been recognized.)

    Actually it has been discussed whether recognizers should change >IN,
    and the consensus among the participants was that recognizers should
    not change >IN. There have been suggestions of specifying that in the >standard, but given that nobody would want to enforce it, it was
    decided that this should go into the rationale (note to myself: put it
    in the rationale). I don't remember the exact reason (I bowed out of
    that discussion), but IIRC it has to do with using recognizers in
    various other tools.

    You evaded the subject, that is fine. It has no real world consequences,
    so is the position of >IN after parsing a word/token.
    That would mean that we can change the standard to
    "
    Whether >IN, after "not-recognizing" a token, points to or after the
    delimiter name/token is implementation defined.
    "
    You will discover that this has no consequence for portable programs.
    This is not the first time the standard does prescribe a particular
    behaviour that cannot be investigated by a conforming program, but
    instead describe what was in ancient implementations.
    (remember POSTPONE? The requirement that TO must parse has no consequence.)
    An good alternative would be to move this informal discussion of parsing
    to annex E, indeed.

    I have a horse in this race. If that is approved I can simplify the
    INTERPRET loop to a single IF within a BEGIN WHILE REPEAT.
    Not that the INTERPRET loop is overly complicated in ciforth (two IF's).

    Background information:
    ciforth kernels don't accommodate hex, decimal, binary, strings and fp.
    All expressions can be added separately and under control of wordlists.
    $DEADBEAF %1111000 #65536 "we gaan naar Rome" 1.001E9
    using the PREFIX mechanism
    : $ .... ; PREFIX IMMEDIATE

    An addition of a single screen morphs QUIT in a lexical analyser for
    e.g. Pascal.


    - anton

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21b-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Wed Feb 25 20:25:12 2026
    From Newsgroup: comp.lang.forth

    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    I still think that meddling with the text interpreter is a big no-no
    and an invitation to disaster.

    Yes, S" 12.34e" >FLOAT is quite horrible, but having the behaviour of
    "123.45" change depending on whether the floating point wordset is
    loaded is also horrible. Probably best to leave things as they are, and
    maybe suggest a nonstandard extension to treat 123.45 as a float. To
    get a double cell you'd use

    It does seem to me that with 32-bit systems widespread, double ints have
    gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Thu Feb 26 06:53:27 2026
    From Newsgroup: comp.lang.forth

    Paul Rubin <no.email@nospam.invalid> writes:
    Probably best to leave things as they are, and
    maybe suggest a nonstandard extension to treat 123.45 as a float.

    Actually, if the proposal is accepted as-is, there will be a
    semi-standardized way to switch the Forth system to accept 123.45 as a
    float: REC-FLOAT is allowed (but not required) to recognize "123.45",
    and by putting REC-FLOAT ahead of REC-NUMBER in the recognizer
    sequence REC-FORTH, the user can eliminate the shadowing of "123.45"
    by REC-NUMBER.

    Alternatively, the user can define REC-NUMBER1, which only recognizes
    doubles with a prefix (i.e., not "123.45"), and replace occurrences of REC-NUMBER with REC-NUMBER1 in REC-FORTH. This also eliminates the
    shadowing. Or, if you really never want doubles, define REC-CELL
    which does not recognize doubles at all, and replace REC-NUMBER by
    REC-CELL.

    This all works in Gforth, we will see what REC-FLOAT recognizes in
    other systems.

    It does seem to me that with 32-bit systems widespread, double ints have >gotten less important.

    Even with 64-bit cells, doubles are important for mixed-length
    arithmetics, which is important for building multi-precision
    arithmetics, used for cryptography and various mathematical
    applications.

    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    #12345. and $DEADBEEF. are standard ways to write a double that is not recognized by REC-FLOAT.

    Concerning group separators, Gforth (development) ignores _ as a group separator, including in singles:

    18_446_744_073_709_551_615

    Many Forth systems accept multiple dots in numbers, which can be used
    as group separators, but the result then is a double; some also accept
    comma as double indicator as well as multiple double indicators, so
    you can write numbers with "," as group separator and "." as decimal
    mark, or with "." as group separator and "," as decimal mark; but
    again, the result is a double. Given the sizes of some singles in
    32-bit and 64-bit systems, a way to provide group separators
    without turning the number into a double is useful.

    Gforth does not have a convenient way to produce the group separator
    on output, yet.

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Thu Feb 26 13:09:21 2026
    From Newsgroup: comp.lang.forth

    In article <87qzq8b07r.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    I still think that meddling with the text interpreter is a big no-no
    and an invitation to disaster.

    Yes, S" 12.34e" >FLOAT is quite horrible, but having the behaviour of >"123.45" change depending on whether the floating point wordset is
    loaded is also horrible. Probably best to leave things as they are, and >maybe suggest a nonstandard extension to treat 123.45 as a float. To
    get a double cell you'd use

    Offically 123.45 is not a double number. It should end with a decimal point.

    How is the support for a proposal:

    Double numbers should start and end with a dot.
    Now any numbers containing a single dot are automatically fp

    A program that uses single dots to indicate doubles, should
    declare an environmental dependancy. The default behaviour it
    that they are floats.

    In this way most programs that uses fp and use single dots are
    fully compliant.

    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.
    You could do this with recognizers (I suppose).


    It does seem to me that with 32-bit systems widespread, double ints have >gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    I have published yourforth, an altenative to jonesforth. It is 32 bits
    and I have eliminated all double precision crap, contributing to
    it pedagogical value.

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Thu Feb 26 07:32:40 2026
    From Newsgroup: comp.lang.forth

    On 2/25/26 10:25 PM, Paul Rubin wrote:
    ...
    It does seem to me that with 32-bit systems widespread, double ints have gotten less important. ...
    Double numbers are still useful on 64-bit systems, in physics,
    chemistry, and number theory. For example, consider factorials, which
    occur in evaluating quantities of fundamental importance in areas like
    atomic and molecular physics and quantum chemistry.

    https://github.com/mynenik/kForth-64/blob/master/forth-src/fsl/extras/cg.4th

    In particular, notice this limitation for 32-bit systems (using single
    length numbers) in the above file:

    13 INTEGER ARRAY fac_table{
    1 1 2 6 24 120 720 5040 40320 362880
    3628800 39916800 479001600
    13 fac_table{ }iput


    With double-length integers, the code becomes useful over a wider range
    of systems. I haven't yet converted it to use double length integers,
    but it is something on my list of tbd.

    --
    Krishna

    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Fri Feb 27 20:24:19 2026
    From Newsgroup: comp.lang.forth

    On 26/02/2026 11:09 pm, albert@spenarnc.xs4all.nl wrote:
    In article <87qzq8b07r.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    I still think that meddling with the text interpreter is a big no-no
    and an invitation to disaster.

    Yes, S" 12.34e" >FLOAT is quite horrible, but having the behaviour of
    "123.45" change depending on whether the floating point wordset is
    loaded is also horrible. Probably best to leave things as they are, and
    maybe suggest a nonstandard extension to treat 123.45 as a float. To
    get a double cell you'd use

    Offically 123.45 is not a double number. It should end with a decimal point.

    How is the support for a proposal:

    Double numbers should start and end with a dot.
    Now any numbers containing a single dot are automatically fp

    A program that uses single dots to indicate doubles, should
    declare an environmental dependancy. The default behaviour it
    that they are floats.

    In this way most programs that uses fp and use single dots are
    fully compliant.

    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.

    And those who see it as a vulnerability:

    garbage in --> valid number out

    You could do this with recognizers (I suppose).

    Given the cost of recognizers one hopes it can do better :)

    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Gerry Jackson@do-not-use@swldwa.uk to comp.lang.forth on Fri Feb 27 09:25:55 2026
    From Newsgroup: comp.lang.forth

    On 26/02/2026 12:09, albert@spenarnc.xs4all.nl wrote:
    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.
    You could do this with recognizers (I suppose).

    It's better to use the ISO 8601 format YYYY-MM-DD where your example
    date is 2003-01-02 which is unambiguous and easy to sort.
    --
    Gerry
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Fri Feb 27 14:48:59 2026
    From Newsgroup: comp.lang.forth

    Gerry Jackson <do-not-use@swldwa.uk> writes:
    On 26/02/2026 12:09, albert@spenarnc.xs4all.nl wrote:
    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.
    You could do this with recognizers (I suppose).

    It's better to use the ISO 8601 format YYYY-MM-DD where your example
    date is 2003-01-02 which is unambiguous and easy to sort.

    You can recognize both, plus "2.1.2003". The benefit compared to the
    bad old solution of just treating all of them as a double number is
    that the recognizer can determine year, month, and day based on the
    separator used, as well as identifying the correct day and month
    irrespective of whether they are written with one or with two digits. Unfortunately, I have seen some people use the wrong order-separator combination, so better give some feedback on what date has been
    understood.

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Fri Feb 27 19:21:10 2026
    From Newsgroup: comp.lang.forth

    On 26-02-2026 13:09, albert@spenarnc.xs4all.nl wrote:
    In article <87qzq8b07r.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    I still think that meddling with the text interpreter is a big no-no
    and an invitation to disaster.

    Yes, S" 12.34e" >FLOAT is quite horrible, but having the behaviour of
    "123.45" change depending on whether the floating point wordset is
    loaded is also horrible. Probably best to leave things as they are, and
    maybe suggest a nonstandard extension to treat 123.45 as a float. To
    get a double cell you'd use

    Offically 123.45 is not a double number. It should end with a decimal point.

    How is the support for a proposal:

    Double numbers should start and end with a dot.
    Now any numbers containing a single dot are automatically fp

    A program that uses single dots to indicate doubles, should
    declare an environmental dependancy. The default behaviour it
    that they are floats.

    In this way most programs that uses fp and use single dots are
    fully compliant.

    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.
    You could do this with recognizers (I suppose).


    It does seem to me that with 32-bit systems widespread, double ints have
    gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    I have published yourforth, an altenative to jonesforth. It is 32 bits
    and I have eliminated all double precision crap, contributing to
    it pedagogical value.

    Groetjes Albert

    Although I can understand the technical, historical and pragmatic
    reasons of Chuck for (a) signifying a double number by a dot and (b) the inclusion of a double number recognizer in the text interpreter, I never followed suit.

    Double number support was NEVER part of the 4tH core - and frankly, the initial idea was even to never support double numbers AT ALL. The
    rationale behind that one was that integers at that time were 32bit
    anyway - the identical precision that double numbers covered - so.. why?

    The range of 64bit numbers covers just about everything under the sun,
    so I agree fullheartedly with the idea that double numbers are close to complete obsolescence. The last time I used triple numbers was when I
    wrote several IBAN related utilities on a 32-bit platform. Which most
    double number applications boils down to nowadays.

    But.. I've been around here for a while and I think given there are
    still people using WORD and vanilla counted strings that the 22nd
    century Forths will still support double numbers - resulting in 1024 bit double numbers.

    Hans Bezemer
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Feb 28 10:15:28 2026
    From Newsgroup: comp.lang.forth

    On 28/02/2026 5:21 am, Hans Bezemer wrote:
    ...
    The range of 64bit numbers covers just about everything under the sun, so I agree fullheartedly with the idea that double numbers are close to complete obsolescence. The last time I used triple numbers was when I wrote several IBAN related utilities on a 32-bit platform. Which most double number applications boils down to nowadays.

    But.. I've been around here for a while and I think given there are still people using WORD and vanilla counted strings that the 22nd century Forths will still support double numbers - resulting in 1024 bit double numbers.

    If the hardware, the OS and its applications still specify doubles then
    surely Forth has no option but to follow, and Moore's suggestion in his
    1989 speech to the ANS-TC that doubles words might be scrapped, somewhat short-sighted? On this forum itself, I recall reading posts talking of
    crypto apps which apparently requires such numbers and calculations.

    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Sat Feb 28 15:34:54 2026
    From Newsgroup: comp.lang.forth

    In article <nnd$73692009$4971d447@b0f461aaf5ef0059>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 26-02-2026 13:09, albert@spenarnc.xs4all.nl wrote:
    In article <87qzq8b07r.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    I still think that meddling with the text interpreter is a big no-no
    and an invitation to disaster.

    Yes, S" 12.34e" >FLOAT is quite horrible, but having the behaviour of
    "123.45" change depending on whether the floating point wordset is
    loaded is also horrible. Probably best to leave things as they are, and >>> maybe suggest a nonstandard extension to treat 123.45 as a float. To
    get a double cell you'd use

    Offically 123.45 is not a double number. It should end with a decimal point. >>
    How is the support for a proposal:

    Double numbers should start and end with a dot.
    Now any numbers containing a single dot are automatically fp

    A program that uses single dots to indicate doubles, should
    declare an environmental dependancy. The default behaviour it
    that they are floats.

    In this way most programs that uses fp and use single dots are
    fully compliant.

    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.
    You could do this with recognizers (I suppose).


    It does seem to me that with 32-bit systems widespread, double ints have >>> gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    I have published yourforth, an altenative to jonesforth. It is 32 bits
    and I have eliminated all double precision crap, contributing to
    it pedagogical value.

    Groetjes Albert

    Although I can understand the technical, historical and pragmatic
    reasons of Chuck for (a) signifying a double number by a dot and (b) the >inclusion of a double number recognizer in the text interpreter, I never >followed suit.

    Double number support was NEVER part of the 4tH core - and frankly, the >initial idea was even to never support double numbers AT ALL. The
    rationale behind that one was that integers at that time were 32bit
    anyway - the identical precision that double numbers covered - so.. why?

    The range of 64bit numbers covers just about everything under the sun,
    so I agree fullheartedly with the idea that double numbers are close to >complete obsolescence. The last time I used triple numbers was when I
    wrote several IBAN related utilities on a 32-bit platform. Which most
    double number applications boils down to nowadays.

    If you want to have a serious mature Forth (gforth, ciforth) Anton Ertl
    has explained that you need to have double precisions support for
    multi precision, cryptography, crc and the like.
    That doesn't mean that you have to build number display around the
    <# #S #> wordset.



    But.. I've been around here for a while and I think given there are
    still people using WORD and vanilla counted strings that the 22nd
    century Forths will still support double numbers - resulting in 1024 bit >double numbers.

    Users of ciforth discover that WORD is a loaded extension, and they get educated as soon as they complain about this.


    Hans Bezemer

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sat Feb 28 17:56:12 2026
    From Newsgroup: comp.lang.forth

    On 28-02-2026 15:34, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$73692009$4971d447@b0f461aaf5ef0059>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 26-02-2026 13:09, albert@spenarnc.xs4all.nl wrote:
    In article <87qzq8b07r.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    I still think that meddling with the text interpreter is a big no-no >>>>> and an invitation to disaster.

    Yes, S" 12.34e" >FLOAT is quite horrible, but having the behaviour of
    "123.45" change depending on whether the floating point wordset is
    loaded is also horrible. Probably best to leave things as they are, and >>>> maybe suggest a nonstandard extension to treat 123.45 as a float. To
    get a double cell you'd use

    Offically 123.45 is not a double number. It should end with a decimal point.

    How is the support for a proposal:

    Double numbers should start and end with a dot.
    Now any numbers containing a single dot are automatically fp

    A program that uses single dots to indicate doubles, should
    declare an environmental dependancy. The default behaviour it
    that they are floats.

    In this way most programs that uses fp and use single dots are
    fully compliant.

    There are people who are font of 01/02/03 date (2003 januari 2 )
    indications that are examples in Starting Forth.
    You could do this with recognizers (I suppose).


    It does seem to me that with 32-bit systems widespread, double ints have >>>> gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0 >>>> or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    I have published yourforth, an altenative to jonesforth. It is 32 bits
    and I have eliminated all double precision crap, contributing to
    it pedagogical value.

    Groetjes Albert

    Although I can understand the technical, historical and pragmatic
    reasons of Chuck for (a) signifying a double number by a dot and (b) the
    inclusion of a double number recognizer in the text interpreter, I never
    followed suit.

    Double number support was NEVER part of the 4tH core - and frankly, the
    initial idea was even to never support double numbers AT ALL. The
    rationale behind that one was that integers at that time were 32bit
    anyway - the identical precision that double numbers covered - so.. why?

    The range of 64bit numbers covers just about everything under the sun,
    so I agree fullheartedly with the idea that double numbers are close to
    complete obsolescence. The last time I used triple numbers was when I
    wrote several IBAN related utilities on a 32-bit platform. Which most
    double number applications boils down to nowadays.

    If you want to have a serious mature Forth (gforth, ciforth) Anton Ertl
    has explained that you need to have double precisions support for
    multi precision, cryptography, crc and the like.
    That doesn't mean that you have to build number display around the
    <# #S #> wordset.



    But.. I've been around here for a while and I think given there are
    still people using WORD and vanilla counted strings that the 22nd
    century Forths will still support double numbers - resulting in 1024 bit
    double numbers.

    Users of ciforth discover that WORD is a loaded extension, and they get educated as soon as they complain about this.


    Hans Bezemer

    Groetjes Albert

    Sure, if you dig deep enough you will always find applications for ANY feature. That doesn't necessarily mean they're essential. I mean - even
    in C you don't find too many "long long long long long long long long
    int" declarations.

    But I'm sure there are libs for that. If you need 'em, you load 'em.
    Like I did with my triple libs for my IBAN utilities.

    And where <# #S #> are concerned - in 4tH they have always been cell
    sized. For the double version I have a double version. Lo and behold:
    for the triple wordset I even have a TRIPLE version. I'm quite confident
    I can even pull off a QUADRO version if need be.

    /hold 3 * constant /thold
    /thold string tholdbuf
    tholdbuf /thold + constant tholdend
    variable hld

    : thold hld -1 over +! @ c! ;
    : <t# tholdend hld ! ;
    : t#> 3drop hld @ tholdend over - ;
    : tsign >r >r >r 0< if [char] - thold then r> r> r> ;
    : t# base @ tu/mod >r >r >r digit>c thold r> r> r> ;
    : t#s begin t# 3dup t0= until ;
    : (tsigned) dup >r -rot r> tabs ;

    Hans Bezemer

    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Sat Feb 28 22:45:10 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl writes:
    If you want to have a serious mature Forth (gforth, ciforth) Anton Ertl
    has explained that you need to have double precisions support for
    multi precision, cryptography, crc and the like.

    It's not clear that you'd need particular syntax for double-cell
    literals though. You'll rarely want double arithmetic per se. You'd
    possibly use it as a building block for multi precision.

    In practice, multi precision arithmetic would likely be written as asm primitives.
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Sun Mar 1 07:54:43 2026
    From Newsgroup: comp.lang.forth

    Paul Rubin <no.email@nospam.invalid> writes:
    In practice, multi precision arithmetic would likely be written as asm >primitives.

    That's what GMP does, but only for certain operations, while other
    code may be more efficient for combinations of these operations (e.g., three-input addition).

    In the history of programming, we usually started out with assembly
    language, but over time, that has given way to programming in
    higher-level languages. In the case of multi-precision arithmetics,
    the support from high-level languages has been:

    1) Double-precision types such as uint128_t in C, allowing to express
    double-precision arithmetics and mixed single/double-precision
    addition and multiplication.

    2) Double-precision (D+) and mixed single/double precision words (UM*
    M*) in Forth (M+ is not quite there, UM+ would be helpful for
    multi-precision).

    3) Add-with-carry builtins (compiler-specific) and intrinsics
    (architecture-specific) in C compilers.

    4) Arbitrary-precision arithmetics in a number of higher-level
    langyages. The size depends on the data, which results in boxing
    and unboxing overhead, which makes that feature really slow in all
    implementations I know. Also, in most languages the usual case is
    single-precision, so the incentives for making the multi-precision
    ase fast are small. It's just an insurance against overflow.

    5) _Bitint() in C23. gcc-15.1 supports numbers up to 65,535 bits, and
    clang-20.1 supports numbers up to 8,388,608bits. The code produced
    for now is mediocre, but that can change.

    I have compared assembly language, 1), 3), and 5) [ertl25-carry2].
    One can get C compilers to produce quite good code with 1) and 3),
    but, depending on the architecture, sometimes 1) is better, and
    sometimes 3). Ideally the compilers should produce the optimal code
    with 5), but for now, they don't.

    As long as we do not add something like 5) to Forth, 2) (close to C's
    1) is the way to go if we want to express this stuff in Forth. Not
    everyone wants Forth to be able to express such things with ease and
    efficiency competetive with C (before _Bitint()), though.

    - anton

    @InProceedings{ertl25-carry2,
    author = {M. Anton Ertl},
    title = {Multi-precision integer arithmetics},
    booktitle = {Tagungsband des Jahrestreffens 2025 der
    GI-Fachgruppe ``Programmiersprachen und
    Rechenkonzepte''},
    year = {2025},
    series = {INSIGHTS --- Schriftenreihe der Fakult\"at Technik},
    pages = {15--25},
    url = {https://www.complang.tuwien.ac.at/papers/ertl25-carry2.pdf},
    slides-url = {https://www.complang.tuwien.ac.at/papers/ertl25-carry2-slides.pdf},
    url-proceedings = {https://www.dhbw-stuttgart.de/fileadmin/dateien/Forschung/Forschungsschwerpunkte_Technik/DHBW_Stuttgart_INSIGHTS_1_2025_Tagungsband_Jahrestreffen_GI-Fachgruppe_Programmiersprachen_und_Rechenkonzepte_2025.pdf},
    abstract = {Multi-precision integer arithmetics is widely used,
    among other things in public-key cryptography and
    when computing many digits of transcendental
    numbers. The present paper discusses
    multi-precision addition and multiplication:
    architectural support and its use in hand-written
    assembly language, libraries that use such
    assembly-language code, and programming language
    support and how close the code generated by Clang
    and GCC is to the hand-written assembly language.}
    }
    --
    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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Sun Mar 1 14:17:19 2026
    From Newsgroup: comp.lang.forth

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    author = {M. Anton Ertl},
    title = {Multi-precision integer arithmetics},

    This paper and the linked one about adding carry bits to the RISC-V
    machine registers are interesting. Someone recently mentioned that the
    RISC-V vector extension has ADC so it might be worth evaluating that in
    future versions of the paper.

    IDK if it's in the spirit of Forth to have anything like _Bitint() and
    I'm surprised to hear about it in C (I didn't know about it before). I
    doubt it but your judgment is better than mine on such questions.

    I think variable sized bignum arithmetic like 4096 bits is fading out of
    public key cryptography these days, as algorithms like RSA are being
    replaced by elliptic curve algorithms with fixed key sizes, typically
    256 bits.
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From antispam@antispam@fricas.org (Waldek Hebisch) to comp.lang.forth on Mon Mar 2 00:17:04 2026
    From Newsgroup: comp.lang.forth

    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Paul Rubin <no.email@nospam.invalid> writes:
    In practice, multi precision arithmetic would likely be written as asm >>primitives.

    That's what GMP does, but only for certain operations, while other
    code may be more efficient for combinations of these operations (e.g., three-input addition).

    In the history of programming, we usually started out with assembly
    language, but over time, that has given way to programming in
    higher-level languages. In the case of multi-precision arithmetics,
    the support from high-level languages has been:

    1) Double-precision types such as uint128_t in C, allowing to express
    double-precision arithmetics and mixed single/double-precision
    addition and multiplication.

    2) Double-precision (D+) and mixed single/double precision words (UM*
    M*) in Forth (M+ is not quite there, UM+ would be helpful for
    multi-precision).

    3) Add-with-carry builtins (compiler-specific) and intrinsics
    (architecture-specific) in C compilers.

    4) Arbitrary-precision arithmetics in a number of higher-level
    langyages. The size depends on the data, which results in boxing
    and unboxing overhead, which makes that feature really slow in all
    implementations I know. Also, in most languages the usual case is
    single-precision, so the incentives for making the multi-precision
    ase fast are small. It's just an insurance against overflow.

    5) _Bitint() in C23. gcc-15.1 supports numbers up to 65,535 bits, and
    clang-20.1 supports numbers up to 8,388,608bits. The code produced
    for now is mediocre, but that can change.

    I have compared assembly language, 1), 3), and 5) [ertl25-carry2].
    One can get C compilers to produce quite good code with 1) and 3),
    but, depending on the architecture, sometimes 1) is better, and
    sometimes 3). Ideally the compilers should produce the optimal code
    with 5), but for now, they don't.

    As long as we do not add something like 5) to Forth, 2) (close to C's
    1) is the way to go if we want to express this stuff in Forth. Not
    everyone wants Forth to be able to express such things with ease and efficiency competetive with C (before _Bitint()), though.

    - anton

    @InProceedings{ertl25-carry2,
    author = {M. Anton Ertl},
    title = {Multi-precision integer arithmetics},
    booktitle = {Tagungsband des Jahrestreffens 2025 der
    GI-Fachgruppe ``Programmiersprachen und
    Rechenkonzepte''},
    year = {2025},
    series = {INSIGHTS --- Schriftenreihe der Fakult\"at Technik},
    pages = {15--25},
    url = {https://www.complang.tuwien.ac.at/papers/ertl25-carry2.pdf},
    slides-url = {https://www.complang.tuwien.ac.at/papers/ertl25-carry2-slides.pdf},
    url-proceedings = {https://www.dhbw-stuttgart.de/fileadmin/dateien/Forschung/Forschungsschwerpunkte_Technik/DHBW_Stuttgart_INSIGHTS_1_2025_Tagungsband_Jahrestreffen_GI-Fachgruppe_Programmiersprachen_und_Rechenkonzepte_2025.pdf},
    abstract = {Multi-precision integer arithmetics is widely used,
    among other things in public-key cryptography and
    when computing many digits of transcendental
    numbers. The present paper discusses
    multi-precision addition and multiplication:
    architectural support and its use in hand-written
    assembly language, libraries that use such
    assembly-language code, and programming language
    support and how close the code generated by Clang
    and GCC is to the hand-written assembly language.}
    }
    --
    Waldek Hebisch
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From antispam@antispam@fricas.org (Waldek Hebisch) to comp.lang.forth on Mon Mar 2 00:21:08 2026
    From Newsgroup: comp.lang.forth

    Paul Rubin <no.email@nospam.invalid> wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    author = {M. Anton Ertl},
    title = {Multi-precision integer arithmetics},

    This paper and the linked one about adding carry bits to the RISC-V
    machine registers are interesting. Someone recently mentioned that the RISC-V vector extension has ADC so it might be worth evaluating that in future versions of the paper.

    IDK if it's in the spirit of Forth to have anything like _Bitint() and
    I'm surprised to hear about it in C (I didn't know about it before). I
    doubt it but your judgment is better than mine on such questions.

    I think variable sized bignum arithmetic like 4096 bits is fading out of public key cryptography these days, as algorithms like RSA are being
    replaced by elliptic curve algorithms with fixed key sizes, typically
    256 bits.

    Elliptic curve algorithms can use significanty smaller primes than
    RSA, but IIUC 256 bits is deemed to be dangerously low.
    --
    Waldek Hebisch
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Mon Mar 2 12:36:44 2026
    From Newsgroup: comp.lang.forth

    In article <10o2l5i$1u2r0$2@paganini.bofh.team>,
    Waldek Hebisch <antispam@fricas.org> wrote:
    Paul Rubin <no.email@nospam.invalid> wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    author = {M. Anton Ertl},
    title = {Multi-precision integer arithmetics},

    This paper and the linked one about adding carry bits to the RISC-V
    machine registers are interesting. Someone recently mentioned that the
    RISC-V vector extension has ADC so it might be worth evaluating that in
    future versions of the paper.

    IDK if it's in the spirit of Forth to have anything like _Bitint() and
    I'm surprised to hear about it in C (I didn't know about it before). I
    doubt it but your judgment is better than mine on such questions.

    If you take Forth as a serious programming language, the paper about multi precision is valuable.


    I think variable sized bignum arithmetic like 4096 bits is fading out of
    public key cryptography these days, as algorithms like RSA are being
    replaced by elliptic curve algorithms with fixed key sizes, typically
    256 bits.

    Elliptic curve algorithms can use significanty smaller primes than
    RSA, but IIUC 256 bits is deemed to be dangerously low.

    Moreover the USA NSA pushes towards elliptic curves. Maybe they have
    a backdoor. Otoh RSA 4096 is well established.

    --
    Waldek Hebisch

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From Stephen Pelc@stephen@vfxforth.com to comp.lang.forth on Mon Mar 2 13:23:05 2026
    From Newsgroup: comp.lang.forth

    On 26 Feb 2026 at 05:25:12 CET, "Paul Rubin" <no.email@nospam.invalid> wrote:

    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    It does seem to me that with 32-bit systems widespread, double ints have gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    We (Wodni & Pelc GmbH) have clients using a 32 bit host who depend
    on 128 bit integers. They have in excess of 10,000 users of their
    application.

    Even if they converted to a 64 bit host Forth, they would still need
    double numbers.

    Stephen
    --
    Stephen Pelc, stephen@vfxforth.com
    Wodni & Pelc GmbH
    Vienna, Austria
    Tel: +44 (0)7803 903612, +34 649 662 974 http://www.vfxforth.com/downloads/VfxCommunity/
    free VFX Forth downloads
    --- Synchronet 3.21c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Tue Mar 3 13:47:54 2026
    From Newsgroup: comp.lang.forth

    In article <10o42vp$15sg5$1@dont-email.me>,
    Stephen Pelc <stephen@vfxforth.com> wrote:
    On 26 Feb 2026 at 05:25:12 CET, "Paul Rubin" <no.email@nospam.invalid> wrote:

    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    It does seem to me that with 32-bit systems widespread, double ints have
    gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    We (Wodni & Pelc GmbH) have clients using a 32 bit host who depend
    on 128 bit integers. They have in excess of 10,000 users of their >application.

    I appreciate that you will not disclose much on your clients.
    Can you reveal what kind of applications would use 128 bit integers
    but not more precision?


    Even if they converted to a 64 bit host Forth, they would still need
    double numbers.

    I use double precision for numbertheoretical examples.
    Bezemer is right that you can get rid of doubles on small systems,
    but not for a serious tool that is to universably usable.


    Stephen

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Stephen Pelc@stephen@vfxforth.com to comp.lang.forth on Tue Mar 3 14:39:45 2026
    From Newsgroup: comp.lang.forth

    On 3 Mar 2026 at 13:47:54 CET, "albert@spenarnc.xs4all.nl" <albert@spenarnc.xs4all.nl> wrote:

    We (Wodni & Pelc GmbH) have clients using a 32 bit host who depend
    on 128 bit integers. They have in excess of 10,000 users of their
    application.

    I appreciate that you will not disclose much on your clients.
    Can you reveal what kind of applications would use 128 bit integers
    but not more precision?

    The application is construction planning. Sometimes over 10 currencies are used. The app must allow for a total cost of well over 10 billion dollars US. They tried 80 bit FP, but the difference in dollars given by an 128 bit
    integer calculation (effectively a huge spreadsheet) and an 80 bit floating point version was 10 million dollars for capping the piles in the new Hong
    Kong airport.. There are many examples in construction of dealing with two quantities, one of which is large and the other small. Capping piles is one of these.

    Stephen
    --
    Stephen Pelc, stephen@vfxforth.com
    Wodni & Pelc GmbH
    Vienna, Austria
    Tel: +44 (0)7803 903612, +34 649 662 974 http://www.vfxforth.com/downloads/VfxCommunity/
    free VFX Forth downloads
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Tue Mar 3 18:33:02 2026
    From Newsgroup: comp.lang.forth

    On 02-03-2026 14:23, Stephen Pelc wrote:
    On 26 Feb 2026 at 05:25:12 CET, "Paul Rubin" <no.email@nospam.invalid> wrote:

    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    It does seem to me that with 32-bit systems widespread, double ints have
    gotten less important. I wouldn't want the standard behaviour to
    change, but I'd probably use the nonstandard extension if it existed.
    With the extension turned on, to get the double int, you'd use 12345 0
    or maybe something like "D# 123 45" .

    Double ints are maybe still useful on 8 bit systems with 16 bit cells.

    We (Wodni & Pelc GmbH) have clients using a 32 bit host who depend
    on 128 bit integers. They have in excess of 10,000 users of their application.

    Even if they converted to a 64 bit host Forth, they would still need
    double numbers.

    Stephen

    Like I said - you can find users for any library, no matter how fringe
    it is - or considered to be - by other users. It took C 50 years before
    it found _Bitint() "essential".

    And like I said before - I have full fledged triple libraries. And even
    used them IRL. Libs are great. You can include them if needed - and
    leave 'em out if they don't serve a purpose in an application.

    I bet I could make a quad lib if I needed it. But I don't. For that
    reason I won't put any effort in it.

    Hans Bezemer
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Wed Mar 4 16:48:36 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl writes:
    Moreover the USA NSA pushes towards elliptic curves. Maybe they have
    a backdoor. Otoh RSA 4096 is well established.

    There was a famous incident where NSA tried to peddle a specific rigged
    curve, but the curves in general use today aren't related to that.

    RSA seems to be giving way to ECC because of possible vulnerability of
    RSA to "index calculus" attacks. I don't claim to understand what that
    is. This might help: https://cr.yp.to/papers/safecurves-20240809.pdf
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Wed Mar 4 16:52:06 2026
    From Newsgroup: comp.lang.forth

    Stephen Pelc <stephen@vfxforth.com> writes:
    The application is construction planning. Sometimes over 10 currencies
    are used. The app must allow for a total cost of well over 10 billion
    dollars US. They tried 80 bit FP, but the difference in dollars given
    by an 128 bit integer calculation (effectively a huge spreadsheet) and
    an 80 bit floating point version was 10 million dollars for capping
    the piles in the new Hong Kong airport.. There are many examples in construction of dealing with two quantities, one of which is large and
    the other small. Capping piles is one of these.

    I wonder if this was due to some kind of numerical instability in which
    case 128 bits might not be enough either. 80 bit FP has a 53 bit
    mantissa and 2**53 pennies is 9e15 dollars. Did you try the same
    calculation with say 256 bit FP, bignums, or whatever?
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Stephen Pelc@stephen@vfxforth.com to comp.lang.forth on Fri Mar 6 10:54:44 2026
    From Newsgroup: comp.lang.forth

    On 5 Mar 2026 at 01:52:06 CET, "Paul Rubin" <no.email@nospam.invalid> wrote:

    Stephen Pelc <stephen@vfxforth.com> writes:
    The application is construction planning. Sometimes over 10 currencies
    are used. The app must allow for a total cost of well over 10 billion
    dollars US. They tried 80 bit FP, but the difference in dollars given
    by an 128 bit integer calculation (effectively a huge spreadsheet) and
    an 80 bit floating point version was 10 million dollars for capping
    the piles in the new Hong Kong airport.. There are many examples in
    construction of dealing with two quantities, one of which is large and
    the other small. Capping piles is one of these.

    I wonder if this was due to some kind of numerical instability in which
    case 128 bits might not be enough either. 80 bit FP has a 53 bit
    mantissa and 2**53 pennies is 9e15 dollars. Did you try the same
    calculation with say 256 bit FP, bignums, or whatever?

    128 bit ints were good enough. We could probably have got away with 96 bits
    but 128 bits were as easy. Note that this is a production app. Speed was also important. Porting the system from ProForth for Windows (a DTC Forth) to VFX Forth (native code compilation) gave a factor of ten improvement in recalculation speed.

    Stephen
    --
    Stephen Pelc, stephen@vfxforth.com
    Wodni & Pelc GmbH
    Vienna, Austria
    Tel: +44 (0)7803 903612, +34 649 662 974 http://www.vfxforth.com/downloads/VfxCommunity/
    free VFX Forth downloads
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Mar 6 12:22:21 2026
    From Newsgroup: comp.lang.forth

    In article <87a4wnayix.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    Stephen Pelc <stephen@vfxforth.com> writes:
    The application is construction planning. Sometimes over 10 currencies
    are used. The app must allow for a total cost of well over 10 billion
    dollars US. They tried 80 bit FP, but the difference in dollars given
    by an 128 bit integer calculation (effectively a huge spreadsheet) and
    an 80 bit floating point version was 10 million dollars for capping
    the piles in the new Hong Kong airport.. There are many examples in
    construction of dealing with two quantities, one of which is large and
    the other small. Capping piles is one of these.

    I wonder if this was due to some kind of numerical instability in which
    case 128 bits might not be enough either. 80 bit FP has a 53 bit
    mantissa and 2**53 pennies is 9e15 dollars. Did you try the same
    calculation with say 256 bit FP, bignums, or whatever?

    Financial calculations donot like floating point. If you started with 32 bits integers, stepping up to quad precision is a smaller step, then introducing
    fp.

    Groetjes.
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sat Mar 7 17:58:43 2026
    From Newsgroup: comp.lang.forth

    On 03-03-2026 15:39, Stephen Pelc wrote:
    On 3 Mar 2026 at 13:47:54 CET, "albert@spenarnc.xs4all.nl" <albert@spenarnc.xs4all.nl> wrote:

    We (Wodni & Pelc GmbH) have clients using a 32 bit host who depend
    on 128 bit integers. They have in excess of 10,000 users of their
    application.

    I appreciate that you will not disclose much on your clients.
    Can you reveal what kind of applications would use 128 bit integers
    but not more precision?

    The application is construction planning. Sometimes over 10 currencies are used. The app must allow for a total cost of well over 10 billion dollars US. They tried 80 bit FP, but the difference in dollars given by an 128 bit integer calculation (effectively a huge spreadsheet) and an 80 bit floating point version was 10 million dollars for capping the piles in the new Hong Kong airport.. There are many examples in construction of dealing with two quantities, one of which is large and the other small. Capping piles is one of
    these.

    Stephen


    Okay, for all those poor souls whose compilers have been rejected by
    huge global corporate construction conglomerates, I'm here to tell you -
    there is hope for you all.

    Too lazy to create my own, I've ported a quadruple word library from the archives of Forth Dimensions. No, it's not perfect by any standard - but
    it works.

    If your compiler is 64-bit, this thing allows you to do basic 256-bit arithmetic.

    To give you an idea - that is enough to give every single atom in the observable universe a unique identifier. I mean - every single atom in
    your body. Every single atom of the car just passing by. Every single
    atom of the plane flying over your head. Every single atom of every girl
    you ever made love to. Every single atom of every place you've ever
    visited in your entire miserable life. Every single atom of every star twinkling in the night sky.

    If that ain't enough to handle the books of a minute construction
    company located in a tiny speck of dust floating in the eternity of
    space, I don't know what will.

    Hans Bezemer

    P.S. Two files, the latter is a 4tH to ANS-Forth translation.

    ---8<---
    [UNDEFINED] |q/| [IF]
    [UNDEFINED] dabs [DEFINED] 4TH# * [IF] [NEEDS lib/ansdbl.4th] [THEN]

    ( quadruple word arithmetic q+ q- support words )

    4 constant /quad

    /quad array 1temp
    /quad array 2temp

    [DEFINED] 4TH# [IF]
    : loop-- -1 /quad 1- cells ;
    : cell-- cell- dup /quad cells + ;
    [ELSE]
    : loop-- 0 /quad 1- cells ;
    : cell-- dup /quad 1- cells + ;
    [THEN]

    : q! ( q# addr -- )
    dup /quad cells + swap do
    i !
    1 cells +loop ;

    : q@ ( addr -- q# )
    cell-- do
    i @
    -1 cells +loop ;

    ( quadruple word arithmetic q+ q- support words)

    : highbit? highbit and rot ;

    [DEFINED] 4TH# [IF]
    : ?carry ( #1 #2 result# -- boolean )
    highbit? highbit? highbit? if and else or then 0<> ;
    [ELSE]
    : ?carry ( #1 #2 result# -- boolean )
    highbit? highbit? highbit? if and else or then 0<> 1 and ;
    [THEN]

    : ?borrow ( #1 # 2 result# -- boolean )
    rot ?carry ;

    ( quadruple word arithmetic q+ q- algorithm words )
    \ all operands in temp variables
    : q+temp ( -- )
    0 loop-- do
    1temp i + @ 2dup + dup 2swap rot ?carry swap
    2temp i + @ 2dup + dup 2swap rot ?carry
    swap 2temp i + ! or
    -1 cells +loop drop ;
    \ all operands in temp variables
    : q-temp ( -- )
    0 loop-- do
    1temp i + @ swap 2dup - dup 2swap rot ?borrow swap
    2temp i + @ 2dup - dup 2swap rot ?borrow
    swap 2temp i + ! or
    -1 cells +loop drop ;

    ( quadruple word arithmetic q+ q- driving words )

    : q+ ( q#1 q#2 -- q#result)
    1temp q! 2temp q! q+temp 2temp q@ ;

    : q- ( q#1 q#2 -- q#result)
    2temp q! 1temp q! q-temp 2temp q@ ;

    ( quadruple word arithmetic q* q/ support words)
    \ all operands in temp variables [DEFINED] 4TH# [IF]
    : q2*temp ( --)
    0 loop-- do
    2temp i + @ dup 0< swap 2* rot + 2temp i + !
    -1 cells +loop drop ;
    [ELSE]
    : q2*temp ( --)
    0 loop-- do
    2temp i + @ dup 0< 1 and swap 2* rot + 2temp i + !
    -1 cells +loop drop ;
    [THEN]
    \ all operands in temp variables
    : q2/temp ( --)
    2temp @ 0<
    /quad cells 0 do
    2temp i + @ dup 1 and swap 2/
    lowbits and rot if highbit or then
    2temp i + !
    1 cells +loop drop ;

    ( quadruple word arithmetic q* q/ support words )

    : q2* ( q# -- q# )
    2temp q! q2*temp 2temp q@ ;

    : q2/ ( q# -- q# )
    2temp q! q2/temp 2temp q@ ;

    : q< ( q#1 q#2 -- boolean )
    q- >r drop drop drop r> 0< ;

    : q0> ( q#1 -- boolean )
    dup 0< -rot or rot or rot or 0= or 0= ;

    ( quadruple word arithmetic q* q/ temporary variables )

    /quad array divisor
    /quad array remainder
    /quad array quotient
    /quad array power

    /quad array result
    /quad array op2

    ( quadruple word arithmetic unsigned q/ support words )
    \ all operands in temp variables
    : @power ( -- )
    begin
    power q@ q2* power q! divisor q@ q2* divisor q!
    remainder q@ divisor q@ q<
    until
    power q@ q2/ power q! divisor q@ q2/ divisor q! ;
    \ all operands in temp variables
    : @quotient ( --)
    begin
    remainder q@ divisor q@ q< 0= if
    remainder q@ divisor q@ q- remainder q!
    quotient q@ power q@ q+ quotient q!
    then

    power q@ q2/ power q! divisor q@ q2/ divisor q!
    power q@ q0> 0=
    until ;

    ( quadruple word arithmetic unsigned q/)

    : |q/| ( |q.dividend| |q.divisor| -- |q.remainder| |q.quotient| )
    divisor q! remainder q!
    0 0 0 0 quotient q! 1 0 0 0 power q!
    @power
    @quotient
    remainder q@ quotient q@ ;

    ( quadruple word arithmetic unsigned q*)

    : |q*| ( d#1 d#2 -- q#1 )
    0 0 op2 q! 0 0 0 0 0 0 result q!
    cell-bits /quad * 1- 0 do
    result q@ q2* result q!
    q2* dup 0< if op2 q@ result q@ q+ result q! then
    loop
    2drop 2drop result q@ ;

    ( quadruple word arithmetic q* q/ support words)

    : ?dsign-abs ( d#1 d#2 -- |d#1| |d#2| boolean )
    >r >r >r r@ dabs r> 0< r> swap r@ swap >r dabs r> r> 0< xor ;

    : ?qminus ( q# boolean -- q# )
    if >r >r >r >r 0 0 0 0 r> r> r> r> q- then ;

    : ?qsign-abs ( q#1 q#2 -- |q#1| |q#2| boolean )
    >r >r >r >r >r i 0< r> swap dup >r ?qminus r>
    r> swap r> swap r> swap r> swap >r dup 0< dup >r ?qminus
    r> r> xor ;

    ( quadruple word arithmetic q* q/)

    : q/ ( q#1 q#2 -- q#result )
    ?qsign-abs >r |q/|
    >r >r >r >r 2drop 2drop r> r> r> r> r> ?qminus ;

    : q* ( d#1 d#2 -- q#result )
    ?dsign-abs >r |q*| r> ?qminus ;

    ( quadruple word arithmetic d*/ )

    : d*/ ( d#1 d#multiplier d#divisor -- d#result)
    >r >r q*
    r> r> dup 0< if -1 -1 else 0 0 then
    q/ 2drop ;

    [DEFINED] 4TH# [IF]
    hide 1temp
    hide 2temp
    hide loop--
    hide cell--
    hide highbit?
    hide ?carry
    hide ?borrow
    hide q+temp
    hide q-temp
    hide q2*temp
    hide q2/temp
    hide divisor
    hide remainder
    hide quotient
    hide power
    hide result
    hide op2
    hide @power
    hide @quotient
    [THEN]
    [THEN]

    \ 1TEMP
    \ 2TEMP
    \ These quadruple word variables aid in the elimination of much of the
    return
    \ stack manipulation which otherwise would be required. They temporarily
    hold
    \ quadruple word numbers during the calculations of Q+TEMP and Q-TEMP. Their
    \ usage does prevent the algorithms from being reentrant.

    \ Q! ( Q# addr -- )
    \ Stores a quadruple word number at the address given. The most significant
    \ word is stored at the address and the least significant word is stored at
    \ the address + 3 cells.

    \ Q@ ( addr -- Q# )
    \ Fetches the quadruple word number from the address given. The most
    \ significant word ends up on the top of stack.

    \ ?CARRY ( W#1 W#2 Result -- boolean )
    \ Accepts the two inputs to an addition and the result of the addition and
    \ leaves a one if a carry occurred and a zero otherwise. It does this by
    \ comparing the signs of the inputs and the sign of the result using the
    \ following truth table:
    \ W#1 0 0 0 0 1 1 1 1
    \ W#2 0 0 1 1 0 0 1 1
    \ Result 0 1 0 1 0 1 0 1
    \ boolean 0 0 1 0 1 0 1 1

    \ ?BORROW ( W#1 W#2 Result -- boolean )
    \ Accepts the two Inputs to a subtraction and the result of the subtraction
    \ and leaves a one if a borrow occurred and a zero otherwise. Because of the
    \ identity, if A-B=C then A=B+C, ?CARRY is used to compute the borrow.

    \ Q+TEMP ( -- )
    \ The two inputs are passed in 1TEMP and 2TEMP. The result of the quadruple
    \ word addition is left In 2TEMP.

    \ Q-TEMP ( -- )
    \ The two inputs are assumed to be in 1TEMP and 2TEMP. The result of the
    \ quadruple word subtraction of 2TEMP from 1TEMP is left in 2TEMP.

    \ Q+ ( Q#1 Q#2 -- Q#Sum )
    \ Accepts two quadruple word operands on the stack and returns the result
    \ of their addition on the stack.

    \ Q- ( Q#1 Q#2 -- Q#differance )
    \ Accepts two quadruple word operands on the stack and returns the result
    \ of the subtraction of Q#2 from Q#1 on the stack.

    \ Q2*TEMP ( -- )
    \ The input is passed in 2TEMP. The result of it being multiplied by two is
    \ left in 2TEMP.

    \ Q2/TEMP ( -- )
    \ The input is passed in 2TEMP. The result of it being divided by two is
    left
    \ in 2TEMP.

    \ Q2* ( |Q#| -- |Q#| )
    \ Accepts a quadruple word number on the stack and multiplies it by two.
    Note
    \ that since the number is an absolute value the high order bit will
    always be
    \ zero thus preventing overflow from occurring.

    \ Q2/ ( |Q#| -- |Q#| )
    \ Accepts a quadruple word number on the stack and divides it by two. Note
    \ that since the number is an absolute value the high order bit can
    always be
    \ made a zero without consideration of a possible sign bit on the number.

    \ Q< ( Q#1 Q#2 -- boolean )
    \ Compares the two quadruple word operands and leaves a one if Q#1 is less
    \ than Q#2 and a zero otherwise.

    \ Q0> ( Q#1 -- boolean )
    \ Compares the quadruple word number on the stack with zero and leaves a one
    \ if it is greater than zero and a zero if the number is less than or
    equal to
    \ zero.

    \ DIVISOR
    \ REMAINDER
    \ QUOTIENT
    \ POWER
    \ These quadruple word variables are used to store temporary intermediate
    \ results during Q/. These variables aid in the elimination of much of the
    \ return stack manipulation which otherwise would be required. Their usage
    \ prevents the algorithms from being reentrant.

    \ RESULT
    \ OP2
    \ These quadruple word variables are used to store temporary intermediate
    \ results during Q*. These variables aid in the elimination of much of the
    \ return stack manipulation which otherwise would be required. Their usage
    \ prevents the algorithms from being reentrant.

    \ @POWER ( -- )
    \ The inputs are passed in DIVISOR, REMAINDER and POWER. This word
    multiplies
    \ the divisor by two until it exceeds the dividend. It then backs up one
    \ multiplication.

    \ @QUOTIENT ( -- )
    \ The inputs are passed in DIVISOR, REMAINDER, QUOTIENT and POWER. This word
    \ repetitively subtracts all lower multiples of two of the DIVISOR
    \ accumulating a quotient and obtaining a remainder.

    \ |Q\| ( |Q.dividend| |Q.divisor| -- |Q.remainder| |Q.quotient|)
    \ Using the absolute value of the dividend and the divisor, the absolute
    value
    \ of quotient and remainder are computed.

    \ |Q*| ( |D#1| |D#2| -- |Q.result|)
    \ The absolute values of the two double word operands are multiplied giving
    \ an absolute value quadruple word result. The algorithm merely looks at
    each
    \ bit of the first operand and for every one bit adds an appropriately
    shifted
    \ second operand to the accumulating result, This algorithm could be speeded
    \ up in many ways. The first is by looking at the counter operand two
    bits at
    \ a time (suggested by Kim Harris). A second is by initially examining the
    \ operands for the one with the least number of ones to use as the counter.
    \ A third way is to examine the remaining counter at each iteration for
    a zero
    \ value and allowing the loop to terminate early.

    \ ?DSIGN-ABS ( D#1 D#2 -- |D#1| |D#2| boolean )
    \ This word computes the absolute value of the two double word numbers input
    \ on the stack and in addition to them leaves a one if the two numbers were
    \ of differing sign or a zero if the numbers were of the same sign. This
    word
    \ is used to calculate the sign of the result of multiplication as well as
    \ taking the absolute values of the operands which the multiply algorithm
    \ requires.

    \ ?QMINUS ( Q# boolean -- °Jesuit )
    \ If the boolean on the top of the stack is a one, the quadruple word number
    \ is two's complemented. This word is used to correct the sign of the result
    \ of a multiply or divide.

    \ ?QSIGN-ABS ( Q#1 Q#2 -- Q#1 Q#2 boolean )
    \ This word computes the absolute value of the two quadruple word numbers
    \ input on the stack and in addition to them leaves a one if the two numbers
    \ were of differing sign or a zero if the numbers were of the same sign.
    This
    \ word is used to calculate the sign of the result of division as well as
    \ taking the absolute values of the operands which the divide algorithm
    \ requires.

    \ Q/ ( Q#dividend Q#divisor -- Q#quotient )
    \ The quadruple word quotient resulting from the division of Q#1 by Q#2 is
    \ left on the stack.

    \ Q* ( D#1 D#2 -- Q#result )
    \ The quadruple word result of the multiplication of Q#1 and Q#2 is left on
    \ the stack.

    \ D*/ ( D#1 D#multiplier D#divisor -- D#result )
    \ This is the typical */ but with double word inputs and outputs. A full
    \ quadruple word intermediate result is used.
    ---8<---
    : ARRAY CREATE CELLS ALLOT ;

    S" ADDRESS-UNIT-BITS" ENVIRONMENT? \ query environment
    [IF] \ if successful
    1 chars * CONSTANT CHAR-BITS \ create constant CHAR-BITS
    [ELSE]
    .( Warning: CHAR-BITS undefined) CR
    [THEN]

    S" MAX-N" ENVIRONMENT? \ query environment
    [IF] \ if successful
    NEGATE 1- CONSTANT (ERROR) \ create constant (ERROR)
    [ELSE]
    .( Warning: ) CHAR ( EMIT .( ERROR) CHAR ) EMIT .( undefined) CR
    [THEN]

    S" MAX-N" ENVIRONMENT? \ query environment
    [IF] \ if successful
    CONSTANT MAX-N \ create constant MAX-N
    [ELSE]
    .( Warning: MAX-N undefined) CR
    [THEN]

    [UNDEFINED] cell-bits [IF]
    char-bits 1 cells * constant cell-bits ( bits per cell )
    [THEN]

    [UNDEFINED] highbit [IF]
    (error) constant highbit ( highbit in cell)
    [THEN]

    [UNDEFINED] lowbits [IF]
    max-n constant lowbits ( lowbits in cell)
    [THEN]
    ---8<---
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Sun Mar 8 18:15:28 2026
    From Newsgroup: comp.lang.forth

    On 2/24/26 2:43 AM, Krishna Myneni wrote:
    On 2/21/26 9:40 AM, Anton Ertl wrote:
    minforth <minforth@gmx.net> writes:
    This is not the time or place for criticism.

    I think it is time for criticism, particularly meaning 2 of
    <https://en.wiktionary.org/wiki/criticism> (meaning 1 is not clear to
    me).  Concerning the place, giving your feedback on
    <https://forth-standard.org/proposals/recognizer-committee-
    proposal-2025-09-11?hideDiff#reply-1623>
    would be ideal, because that provides the versions of the proposal and
    the feedback in one place.

    Everyone must decide for
    themselves whether this flavour of recognisers is useful for their
    applications.

    Yes, and system implementors have to decide whether the want to
    implement it.


    My initial study of the recognizer proposal, and first steps to
    implement it in kForth-64, have led to a few observations:
    ...

    I'm happy to report that kForth-64 now has its interpreter factored
    internally into recognizers, in a model quite close to the reference implementation of the recognizers proposal at forth-standard.org.

    The current stage of recognizer usage is at "Level 1" per the definition
    in the recognizers proposal. The recognizers are not yet user settable,
    and there is no provision for recognizer sequences, but these are straightforward to add.

    Despite kForth's non-standard INTERPRET which performs partial
    compilation in State 0 to allow entering Forth expressions with control structures such a DO ... LOOP, IF ... ELSE ... THEN etc. directly to the interpreter, on a single line of input, the Forth recognizer sequence
    turns out to be straightforward with the specs of the recognizers proposal.

    In the current kForth-64 commit (3fee3a2) at GitHub, the following words
    from the recognizer proposal are implemented:

    REC-NAME
    REC-NUMBER
    REC-FLOAT
    REC-NONE
    TRANSLATE-NAME
    TRANSLATE-CELL
    TRANSLATE-FLOAT
    TRANSLATE-NONE

    Once the recognizer sequences interface is implemented to allow
    user-written Forth definitions to be substituted for the built-in
    recognizers, I will test it with a replacement REC-NUMBER written in
    Forth which will recognize both single and double length numbers.

    My inclination is to use C-style syntax for a long long literal for
    REC-NUMBER to recognize a double length number e.g.

    −170141183460469231731687303715884105728LL


    --
    KM










    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Mon Mar 9 07:49:42 2026
    From Newsgroup: comp.lang.forth

    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    My inclination is to use C-style syntax for a long long literal for >REC-NUMBER to recognize a double length number e.g.

    -170141183460469231731687303715884105728LL

    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    Recent development Gforth has

    .-is-dcell? ( - flag ) gforth-experimental "dot-is-dcell-question"
    If this user flag is true (default), 'rec-number' recognizes numbers
    without prefix that contain a decimal point as double-cell numbers.
    Otherwise 'rec-number' does not recognize the number, and, if present,
    'rec-float' will recognize it as a floating-point number.
    'to .-is-dcell?' run-time: ( x - ) If x=0 change the value of
    '.-is-dcell?' to false, otherwise to true.

    I.e., by default "123." is recognized as double, but once you perform

    false to .-is-dcell?

    it will no longer be recognized as double, and rec-float will get a
    chance at recognizing it (with the default recognizer order), and will recognize it as float. And if you want to write a double, you write
    "#123." or "$7b.".

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Mon Mar 9 10:37:56 2026
    From Newsgroup: comp.lang.forth

    In article <2026Mar9.084942@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    My inclination is to use C-style syntax for a long long literal for >>REC-NUMBER to recognize a double length number e.g.

    -170141183460469231731687303715884105728LL

    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    If the next step is to obsolete default BASE double numbers, I am all
    for it. I hate stuff has suffixes as LL HH for this purpose.
    That is fine with general lexers, not so with Forth.
    (For operators that suffices are not a problem, because they must match a dictionary entry wholesale. For huge numbers you could have
    +h -h *h /h %h ).


    Recent development Gforth has

    .-is-dcell? ( - flag ) gforth-experimental "dot-is-dcell-question"
    If this user flag is true (default), 'rec-number' recognizes numbers
    without prefix that contain a decimal point as double-cell numbers.
    Otherwise 'rec-number' does not recognize the number, and, if present,
    'rec-float' will recognize it as a floating-point number.
    'to .-is-dcell?' run-time: ( x - ) If x=0 change the value of
    '.-is-dcell?' to false, otherwise to true.

    I.e., by default "123." is recognized as double, but once you perform

    false to .-is-dcell?

    it will no longer be recognized as double, and rec-float will get a
    chance at recognizing it (with the default recognizer order), and will >recognize it as float. And if you want to write a double, you write
    "#123." or "$7b.".

    Introducing another state besides STATE ?

    In the context of PREFIX the only state besides STATE is the search
    order, i.e. namespaces. Most serious languages have namespaces, and
    tend to accept that procedure calls change their meaning dependant on namespace.

    (I tend to accept BASE as an internal state of the <# # #S #> class, rather than a global state.)


    - anton

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Mon Mar 9 16:48:24 2026
    From Newsgroup: comp.lang.forth

    On 3/9/26 2:49 AM, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    My inclination is to use C-style syntax for a long long literal for
    REC-NUMBER to recognize a double length number e.g.

    -170141183460469231731687303715884105728LL

    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    Recent development Gforth has

    .-is-dcell? ( - flag ) gforth-experimental "dot-is-dcell-question"
    If this user flag is true (default), 'rec-number' recognizes numbers
    without prefix that contain a decimal point as double-cell numbers.
    Otherwise 'rec-number' does not recognize the number, and, if present,
    'rec-float' will recognize it as a floating-point number.
    'to .-is-dcell?' run-time: ( x - ) If x=0 change the value of
    '.-is-dcell?' to false, otherwise to true.

    I.e., by default "123." is recognized as double, but once you perform

    false to .-is-dcell?

    it will no longer be recognized as double, and rec-float will get a
    chance at recognizing it (with the default recognizer order), and will recognize it as float. And if you want to write a double, you write
    "#123." or "$7b.".

    - anton

    I like the concept of requiring both the base prefix and the trailing
    decimal point -- this notation is far less likely to be confused for a floating point number than with the trailing decimal point alone.

    Thank you.

    --
    Krishna

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Tue Mar 10 07:35:50 2026
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl writes:
    In article <2026Mar9.084942@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    If the next step is to obsolete default BASE double numbers, I am all
    for it.

    Make a proposal. I doubt that it will find consensus, but I have been surprised before.

    Recent development Gforth has

    .-is-dcell? ( - flag ) gforth-experimental "dot-is-dcell-question"
    If this user flag is true (default), 'rec-number' recognizes numbers
    without prefix that contain a decimal point as double-cell numbers.
    Otherwise 'rec-number' does not recognize the number, and, if present,
    'rec-float' will recognize it as a floating-point number.
    'to .-is-dcell?' run-time: ( x - ) If x=0 change the value of
    '.-is-dcell?' to false, otherwise to true.

    I.e., by default "123." is recognized as double, but once you perform

    false to .-is-dcell?

    it will no longer be recognized as double, and rec-float will get a
    chance at recognizing it (with the default recognizer order), and will >>recognize it as float. And if you want to write a double, you write >>"#123." or "$7b.".

    Introducing another state besides STATE ?

    It's role is more like that of BASE, which is bad enough.

    One way to make it more civilized would be to specify that INCLUDED
    and friends save the current value of .-IS-CELL?, then set it to true,
    include the file, then restore the saved value.

    This would mean that you can set the behaviour for the rest of the
    file, but without it affecting included files or text interpretation
    after the current file is included.

    (I tend to accept BASE as an internal state of the <# # #S #> class, rather >than a global state.)

    BASE is global state and affects input number conversion in addition
    to the # words. Early in Gforth development, a small benchmark like

    : foo 1000000 0 do loop ;

    [yes, with CPUs running at 12-25MHz, this took noticable time] took
    much longer than expected. So I set out to see why each iteration
    took so long. It took quite a while until I understood that the
    iterations were as fast as I expected, but that this loop performs
    many more iterations than I expected, because BASE was hex by default.

    One learns by pain. This pain was so notable that I remember it until
    now, more than three decades later.

    - 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: https://forth-standard.org/
    EuroForth 2025 proceedings: http://www.euroforth.org/ef25/papers/
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Tue Mar 10 12:06:27 2026
    From Newsgroup: comp.lang.forth

    In article <2026Mar10.083550@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@spenarnc.xs4all.nl writes:
    In article <2026Mar9.084942@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    If the next step is to obsolete default BASE double numbers, I am all
    for it.

    Make a proposal. I doubt that it will find consensus, but I have been >surprised before.

    What do you think of this:
    Decimal points are reserved for floating point, all else is obsolescent.
    A double precision integer is recognized by

    ##-118189089000089082828282888888888828282828 $$FFFF0000FFFF0000FFFF0000FFFFF0000 %%111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    This is reminiscent of the LL suffix, but I like prefix better.
    In a pinch you could do a portable implementation of
    $$ FF0000FFFF0000FFFF0000FFFFF0000
    to replace
    $$FFFF0000FFFF0000FFFF0000FFFFF0000

    We really have to get rid of the decimal point for this, and case-insensitive. (Only languages that have roots in 70's BASIC LISP FORTRAN FORTH have this.) Also there is no case-sensitivity in Chinese.

    <SNIP>

    - anton

    Groetjes Albert
    --
    The Chinese government is satisfied with its military superiority over USA.
    The next 5 year plan has as primary goal to advance life expectancy
    over 80 years, like Western Europe.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Wed Mar 11 09:45:50 2026
    From Newsgroup: comp.lang.forth

    On 3/9/26 16:48, Krishna Myneni wrote:
    On 3/9/26 2:49 AM, Anton Ertl wrote:
    Krishna Myneni <krishna.myneni@ccreweb.org> writes:
    My inclination is to use C-style syntax for a long long literal for
    REC-NUMBER to recognize a double length number e.g.

    -170141183460469231731687303715884105728LL

    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    Recent development Gforth has

       .-is-dcell? ( - flag  ) gforth-experimental "dot-is-dcell-question"
          If this user flag is true (default), 'rec-number' recognizes
    numbers
       without prefix that contain a decimal point as double-cell numbers.
       Otherwise 'rec-number' does not recognize the number, and, if present, >>    'rec-float' will recognize it as a floating-point number.
       'to .-is-dcell?' run-time: ( x - ) If x=0 change the value of
       '.-is-dcell?' to false, otherwise to true.

    I.e., by default "123." is recognized as double, but once you perform

    false to .-is-dcell?

    it will no longer be recognized as double, and rec-float will get a
    chance at recognizing it (with the default recognizer order), and will
    recognize it as float.  And if you want to write a double, you write
    "#123." or "$7b.".

    - anton

    I like the concept of requiring both the base prefix and the trailing decimal point -- this notation is far less likely to be confused for a floating point number than with the trailing decimal point alone.


    Base prefixes and double cell entries are now recognized by REC-NUMBER
    in kForth-64. Double length number recognition requires that the number
    have a base prefix ('$', '#', or '%') and have a trailing decimal
    character '.'.

    REC-NUMBER returns TRANSLATE-CELL or TRANSLATE-DCELL for valid single or double length numbers. I believe this double length number entry
    requirement is sufficient to avoid confusion with floating point number
    entry. It also maintains portability of code written for kForth with the current standard, being a more restrictive subset of all formats
    recognized as double length in the current standard.

    There is no change to REC-FLOAT. It still requires a 'E' exponent
    character, optionally followed by an integer power of 10 per the current standard. There are no plans to change this. Of course it is anticipated
    that users will be able to change it through using custom recognizers in
    the future.

    Single cell number examples of lexemes consistent with the standard:

    #123 ( decimal 123 )
    #-123 ( decimal -123 )
    $ffff ( hex ffff = decimal 65535 )
    %-110011 ( binary -110011 = decimal -51 )

    When single cell numbers do not use a base prefix character, the current
    value of BASE is used to interpret the lexeme.

    Examples of double cell lexemes:

    #-170141183460469231731687303715884105728. ( MIN DINT ) $ffffffffffffffffffffffffffffffff. ( MAX DUINT )

    A base prefix AND a trailing decimal point are required to recognize the double cell lexemes.

    --
    KM




    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Krishna Myneni@krishna.myneni@ccreweb.org to comp.lang.forth on Wed Mar 11 09:48:31 2026
    From Newsgroup: comp.lang.forth

    On 3/10/26 06:06, albert@spenarnc.xs4all.nl wrote:
    In article <2026Mar10.083550@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@spenarnc.xs4all.nl writes:
    In article <2026Mar9.084942@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    My recommendation is to support the standard syntax

    #-170141183460469231731687303715884105728.

    If the next step is to obsolete default BASE double numbers, I am all
    for it.

    Make a proposal. I doubt that it will find consensus, but I have been
    surprised before.

    What do you think of this:
    Decimal points are reserved for floating point, all else is obsolescent.
    A double precision integer is recognized by

    ##-118189089000089082828282888888888828282828 $$FFFF0000FFFF0000FFFF0000FFFFF0000 %%111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

    This is reminiscent of the LL suffix, but I like prefix better.
    In a pinch you could do a portable implementation of
    $$ FF0000FFFF0000FFFF0000FFFFF0000
    to replace
    $$FFFF0000FFFF0000FFFF0000FFFFF0000


    The C style LL suffix is no good anyway. On 64-bit gcc,

    long long int

    is still a 64 bit integer, not a 128 bit integer.

    --
    Krishna

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From NN@november.nihal@gmail.com to comp.lang.forth on Thu Mar 19 19:23:40 2026
    From Newsgroup: comp.lang.forth

    On 09/02/2026 7:49 am, Anton Ertl wrote:
    A more fleshed-out version of the current recognizer proposal is
    online: <https://forth-standard.org/proposals/recognizer-committee-proposal-2025-09-11?hideDiff#reply-1614>

    After many years this proposal is in transition from being fluid to
    solid, so if you want major upheavals, I doubt that your input will be
    acted upon (but you might still want to give it). OTOH, if you find
    any mistakes, missing parts or unclear parts, now is the time when
    your input will be most effective. In either case, please report any feedback by clicking on the Reply button on the web page above.

    - anton

    I have never written a compiler but i have written a few parsers.

    The only input I have is:

    (1) https://www.forth.com/recognizers/

    I found this page very useful. Credit to whomever wrote it.

    (2) thanks to brad nelsons musings on svfig.

    They made recognizers more understandble.

    Hope it helps

    NN

    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From thresh3@thresh3@fastmail.com (Lev) to comp.lang.forth on Thu Mar 19 23:13:07 2026
    From Newsgroup: comp.lang.forth

    NN <november.nihal@gmail.com> wrote:

    (1) https://www.forth.com/recognizers/
    I found this page very useful. Credit to whomever wrote it.

    (2) thanks to brad nelsons musings on svfig.
    They made recognizers more understandble.

    Timely -- Krishna Myneni just posted kForth-32 v2.7.0 in this
    group, and the main change is a rewritten interpreter/compiler
    aligned with the recognizer proposal. So there's now a
    working implementation to look at alongside the spec.

    The Forth Inc page is good at explaining the "what." What
    I find harder to get from the docs is the "why now" -- Forth
    has always had INTERPRET and the ability to extend the text
    interpreter. What recognizers add is a standard way to do
    it, so that extensions compose instead of each implementation
    inventing its own hook.

    The analogy that clicked for me: recognizers are to Forth's
    text interpreter what DOES> was to defining words. DOES>
    didn't let you do anything new -- you could always write
    machine code. But it gave the pattern a name and made it
    composable. Recognizers do the same for "how do I teach the
    interpreter a new kind of input."
    --- Synchronet 3.21d-Linux NewsLink 1.2