• "The Best Programming Language for the End of the World"

    From Alexis@flexibeast@gmail.com to comp.lang.forth on Thu Mar 27 16:05:38 2025
    From Newsgroup: comp.lang.forth


    Thought people in this group might be interested in this article on
    Wired:

    "Once the grid goes down, an old programming language called Forth—and a
    new operating system called Collapse OS—may be our only salvation."

    -- https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/


    Alexis.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Martin Nicholas@reply-2025@mgn.org.uk to comp.lang.forth on Thu Mar 27 08:39:00 2025
    From Newsgroup: comp.lang.forth

    On Thu, 27 Mar 2025 16:05:38 +1100
    Alexis <flexibeast@gmail.com> wrote:
    Thought people in this group might be interested in this article on
    Wired:

    "Once the grid goes down, an old programming language called
    Forth—and a new operating system called Collapse OS—may be our only salvation."

    -- https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/


    Alexis.
    No Wired subscription? Here's what you need:
    https://collapseos.org/
    --
    Regards,
    Martin Nicholas.
    E-mail: reply-202503@mgn.org.uk (Address will be valid throughout
    March).
    I'm a fan of the free and open internet - what's wrong with me?
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Alexis@flexibeast@gmail.com to comp.lang.forth on Fri Mar 28 10:21:58 2025
    From Newsgroup: comp.lang.forth

    Martin Nicholas <reply-2025@mgn.org.uk> writes:

    No Wired subscription?

    i don't have a Wired subscription, and am able to access the full
    article; is this not the case for you?

    (My general policy is to not link to articles whose full version is
    behind a paywall, with some exceptions where e.g. there's a
    non-paywalled abstract which itself provides useful information.)


    Alexis.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Martin Nicholas@reply-2025@mgn.org.uk to comp.lang.forth on Fri Mar 28 08:02:35 2025
    From Newsgroup: comp.lang.forth

    On Fri, 28 Mar 2025 10:21:58 +1100
    Alexis <flexibeast@gmail.com> wrote:

    Martin Nicholas <reply-2025@mgn.org.uk> writes:

    No Wired subscription?

    i don't have a Wired subscription, and am able to access the full
    article; is this not the case for you?

    (My general policy is to not link to articles whose full version is
    behind a paywall, with some exceptions where e.g. there's a
    non-paywalled abstract which itself provides useful information.)


    Alexis.

    You (I) get one free article per month. After that I get the first few
    lines and a prompt to subscribe. The fingerprinting is difficult to
    defeat - I gave up.
    --
    Regards,

    Martin Nicholas.

    E-mail: reply-202503@mgn.org.uk (Address will be valid throughout
    March).

    Cyber-diversity is as important as bio-diversity.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anthk@anthk@openbsd.home to comp.lang.forth on Fri Mar 28 22:14:54 2025
    From Newsgroup: comp.lang.forth

    On 2025-03-27, Alexis <flexibeast@gmail.com> wrote:

    Thought people in this group might be interested in this article on
    Wired:

    "Once the grid goes down, an old programming language called Forth—and a new operating system called Collapse OS—may be our only salvation."

    -- https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/


    Alexis.

    Add a ZMachine on top and I'm sold. But not as a post-apocallipse computer,
    but maybe as a general one if it had networking support. Writing a gopher, irc and some small usenet client would be a breeze.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sat Mar 29 01:07:21 2025
    From Newsgroup: comp.lang.forth

    Writing a gopher, irc
    and some small usenet client would be a breeze.

    That should be the least of our worries when the world ends?

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Mar 29 15:54:58 2025
    From Newsgroup: comp.lang.forth

    On 29/03/2025 12:07 pm, mhx wrote:
    Writing a gopher, irc
    and some small usenet client would be a breeze.

    That should be the least of our worries when the world ends?

    No computing in heaven? That'd be a contradiction in terms :)


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Alexis@flexibeast@gmail.com to comp.lang.forth on Sun Mar 30 18:51:30 2025
    From Newsgroup: comp.lang.forth

    Martin Nicholas <reply-2025@mgn.org.uk> writes:

    You (I) get one free article per month. After that I get the first few
    lines and a prompt to subscribe. The fingerprinting is difficult to
    defeat - I gave up.

    Ah! Now i understand. Thanks, i'll keep that in mind in future.


    Alexis.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Bernd Linsel@bl1-thispartdoesnotbelonghere@gmx.com to comp.lang.forth on Sun Mar 30 14:14:59 2025
    From Newsgroup: comp.lang.forth

    On 28.03.25 09:02, Martin Nicholas wrote:
    On Fri, 28 Mar 2025 10:21:58 +1100
    Alexis <flexibeast@gmail.com> wrote:

    Martin Nicholas <reply-2025@mgn.org.uk> writes:

    No Wired subscription?

    i don't have a Wired subscription, and am able to access the full
    article; is this not the case for you?

    (My general policy is to not link to articles whose full version is
    behind a paywall, with some exceptions where e.g. there's a
    non-paywalled abstract which itself provides useful information.)


    Alexis.

    You (I) get one free article per month. After that I get the first few
    lines and a prompt to subscribe. The fingerprinting is difficult to
    defeat - I gave up.


    Try

    https://archive.ph/2025.03.26-120837/https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/
    --
    Bernd Linsel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anthk@anthk@openbsd.home to comp.lang.forth on Sun Mar 30 14:44:35 2025
    From Newsgroup: comp.lang.forth

    On 2025-03-29, mhx <mhx@iae.nl> wrote:
    Writing a gopher, irc
    and some small usenet client would be a breeze.

    That should be the least of our worries when the world ends?

    -marcel

    More than 'end', Dusk OS looks great for 2nd/3rd world machines
    with very few requirements. You might find surprised that Lagrange
    and protocols like Gopher and Gemini among https://telae.net
    are used in some part of South America.

    More than 'the end of the world', think about 'non reliable
    sources of power', shitty internet connections and so on.

    DuskOS with TCP/IP, gopher/irc and maybe some basic soundcard
    support would be great for low end i386 machines.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From sjack@sjack@dontemail.me (sjack) to comp.lang.forth on Sun Mar 30 17:09:49 2025
    From Newsgroup: comp.lang.forth

    Alexis <flexibeast@gmail.com> wrote:

    "Once the grid goes down, an old programming language called Forth?and a
    new operating system called Collapse OS?may be our only salvation."

    _A Boy and His Dog_
    Savaging old computer parts may work for awhile if one can avoid
    the sea people, zombies and morlocks.
    --
    me
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Mon Mar 31 12:38:30 2025
    From Newsgroup: comp.lang.forth

    In article <slrnvuik3u.miq.anthk@openbsd.home>,
    anthk <anthk@openbsd.home> wrote:
    On 2025-03-29, mhx <mhx@iae.nl> wrote:
    Writing a gopher, irc
    and some small usenet client would be a breeze.

    That should be the least of our worries when the world ends?

    -marcel

    More than 'end', Dusk OS looks great for 2nd/3rd world machines
    with very few requirements. You might find surprised that Lagrange
    and protocols like Gopher and Gemini among https://telae.net
    are used in some part of South America.

    More than 'the end of the world', think about 'non reliable
    sources of power', shitty internet connections and so on.

    DuskOS with TCP/IP, gopher/irc and maybe some basic soundcard
    support would be great for low end i386 machines.

    The third world is developing faster than the first world because
    of the second world.
    Because of the Belt and Road initiative and investments from China but
    mostly of the incompetence of Musk and Trump, USA becomes the third
    world, and the other worlds move one place up.
    Don't expect i386 relevant in other places than the USA.
    arm and riscv rule!

    Huawei is deploying 6G and once finished starlink can't compete,
    because they need ground stations everywhere.
    Robot factories can crank out one smart phone per second, so the now
    poor countries can afford them. Read up on 'xiao mi'.

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From John Ames@commodorejohn@gmail.com to comp.lang.forth on Mon Mar 31 07:56:32 2025
    From Newsgroup: comp.lang.forth

    On Sat, 29 Mar 2025 01:07:21 +0000
    mhx@iae.nl (mhx) wrote:

    Writing a gopher, irc
    and some small usenet client would be a breeze.

    That should be the least of our worries when the world ends?

    -marcel

    IRC is *always* Priority #1.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Apr 1 10:37:34 2025
    From Newsgroup: comp.lang.forth

    On 31/03/2025 4:09 am, sjack wrote:
    Alexis <flexibeast@gmail.com> wrote:

    "Once the grid goes down, an old programming language called Forth?and a
    new operating system called Collapse OS?may be our only salvation."

    _A Boy and His Dog_
    Savaging old computer parts may work for awhile if one can avoid
    the sea people, zombies and morlocks.

    Never heard of that and checked it out. It was more disturbing than
    Suspiria I watched the day before. Shows what 'The End of the World'
    does to people's imagination...





    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Thu Apr 3 16:44:34 2025
    From Newsgroup: comp.lang.forth

    On 27-03-2025 06:05, Alexis wrote:

    Thought people in this group might be interested in this article on
    Wired:

    "Once the grid goes down, an old programming language called Forth—and a new operating system called Collapse OS—may be our only salvation."

    -- https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/

    As always, it's interesting which impression Forth leaves to a newbie -
    even if it's completely negative. Think of https://www.embedded.com/i-hate-forth/

    "Forth is also a write-only language. The language is simple with few keywords." Which is not true. C has a few dozen keywords. 4tH has a few hundred.

    "I've looked at a lot of Forth code, and it's almost uniformly
    doc-free." That's an attitude problem - not a language problem.

    "The average Forth program becomes much more quickly a mess of cryptic definitions only the original programmer understands." Again, a lack of documentation is not a problem of the language.

    "Most create considerably less when you factor in all of the real
    aspects of engineering – meetings, breaks, working with colleagues,
    etc." I have always solved this by not taking breaks, not attend
    meetings and completely refuse to work together with other people. What
    do they know..

    .. And this article is in part NO different, unfortunately. I quote:
    "YAGNI (you aren’t gonna need it), KISS (keep it simple, stupid), DRY (don’t repeat yourself) — were rendered obsolete."

    That's nonsense. You always gotta keep it simple (depending on your
    definition of "simple" - I consider this way of converting time
    notations to American simple, but not all agree : am12pm 11 + 12 mod 1+ ;)

    Forth kind of invented DRY and called it "refactoring". And why in his
    right mind is gonna violate YAGNI if he either already has an idea on
    how to fill that void or is absolutely sure he's fine? Either I'm
    putting a glass on the table because I wanna have a refill or I'm good.

    However, every GOOD programmer understands there are always requirements
    that force you to break the rules. When that happens or which rules need
    to be broken depends on how skilled the programmer is. No language can
    help you there.

    "Forth leaves it all up to the programmer" - and that's Forth Achilles
    heel. The language doesn't fail - the programmer fails.

    "Rather than sending bytes into the ether and trusting the system to
    figure out where they go, as I would in Python, I got used to being responsible for allocating and freeing memory. All I could think about
    was what was being stored, where it was being stored, and how much space
    it required. Each line of code suddenly bore weight. I was Immortan Joe,
    my laptop was my Citadel, and memory was my water."

    And that's where modern languages fail. They try to let the language do
    the job. Until we have capable AI, you're not gonna enforce good
    programming unto users if they're incapable of good programming. Edsger Dijkstra knew that - read what he wrote about Ada, one of the first
    efforts in that direction.

    After that we've had Java and Rust - same result. Or do you actually
    think that the quality of programs has been improved by the likes of Java?

    "If you think your users are idiots, only idiots will use it."
    Never has there been a quote more appropriate to the software industry.

    Forth is the opposite. There are no training wheels. Gee, I doubt it
    even got wheels. You can only survive when you have discipline. The best
    Forth programs consists of what in C would be considered a list of
    prototypes (one liners, for those who don't get it).

    But after ten, twenty years I still find most of my programs are still perfectly maintainable - contrary to what most notorious Forth haters
    claim. For me, it works. That doesn't mean that other opinions are
    invalid - it just means I'm not them.

    Hans Bezemer


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Fri Apr 4 15:57:56 2025
    From Newsgroup: comp.lang.forth

    On 4/04/2025 1:44 am, Hans Bezemer wrote:
    ...
    "I've looked at a lot of Forth code, and it's almost uniformly doc-free." That's an attitude problem - not a language problem.

    "The average Forth program becomes much more quickly a mess of cryptic definitions only the original programmer understands." Again, a lack of documentation is not a problem of the language.

    I'm sure the author of that article is accomplished but I know bias when I see it.
    Columnist John Dvorak famously said:

    "I have yet to see a decent piece of software written in Forth. Let's face it,
    Forth stinks."

    and writers ever since have piggy-backed off it.

    But after ten, twenty years I still find most of my programs are still perfectly maintainable - contrary to what most notorious Forth haters claim.

    Same here and not just that, there are apps whose coding I'm quite proud of having
    gone through several updates. The amount of doc I include is based on who is likely
    to use/maintain it - usually me. That said, some stuff has ended up in commercial
    apps and nobody has come back to me and asked for more docs. I guess that means I
    know my audience.

    Hans, if nothing else you know how to stir up forthers :-)

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Apr 4 13:36:18 2025
    From Newsgroup: comp.lang.forth

    In article <nnd$4e8dcfed$6eb3f489@d30798298ac0a139>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-03-2025 06:05, Alexis wrote:

    Thought people in this group might be interested in this article on
    Wired:

    "Once the grid goes down, an old programming language called Forth—and a >> new operating system called Collapse OS—may be our only salvation."

    -- https://www.wired.com/story/forth-collapse-os-apocalypse-programming-language/

    As always, it's interesting which impression Forth leaves to a newbie -
    even if it's completely negative. Think of >https://www.embedded.com/i-hate-forth/

    "Forth is also a write-only language. The language is simple with few >keywords." Which is not true. C has a few dozen keywords. 4tH has a few >hundred.
    This is debatable. C has left the bulk of functionality to procedures
    with conventional names, but so does Forth. open() is not different
    from OPEN-FILE.
    So it is fair to compare the C special tokens with Forth words that
    parse or alter the program flow.

    "I've looked at a lot of Forth code, and it's almost uniformly
    doc-free." That's an attitude problem - not a language problem.
    I agree. Most programmers agree that ( -- ) is sufficient documentation.
    My advice is : precede each word with a specification that allows
    the use of this word. The ideal is that the definition itself is
    in fact the documentation of the definition. This is Chuck Moore's
    pipe dream.

    <SNIP>

    "The average Forth program becomes much more quickly a mess of cryptic >definitions only the original programmer understands." Again, a lack of >documentation is not a problem of the language.
    Sadly this is true more often than not.

    <SNIP>

    But after ten, twenty years I still find most of my programs are still >perfectly maintainable - contrary to what most notorious Forth haters
    claim. For me, it works. That doesn't mean that other opinions are
    invalid - it just means I'm not them.

    Yes good programmers.
    Bad programmers think that once Python detects no syntax errors, it is
    perfect.


    Hans Bezemer

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 5 14:48:10 2025
    From Newsgroup: comp.lang.forth

    On 4/04/2025 10:36 pm, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$4e8dcfed$6eb3f489@d30798298ac0a139>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-03-2025 06:05, Alexis wrote:
    ...
    "I've looked at a lot of Forth code, and it's almost uniformly
    doc-free." That's an attitude problem - not a language problem.
    I agree. Most programmers agree that ( -- ) is sufficient documentation.
    My advice is : precede each word with a specification that allows
    the use of this word. The ideal is that the definition itself is
    in fact the documentation of the definition. This is Chuck Moore's
    pipe dream.

    I'm not so sure. 10 definitions and 2 comments. Does it need more?

    \ Encountered file error, display msg, filename then quit
    : FERR ( ? ior a u -- ? ) rot 0= if 2drop end
    cr ." File error: " type ." - " @fname type abort ;

    : FOPEN ( a n fam -- ) open-file s" open" ferr cf ! ;
    : FCREAT ( a n fam -- ) create-file s" create" ferr cf ! ;
    : FREAD ( a n -- n' ) cf @ read-file s" read" ferr ;
    : FWRITE ( a n -- ) cf @ write-file s" write" ferr ;
    : FSEEK ( ud -- ) cf @ reposition-file s" position" ferr ;
    : FCLOSE ( -- ) cf @ close-file s" close" ferr ;

    \ Install terminal data at offs to target at adr
    : SET.S ( a ofs -- ) dbuf + count rot >target place ;
    : SET.W ( a ofs -- ) dbuf + @ swap >target ! ;
    : SET.B ( a ofs -- ) dbuf + c@ swap >target c! ;



    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Fri Apr 4 23:16:30 2025
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> writes:
    : FOPEN ( a n fam -- ) open-file s" open" ferr cf ! ;

    I'm used to functions like this returning file handles instead of
    storing into a global var, so you can have more than one file active at
    the same time.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Sat Apr 5 08:40:15 2025
    From Newsgroup: comp.lang.forth

    In article <cf9dc70297223ad4a39ba1a4ba2c072c8737e306@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 4/04/2025 10:36 pm, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$4e8dcfed$6eb3f489@d30798298ac0a139>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-03-2025 06:05, Alexis wrote:
    ...
    "I've looked at a lot of Forth code, and it's almost uniformly
    doc-free." That's an attitude problem - not a language problem.
    I agree. Most programmers agree that ( -- ) is sufficient documentation.
    My advice is : precede each word with a specification that allows
    the use of this word. The ideal is that the definition itself is
    in fact the documentation of the definition. This is Chuck Moore's
    pipe dream.

    I'm not so sure. 10 definitions and 2 comments. Does it need more?

    \ Encountered file error, display msg, filename then quit
    : FERR ( ? ior a u -- ? ) rot 0= if 2drop end
    cr ." File error: " type ." - " @fname type abort ;

    : FOPEN ( a n fam -- ) open-file s" open" ferr cf ! ;
    : FCREAT ( a n fam -- ) create-file s" create" ferr cf ! ;
    : FREAD ( a n -- n' ) cf @ read-file s" read" ferr ;
    : FWRITE ( a n -- ) cf @ write-file s" write" ferr ;
    : FSEEK ( ud -- ) cf @ reposition-file s" position" ferr ;
    : FCLOSE ( -- ) cf @ close-file s" close" ferr ;

    \ Install terminal data at offs to target at adr
    : SET.S ( a ofs -- ) dbuf + count rot >target place ;
    : SET.W ( a ofs -- ) dbuf + @ swap >target ! ;
    : SET.B ( a ofs -- ) dbuf + c@ swap >target c! ;


    Who would have guessed (a n ) is actually a file name?

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sat Apr 5 07:12:47 2025
    From Newsgroup: comp.lang.forth

    On Sat, 5 Apr 2025 6:40:15 +0000, albert@spenarnc.xs4all.nl wrote:

    In article <cf9dc70297223ad4a39ba1a4ba2c072c8737e306@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 4/04/2025 10:36 pm, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$4e8dcfed$6eb3f489@d30798298ac0a139>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-03-2025 06:05, Alexis wrote:
    [..]
    I'm not so sure. 10 definitions and 2 comments. Does it need more?

    \ Encountered file error, display msg, filename then quit
    : FERR ( ? ior a u -- ? ) rot 0= if 2drop end
    cr ." File error: " type ." - " @fname type abort ;

    : FOPEN ( a n fam -- ) open-file s" open" ferr cf ! ;
    : FCREAT ( a n fam -- ) create-file s" create" ferr cf ! ;
    : FREAD ( a n -- n' ) cf @ read-file s" read" ferr ;
    : FWRITE ( a n -- ) cf @ write-file s" write" ferr ;
    : FSEEK ( ud -- ) cf @ reposition-file s" position" ferr ;
    : FCLOSE ( -- ) cf @ close-file s" close" ferr ;

    Well... What are @fname and cf ? What message do I get when I
    open file1, then file2, start processing file1, and encounter a
    FSEEK error? Are both file2 and file1 closed?
    When doing a load of a deeply nested file, what are the
    diagnostics when there is an error in a definition? Are errors
    in definitions mentioning the file name / line numbers when the
    definition executes, not only when it is being compiled? Can I
    use FSEEK in case a few files are open? Which file closes when
    FCLOSE is executed in case of a nested load?

    Clearly some documentation is missing on the WHAT, but also
    with respect to the HOW : is this interface doing what I
    expect from it and/or can I adapt it to my demands.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anthk@anthk@openbsd.home to comp.lang.forth on Sat Apr 5 21:49:18 2025
    From Newsgroup: comp.lang.forth

    On 2025-03-31, albert@spenarnc.xs4all.nl <albert@spenarnc.xs4all.nl> wrote:
    In article <slrnvuik3u.miq.anthk@openbsd.home>,
    anthk <anthk@openbsd.home> wrote:
    On 2025-03-29, mhx <mhx@iae.nl> wrote:
    Writing a gopher, irc
    and some small usenet client would be a breeze.

    That should be the least of our worries when the world ends?

    -marcel

    More than 'end', Dusk OS looks great for 2nd/3rd world machines
    with very few requirements. You might find surprised that Lagrange
    and protocols like Gopher and Gemini among https://telae.net
    are used in some part of South America.

    More than 'the end of the world', think about 'non reliable
    sources of power', shitty internet connections and so on.

    DuskOS with TCP/IP, gopher/irc and maybe some basic soundcard
    support would be great for low end i386 machines.

    The third world is developing faster than the first world because
    of the second world.
    Because of the Belt and Road initiative and investments from China but
    mostly of the incompetence of Musk and Trump, USA becomes the third
    world, and the other worlds move one place up.
    Don't expect i386 relevant in other places than the USA.
    arm and riscv rule!

    Huawei is deploying 6G and once finished starlink can't compete,
    because they need ground stations everywhere.
    Robot factories can crank out one smart phone per second, so the now
    poor countries can afford them. Read up on 'xiao mi'.

    Groetjes Albert

    I daily speak with latam users. They love some Gopher and Gemini services
    such as News Waffle.

    You can always check comp.infosystems.gemini

    On Forth, I think Retroforth could be suited for that if it had TLS support. --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sun Apr 6 12:38:14 2025
    From Newsgroup: comp.lang.forth

    On 5/04/2025 6:12 pm, mhx wrote:
    On Sat, 5 Apr 2025 6:40:15 +0000, albert@spenarnc.xs4all.nl wrote:

    In article <cf9dc70297223ad4a39ba1a4ba2c072c8737e306@i2pn2.org>,
    dxf  <dxforth@gmail.com> wrote:
    On 4/04/2025 10:36 pm, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$4e8dcfed$6eb3f489@d30798298ac0a139>,
    Hans Bezemer  <the.beez.speaks@gmail.com> wrote:
    On 27-03-2025 06:05, Alexis wrote:
    [..]
    I'm not so sure.  10 definitions and 2 comments.  Does it need more?

    \ Encountered file error, display msg, filename then quit
    : FERR ( ? ior a u -- ? )  rot 0= if  2drop  end
     cr ." File error: "  type  ."  - "  @fname type  abort ;

    : FOPEN  ( a n fam -- )  open-file  s" open"  ferr  cf ! ;
    : FCREAT ( a n fam -- )  create-file  s" create"  ferr  cf ! ;
    : FREAD  ( a n -- n' )  cf @ read-file  s" read"  ferr ;
    : FWRITE ( a n -- )  cf @ write-file  s" write"  ferr ;
    : FSEEK  ( ud -- )  cf @ reposition-file  s" position"  ferr ;
    : FCLOSE ( -- )  cf @ close-file  s" close"  ferr ;

    Well... What are @fname and cf ? What message do I get when I
    open file1, then file2, start processing file1, and encounter a
    FSEEK error? Are both file2 and file1 closed?
    When doing a load of a deeply nested file, what are the
    diagnostics when there is an error in a definition? Are errors
    in definitions mentioning the file name / line numbers when the
    definition executes, not only when it is being compiled? Can I
    use FSEEK in case a few files are open? Which file closes when
    FCLOSE is executed in case of a nested load?

    Clearly some documentation is missing on the WHAT, but also
    with respect to the HOW : is this interface doing what I
    expect from it and/or can I adapt it to my demands.

    While this may be the response of an armchair critic, the maintainer of
    the app has encountered no issues after many updates and decades of use.

    "In particular you need to avoid writing code for situations that will
    never arise in practice. You need to avoid writing code to handle a
    general problem that you are never going to encounter. I don't need
    to solve the general problem when I only have to solve these specific
    cases." -- Chuck Moore






    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sun Apr 6 12:40:25 2025
    From Newsgroup: comp.lang.forth

    On 5/04/2025 5:16 pm, Paul Rubin wrote:
    dxf <dxforth@gmail.com> writes:
    : FOPEN ( a n fam -- ) open-file s" open" ferr cf ! ;

    I'm used to functions like this returning file handles instead of
    storing into a global var, so you can have more than one file active at
    the same time.

    The code is from an installer app that goes back to the earliest days
    of DX-Forth. I never had reason to extend its file handling.

    BTW 99% of apps I write still only require one input and one output
    file, in which case only two handles are needed. I have a library for
    that which allows more handles to be created if need be.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sun Apr 6 15:21:05 2025
    From Newsgroup: comp.lang.forth

    On 5/04/2025 6:12 pm, mhx wrote:
    ...
    Clearly some documentation is missing on the WHAT, but also
    with respect to the HOW : is this interface doing what I
    expect from it and/or can I adapt it to my demands.

    On the topic of documentation Forth Standard (the document to which
    everyone looks) hasn't clarified aspects of REPRESENT F. etc. I
    believe iForth considers PRECISION to mean decimal places. Did you
    depart from the Standard - or you were confused by it?

    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sun Apr 6 07:10:10 2025
    From Newsgroup: comp.lang.forth

    On Sun, 6 Apr 2025 5:21:05 +0000, dxf wrote:

    On 5/04/2025 6:12 pm, mhx wrote:
    [..]
    On the topic of documentation Forth Standard (the document to which
    everyone looks) hasn't clarified aspects of REPRESENT F. etc.

    I don't let the Standard confuse me. It's beneficial when others
    adhere to it closely, unless it's not. In particular, I don't agree
    to the efforts to try to standardize untested 'good ideas.'

    I believe iForth considers PRECISION to mean decimal places. Did you
    depart from the Standard - or you were confused by it?

    I understand the difference between precision and decimal places, but
    when formatting numbers my objectives are cosmetic. When I need
    precision
    I fetch the binary representation, not what a program prints out at a
    random spot. It is the same with for example 'C' : it's almost always
    about how it looks like on the screen. (Unless when comparing floating
    point values, e.g., when trying to let a simulator stop at exactly the
    time typed in by the user.)

    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?

    Documentation is for others :--)

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sun Apr 6 10:55:31 2025
    From Newsgroup: comp.lang.forth

    On 06-04-2025 09:10, mhx wrote:
    Documentation is for others :--)

    "Others". That's a philosophical question. Answering it greatly
    influences ones view on documentation:

    "You thought that it could never happen to all the people you became."

    That's how I view "persons". I assume I'm the same person that went to
    bed, however, I have no evidence whatsoever that I am. Does a computer,
    fed with the data his predecessors collected, assume he's the same
    computer as the ones he replaced?

    Still, I feel a close connection to the persons that were me before me
    and the persons that eventually will become me. I don't want to make
    their work unnecessarily difficult. That's why I document. I've praised
    them several times - either for making a tutorial for a specific library
    - or at least leaving an example or demo.

    That's why I think the Hans Bezemer of yesterday was not only a clever
    lad, but also a nice guy. ;-)

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sun Apr 6 10:57:49 2025
    From Newsgroup: comp.lang.forth

    On 04-04-2025 06:57, dxf wrote:
    Hans, if nothing else you know how to stir up forthers :-)

    What gave you the impression I only deploy this talent when in the
    company of Forthers? ;-)

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sun Apr 6 09:42:15 2025
    From Newsgroup: comp.lang.forth

    "Others". That's a philosophical question. Answering it greatly
    influences ones view on documentation:

    Others are not me. I write a lot of documentation but it does assume
    that I myself will be reading it (at a time I have not lost my marbles
    yet). There's a lot of documentation out there that (rightly so)
    assumes its readers know nothing of and don't care about the subject
    and just want to know how an option is called, and if it does what they approximately think it should do (I am in that class myself when looking
    up, e.g., OS functions).
    I think that type of documentation should be left to professional
    writers.

    When presenting a code snippet in this forum, my approach would not
    do. If even a tiny detail is not explained, the post will not
    work for a casual reader. To know *why* it doesn't work you need
    to be able to think like a `professional writer`, not like the
    original programmer.

    Unfortunately (?) my approach only works for small, dedicated
    programs. There are examples where I wanted to write a bigger
    application (e.g. MANX, SPIFSIM, SYSSIM, iSPICE, ..). I am
    constantly trying to refactor those programs in small stand-alone
    modules but I have failed (e.g. MANX which has horrible
    object-oriented rubbish) when I (perhaps temporarily) lost
    interest in the subject itself.

    As I am also a ngspice maintainer (19,161 'C' Files in 4,856
    directories, only user documentation), I know my Forth
    approach works (iSPICE has only 7 dedicated files).

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Sun Apr 6 12:03:27 2025
    From Newsgroup: comp.lang.forth

    In article <nnd$0421e149$32c06852@2334ade0ee643771>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 06-04-2025 09:10, mhx wrote:
    Documentation is for others :--)

    "Others". That's a philosophical question. Answering it greatly
    influences ones view on documentation:

    "You thought that it could never happen to all the people you became."

    That's how I view "persons". I assume I'm the same person that went to
    bed, however, I have no evidence whatsoever that I am. Does a computer,
    fed with the data his predecessors collected, assume he's the same
    computer as the ones he replaced?

    Still, I feel a close connection to the persons that were me before me
    and the persons that eventually will become me. I don't want to make
    their work unnecessarily difficult. That's why I document. I've praised
    them several times - either for making a tutorial for a specific library
    - or at least leaving an example or demo.

    That's why I think the Hans Bezemer of yesterday was not only a clever
    lad, but also a nice guy. ;-)

    Exactly my thoughts. How often I read code and think that it is brilliantly written and brilliantly documented, but I don't remember I wrote it.

    Hans Bezemer

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sun Apr 6 20:17:53 2025
    From Newsgroup: comp.lang.forth

    On 6/04/2025 6:55 pm, Hans Bezemer wrote:
    On 06-04-2025 09:10, mhx wrote:
    Documentation is for others :--)

    "Others". That's a philosophical question. Answering it greatly influences ones view on documentation:

    "You thought that it could never happen to all the people you became."

    That's how I view "persons". I assume I'm the same person that went to bed, however, I have no evidence whatsoever that I am. Does a computer, fed with the data his predecessors collected, assume he's the same computer as the ones he replaced?

    Still, I feel a close connection to the persons that were me before me and the persons that eventually will become me. I don't want to make their work unnecessarily difficult. That's why I document. I've praised them several times - either for making a tutorial for a specific library - or at least leaving an example or demo.

    That's why I think the Hans Bezemer of yesterday was not only a clever lad, but also a nice guy. ;-)

    So they do it for the praise? Typical ;-)

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Sun Apr 6 12:21:31 2025
    From Newsgroup: comp.lang.forth

    In article <7ab907de406b3b22270e4118b727c265@www.novabbs.com>,
    mhx <mhx@iae.nl> wrote:
    <SNIP>
    Unfortunately (?) my approach only works for small, dedicated
    programs. There are examples where I wanted to write a bigger
    application (e.g. MANX, SPIFSIM, SYSSIM, iSPICE, ..). I am
    constantly trying to refactor those programs in small stand-alone
    modules but I have failed (e.g. MANX which has horrible
    object-oriented rubbish) when I (perhaps temporarily) lost
    interest in the subject itself.

    I felt bad when I ditched MANX and gave up maintaining it.
    Following your advice I have rewritten it, and it is now
    healthy with a much simpler object oriented approach
    (one screen, but it pulls in the FORMAT&EVAL, also one screen).
    More powerful too, happily playing sustained notes (organ, pc-speakers) percussion (metallophone, drum) and a midi expander, at the same time.

    I have done much maintenance, and had succes with slash and burn
    maintenance, i.e. removing bad features before adding a replacement.
    Also I documented features and through the attempted specs I discovered
    tests that failed, that in turn forced permission to change code.
    manx and eldo (Dutch taxes documentation system) were the exceptions
    where this was less succesful.


    As I am also a ngspice maintainer (19,161 'C' Files in 4,856
    directories, only user documentation), I know my Forth
    approach works (iSPICE has only 7 dedicated files).

    These kind of projects are a nightmare. For example after two
    years of eldo I only succeeded in partly documenting how it worked.
    The "documentation" was 1 meter of binders, virtually worthless.


    -marcel

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From sjack@sjack@dontemail.me (sjack) to comp.lang.forth on Sun Apr 6 13:43:25 2025
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> wrote:
    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?


    I don't worry much about documentation. If I don't understand my
    code it's no big deal, I probably didn't know what I was doing in
    the first place. As long as the computer can understand it and get
    it right, most of the time, I've done my job.
    --
    me
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From sjack@sjack@dontemail.me (sjack) to comp.lang.forth on Sun Apr 6 13:43:28 2025
    From Newsgroup: comp.lang.forth

    anthk <anthk@openbsd.home> wrote:

    DuskOS with TCP/IP, gopher/irc and maybe some basic soundcard
    support would be great for low end i386 machines.

    I wish such retro project well although I think 'After the fall' any
    computing will be more of a distraction than an aid to survival. I
    don't keep technology in my bug-out pack.

    Finding enough hardware to put together a system may be possible and
    creating software for such should be little problem if secondary
    storage is available. Where does one 'after the fall' find quality
    floppy disks? Perhaps an alternative could be a frog brain in a jar
    with some cobbled neural interface. Anyone working on that?
    --
    me
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Mon Apr 7 11:07:56 2025
    From Newsgroup: comp.lang.forth

    On 6/04/2025 11:43 pm, sjack wrote:
    dxf <dxforth@gmail.com> wrote:
    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?


    I don't worry much about documentation. If I don't understand my
    code it's no big deal, I probably didn't know what I was doing in
    the first place. As long as the computer can understand it and get
    it right, most of the time, I've done my job.

    Folks like a security blanket - authority handed down. Often just
    holding and cherishing the documentation, repeating the verses, is
    enough. Throw a curveball and it's like watching Forbidden Planet
    where Robby the Robot is presented with contradictory instructions.
    Luckily Standard Forth is mostly harmless as nobody takes it seriously.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Mon Apr 7 06:39:43 2025
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> writes:
    "In particular you need to avoid writing code for situations that will
    never arise in practice. You need to avoid writing code to handle a
    general problem that you are never going to encounter. I don't need
    to solve the general problem when I only have to solve these specific
    cases." -- Chuck Moore

    Fortunately, he did not practice what he (later) preached, or he would
    not have implemented Forth, the solution to a very general problem.

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Mon Apr 7 06:42:56 2025
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> writes:
    On the topic of documentation Forth Standard (the document to which
    everyone looks) hasn't clarified aspects of REPRESENT F. etc.

    The document does not write itself. If you think that something is
    unclear, you can make a request for clarification on <https://forth-standard.org/> (when it runs again, hopefully soon).
    If you think that some text should be changed in a specific way, you
    can make a proposal for that. If you have no interest in doing that
    for these topics (which seem to be important enough to mention them
    here), why should anybody else have an interest in doing that?

    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?

    In the case of "F.", I actually believe that most users would prefer
    something that produces an output, possibly in scientific
    representation, of up to 20 characters over the exact implementation
    of the specification that is implemented by Gforth and VFX:

    1e200 f. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. ok
    1e-200 f. 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 ok

    But nobody has written a proposal for changing "F." in that way. The
    feedback on such a proposal would indicate whether my belief is
    correct or not. The absence of such a proposal indicates that the
    topic is not important enough for Forth programmers and implementors.

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Mon Apr 7 21:05:11 2025
    From Newsgroup: comp.lang.forth

    On 7/04/2025 4:42 pm, Anton Ertl wrote:
    dxf <dxforth@gmail.com> writes:
    On the topic of documentation Forth Standard (the document to which
    everyone looks) hasn't clarified aspects of REPRESENT F. etc.

    The document does not write itself.

    No, and neither has anyone as the Synod doesn't say what needs to be done.
    Can you imagine if Forth-94 had used that approach? AFAIK sub-committees
    were allocated tasks.

    If you think that something is
    unclear, you can make a request for clarification on <https://forth-standard.org/> (when it runs again, hopefully soon).
    If you think that some text should be changed in a specific way, you
    can make a proposal for that. If you have no interest in doing that
    for these topics (which seem to be important enough to mention them
    here), why should anybody else have an interest in doing that?

    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?

    In the case of "F.", I actually believe that most users would prefer something that produces an output, possibly in scientific
    representation, of up to 20 characters over the exact implementation
    of the specification that is implemented by Gforth and VFX:

    1e200 f. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000. ok
    1e-200 f. 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 ok

    But nobody has written a proposal for changing "F." in that way. The feedback on such a proposal would indicate whether my belief is
    correct or not. The absence of such a proposal indicates that the
    topic is not important enough for Forth programmers and implementors.

    That wasn't it. Rather the relation between 'significant digits' and
    output is never really specified. Even the example Forth-94 gave ( 1E3 F. ) didn't help because no mention of the PRECISION used.

    NT/FORTH (C) 2005 Peter Fälth Version 1.6-983-824 Compiled on 2017-12-03

    3 set-precision
    1e3 f. 1000. ok

    6 set-precision ok
    1e f. 1.00000 ok
    1e4 f. 10000.0 ok
    1e-4 f. 0.000100000 ok
    0e f. 0.00000 ok


    Gforth 0.7.9_20200709

    3 set-precision
    1e3 f. 1000. ok

    6 set-precision ok
    1e f. 1. ok
    1e4 f. 10000. ok
    1e-4 f. 0.0001 ok
    0e f. 0. ok

    Not sure whether it would affect a Standard Program but I imagine porting
    a real-world app could be a problem.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Kerr-Mudd, John@admin@127.0.0.1 to comp.lang.forth on Mon Apr 7 16:31:18 2025
    From Newsgroup: comp.lang.forth

    On Mon, 7 Apr 2025 11:07:56 +1000
    dxf <dxforth@gmail.com> wrote:

    On 6/04/2025 11:43 pm, sjack wrote:
    dxf <dxforth@gmail.com> wrote:
    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?


    I don't worry much about documentation. If I don't understand my
    code it's no big deal, I probably didn't know what I was doing in
    the first place. As long as the computer can understand it and get
    it right, most of the time, I've done my job.

    Folks like a security blanket - authority handed down. Often just
    holding and cherishing the documentation, repeating the verses, is
    enough. Throw a curveball and it's like watching Forbidden Planet
    where Robby the Robot is presented with contradictory instructions.
    That used to happen every other weeek in Star Trek TOS.

    Luckily Standard Forth is mostly harmless as nobody takes it seriously.

    --
    Bah, and indeed Humbug.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Tue Apr 8 13:43:59 2025
    From Newsgroup: comp.lang.forth

    On 07-04-2025 13:05, dxf wrote:
    As a matter of fact, the whole issue can be solved by one single very
    simple addition to the standard. All my FP systems hold this very
    definition for SET-PRECISION:

    \ 34: Reimplemented PRECISION and SET-PRECISION.
    maxdigits VALUE PRECISION
    : SET-PRECISION ( n -- ) maxdigits MIN TO PRECISION ;

    Since the FLOAT wordset is always in decimal (12.4.1.2 Ambiguous
    conditions - BASE is not decimal (12.6.1.2143 REPRESENT, 12.6.2.1427 F., 12.6.2.1513 FE., 12.6.2.1613 FS.) it is trivial to calculate the number
    of significant digits.

    The definition given here ( --- CONSTANT MAXDIGITS) ensures that the
    value issued to SET-PRECISION is always sane.

    Of course, if one does not have access to some carnal knowledge
    concerning the mantissa, one does have a problem concerning porting and maintenance.

    Hans Bezemer


    On 7/04/2025 4:42 pm, Anton Ertl wrote:
    dxf <dxforth@gmail.com> writes:
    On the topic of documentation Forth Standard (the document to which
    everyone looks) hasn't clarified aspects of REPRESENT F. etc.

    The document does not write itself.

    No, and neither has anyone as the Synod doesn't say what needs to be
    done.
    Can you imagine if Forth-94 had used that approach? AFAIK sub-committees were allocated tasks.

    If you think that something is
    unclear, you can make a request for clarification on
    <https://forth-standard.org/> (when it runs again, hopefully soon).
    If you think that some text should be changed in a specific way, you
    can make a proposal for that. If you have no interest in doing that
    for these topics (which seem to be important enough to mention them
    here), why should anybody else have an interest in doing that?

    That holes still exist after 30 years can only mean forthers are
    content with less than perfect documentation. No?

    In the case of "F.", I actually believe that most users would prefer
    something that produces an output, possibly in scientific
    representation, of up to 20 characters over the exact implementation
    of the specification that is implemented by Gforth and VFX:

    1e200 f. 100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.
    ok
    1e-200 f. 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
    ok

    But nobody has written a proposal for changing "F." in that way. The
    feedback on such a proposal would indicate whether my belief is
    correct or not. The absence of such a proposal indicates that the
    topic is not important enough for Forth programmers and implementors.

    That wasn't it. Rather the relation between 'significant digits' and
    output is never really specified. Even the example Forth-94 gave (
    1E3 F. )
    didn't help because no mention of the PRECISION used.

    NT/FORTH (C) 2005 Peter Fälth Version 1.6-983-824 Compiled on
    2017-12-03

    3 set-precision
    1e3 f. 1000. ok

    6 set-precision ok
    1e f. 1.00000 ok
    1e4 f. 10000.0 ok
    1e-4 f. 0.000100000 ok
    0e f. 0.00000 ok


    Gforth 0.7.9_20200709

    3 set-precision
    1e3 f. 1000. ok

    6 set-precision ok
    1e f. 1. ok
    1e4 f. 10000. ok
    1e-4 f. 0.0001 ok
    0e f. 0. ok

    Not sure whether it would affect a Standard Program but I imagine porting
    a real-world app could be a problem.


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Tue Apr 8 13:48:29 2025
    From Newsgroup: comp.lang.forth

    On 06-04-2025 15:43, sjack wrote:
    I don't worry much about parachutes. If I don't understand folding it's
    no big deal, I probably didn't know what I was doing in
    the first place. As long as my wife can understand it and get it right,
    MOST OF THE TIME, I've done my job.

    Hans Bezemer



    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Tue Apr 8 13:45:29 2025
    From Newsgroup: comp.lang.forth

    On Tue, 8 Apr 2025 11:48:29 +0000, Hans Bezemer wrote:
    [..]
    I don't worry much about parachutes. If I don't understand
    folding it's no big deal, I probably didn't know what I was
    doing in the first place. As long as my wife can understand
    it and get it right, MOST OF THE TIME, I've done my job.

    I case she did not, that happens only once: clearly
    not worth the time to correct.

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Wed Apr 9 01:15:59 2025
    From Newsgroup: comp.lang.forth

    On 8/04/2025 9:43 pm, Hans Bezemer wrote:
    On 07-04-2025 13:05, dxf wrote:
    As a matter of fact, the whole issue can be solved by one single very simple addition to the standard. All my FP systems hold this very definition for SET-PRECISION:

    \ 34: Reimplemented PRECISION and SET-PRECISION.
    maxdigits VALUE PRECISION
    : SET-PRECISION ( n -- )         maxdigits MIN TO PRECISION ;

    Since the FLOAT wordset is always in decimal (12.4.1.2 Ambiguous conditions - BASE is not decimal (12.6.1.2143 REPRESENT, 12.6.2.1427 F., 12.6.2.1513 FE., 12.6.2.1613 FS.) it is trivial to calculate the number of significant digits.

    The definition given here ( --- CONSTANT MAXDIGITS) ensures that the value issued to SET-PRECISION is always sane.

    Of course, if one does not have access to some carnal knowledge concerning the mantissa, one does have a problem concerning porting and maintenance.

    It's not SET-PRECISION (presumably the implementer has made that sane)
    but rather variability when values are sane e.g.

    6 set-precision  ok
    1e-4 f.  0.000100000  ok

    6 set-precision  ok
    1e-4 f. 0.0001  ok

    While both of those are numerically correct, they're plainly different i.e.
    11 characters vs. 6 characters. As an app writer I'd like some uniformity
    here as I might want to output several columns of numbers on a screen. To
    do that I need to know how wide to make those columns.

    I can't believe other langs have this issue as it would be hard to write portable apps?

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Wed Apr 9 12:21:13 2025
    From Newsgroup: comp.lang.forth

    On 9/04/2025 1:15 am, dxf wrote:
    ...
    It's not SET-PRECISION (presumably the implementer has made that sane)
    but rather variability when values are sane e.g.

    6 set-precision  ok
    1e-4 f.  0.000100000  ok

    6 set-precision  ok
    1e-4 f. 0.0001  ok

    While both of those are numerically correct, they're plainly different i.e. 11 characters vs. 6 characters. As an app writer I'd like some uniformity here as I might want to output several columns of numbers on a screen. To
    do that I need to know how wide to make those columns.
    ...

    Iforth's F. was previously mentioned. In addition to treating PRECISION as
    a decimal points specifier (ok it was their decision) F. includes mode switching based on something called 'fieldwidth' for which I could find no reference. Is mode switching good or bad? As always - it depends. I've
    yet to see a bank statement with the balance displayed in scientific
    notation. (But then I'm not Elon Musk so who knows.)

    I mention this to demonstrate the variability that exists across forth - presumably because Forth-94 chose not to think it through leaving folks
    to their own devices. REPRESENT ? Well, I could rant about that too :)

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Apr 9 10:42:20 2025
    From Newsgroup: comp.lang.forth

    On 09-04-2025 04:21, dxf wrote:
    On 9/04/2025 1:15 am, dxf wrote:
    ...
    It's not SET-PRECISION (presumably the implementer has made that sane)
    but rather variability when values are sane e.g.

    6 set-precision  ok
    1e-4 f.  0.000100000  ok

    6 set-precision  ok
    1e-4 f. 0.0001  ok

    While both of those are numerically correct, they're plainly different i.e. >> 11 characters vs. 6 characters. As an app writer I'd like some uniformity >> here as I might want to output several columns of numbers on a screen. To >> do that I need to know how wide to make those columns.
    ...

    Iforth's F. was previously mentioned. In addition to treating PRECISION as
    a decimal points specifier (ok it was their decision) F. includes mode switching based on something called 'fieldwidth' for which I could find no reference. Is mode switching good or bad? As always - it depends. I've
    yet to see a bank statement with the balance displayed in scientific notation. (But then I'm not Elon Musk so who knows.)

    I mention this to demonstrate the variability that exists across forth - presumably because Forth-94 chose not to think it through leaving folks
    to their own devices. REPRESENT ? Well, I could rant about that too :)

    I've never been an avid FP wordset user, so I must admit I've never
    delved so deep into it. But when I did (last night) I thought "Darn,
    he's right!"

    1. I remember my spreadsheet having a way to set the number of decimals.
    So I looked there. It used F.R to use that result - and to my surprise
    (it seems .R little brother) AFAIK it's not part of the FP wordset;

    2. So I looked in the standard (obvious when you're coming from F.R) and
    no - nothing special there: "Set the number of significant digits". Well that's helpful. But do you mean "significant digits" the way I mean "significant digits"? I don't think so.. The beauty of "most significant digits of the significand" didn't escape me, though. Merriam Webster, "significant": "of a noticeably or measurably large amount". Almost like
    "most", you mean. ;-)

    3. If I can't find any help there, try elsewhere. Like C++. There
    "Precision" really means "Precision" - aka "the number of significant
    digits in the mantissa". Which in my book means 19 for a 64-bit mantissa
    and 9 for a 32-bit mantissa - if someone is unsure of what I mean.
    "fixed" however, is the keyword in C++ that switches this meaning to the number of decimals. If I understand you correctly, that's how iForth
    actually works.

    I see two ways out of this:
    a. Add F.R to the standard;
    b. Add SET-DECIMALS or SET-FIXED to the standard.

    And finally, add a section to the Annex to define and clarify the whole
    darn thing (because IMHO that is dearly missing).

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Wed Apr 9 20:35:41 2025
    From Newsgroup: comp.lang.forth

    On 9/04/2025 6:42 pm, Hans Bezemer wrote:
    On 09-04-2025 04:21, dxf wrote:
    On 9/04/2025 1:15 am, dxf wrote:
    ...
    It's not SET-PRECISION (presumably the implementer has made that sane)
    but rather variability when values are sane e.g.

    6 set-precision  ok
    1e-4 f.  0.000100000  ok

    6 set-precision  ok
    1e-4 f. 0.0001  ok

    While both of those are numerically correct, they're plainly different i.e. >>> 11 characters vs. 6 characters.  As an app writer I'd like some uniformity >>> here as I might want to output several columns of numbers on a screen.  To >>> do that I need to know how wide to make those columns.
    ...

    Iforth's F. was previously mentioned.  In addition to treating PRECISION as >> a decimal points specifier (ok it was their decision) F. includes mode
    switching based on something called 'fieldwidth' for which I could find no >> reference.  Is mode switching good or bad?  As always - it depends.  I've >> yet to see a bank statement with the balance displayed in scientific
    notation.  (But then I'm not Elon Musk so who knows.)

    I mention this to demonstrate the variability that exists across forth -
    presumably because Forth-94 chose not to think it through leaving folks
    to their own devices.  REPRESENT ?  Well, I could rant about that too :)

    I've never been an avid FP wordset user, so I must admit I've never delved so deep into it. But when I did (last night) I thought "Darn, he's right!"

    1. I remember my spreadsheet having a way to set the number of decimals. So I looked there. It used F.R to use that result - and to my surprise (it seems .R little brother) AFAIK it's not part of the FP wordset;

    2. So I looked in the standard (obvious when you're coming from F.R) and no - nothing special there: "Set the number of significant digits". Well that's helpful. But do you mean "significant digits" the way I mean "significant digits"? I don't think so.. The beauty of "most significant digits of the significand" didn't escape me, though. Merriam Webster, "significant": "of a noticeably or measurably large amount". Almost like  "most", you mean. ;-)

    3. If I can't find any help there, try elsewhere. Like C++. There "Precision" really means "Precision" - aka "the number of significant digits in the mantissa". Which in my book means 19 for a 64-bit mantissa and 9 for a 32-bit mantissa - if someone is unsure of what I mean. "fixed" however, is the keyword in C++ that switches this meaning to the number of decimals. If I understand you correctly, that's how iForth actually works.

    I see two ways out of this:
    a. Add F.R to the standard;
    b. Add SET-DECIMALS or SET-FIXED to the standard.

    And finally, add a section to the Annex to define and clarify the whole darn thing (because IMHO that is dearly missing).

    Also specify which of these should be displayed:

    6 set-precision
    0.000100000
    0.0001 ( redundant trailing zeros removed)

    For my money I'd have:

    (F.) ( r n -- adr len )

    From that an app or library can define F.R :

    \ Print a string right-aligned in a field width characters
    : S.R ( adr len width -- ) over - spaces type ;

    : F.R ( r n width -- ) >r (f.) r> s.r ;

    Or where the display mustn't exceed field-width ...

    \ Per S.R but print asterisks if string exceeds width. Assumes
    \ adr len can be written to.
    : ?S.R ( adr len width -- )
    2dup > if nip 2dup [char] * fill dup then s.r ;

    : ?F.R ( r n width -- ) >r (f.) r> ?s.r ;

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Apr 9 13:20:23 2025
    From Newsgroup: comp.lang.forth

    In article <nnd$3aa8c556$6770ff88@2813463487325c8d>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 06-04-2025 15:43, sjack wrote:
    I don't worry much about parachutes. If I don't understand folding it's
    no big deal, I probably didn't know what I was doing in
    the first place. As long as my wife can understand it and get it right,
    MOST OF THE TIME, I've done my job.

    If I understand you correctly, you are okay if your wife gets it
    right 4 of 5 times?


    Hans Bezemer



    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Apr 9 13:28:04 2025
    From Newsgroup: comp.lang.forth

    In article <nnd$4e97017c$71179fa7@ab267a929dfc81b6>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    <SNIP>

    I see two ways out of this:
    a. Add F.R to the standard;
    b. Add SET-DECIMALS or SET-FIXED to the standard.

    And finally, add a section to the Annex to define and clarify the whole
    darn thing (because IMHO that is dearly missing).

    I'm with Anton Ertl here. If you have a clear idea what has to be done, formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).


    Hans Bezemer


    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From sjack@sjack@dontemail.me (sjack) to comp.lang.forth on Wed Apr 9 13:14:19 2025
    From Newsgroup: comp.lang.forth

    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    that's helpful. But do you mean "significant digits" the way I mean "significant digits"? I don't think so.. The beauty of "most significant

    If you take a measurement and get a four digit number where the last
    digit was result of rounding, then you have three significant digits.

    But "words lie"; just their nature.
    --
    me
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Apr 9 18:34:34 2025
    From Newsgroup: comp.lang.forth

    On 08-04-2025 15:45, mhx wrote:
    On Tue, 8 Apr 2025 11:48:29 +0000, Hans Bezemer wrote:
    [..]
    I don't worry much about parachutes. If I don't understand
    folding it's no big deal, I probably didn't know what I was
    doing in the first place. As long as my wife can understand
    it and get it right, MOST OF THE TIME, I've done my job.

    I case she did not, that happens only once: clearly
    not worth the time to correct.

    -marcel

    That may be an incorrect assumption - she might actually be *working*
    there. It might be her only source of income since she inherited the
    business from you - and people may be skydiving every day - unaware that they're actually be up for dirt diving.

    Not only the pants of your clients, but your commemoration may also be
    soiled. And what about all those poor widows - let alone the orphans?
    Without their provider they may end up on the streets, begging with
    their tiny, trembling voices for a sixpence as you pass by, hurrying for
    work.

    Oh, the horror!

    Hans Bezemer
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Apr 9 18:40:57 2025
    From Newsgroup: comp.lang.forth

    On 09-04-2025 13:20, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$3aa8c556$6770ff88@2813463487325c8d>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 06-04-2025 15:43, sjack wrote:
    I don't worry much about parachutes. If I don't understand folding it's
    no big deal, I probably didn't know what I was doing in
    the first place. As long as my wife can understand it and get it right,
    MOST OF THE TIME, I've done my job.

    If I understand you correctly, you are okay if your wife gets it
    right 4 of 5 times?

    According to sjack - yes. Don't ask me.. He's the one who is happy when
    his code works "sometimes".

    Hans Bezemer


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Wed Apr 9 16:44:28 2025
    From Newsgroup: comp.lang.forth

    On Wed, 9 Apr 2025 16:34:34 +0000, Hans Bezemer wrote:

    On 08-04-2025 15:45, mhx wrote:
    [..]
    That may be an incorrect assumption - she might actually be *working*
    there. It might be her only source of income since she inherited the
    business from you - and people may be skydiving every day - unaware that they're actually be up for dirt diving.

    I was, of course, assuming your wife was folding *your* parachute.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Thu Apr 10 13:25:21 2025
    From Newsgroup: comp.lang.forth

    On 6/04/2025 5:10 pm, mhx wrote:
    On Sun, 6 Apr 2025 5:21:05 +0000, dxf wrote:

    On 5/04/2025 6:12 pm, mhx wrote:
    [..]
    On the topic of documentation Forth Standard (the document to which
    everyone looks) hasn't clarified aspects of REPRESENT F. etc.

    I don't let the Standard confuse me. It's beneficial when others
    adhere to it closely, unless it's not. In particular, I don't agree
    to the efforts to try to standardize untested 'good ideas.'
    ...

    Do you mean 'significant digits' as opposed to 'decimal places'? FWIW
    I believe Forth-94's introduction of the former had definite benefits - particularly if one is interested in compact representation. For me
    it wasn't a case of either/or but how I could combine both in a simple user-friendly interface. Oddly Forth-94's lack of functionality and
    vague specification proved an advantage. I wasn't hog-tied by it.

    Probably when Forth-94 came out 'significant digits' was "untested".
    But it's now been two decades for me. Over that time I've scrutinized, replicated, massaged, had thought bubbles I then rejected. So for me
    at least it's 'proven'.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Thu Apr 10 15:15:33 2025
    From Newsgroup: comp.lang.forth

    On 9/04/2025 11:14 pm, sjack wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    that's helpful. But do you mean "significant digits" the way I mean
    "significant digits"? I don't think so.. The beauty of "most significant

    If you take a measurement and get a four digit number where the last
    digit was result of rounding, then you have three significant digits.

    But "words lie"; just their nature.

    But when Forth-94 instructs you to 'round the number to n significant digits' what is unclear? Not the numerical result.

    What's ambiguous in Forth-94 is the returned representation i.e. should REPRESENT return '0's representing the insignificant digits; should F.
    trim the redundant trailing '0's.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Thu Apr 10 17:18:23 2025
    From Newsgroup: comp.lang.forth

    On 9/04/2025 9:28 pm, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$4e97017c$71179fa7@ab267a929dfc81b6>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    <SNIP>

    I see two ways out of this:
    a. Add F.R to the standard;
    b. Add SET-DECIMALS or SET-FIXED to the standard.

    And finally, add a section to the Annex to define and clarify the whole
    darn thing (because IMHO that is dearly missing).

    I'm with Anton Ertl here. If you have a clear idea what has to be done, formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).

    Why must it be done? To please you? If the committee is satisfied with
    the status quo nothing need be done. And that's what you're seeing.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Thu Apr 10 12:40:53 2025
    From Newsgroup: comp.lang.forth

    In article <f7a591a1dc38e555ac1aecce6c59bd3bf195d09c@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 9/04/2025 9:28 pm, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$4e97017c$71179fa7@ab267a929dfc81b6>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    <SNIP>

    I see two ways out of this:
    a. Add F.R to the standard;
    b. Add SET-DECIMALS or SET-FIXED to the standard.

    And finally, add a section to the Annex to define and clarify the whole
    darn thing (because IMHO that is dearly missing).

    I'm with Anton Ertl here. If you have a clear idea what has to be done,
    formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).

    Why must it be done? To please you? If the committee is satisfied with
    the status quo nothing need be done. And that's what you're seeing.

    You must do it, because you are not satisfied with the standard.
    <insults deleted>

    Groetjes Albert

    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Thu Apr 10 13:35:42 2025
    From Newsgroup: comp.lang.forth

    On 10-04-2025 07:15, dxf wrote:
    On 9/04/2025 11:14 pm, sjack wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    that's helpful. But do you mean "significant digits" the way I mean
    "significant digits"? I don't think so.. The beauty of "most significant

    If you take a measurement and get a four digit number where the last
    digit was result of rounding, then you have three significant digits.

    But "words lie"; just their nature.

    But when Forth-94 instructs you to 'round the number to n significant digits' what is unclear? Not the numerical result.

    What's ambiguous in Forth-94 is the returned representation i.e. should REPRESENT return '0's representing the insignificant digits; should F.
    trim the redundant trailing '0's.

    Just my gut feeling: REPRESENT - no. This is a word used to construct
    number representations. It should be as literal as possible, because the programmer will most probably interfere in the representation. If he
    wants those zeros he should get them rather than add them IMHO.

    F. - yes. This is my most vanilla floating point printer. It's the "just
    gimme my number" word - no frills.

    Hans Bezemer


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From sjack@sjack@dontemail.me (sjack) to comp.lang.forth on Thu Apr 10 12:50:35 2025
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> wrote:

    What's ambiguous in Forth-94 is the returned representation i.e. should REPRESENT return '0's representing the insignificant digits; should F.
    trim the redundant trailing '0's.

    See your point but won't give an opinion as how REPRESENT output
    should appear, not my place.

    But as a user the wording of REPRESENT, and thus PRECISION and
    SET-PRECISION, is a little off. Rounding is mentioned but all the
    parameters are stated as significant digits. Don't think
    it prevents a user from getting what he wants but could taint
    discussion of the result's significance. Is the result all
    significant digits or significant digits plus one? Either could be
    correct depending on the circumstance and the latter would be
    the most often wanted.
    --
    me
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Fri Apr 11 11:55:19 2025
    From Newsgroup: comp.lang.forth

    On 10/04/2025 9:35 pm, Hans Bezemer wrote:
    On 10-04-2025 07:15, dxf wrote:
    On 9/04/2025 11:14 pm, sjack wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    that's helpful. But do you mean "significant digits" the way I mean
    "significant digits"? I don't think so.. The beauty of "most significant >>>
    If you take a measurement and get a four digit number where the last
    digit was result of rounding, then you have three significant digits.

    But "words lie"; just their nature.

    But when Forth-94 instructs you to 'round the number to n significant digits'
    what is unclear?  Not the numerical result.

    What's ambiguous in Forth-94 is the returned representation i.e. should
    REPRESENT return '0's representing the insignificant digits; should F.
    trim the redundant trailing '0's.

    Just my gut feeling: REPRESENT - no. This is a word used to construct number representations. It should be as literal as possible, because the programmer will most probably interfere in the representation. If he wants those zeros he should get them rather than add them IMHO.

    Gut feeling or no, interpreting the spec such that the user may only access u characters from the buffer results in poor outcomes. We knew this by 2004. Later a revised spec for REPRESENT was offered that resolved all known issues and ambiguities.

    F. - yes. This is my most vanilla floating point printer. It's the "just gimme my number" word - no frills.

    IOW you chose an interpretation that you knew was good for you. Exactly my approach.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Fri Apr 11 12:19:44 2025
    From Newsgroup: comp.lang.forth

    On 10/04/2025 8:40 pm, albert@spenarnc.xs4all.nl wrote:
    In article <f7a591a1dc38e555ac1aecce6c59bd3bf195d09c@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 9/04/2025 9:28 pm, albert@spenarnc.xs4all.nl wrote:
    ...
    I'm with Anton Ertl here. If you have a clear idea what has to be done,
    formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).

    Why must it be done? To please you? If the committee is satisfied with
    the status quo nothing need be done. And that's what you're seeing.

    You must do it, because you are not satisfied with the standard.

    Chuck Moore might beg to differ.

    'Matters of fact or truth or beauty cannot be voted on. They speak for
    themselves.'

    If one sees truth of what's been said, one acts on it. To wait for
    authority to tell one what to do indicates only subservience.

    <insults deleted>

    I'm not aware anything was deleted.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Fri Apr 11 13:52:26 2025
    From Newsgroup: comp.lang.forth

    On 10/04/2025 10:50 pm, sjack wrote:
    dxf <dxforth@gmail.com> wrote:

    What's ambiguous in Forth-94 is the returned representation i.e. should
    REPRESENT return '0's representing the insignificant digits; should F.
    trim the redundant trailing '0's.

    See your point but won't give an opinion as how REPRESENT output
    should appear, not my place.

    But as a user the wording of REPRESENT, and thus PRECISION and
    SET-PRECISION, is a little off. Rounding is mentioned but all the
    parameters are stated as significant digits. Don't think
    it prevents a user from getting what he wants but could taint
    discussion of the result's significance. Is the result all
    significant digits or significant digits plus one? Either could be
    correct depending on the circumstance and the latter would be
    the most often wanted.

    With REPRESENT we're dealing with full-precision numbers being displayed
    in lesser precision. Would 'significant digits plus one' even apply?

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Apr 11 12:17:50 2025
    From Newsgroup: comp.lang.forth

    In article <00017933da7aa3f05c28a90fc9cbc9b84dca418f@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 10/04/2025 8:40 pm, albert@spenarnc.xs4all.nl wrote:
    In article <f7a591a1dc38e555ac1aecce6c59bd3bf195d09c@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 9/04/2025 9:28 pm, albert@spenarnc.xs4all.nl wrote:
    ...
    I'm with Anton Ertl here. If you have a clear idea what has to be done, >>>> formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).

    Why must it be done? To please you? If the committee is satisfied with >>> the status quo nothing need be done. And that's what you're seeing.

    You must do it, because you are not satisfied with the standard.

    Chuck Moore might beg to differ.

    No. Chuck more doesnot criticize standards. He ignored them.


    'Matters of fact or truth or beauty cannot be voted on. They speak for
    themselves.'

    If one sees truth of what's been said, one acts on it. To wait for
    authority to tell one what to do indicates only subservience.

    <insults deleted>

    I'm not aware anything was deleted.

    You are blissfully unaware of the insults I have in store.
    Let us keep that way.

    Groetjes Albert

    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Fri Apr 11 13:10:55 2025
    From Newsgroup: comp.lang.forth

    On 11-04-2025 04:19, dxf wrote:
    On 10/04/2025 8:40 pm, albert@spenarnc.xs4all.nl wrote:
    In article <f7a591a1dc38e555ac1aecce6c59bd3bf195d09c@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 9/04/2025 9:28 pm, albert@spenarnc.xs4all.nl wrote:
    ...
    I'm with Anton Ertl here. If you have a clear idea what has to be done, >>>> formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).

    Why must it be done? To please you? If the committee is satisfied with >>> the status quo nothing need be done. And that's what you're seeing.

    You must do it, because you are not satisfied with the standard.

    Chuck Moore might beg to differ.

    'Matters of fact or truth or beauty cannot be voted on. They speak for
    themselves.'

    If one sees truth of what's been said, one acts on it. To wait for
    authority to tell one what to do indicates only subservience.

    <insults deleted>

    I'm not aware anything was deleted.


    A proposition can be true a priori (conceptual only, like every bachelor
    is unmarried - even if I've never seen the guy). A fact is a state of actuality - and hence can only be evaluated as true or false a
    posteriori, since such proposition has to be confronted with the real
    world to establish its "truth" value (in the words of Wittgenstein -
    with a touch of Quine).

    In the eyes of John Locke beauty is a secondary quality - and hence (as
    the saying goes) "in the eye of the beholder". You may establish it intersubjectively - but never objectively. Consequently, it cannot be
    "self evident".

    So in short, no, you cannot vote on truth or fact (in spite of what postmodernism claims), but you can most certainly vote on beauty.

    Hans Bezemer
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From sjack@sjack@dontemail.me (sjack) to comp.lang.forth on Fri Apr 11 13:39:32 2025
    From Newsgroup: comp.lang.forth

    dxf <dxforth@gmail.com> wrote:

    With REPRESENT we're dealing with full-precision numbers being displayed
    in lesser precision. Would 'significant digits plus one' even apply?

    Unsure what is meant by "full-precision numbers" so the following
    reasoning my be off in that respect:

    Floating-point has _potential_ to express a number with _maximum_ of u significant digits plus one rounded digit. However, in application a
    result may have less than the maximum potential significant digits and
    should be returned (displayed) with all digits _after the first non-significant digit_ chopped (or padded with zero's).

    For sure I'm no authority on floating-point numbers. The only thing
    I know is what I recall from remedial math in the olden days of light
    that one wants a result of u significant digits plus the one rounded
    digit. Such form of number is then useful for other floating-point calculations.
    --
    me
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Fri Apr 11 15:50:50 2025
    From Newsgroup: comp.lang.forth

    On 11-04-2025 05:52, dxf wrote:
    With REPRESENT we're dealing with full-precision numbers being displayed
    in lesser precision. Would 'significant digits plus one' even apply?
    I did more digging into the subject that I probably should have done -
    but I think so. IMHO there is no consensus (either in the standard nor elsewhere) what "significant digits" are. However I found that:

    1. The significant seems to be the main source of "significant digits";

    2. Either large exponents (and digits to the right of integer upto the
    decimal point) - or small exponents (and digits to the left upto the
    decimal point) are often referred to as "placeholders" AKA - not part of
    the "significant digits";

    3. Leading zeroes (before the decimal point, but preceding the
    significant digits) or trailing zeroes (after the decimal point, but
    following the significant digits) are not placeholders. Note that some "trailing zeroes" can be significant digits;

    4. The rightmost digit of the "significant digits", even when incorrect
    - is part of the significant digits.

    And yeah, then there are things like rounding, "trapped zeroes", exact
    numbers - Oof!

    But I think it would help if a definition of significant digits would be
    added to the standard. Now everybody is guessing what it means..

    Hans Bezemer


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 12 00:23:27 2025
    From Newsgroup: comp.lang.forth

    On 11/04/2025 9:10 pm, Hans Bezemer wrote:
    On 11-04-2025 04:19, dxf wrote:
    On 10/04/2025 8:40 pm, albert@spenarnc.xs4all.nl wrote:
    In article <f7a591a1dc38e555ac1aecce6c59bd3bf195d09c@i2pn2.org>,
    dxf  <dxforth@gmail.com> wrote:
    On 9/04/2025 9:28 pm, albert@spenarnc.xs4all.nl wrote:
    ...
    I'm with Anton Ertl here. If you have a clear idea what has to be done, >>>>> formulate it and send in a proposal. (But I'm as guilty as you
    regards other matters ...).

    Why must it be done?  To please you?  If the committee is satisfied with >>>> the status quo nothing need be done.  And that's what you're seeing.

    You must do it, because you are not satisfied with the standard.

    Chuck Moore might beg to differ.

    'Matters of fact or truth or beauty cannot be voted on.  They speak for
      themselves.'

    If one sees truth of what's been said, one acts on it.  To wait for
    authority to tell one what to do indicates only subservience.

    <insults deleted>

    I'm not aware anything was deleted.


    A proposition can be true a priori (conceptual only, like every bachelor is unmarried - even if I've never seen the guy). A fact is a state of actuality - and hence can only be evaluated as true or false a posteriori, since such proposition has to be confronted with the real world to establish its "truth" value (in the words of Wittgenstein - with a touch of Quine).

    In the eyes of John Locke beauty is a secondary quality - and hence (as the saying goes) "in the eye of the beholder". You may establish it intersubjectively - but never objectively. Consequently, it cannot be "self evident".

    So in short, no, you cannot vote on truth or fact (in spite of what postmodernism claims), but you can most certainly vote on beauty.

    Rarely is a vote on the truth or fact of a matter. Rather it's a vote on action
    to be taken in response to the alleged truth or fact. Insofar as there is no compulsion to act, there is no compulsion to make propositions.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 12 00:46:00 2025
    From Newsgroup: comp.lang.forth

    On 11/04/2025 11:39 pm, sjack wrote:
    dxf <dxforth@gmail.com> wrote:

    With REPRESENT we're dealing with full-precision numbers being displayed
    in lesser precision. Would 'significant digits plus one' even apply?

    Unsure what is meant by "full-precision numbers" so the following
    reasoning my be off in that respect:

    Floating-point has _potential_ to express a number with _maximum_ of u significant digits plus one rounded digit. However, in application a
    result may have less than the maximum potential significant digits and
    should be returned (displayed) with all digits _after the first non-significant digit_ chopped (or padded with zero's).

    For sure I'm no authority on floating-point numbers. The only thing
    I know is what I recall from remedial math in the olden days of light
    that one wants a result of u significant digits plus the one rounded
    digit. Such form of number is then useful for other floating-point calculations.

    I recall IEEE-754 talking about 'correctly rounded' numbers when
    converting to external representation. This is likely to have
    been a factor in Intel's decision to use 80-bits internally.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Fri Apr 11 15:42:04 2025
    From Newsgroup: comp.lang.forth

    This is likely to have been a factor in Intel's decision to use
    80-bits internally.

    Maybe they needed 80 bits to print a binary 64-bit float in BCD
    for COBOL compilers.
    However, one needs a few hundred bits to correctly represent a
    binary 56-bit significand in decimal, so maybe it is only enough
    for single-precision floats?
    For sure, high-quality libraries do not rely on 80-bit extended
    precision for decimal output - I remember even the MASM library
    had special code for that.

    The real problem in practice is what to do when the user
    calculates, e.g., sin(x)/x for x near 0, or inverts a
    10,000 x 10,000 matrix. My approach is that the user knows
    the precision of what he wants to see (if not, we have no
    problem and can do anything), and his problem is what the
    result *looks like* on the screen, on paper, or to other
    programs. And it is not only the digits, it also +/-NaN,
    +/-Infinity, and maybe the payload of these specials.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 12 11:40:06 2025
    From Newsgroup: comp.lang.forth

    On 11/04/2025 11:50 pm, Hans Bezemer wrote:
    On 11-04-2025 05:52, dxf wrote:
    With REPRESENT we're dealing with full-precision numbers being displayed
    in lesser precision.  Would 'significant digits plus one' even apply?
    I did more digging into the subject that I probably should have done - but I think so. IMHO there is no consensus (either in the standard nor elsewhere) what "significant digits" are. However I found that:

    1. The significant seems to be the main source of "significant digits";

    2. Either large exponents (and digits to the right of integer upto the decimal point) - or small exponents (and digits to the left upto the decimal point) are often referred to as "placeholders" AKA - not part of the "significant digits";

    3. Leading zeroes (before the decimal point, but preceding the significant digits) or trailing zeroes (after the decimal point, but following the significant digits) are not placeholders. Note that some "trailing zeroes" can be significant digits;

    4. The rightmost digit of the "significant digits", even when incorrect - is part of the significant digits.

    And yeah, then there are things like rounding, "trapped zeroes", exact numbers - Oof!

    But I think it would help if a definition of significant digits would be added to the standard. Now everybody is guessing what it means..

    Perhaps I'm missing something but looking at:

    https://en.wikipedia.org/wiki/Significant_figures

    subsection "Rounding to significant figures" I'm not seeing anything unexpected or ambiguous.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 12 14:43:16 2025
    From Newsgroup: comp.lang.forth

    On 12/04/2025 1:42 am, mhx wrote:
    This is likely to have been a factor in Intel's decision to use
    80-bits internally.

    Maybe they needed 80 bits to print a binary 64-bit float in BCD
    for COBOL compilers.
    However, one needs a few hundred bits to correctly represent a
    binary 56-bit significand in decimal, so maybe it is only enough
    for single-precision floats?

    Who does that?

    For sure, high-quality libraries do not rely on 80-bit extended
    precision for decimal output - I remember even the MASM library
    had special code for that.
    ...

    I take no precautions limiting output to 15 and 18 digits respectively
    for double and extended. This is floating-point after all and lack of
    accuracy at the limits is expected.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sat Apr 12 07:04:47 2025
    From Newsgroup: comp.lang.forth

    On Sat, 12 Apr 2025 4:43:16 +0000, dxf wrote:

    [..]
    I take no precautions limiting output to 15 and 18 digits respectively
    for double and extended. This is floating-point after all and lack of accuracy at the limits is expected.

    I think it has to do more with things like
    FORTH> 1e 9e f/ 1e1000 f/ fe. 0.0111111111111111111e-999 ok

    or Gforth's
    1e 9e f/ 1e100 f/ fe. 0.0111111111111111111e-999
    11.1111111111111E-102 ok

    of SwiftX's
    1e 9e f/ 1e390 f/ fe. 111.11111111111112E-393

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 12 18:08:04 2025
    From Newsgroup: comp.lang.forth

    On 12/04/2025 5:04 pm, mhx wrote:
    On Sat, 12 Apr 2025 4:43:16 +0000, dxf wrote:

    [..]
    I take no precautions limiting output to 15 and 18 digits respectively
    for double and extended.  This is floating-point after all and lack of
    accuracy at the limits is expected.

    I think it has to do more with things like
    FORTH> 1e 9e f/ 1e1000 f/ fe.  0.0111111111111111111e-999  ok

    or Gforth's
    1e 9e f/ 1e100  f/ fe.  0.0111111111111111111e-999  11.1111111111111E-102  ok

    of SwiftX's
    1e 9e f/ 1e390  f/ fe. 111.11111111111112E-393

    What's the problem (other than incorrect implementation of FE.) ?


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Sat Apr 12 12:51:19 2025
    From Newsgroup: comp.lang.forth

    In article <nnd$3b8abc48$46689fd5@9359a5552d288bf6>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    <SNIP>
    4. The rightmost digit of the "significant digits", even when incorrect
    - is part of the significant digits.

    In metal working the implied precision is half of the last digit.
    If there is a bar over the last digit the precision is a unit
    If there is a squiggly bar over the last digit the precision is two units.
    So 1.00 means a precision required is 5 micron.

    This is more significant as the talk of displayed digits after the
    decimal point.

    <SNIP>
    Hans Bezemer


    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sat Apr 12 14:57:34 2025
    From Newsgroup: comp.lang.forth

    On 12-04-2025 03:40, dxf wrote:
    subsection "Rounding to significant figures" I'm not seeing anything unexpected
    or ambiguous.

    Neither do I. However, there is more in the world than Wikipedia:

    https://www.britannica.com/science/significant-figures https://ccnmtl.columbia.edu/projects/mmt/frontiers/web/chapter_5/6665.html https://www.montgomerycollege.edu/_documents/academics/support/learning-centers/ackerman-learning-center-rockville/significant-figures.pdf
    https://chem.libretexts.org/Bookshelves/Analytical_Chemistry/Supplemental_Modules_(Analytical_Chemistry)/Quantifying_Nature/Significant_Digits
    https://www.physics.uoguelph.ca/significant-digits-tutorial https://www.chem.fsu.edu/chemlab/chm1020c/lecture%202/04.php https://chem.libretexts.org/Bookshelves/Introductory_Chemistry/Introductory_Chemistry_(LibreTexts)/02%3A_Measurement_and_Problem_Solving/2.04%3A_Significant_Figures_in_Calculations
    https://pmc.ncbi.nlm.nih.gov/articles/PMC4483789/ https://www.my-gcsescience.com/decimal-places-significant-figures/

    .. just to name a few..

    Look, *IF* we're adding a definition to the standard and *IF* we use the Wikipedia definition - I have no problem with that. Rather a bad
    definition than no definition (not saying the Wikipedia one is bad). But
    I don't fool myself into thinking that Wikipedia is *automatically* the
    most authoritative source.

    Hans Bezemer


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sat Apr 12 13:27:27 2025
    From Newsgroup: comp.lang.forth

    So 1.00 means a precision required is 5 micron.

    Where are the microns coming from?
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sat Apr 12 23:42:55 2025
    From Newsgroup: comp.lang.forth

    On 12/04/2025 10:57 pm, Hans Bezemer wrote:
    On 12-04-2025 03:40, dxf wrote:
    subsection "Rounding to significant figures" I'm not seeing anything unexpected
    or ambiguous.

    Neither do I. However, there is more in the world than Wikipedia:

    https://www.britannica.com/science/significant-figures https://ccnmtl.columbia.edu/projects/mmt/frontiers/web/chapter_5/6665.html https://www.montgomerycollege.edu/_documents/academics/support/learning-centers/ackerman-learning-center-rockville/significant-figures.pdf
    https://chem.libretexts.org/Bookshelves/Analytical_Chemistry/Supplemental_Modules_(Analytical_Chemistry)/Quantifying_Nature/Significant_Digits
    https://www.physics.uoguelph.ca/significant-digits-tutorial https://www.chem.fsu.edu/chemlab/chm1020c/lecture%202/04.php https://chem.libretexts.org/Bookshelves/Introductory_Chemistry/Introductory_Chemistry_(LibreTexts)/02%3A_Measurement_and_Problem_Solving/2.04%3A_Significant_Figures_in_Calculations
    https://pmc.ncbi.nlm.nih.gov/articles/PMC4483789/ https://www.my-gcsescience.com/decimal-places-significant-figures/

    .. just to name a few..

    Look, *IF* we're adding a definition to the standard and *IF* we use the Wikipedia definition - I have no problem with that. Rather a bad definition than no definition (not saying the Wikipedia one is bad). But I don't fool myself into thinking that Wikipedia is *automatically* the most authoritative source.

    No but if I were a Standard Forth user I'd like to know what the impact of these
    other definitions means in practice. When I discovered what "correctly rounded"
    external representation in IEEE would likely entail I rolled my eyes knowing there
    was no way I was going to implement that. I mean there's theory and then there's
    reality.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From antispam@antispam@fricas.org (Waldek Hebisch) to comp.lang.forth on Sun Apr 13 02:50:15 2025
    From Newsgroup: comp.lang.forth

    mhx <mhx@iae.nl> wrote:
    So 1.00 means a precision required is 5 micron.

    Where are the microns coming from?

    What Albert wrote implies that precision is 0.005 (half of 0.01).
    But (what he did not wrote) default unit for mechanical work is
    milimeter. 0.005 of milimeter is 5 micron.
    --
    Waldek Hebisch
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Sun Apr 13 14:26:39 2025
    From Newsgroup: comp.lang.forth

    On 12/04/2025 10:57 pm, Hans Bezemer wrote:
    ...
    Look, *IF* we're adding a definition to the standard and *IF* we use the Wikipedia definition - I have no problem with that. Rather a bad definition than no definition (not saying the Wikipedia one is bad). But I don't fool myself into thinking that Wikipedia is *automatically* the most authoritative source.

    FWIW "fixed-point notation" isn't defined either.


    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Sun Apr 13 19:24:03 2025
    From Newsgroup: comp.lang.forth

    On 13-04-2025 04:50, Waldek Hebisch wrote:
    mhx <mhx@iae.nl> wrote:
    So 1.00 means a precision required is 5 micron.

    Where are the microns coming from?

    What Albert wrote implies that precision is 0.005 (half of 0.01).
    But (what he did not wrote) default unit for mechanical work is
    milimeter. 0.005 of milimeter is 5 micron.


    Agreed, the terms mu and micron are still quite popular among boomers,
    but haven't actually been part of the SI since 1967. It's micrometre,
    folks. Glow up!

    Hans Bezemer
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Sun Apr 13 21:00:37 2025
    From Newsgroup: comp.lang.forth

    On Sun, 13 Apr 2025 17:24:03 +0000, Hans Bezemer wrote:

    On 13-04-2025 04:50, Waldek Hebisch wrote:
    mhx <mhx@iae.nl> wrote:
    So 1.00 means a precision required is 5 micron.

    Where are the microns coming from?

    What Albert wrote implies that precision is 0.005 (half of 0.01).
    But (what he did not wrote) default unit for mechanical work is
    milimeter. 0.005 of milimeter is 5 micron.


    Agreed, the terms mu and micron are still quite popular among boomers,
    but haven't actually been part of the SI since 1967. It's micrometre,
    folks. Glow up!

    Irrelevant. Albert pointed out that the number "1.00" means nothing
    without a context that allows to decide how the number should be
    printed or evaluated. Unfortunately, he chose the mechanical domain
    in his example without giving the conventions valid in that environment.
    So I couldn't calculate output = "5e-6" from input "1.00."

    The context that ANS assumes might be the use of IEEE double
    precision. That gives at least some numbers to relate 'precision'
    to when Forth (with a properly implemented FP package) prints a
    given number. It tells me nothing about the precision of, e.g.,
    a sin(x)/x calculation that my program does.

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Mon Apr 14 13:31:45 2025
    From Newsgroup: comp.lang.forth

    On 14/04/2025 7:00 am, mhx wrote:
    On Sun, 13 Apr 2025 17:24:03 +0000, Hans Bezemer wrote:

    On 13-04-2025 04:50, Waldek Hebisch wrote:
    mhx <mhx@iae.nl> wrote:
    So 1.00 means a precision required is 5 micron.

    Where are the microns coming from?

    What Albert wrote implies that precision is 0.005 (half of 0.01).
    But (what he did not wrote) default unit for mechanical work is
    milimeter.  0.005 of milimeter is 5 micron.


    Agreed, the terms mu and micron are still quite popular among boomers,
    but haven't actually been part of the SI since 1967. It's micrometre,
    folks. Glow up!

    Irrelevant. Albert pointed out that the number "1.00" means nothing
    without a context that allows to decide how the number should be
    printed or evaluated.
    ...

    But we do know something about it in the context of computer math.
    For ex. "1.00" when presented to a computer will be extended to the
    intrinsic precision of the computer's floats and be used thereafter
    at that precision. Similarly when it comes to output an fp number
    to an external device it will be at the intrinsic precision unless
    reduced by the operator.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From minforth@minforth@gmx.net (minforth) to comp.lang.forth on Mon Apr 14 06:54:41 2025
    From Newsgroup: comp.lang.forth

    Present
    1. F.
    to a Forth system.

    We oldtimers know what will happen, but it remains a fossil artefact for
    sure.

    --
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Mon Apr 14 07:48:10 2025
    From Newsgroup: comp.lang.forth

    For ex. "1.00" when presented to a computer will be extended to the
    intrinsic precision of the computer's floats and be used thereafter
    at that precision.

    Here you assume that you can not do a calculation that will
    reduce that precision, or that the hardware keep track of all
    operations and calculate the remaining precision as it goes.

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Mon Apr 14 18:31:16 2025
    From Newsgroup: comp.lang.forth

    On 14/04/2025 5:48 pm, mhx wrote:
    For ex. "1.00" when presented to a computer will be extended to the
    intrinsic precision of the computer's floats and be used thereafter
    at that precision.

    Here you assume that you can not do a calculation that will
    reduce that precision,

    I can't imagine a programmer that assumes it.

    or that the hardware keep track of all
    operations and calculate the remaining precision as it goes.

    I'll worry about it when it happens.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Mon Apr 14 18:50:02 2025
    From Newsgroup: comp.lang.forth

    On 14/04/2025 4:54 pm, minforth wrote:
    Present
    1. F.
    to a Forth system.

    We oldtimers know what will happen, but it remains a fossil artefact for sure.

    Floating-point math has replaced integer math in Forth?

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Mon Apr 14 16:14:33 2025
    From Newsgroup: comp.lang.forth

    On 14-04-2025 08:54, minforth wrote:
    Present
    1. F.
    to a Forth system.

    We oldtimers know what will happen, but it remains a fossil artefact for sure.

    In 4tH you'll get an error message - but I catch your drift. BTW, Gforth issues a warning. I think it was because Chuck assumed that double
    numbers with a point in it, doubled up for "fixed point numbers".

    I did a whole video on YT on how wonderful that works on 64 bits - but reducing that format to just two digits takes only seven bits. I must
    admit I haven't experimented a lot with that, but I assume it's workable
    - even in 16 bits. I gotta admit - I love it.

    BTW, the standard (section A.12.3.7, A.12.6.1.0558, 12.3.7) requires the trailing E.

    As far as the embedded decimal point goes:

    "The Technical Committee has more than once received the suggestion that
    the text interpreter in Standard Forth systems should treat numbers that
    have an embedded decimal point, but no exponent, as floating-point
    numbers rather than double cell numbers. This suggestion, although it
    has merit, has always been voted down because it would break too much
    existing code; many existing implementations put the full digit string
    on the stack as a double number and use other means to inform the
    application of the location of the decimal point."

    In short: !!WE DON'T WANNA BREAK EXISTING CODE!!

    On the other hand, "TC reply to Q0004":

    Q: Will a number with an *embedded* decimal point be converted to a double-cell number in a Standard Forth system?

    A: Not necessarily. A Standard System is permitted, *but not required,*
    to convert digit strings with embedded periods as double numbers. Consequently, a Standard Program cannot rely on any particular
    interpretation of such digit strings.

    BTW, the idea that Forth suggests the use of a IEEE format - not
    according to the standard:

    "12.3.1.2 Floating-point numbers
    The internal representation of a floating-point number, including the
    format and precision of the significand and the format and range of the exponent, >>> *is implementation defined."* <<<

    .. which in itself is quite fortunate since I got two FP systems with different internal representations ;-)

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Tue Apr 15 13:03:09 2025
    From Newsgroup: comp.lang.forth

    On 15/04/2025 12:14 am, Hans Bezemer wrote:
    ...
    BTW, the standard (section A.12.3.7, A.12.6.1.0558, 12.3.7) requires the trailing E.

    As far as the embedded decimal point goes:

    "The Technical Committee has more than once received the suggestion that the text interpreter in Standard Forth systems should treat numbers that have an embedded decimal point, but no exponent, as floating-point numbers rather than double cell numbers. This suggestion, although it has merit, has always been voted down because it would break too much existing code; many existing implementations put the full digit string on the stack as a double number and use other means to inform the application of the location of the decimal point."

    In short: !!WE DON'T WANNA BREAK EXISTING CODE!!

    On the other hand, "TC reply to Q0004":

    Q: Will a number with an *embedded* decimal point be converted to a double-cell number in a Standard Forth system?

    A: Not necessarily. A Standard System is permitted, *but not required,* to convert digit strings with embedded periods as double numbers. Consequently, a Standard Program cannot rely on any particular interpretation of such digit strings.

    AFAIR Forth-83 and prior never specified what form a double number should take i.e.
    there was no 'standard code' to break. One could say Forth-94 was setting a standard
    where none previously existed.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Tue Apr 15 12:57:03 2025
    From Newsgroup: comp.lang.forth

    In article <d7e4a431359d3a254cbdeb6e7ca8d516e93472ad@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 15/04/2025 12:14 am, Hans Bezemer wrote:
    ...
    BTW, the standard (section A.12.3.7, A.12.6.1.0558, 12.3.7) requires the trailing E.

    As far as the embedded decimal point goes:

    "The Technical Committee has more than once received the suggestion that the text interpreter in Standard Forth systems should treat numbers that have an embedded decimal
    point, but no exponent, as floating-point numbers rather than double cell numbers. This suggestion, although it has merit, has always been voted down because it would break
    too much existing code; many existing implementations put the full digit string on the stack as a double number and use other means to inform the application of the location
    of the decimal point."

    In short: !!WE DON'T WANNA BREAK EXISTING CODE!!

    On the other hand, "TC reply to Q0004":

    Q: Will a number with an *embedded* decimal point be converted to a double-cell number in a Standard Forth system?

    A: Not necessarily. A Standard System is permitted, *but not required,* to convert digit strings with embedded periods as double numbers. Consequently, a Standard Program
    cannot rely on any particular interpretation of such digit strings.

    AFAIR Forth-83 and prior never specified what form a double number should take i.e.
    there was no 'standard code' to break. One could say Forth-94 was setting a standard
    where none previously existed.


    The best solution is to require an exponent sign, different from E.
    An environment font of hex numbers, should not standardize this E.

    A _ or ~ would be ideal.

    Now the rule becomes a string containing an exponent sign would be fp.
    Full stop.

    1~0 2~0 F+ FS.
    or
    1_0 2_0 F+ FS. \ algol 68 compatible.

    The exponent 0 can be ommitted:
    1_ 2_ F+ FS. 3.0000000000000000000_

    This can solve another unpleasantness.
    Now most printed fp numbers would be read in as a double.
    With _/~ you can print numbers like
    567.123~
    and read in just the same.

    It can be upwards compatible, having all legacy shit intact.
    In hex fp now can be transferred in ascii .
    This is one headache less. I admit that at Shell, the fp
    numbers the geology simulation get from the ai boys analysing
    the drill specimens, precision was not a problem.
    (transfer from lisp to c to FORTRAN.)

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Tue Apr 15 15:17:32 2025
    From Newsgroup: comp.lang.forth

    albert@spenarnc.xs4all.nl writes:
    1_0 2_0 F+ FS. \ algol 68 compatible.

    The exponent 0 can be ommitted:
    1_ 2_ F+ FS. 3.0000000000000000000_

    Python 3.11.2 (main, Sep 14 2024, 03:00:30) [GCC 12.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    print(1_0+2_0)
    30

    Gforth (development):
    1_0 2_0 + . \ output: 30
    1_ 2_ + . \ output: 3

    With _/~ you can print numbers like
    567.123~
    and read in just the same.

    You can also print numbers like

    567.123e

    and read in just the same. It's just that the specification of
    F. specifies neither "e" nor "~".

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Tue Apr 15 19:47:39 2025
    From Newsgroup: comp.lang.forth

    1_0 2_0 + . \ output: 30

    Sorry, I really don't like this. It takes away my
    underlying mental model of how things should work.
    What happens for "10_ 20_ + ." ?

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Tue Apr 15 21:59:21 2025
    From Newsgroup: comp.lang.forth

    mhx@iae.nl (mhx) writes:
    1_0 2_0 + . \ output: 30

    Sorry, I really don't like this. It takes away my
    underlying mental model of how things should work.
    What happens for "10_ 20_ + ." ?

    It outputs 30, too. The intended use of _ in Gforth is like this:

    100_000_000_000 20_000_000_000 + . \ outputs 120000000000

    or with groups of 4 for those environments where that is conventional.

    What does your underlying mental model say how things should work?

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From dxf@dxforth@gmail.com to comp.lang.forth on Wed Apr 16 10:15:43 2025
    From Newsgroup: comp.lang.forth

    On 16/04/2025 5:47 am, mhx wrote:
    1_0 2_0 + . \ output: 30

    Sorry, I really don't like this. It takes away my
    underlying mental model of how things should work.
    What happens for "10_ 20_ + ." ?

    By "mental model" presumably you mean cultural conditioning? Since
    as far as I'm aware nobody is born with it. While some fret over
    1. F. I can't say it's been an issue since leaving Microsoft BASIC
    in the 1980's. Perhaps my missing the whole C thing had something
    to do with it - in which case I'm grateful. The endless comparison
    of Forth with other languages only serves to belittle it.

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Paul Rubin@no.email@nospam.invalid to comp.lang.forth on Tue Apr 15 17:32:34 2025
    From Newsgroup: comp.lang.forth

    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    What happens for "10_ 20_ + ." ?
    It outputs 30, too. The intended use of _ in Gforth is like this:...
    What does your underlying mental model say how things should work?

    One model is to ignore _ as gforth appears to. Another is that _ is a separator character, ignored when it appears between two digits, but
    meaningful or an error at the starting or ending position. That is how
    Python 3 appears to work. 1_0 is the same as 10, but 10_ is a syntax error. --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Wed Apr 16 12:59:23 2025
    From Newsgroup: comp.lang.forth

    In article <2025Apr15.235921@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    mhx@iae.nl (mhx) writes:
    1_0 2_0 + . \ output: 30

    Sorry, I really don't like this. It takes away my
    underlying mental model of how things should work.
    What happens for "10_ 20_ + ." ?

    It outputs 30, too. The intended use of _ in Gforth is like this:

    100_000_000_000 20_000_000_000 + . \ outputs 120000000000

    or with groups of 4 for those environments where that is conventional.

    What does your underlying mental model say how things should work?

    The characters fit for grouping digits are, as long as we want a
    range for large number bases:

    &0 BL DO I EMIT LOOP
    !"#$%&'()*+,-./

    If you insist that 1a and 1A is the same number, you have more choice,
    but your limit yourself to base 36.

    . is the decimal point. Thank god there is no adaptation to nationality
    in Forth.
    &_ is fine as a separator because it is out of the range of even 64
    base numbers.
    The comma, the hash, are most fit with single and double quotes a
    distant second.
    The rational use of grouping numbers is &, , because there is ample
    precedent and recognition for that.

    for example
    The US national debt is
    36,482,590,720,183.13 dollars.
    (The 13 cent is not precise, it may go up slightly since this writing.)

    We must let go of the figforth habit to ignore all non-digit characters
    to interpret 19:80:07 as a wall clock time.


    - anton

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From mhx@mhx@iae.nl (mhx) to comp.lang.forth on Wed Apr 16 13:59:44 2025
    From Newsgroup: comp.lang.forth

    On Tue, 15 Apr 2025 21:59:21 +0000, Anton Ertl wrote:

    mhx@iae.nl (mhx) writes:
    1_0 2_0 + . \ output: 30

    Sorry, I really don't like this. It takes away my
    underlying mental model of how things should work.
    What happens for "10_ 20_ + ." ?

    It outputs 30, too. The intended use of _ in Gforth is like this:

    100_000_000_000 20_000_000_000 + . \ outputs 120000000000

    or with groups of 4 for those environments where that is conventional.

    What does your underlying mental model say how things should work?

    My mental model (in a basic Forth context) recognizes a pattern where
    '_' means '.'. The output of 1.0 2.0 + . then probably intends to
    be 1.0 2.0 d+ d. (the reason for '_' is the wish to process numbers
    with embedded decimal point). Numerically the output is then '3' or
    maybe '3_0', or '3_00', but never '30.'

    Your example

    100_000_000_000 20_000_000_000 + . \ outputs 120000000000

    is not very appetizing because it combines a useful concept
    (allowing a visual cue in number I/O) with the need to
    redefine many standard words.

    De gustibus non disputandum est.

    -marcel
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Wed Apr 16 18:20:18 2025
    From Newsgroup: comp.lang.forth

    On 16-04-2025 02:15, dxf wrote:
    On 16/04/2025 5:47 am, mhx wrote:
    1_0 2_0 + . \ output: 30

    Sorry, I really don't like this. It takes away my
    underlying mental model of how things should work.
    What happens for "10_ 20_ + ." ?

    By "mental model" presumably you mean cultural conditioning? Since
    as far as I'm aware nobody is born with it. While some fret over
    1. F. I can't say it's been an issue since leaving Microsoft BASIC
    in the 1980's. Perhaps my missing the whole C thing had something
    to do with it - in which case I'm grateful. The endless comparison
    of Forth with other languages only serves to belittle it.

    Well, frankly, I feel sometimes you should take the pain - or maybe
    introduce a setting to select the implementation. I've been through this
    a few times, fixing dozens of programs because I felt this solution was
    far better than what it replaced.

    You can tune the behavior of most C compilers as well - comply to a
    certain standard. Don't tell me you can't do that with Forth (because
    you can).

    But if you allow to build kludge after kludge after kludge, you will end
    up with a very weird language.

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Wed Apr 16 16:50:32 2025
    From Newsgroup: comp.lang.forth

    mhx@iae.nl (mhx) writes:
    On Tue, 15 Apr 2025 21:59:21 +0000, Anton Ertl wrote:
    [...]
    Your example

    100_000_000_000 20_000_000_000 + . \ outputs 120000000000

    is not very appetizing because it combines a useful concept
    (allowing a visual cue in number I/O) with the need to
    redefine many standard words.

    You find the change in Gforth in <http://git.savannah.gnu.org/cgit/gforth.git/commit/?id=13a9bb946e1375865c874c73dc51aae8b779216b>.
    It introduces a new non-standard word ">number_" and changes two calls
    of ">number" into ">number_" in the non-standard word "s>unumber?".
    This means that uses of >NUMBER in user programs do not ignore _,
    which one may find desirable or not.

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Wed Apr 16 21:26:17 2025
    From Newsgroup: comp.lang.forth

    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    You can tune the behavior of most C compilers as well - comply to a
    certain standard. Don't tell me you can't do that with Forth (because
    you can).

    C standards avoid incompatible changes as good as they can. However,
    because C is a keyword-based language and redefining existing names
    produces an error in C, even adding a single keyword or a single name
    can break compatibility with an existing program, and the compilers
    allow you to dial the specific standard in order to deal with that.

    Forth is better suited to deal with such changes, but then some people
    come along and use the misfeatures of C as encouragement for their
    desire to break existing programs.

    OTOH, Forth is worse suited to deal with dial-your-language-version
    options: C uses separate compilation, so if the main program uses some
    version of the standard, and a library uses a different version,
    that's typically no problem, because they are both compiled with
    different compiler calls (which may have different options).

    Forth, OTOH, compiles all the sources in one compilation run, and any
    choices you dial at one point tend to affect all the rest of the
    compilation, even if it compiles some independently developed library.
    One could dream up ways to deal with that problem, but given past
    experience, I doubt such ideas would find enough support; some would
    call that "WIBNI"s, while others would point out that Chuck Moore did
    not bring these ideas down from the mountain.

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Thu Apr 17 13:30:12 2025
    From Newsgroup: comp.lang.forth

    On 16-04-2025 23:26, Anton Ertl wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    You can tune the behavior of most C compilers as well - comply to a
    certain standard. Don't tell me you can't do that with Forth (because
    you can).

    C standards avoid incompatible changes as good as they can. However,
    because C is a keyword-based language and redefining existing names
    produces an error in C, even adding a single keyword or a single name
    can break compatibility with an existing program, and the compilers
    allow you to dial the specific standard in order to deal with that.

    Forth is better suited to deal with such changes, but then some people
    come along and use the misfeatures of C as encouragement for their
    desire to break existing programs.

    OTOH, Forth is worse suited to deal with dial-your-language-version
    options: C uses separate compilation, so if the main program uses some version of the standard, and a library uses a different version,
    that's typically no problem, because they are both compiled with
    different compiler calls (which may have different options).

    Forth, OTOH, compiles all the sources in one compilation run, and any
    choices you dial at one point tend to affect all the rest of the
    compilation, even if it compiles some independently developed library.
    One could dream up ways to deal with that problem, but given past
    experience, I doubt such ideas would find enough support; some would
    call that "WIBNI"s, while others would point out that Chuck Moore did
    not bring these ideas down from the mountain.

    - anton

    I don't think so. Using K&R prototypes is significantly different from
    ANSI prototypes. That must have broken quite some code - unless specific measures were taken to allow "old format" codes as well. restrict,
    nullptr, inline, bool - the list of added keywords is endless. BTW, so
    is the list of deprecated keywords, like "_Bool" with was replaced by
    the far less ugly "bool" in 2023.

    So I don't think they "avoid incompatible changes".

    And I don't think the argument that "Forth compiles in one go" holds up
    as an argument to avoid cleaning up historical clutter. The different
    versions of a "keyword" could be created as their names, followed by a
    postfix of the standard, e.g. DO_79, DO_82, DO_94. Let's call 'em
    "version words".

    There could be special words like [FORTH78], [ANSFORTH] - which would no nothing but:
    - Either hiding words in the dictionary that should be disabled;
    - Activating words that are part of this standard;
    - Assigning the proper "version" words to trampolines or DEFERs.

    But I think maybe, just maybe the same effect could be achieved by using wordsets. I don't know. Never implemented them. Never used them (except
    when switching to the EDITOR wordset on the ZX Spectrum).

    Now - it may be that some techniques (like hiding or unhiding words, or trampolines) are not part of Forth. Well, with an overhaul you could
    include those. And package the entire thing in a wordset, so it's optional.

    So, if we compile an external library using a mix of Forth-79, ANS Forth
    and Forth 2012, it could be as simple as:

    INCLUDE a.fs
    INCLUDE b.fs
    [FORTH2012]

    a.fs:
    [FORTH79]
    ...

    b.fs:
    [ANSFORTH]
    ...

    That's much like setting the radix. So - why couldn't this work?

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Thu Apr 17 14:04:48 2025
    From Newsgroup: comp.lang.forth

    In article <2025Apr16.232617@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    You can tune the behavior of most C compilers as well - comply to a
    certain standard. Don't tell me you can't do that with Forth (because
    you can).

    C standards avoid incompatible changes as good as they can. However,
    because C is a keyword-based language and redefining existing names
    produces an error in C, even adding a single keyword or a single name
    can break compatibility with an existing program, and the compilers
    allow you to dial the specific standard in order to deal with that.

    Oh? For example 'static' in a c-source has the meaning of making a name invisile to the outside world.
    A normal person would call that 'local', especially given that static
    actually meant residing in heap memory.
    So as the c-expert hired for Fico moldings I introduced a file
    fico.h with a line

    #define static local

    (and the line
    #define TRUE 1
    because they came from Pascal and thought that TRUE was -1 ).

    - anton

    Groetjes Albert
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Thu Apr 17 16:13:09 2025
    From Newsgroup: comp.lang.forth

    On 17-04-2025 14:04, albert@spenarnc.xs4all.nl wrote:
    Oh? For example 'static' in a c-source has the meaning of making a name invisile to the outside world.
    A normal person would call that 'local', especially given that static actually meant residing in heap memory.

    Exactly my point. BTW, you could state a similar story around "void" -
    which in some cases means "untyped" (I like "raw") and in some cases "nothing". And yeah, we've gotten used to all these quirks - but that
    doesn't mean it isn't cringe in some way.

    So as the c-expert hired for Fico moldings I introduced a file
    fico.h with a line

    #define static local

    (and the line
    #define TRUE 1
    because they came from Pascal and thought that TRUE was -1 ).

    I loved that! There was some article in Byte where the guy stated he
    used such a technique to get people used to C after FORTRAN - I used a
    similar technique to get weaned from Pascal. And yeah - that file
    included TRUE. And BEGIN. And END.

    I used it until people began to complain "it wasn't proper C" - which technically - it was. Then I converted the whole shebang to "proper C".
    But "4th.h" still contains these lines:

    #define TRUE (1)
    #define FALSE (0)

    So, in a little way "easyc.h" still survives! ;-)

    Hans Bezemer

    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From anton@anton@mips.complang.tuwien.ac.at (Anton Ertl) to comp.lang.forth on Fri Apr 18 06:28:17 2025
    From Newsgroup: comp.lang.forth

    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    On 16-04-2025 23:26, Anton Ertl wrote:
    OTOH, Forth is worse suited to deal with dial-your-language-version
    options: C uses separate compilation, so if the main program uses some
    version of the standard, and a library uses a different version,
    that's typically no problem, because they are both compiled with
    different compiler calls (which may have different options).

    Forth, OTOH, compiles all the sources in one compilation run, and any
    choices you dial at one point tend to affect all the rest of the
    compilation, even if it compiles some independently developed library.
    One could dream up ways to deal with that problem, but given past
    experience, I doubt such ideas would find enough support; some would
    call that "WIBNI"s, while others would point out that Chuck Moore did
    not bring these ideas down from the mountain.

    - anton

    I don't think so. Using K&R prototypes is significantly different from
    ANSI prototypes. That must have broken quite some code - unless specific >measures were taken to allow "old format" codes as well.

    They certainly were, and still are. E.g, for the following function
    definition in pre-C89 style:

    foo(x)
    int x;
    {
    return bar(x);
    }

    gcc-12 produces some warnings:

    xxx.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | foo(x)
    | ^~~
    xxx.c: In function ‘foo’:
    xxx.c:4:10: warning: implicit declaration of function ‘bar’ [-Wimplicit-function-declaration]
    4 | return bar(x);
    | ^~~

    but it compiles the code. In the old times the calling conventions
    were designed to work for undeclared functions, so the compiled code
    also worked. Things like the I32LP64 mistake and newer calling
    conventions were designed for programs with fully-blown prototypes, so
    on newer platforms some of the old code does not work (in particular,
    when passing a double or an undeclared pointer), but that's the choice
    of the implementors, not due to the C standard introducing an
    incompatible requirement.

    restrict,
    nullptr, inline, bool - the list of added keywords is endless.

    The number of keywords is finite (to be exact, C23 has 59 keywords,
    including 5 obsolescent keywords), which means that the number of
    added keywords is finite, too.

    BTW, so
    is the list of deprecated keywords, like "_Bool" with was replaced by
    the far less ugly "bool" in 2023.

    The number of obsolescent keywords in C23 is 5. Endless?

    And I don't think the argument that "Forth compiles in one go" holds up
    as an argument to avoid cleaning up historical clutter. The different >versions of a "keyword" could be created as their names, followed by a >postfix of the standard, e.g. DO_79, DO_82, DO_94. Let's call 'em
    "version words".

    There are no keywords in Forth, which makes changes less problematic
    than in C. And names can be redefined in Forth, which also makes
    changes less problematic.

    As for introducing changes that are so disruptive that you would then
    need dial-your-standard features to provide backwards compatibility
    (e.g., stuff like the Forth-83 disruptions to Forth-79, e.g., the
    changes to NOT and PICK), yes, one could propose technical workarounds
    for that. It's just that the Forth community and the Forth-200x will
    not find a consensus for taking such measures.

    E.g., consider requiring the text interpreter of Forth systems to
    treat 1.0 as FP value; currently this is not standardized, but common
    practice (gforth, iForth, lxf, SwiftForth, VFX) is to treat it as
    equivalent to 10., i.e., a double-cell integer.

    One way to keep backwards compatibility with the current common
    practice would be to require having a word FORTH-2030-FP-SYNTAX (or
    maybe just FORTH-2030) in every file that uses the new FP syntax
    before the use of that syntax. If that word does not appear in that
    file, "1.0" would still be non-standardized.

    Next: "1.". If we had such declarations, we could even support "1." (standardized as double-cell in Forth-94 and Forth-2012) as FP number.
    The alternative would be to treat "1." as double-cell and 1.0 as FP
    value, which IMO is even worse than requiring an "e" in every FP
    value.

    But back to the dial-a-standard things: I have never seen such a
    proposal that limits the dialing to one file. Instead, the proposals
    and existing practice is to dial for the rest of text interpretation
    (or until somthing else is dialed). That would mean that previously
    working files might no longer work when included after dialing the new
    FP syntax. E.g., all versions of the recognizer proposal have been
    along these lines, and Bernd Paysan has actually proposed allowing to
    treat "1." as FP value by swapping the integer and FP recognizer in
    the recognizer order, which would have exactly this effect. And Bernd
    Paysan is not the only one: Among other dialing features that all are
    not limited to the file, VFX supports disabling the recognition of
    "1." as double, which then leads to its recognition as FP number; but
    that disabling is not limited to a file, but extends to the rest of
    the text interpretation.

    Here's the example for VFX:

    ',' dp-char 1+ c! ok
    1. ok F:-1
    f. 1. ok

    So you could try to propose a word like FORTH-2030-FP-SYNTAX, but I
    expect that the reactions would be along the following lines (in the
    community and in the standardization committee):

    1) A number of people consider this completely unnecessary, and
    actually heretical, because Chuck Moore came down from the mountain
    with doubles, not floats, so that's the way it was always meant to
    be. Some would argue that treating "1.0" or "1." as FP number is
    proposed just to cater to C programmers, and that Forthers should
    take pride in deviating from the beaten path.

    2) A number of people would argue against the limitation to a specific
    file because of "complexity" (meaning implementation complexity),
    "WIBNI", or because Chuck Moore came down from the mountain without
    that idea, and that Chuck Moore has argued against libraries, that
    he has argued against saving and restoring state, and instead has
    argued for always setting it. And that the common practice (e.g.,
    in VFX) is to just set the state, and never

    3) And if you changed your proposal to just affect the rest of text
    interpretation (and include another word FORTH-2012-FP-SYNTAX or
    somesuch to switch back), some people (including me) would argue
    that this variant of FORTH-2030-FP-SYNTAX would break existing
    code, and that introducing FORTH-2012-FP-SYNTAX is a poor and
    error-prone substitute for defining FORTH-2030-FP-SYNTAX properly.
    Word counters would dislike this variant because it introduces an
    additional word, and the people who argue 1) would also dislike the
    proposal.

    The bottom line is that the proposal would probably not find a
    consensus and would not be accepted by the committee. The bottom line
    is:

    One could dream up ways to deal with that problem, but given past
    experience, I doubt such ideas would find enough support

    And the bottom line of that is that proposals for incompatible changes
    have little chance of being accepted.

    There could be special words like [FORTH78], [ANSFORTH] - which would no >nothing but:
    - Either hiding words in the dictionary that should be disabled;
    - Activating words that are part of this standard;

    Interestingly, Forth-79 includes a word 79-STANDARD, and Forth-83
    includes a word FORTH-83, but Forth-94 and Forth-2012 do not include
    such words. We had a discussion whether we should have Forth-94 and
    Forth-2012 versions of environmental queries for wordsets in
    Forth-2012, but the committee decided against that.

    In any case, if you want to support including libraries written for a
    different standard, the effect of such words should be limited to a
    specific file. If the standards are incompatible and you want
    libraries, and you do not provide this kind of dialing, you can take a
    look at the Python 3 transition pain (or worse, what happened with
    Perl6) to see what happens. The Python community has learned from
    that experience not to introduce such incompatible changes again.

    - Assigning the proper "version" words to trampolines or DEFERs.

    That's exactly the wrong thing to do. You want to statically bind the
    name to the word with the right version. E.g. if you have a Forth-83 program

    forth-83
    100 load ( includes a library written in Forth-79)

    : foo ( ... -- ... )
    ... not ... ;

    and the library contains

    79-standard
    : bar ( ... -- ... )
    ... not ... ;

    you want the use of NOT in FOO to be statically bound to (what
    Forth-94 calls) INVERT and the NOT in BAR to be statically bound to
    0=; you usually don't want BAR or FOO to change its behaviour
    depending on which standard is selected.

    But I think maybe, just maybe the same effect could be achieved by using >wordsets.

    I assume you mean wordlists. Yes, the effect of switching between the
    Forth-83 NOT and the Forth-79 NOT can be achieved by having a wordlist containing the Forth-79 words and a wordlist containing the Forth-83
    words, and putting it in the search order.

    So, if we compile an external library using a mix of Forth-79, ANS Forth
    and Forth 2012, it could be as simple as:

    INCLUDE a.fs
    INCLUDE b.fs
    [FORTH2012]

    a.fs:
    [FORTH79]
    ...

    b.fs:
    [ANSFORTH]
    ...

    There is 79-STANDARD, but there is no word equivalent to [FORTH2012]
    or [ANSFORTH]. So a program that contains "[FORTH2012]" without first
    defining it is not Forth-2012-compliant. And a program that contains [ANSFORTH] without first defining it is not Forth-94 compliant.

    That's much like setting the radix.

    BASE is one of the misfeatures of Forth, and demonstrates the
    disadvantage of having a state for the rest of the text
    interpretation, and the Chuck Moore approach to . Do you start every
    file with DECIMAL or HEX? Looking at SwiftForth (where one might
    expect the most Chuck Moore influence), I see 26 occurences of DECIMAL
    and 16 occurences of HEX, and usually not before the first occurence
    of an integer with several digits. As an example, the file that
    contains the definition

    : DECIMAL ( -- ) 10 BASE ! ;

    does not contain an invocation of DECIMAL before this use of "10".

    So - why couldn't this work?

    As mentioned, there is no [FORTH2012] and no [ANSFORTH].

    Moreover, this general approach does not work for BASE: If the next
    standard required that systems start out in, say, octal, I am sure
    that a lot of the existing source files would fail unless you invoked
    DECIMAL before the INCLUDE. BASE only works (and only so-so) because
    every sane system defaults to DECIMAL, and that does not change
    between standard versions.

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Hans Bezemer@the.beez.speaks@gmail.com to comp.lang.forth on Fri Apr 18 13:07:11 2025
    From Newsgroup: comp.lang.forth

    On 18-04-2025 08:28, Anton Ertl wrote:
    So you could try to propose a word like FORTH-2030-FP-SYNTAX, but I
    expect that the reactions would be along the following lines (in the community and in the standardization committee)

    Lots of words - and very few arguments. Let's break it down to the most egregious part of the whole argument.

    1. You seem to suggest you know how the TC (and the community) would
    react. This fuels ugly rumors that the whole "standards game" is rigged.
    Not your best argument.

    2. You put up a whole lot of things - but nowhere do you prove (contrary
    to your previous posts) that it is not technically feasible. On the
    contrary, you agreed that every single solution I put forward can be
    done. You just don't like it. That's okay, but that doesn't take
    anything away from my original argument.

    3. Nowhere did I state the application of this word should be limited to
    a single file? Or a single block file. Or a single word. It could
    function like "BASE". You don't like BASE. <Sigh>. Okay - see previous enumeration.

    4. No, I don't start every single file with DECIMAL. Like every compiler
    4tH starts up in decimal. It is a safe assumption that when a file is compiled, the state of the compiler is in decimal. If you changed that
    and don't change it back to the default, that is because you're a lousy programmer without any discipline who should have touched Forth with a
    pole. Every horror heavens unleashes upon you is well deserved.

    5. Quote: "you usually don't want BAR or FOO to change its behavior
    depending on which standard is selected." That's exactly what I want, actually. And using a word to set the standard could automatically be
    applied to every single source file or block (unless you have blocks
    where all 16 lines are used - in which case you're a lousy programmer without.. etc.).

    6. Quote: "If that word does not appear in that file, "1.0" would still
    be non-standardized." In that case you're a lousy programmer without..
    etc. Gee - next we're gonna get the argument "If you take too many items
    from the stack, your program will crash".

    7. I tend to put all of my includes (except one) at the very front of my program. Just like I neatly declare all variables and arrays at the
    start of a programs. That's a kind of personal hygiene all programmers
    should master.

    What you're actually "forgetting" is that ALL THIS is necessary only and
    only because companies or individuals rather acquire technical debt than change their sources to new standards - AND THEN *USE* that technical
    debt to halt down the natural evolution of a language - by introducing
    the argument of "breaking code", and thinking they can get away with it.

    Python 2.0 -> 3.0 introduced some technical debt. True. They overcame
    it. The language is still alive. Next time, try to reduce the number of changes you introduce per release. Duh! Perl 5.0 -> 6.0 accumulated so
    much technical debt they never recovered. And yes, I'm aware of the cost
    of "technical debt" - both professionally as personally. So don't try
    this on me.

    Sometimes, I made changes to 4tH that accumulated a huge amount of
    technical debt. The changes in itself were sometimes trivial, but would
    break code. I'd be editing, compiling and testing tens, hundreds of
    programs for evenings without end. Keeping lists of what was done, and
    what still had to be done. It's no fun. But it had to be done.

    At work, we either put in the effort - or had to run the code on an old interpreter with all the CVE's associated with it. Not a good plan.

    So yes, collecting technical debt has its consequences. And I think it's better to have a language WITHOUT all the old kludges in place than one
    where the most horrible compromises had to be made in order to
    facilitate a bad attitude - to put it frankly.

    Hans Bezemer
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From albert@albert@spenarnc.xs4all.nl to comp.lang.forth on Fri Apr 18 13:40:57 2025
    From Newsgroup: comp.lang.forth

    In article <2025Apr18.082817@mips.complang.tuwien.ac.at>,
    One way to keep backwards compatibility with the current common
    practice would be to require having a word FORTH-2030-FP-SYNTAX (or
    maybe just FORTH-2030) in every file that uses the new FP syntax
    before the use of that syntax. If that word does not appear in that
    file, "1.0" would still be non-standardized.

    This would be easy enough
    The file
    dbase_FORTH-2xxxx.frt
    contains
    "
    ALSO FORTH-2xxxx \ A named vocabulary
    do
    your
    thing
    PREVIOUS
    "
    wordlist are underused. You could have two independant random
    number generators, by loading the source twice.

    Because ciforth uses prefixes 0 1 2 .. 9 parse a number I can redefine
    (in a separate wordlist or just in FORTH)

    : 7
    -1 PP +! (NUMBER) POSTPONE SDLITERAL
    ; IMMEDIATE PREFIX

    It is sufficient to revector SDLITERAL

    Now SDLITERAL is
    (DPL is the position of the decimal point, initialised at NULL)
    : SDLITERAL DPL @ IF POSTPONE DLITERAL ELSE DROP POSTPONE LITERAL THEN
    ; IMMEDIATE

    I could revector it with
    : SDLITERAL DPL @ 0<> 10 ?ERROR DROP POSTPONE LITERAL ;

    (With 10 meaning "not a valid digit")

    By the way. Do you really need numbers like 340282366920938463463374607431764264639

    Maybe it is time to ditch double integers, the decimal point is a
    seventy's kludge. The most characteristic feature of integers is ...
    that they don't contain a decimal point, embedded or trailing.
    Simply put, it is time to reserve the decimal point for floats.

    If you really are into number theory, primes whatnot,
    you could think of a proposed prefix (recognizer)

    \ DMAXUINT in decimal:
    ##340282366920938463463374607431764264639

    and maybe
    $$FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

    I see Marcel Hendrix programs and there constant integers have
    a $ or a # prefix anyway.

    Groetjes Albert





    Next: "1.". If we had such declarations, we could even support "1." >(standardized as double-cell in Forth-94 and Forth-2012) as FP number.
    The alternative would be to treat "1." as double-cell and 1.0 as FP
    value, which IMO is even worse than requiring an "e" in every FP
    value.

    But back to the dial-a-standard things: I have never seen such a
    proposal that limits the dialing to one file. Instead, the proposals
    and existing practice is to dial for the rest of text interpretation
    (or until somthing else is dialed). That would mean that previously
    working files might no longer work when included after dialing the new
    FP syntax. E.g., all versions of the recognizer proposal have been
    along these lines, and Bernd Paysan has actually proposed allowing to
    treat "1." as FP value by swapping the integer and FP recognizer in
    the recognizer order, which would have exactly this effect. And Bernd
    Paysan is not the only one: Among other dialing features that all are
    not limited to the file, VFX supports disabling the recognition of
    "1." as double, which then leads to its recognition as FP number; but
    that disabling is not limited to a file, but extends to the rest of
    the text interpretation.

    Here's the example for VFX:

    ',' dp-char 1+ c! ok
    1. ok F:-1
    f. 1. ok

    So you could try to propose a word like FORTH-2030-FP-SYNTAX, but I
    expect that the reactions would be along the following lines (in the >community and in the standardization committee):

    1) A number of people consider this completely unnecessary, and
    actually heretical, because Chuck Moore came down from the mountain
    with doubles, not floats, so that's the way it was always meant to
    be. Some would argue that treating "1.0" or "1." as FP number is
    proposed just to cater to C programmers, and that Forthers should
    take pride in deviating from the beaten path.

    2) A number of people would argue against the limitation to a specific
    file because of "complexity" (meaning implementation complexity),
    "WIBNI", or because Chuck Moore came down from the mountain without
    that idea, and that Chuck Moore has argued against libraries, that
    he has argued against saving and restoring state, and instead has
    argued for always setting it. And that the common practice (e.g.,
    in VFX) is to just set the state, and never

    3) And if you changed your proposal to just affect the rest of text
    interpretation (and include another word FORTH-2012-FP-SYNTAX or
    somesuch to switch back), some people (including me) would argue
    that this variant of FORTH-2030-FP-SYNTAX would break existing
    code, and that introducing FORTH-2012-FP-SYNTAX is a poor and
    error-prone substitute for defining FORTH-2030-FP-SYNTAX properly.
    Word counters would dislike this variant because it introduces an
    additional word, and the people who argue 1) would also dislike the
    proposal.

    The bottom line is that the proposal would probably not find a
    consensus and would not be accepted by the committee. The bottom line
    is:

    One could dream up ways to deal with that problem, but given past
    experience, I doubt such ideas would find enough support

    And the bottom line of that is that proposals for incompatible changes
    have little chance of being accepted.

    There could be special words like [FORTH78], [ANSFORTH] - which would no >>nothing but:
    - Either hiding words in the dictionary that should be disabled;
    - Activating words that are part of this standard;

    Interestingly, Forth-79 includes a word 79-STANDARD, and Forth-83
    includes a word FORTH-83, but Forth-94 and Forth-2012 do not include
    such words. We had a discussion whether we should have Forth-94 and >Forth-2012 versions of environmental queries for wordsets in
    Forth-2012, but the committee decided against that.

    In any case, if you want to support including libraries written for a >different standard, the effect of such words should be limited to a
    specific file. If the standards are incompatible and you want
    libraries, and you do not provide this kind of dialing, you can take a
    look at the Python 3 transition pain (or worse, what happened with
    Perl6) to see what happens. The Python community has learned from
    that experience not to introduce such incompatible changes again.

    - Assigning the proper "version" words to trampolines or DEFERs.

    That's exactly the wrong thing to do. You want to statically bind the
    name to the word with the right version. E.g. if you have a Forth-83 program

    forth-83
    100 load ( includes a library written in Forth-79)

    : foo ( ... -- ... )
    ... not ... ;

    and the library contains

    79-standard
    : bar ( ... -- ... )
    ... not ... ;

    you want the use of NOT in FOO to be statically bound to (what
    Forth-94 calls) INVERT and the NOT in BAR to be statically bound to
    0=; you usually don't want BAR or FOO to change its behaviour
    depending on which standard is selected.

    But I think maybe, just maybe the same effect could be achieved by using >>wordsets.

    I assume you mean wordlists. Yes, the effect of switching between the >Forth-83 NOT and the Forth-79 NOT can be achieved by having a wordlist >containing the Forth-79 words and a wordlist containing the Forth-83
    words, and putting it in the search order.

    So, if we compile an external library using a mix of Forth-79, ANS Forth >>and Forth 2012, it could be as simple as:

    INCLUDE a.fs
    INCLUDE b.fs
    [FORTH2012]

    a.fs:
    [FORTH79]
    ...

    b.fs:
    [ANSFORTH]
    ...

    There is 79-STANDARD, but there is no word equivalent to [FORTH2012]
    or [ANSFORTH]. So a program that contains "[FORTH2012]" without first >defining it is not Forth-2012-compliant. And a program that contains >[ANSFORTH] without first defining it is not Forth-94 compliant.

    That's much like setting the radix.

    BASE is one of the misfeatures of Forth, and demonstrates the
    disadvantage of having a state for the rest of the text
    interpretation, and the Chuck Moore approach to . Do you start every
    file with DECIMAL or HEX? Looking at SwiftForth (where one might
    expect the most Chuck Moore influence), I see 26 occurences of DECIMAL
    and 16 occurences of HEX, and usually not before the first occurence
    of an integer with several digits. As an example, the file that
    contains the definition

    : DECIMAL ( -- ) 10 BASE ! ;

    does not contain an invocation of DECIMAL before this use of "10".

    So - why couldn't this work?

    As mentioned, there is no [FORTH2012] and no [ANSFORTH].

    Moreover, this general approach does not work for BASE: If the next
    standard required that systems start out in, say, octal, I am sure
    that a lot of the existing source files would fail unless you invoked
    DECIMAL before the INCLUDE. BASE only works (and only so-so) because
    every sane system defaults to DECIMAL, and that does not change
    between standard versions.

    - 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 2023 proceedings: http://www.euroforth.org/ef23/papers/
    EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/
    --
    Temu exploits Christians: (Disclaimer, only 10 apostles)
    Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
    Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
    And Gifts For Friends Family And Colleagues.
    --- Synchronet 3.20c-Linux NewsLink 1.2
  • From Wolfgang Allinger@all2001@spambog.com to comp.lang.forth on Fri Apr 18 09:19:00 2025
    From Newsgroup: comp.lang.forth


    On 18 Apr 25 at group /comp/lang/forth in article 2025Apr18.082817@mips.complang.tuwien.ac.at
    <anton@mips.complang.tuwien.ac.at> (anton@mips.complang.tuwien.ac.at) wrote:

    That's much like setting the radix.

    BASE is one of the misfeatures of Forth, and demonstrates the
    disadvantage of having a state for the rest of the text
    interpretation, and the Chuck Moore approach to . Do you start every
    file with DECIMAL or HEX? Looking at SwiftForth (where one might
    expect the most Chuck Moore influence), I see 26 occurences of DECIMAL
    and 16 occurences of HEX, and usually not before the first occurence
    of an integer with several digits. As an example, the file that
    contains the definition

    : DECIMAL ( -- ) 10 BASE ! ;

    does not contain an invocation of DECIMAL before this use of "10".

    So - why couldn't this work?

    As mentioned, there is no [FORTH2012] and no [ANSFORTH].

    Moreover, this general approach does not work for BASE: If the next
    standard required that systems start out in, say, octal, I am sure
    that a lot of the existing source files would fail unless you invoked
    DECIMAL before the INCLUDE. BASE only works (and only so-so) because
    every sane system defaults to DECIMAL, and that does not change
    between standard versions.

    In all of my applications $0A BASE ! is one of the 1st words, because of
    the DECIMAL issue. and ICECOLD and COLD also set it to $0A

    Also all my developed HW (w/ and w/ FORTH) I made a 0,1uf || 100k from GND
    to PE and spent a good PWRup/BROWNout chip.

    and my ICECOLD sets the RAM all regs of CPU and peripheral to the default state or 0 if there is none.

    So all my aps start with a defined state of all regs, vars...

    Covered my ass very good for nearly 60 yrs of working!

    YMMV and masochists don't do it :)





    Saludos (an alle Vern�nftigen, Rest sh. sig)
    Wolfgang
    --
    Ich bin in Paraguay lebender Trollallergiker :) reply Adresse gesetzt!
    Ich diskutiere zuk�nftig weniger mit Idioten, denn sie ziehen mich auf
    ihr Niveau herunter und schlagen mich dort mit ihrer Erfahrung! :p
    (lt. alter usenet Weisheit) iPod, iPhone, iPad, iTunes, iRak, iDiot

    --- Synchronet 3.20c-Linux NewsLink 1.2