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

    From Martin Nicholas@21:1/5 to Alexis on Thu Mar 27 08:39:00 2025
    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?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Nicholas@21:1/5 to Alexis on Fri Mar 28 08:02:35 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From anthk@21:1/5 to Alexis on Fri Mar 28 22:14:54 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bernd Linsel@21:1/5 to Martin Nicholas on Sun Mar 30 14:14:59 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From anthk@21:1/5 to mhx on Sun Mar 30 14:44:35 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to All on Sat Mar 29 01:07:21 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to anthk@openbsd.home on Mon Mar 31 12:38:30 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to Alexis on Sun Mar 30 17:09:49 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Fri Apr 4 13:36:18 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Sat Apr 5 08:40:15 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to dxf on Fri Apr 4 23:16:30 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to albert@spenarnc.xs4all.nl on Sat Apr 5 07:12:47 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From anthk@21:1/5 to albert@spenarnc.xs4all.nl on Sat Apr 5 21:49:18 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to dxf on Sun Apr 6 07:10:10 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to All on Sun Apr 6 09:42:15 2025
    "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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Sun Apr 6 12:03:27 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to mhx on Sun Apr 6 12:21:31 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to dxf on Sun Apr 6 13:43:25 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to anthk on Sun Apr 6 13:43:28 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to dxf on Mon Apr 7 06:39:43 2025
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to dxf on Mon Apr 7 06:42:56 2025
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to dxf on Mon Apr 7 16:31:18 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to Hans Bezemer on Tue Apr 8 13:45:29 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Wed Apr 9 13:20:23 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Wed Apr 9 13:28:04 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to Hans Bezemer on Wed Apr 9 13:14:19 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to Hans Bezemer on Wed Apr 9 16:44:28 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Thu Apr 10 12:40:53 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to dxf on Thu Apr 10 12:50:35 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Fri Apr 11 12:17:50 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From sjack@21:1/5 to dxf on Fri Apr 11 13:39:32 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to All on Fri Apr 11 15:42:04 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to dxf on Sat Apr 12 07:04:47 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Sat Apr 12 12:51:19 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to All on Sat Apr 12 13:27:27 2025
    So 1.00 means a precision required is 5 micron.

    Where are the microns coming from?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Waldek Hebisch@21:1/5 to mhx on Sun Apr 13 02:50:15 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to Hans Bezemer on Sun Apr 13 21:00:37 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@21:1/5 to All on Mon Apr 14 06:54:41 2025
    Present
    1. F.
    to a Forth system.

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

    --

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to All on Mon Apr 14 07:48:10 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Tue Apr 15 12:57:03 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@spenarnc.xs4all.nl on Tue Apr 15 15:17:32 2025
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to All on Tue Apr 15 19:47:39 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to mhx on Tue Apr 15 21:59:21 2025
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Tue Apr 15 17:32:34 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to Anton Ertl on Wed Apr 16 12:59:23 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mhx@21:1/5 to Anton Ertl on Wed Apr 16 13:59:44 2025
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to mhx on Wed Apr 16 16:50:32 2025
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Hans Bezemer on Wed Apr 16 21:26:17 2025
    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/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to Anton Ertl on Thu Apr 17 14:04:48 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Sat Apr 26 13:07:56 2025
    In article <b73cd7a7ab393f51bfaa18a9171086732bcc0bdf@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 26/04/2025 2:34 am, Hans Bezemer wrote:
    ...
    Yeah, I have helped to make a proposal for PLACE and +PLACE - which never even made it to the voting stage.

    It's a nice symmetry. OTOH the remaining vendors use APPEND and why should they change?


    $+! was even earlier. It predates the IBM PC XT.
    (Osborne, CP/M)

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Sun Apr 27 14:02:39 2025
    In article <nnd$63e5382c$3fdcafbf@3f3b7214bd28514c>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-04-2025 08:21, dxf wrote:
    On 26/04/2025 9:07 pm, albert@spenarnc.xs4all.nl wrote:
    In article <b73cd7a7ab393f51bfaa18a9171086732bcc0bdf@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 26/04/2025 2:34 am, Hans Bezemer wrote:
    ...
    Yeah, I have helped to make a proposal for PLACE and +PLACE - which never even made it to the voting stage.

    It's a nice symmetry. OTOH the remaining vendors use APPEND and why should they change?


    $+! was even earlier. It predates the IBM PC XT.
    (Osborne, CP/M)

    Even PLACE was new back then!

    String stacks often had $+ or equiv. Somehow I never took to them.
    Not enough applications that warranted the effort?

    Let's face it - the string support was notoriously bad in Forth. People >openly complained about that.

    You must get rid of two ideas that are in the basic/lisp/c world.

    1. You don't need dynamic strings. Just keep track of where you left them.
    [ If you really need them, don't do circular buffer or string stacks.
    Interface to the memory wordset (ALLOCATE c.s). ]

    2. Zero ended strings is a stupid 60's c-cludge. Copying that into Forth is beyond .. . They can't accomodate zero byte in strings, They cannot
    accomodate multiple byte characters.

    If you fetch a string, you have a "c-addr count". Forth can have 2 items
    on the stack you know.

    So In my CP/M day I get by with $! $@ $+! and $C+! .
    I made a program playing a text adventure game with that.

    Groetjes Albert




    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to the.beez.speaks@gmail.com on Sun Apr 27 16:30:50 2025
    In article <nnd$7772d25c$1baf7e22@e877e04d3a33b727>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-04-2025 14:02, albert@spenarnc.xs4all.nl wrote:
    In article <nnd$63e5382c$3fdcafbf@3f3b7214bd28514c>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    On 27-04-2025 08:21, dxf wrote:
    On 26/04/2025 9:07 pm, albert@spenarnc.xs4all.nl wrote:
    In article <b73cd7a7ab393f51bfaa18a9171086732bcc0bdf@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 26/04/2025 2:34 am, Hans Bezemer wrote:
    ...
    Yeah, I have helped to make a proposal for PLACE and +PLACE - which never even made it to the voting stage.

    It's a nice symmetry. OTOH the remaining vendors use APPEND and why should they change?


    $+! was even earlier. It predates the IBM PC XT.
    (Osborne, CP/M)

    Even PLACE was new back then!

    String stacks often had $+ or equiv. Somehow I never took to them.
    Not enough applications that warranted the effort?

    Let's face it - the string support was notoriously bad in Forth. People
    openly complained about that.

    You must get rid of two ideas that are in the basic/lisp/c world.

    1. You don't need dynamic strings. Just keep track of where you left them. >> [ If you really need them, don't do circular buffer or string stacks.
    Interface to the memory wordset (ALLOCATE c.s). ]

    2. Zero ended strings is a stupid 60's c-cludge. Copying that into Forth is >> beyond .. . They can't accomodate zero byte in strings, They cannot
    accomodate multiple byte characters.

    If you fetch a string, you have a "c-addr count". Forth can have 2 items
    on the stack you know.

    So In my CP/M day I get by with $! $@ $+! and $C+! .
    I made a program playing a text adventure game with that.

    Groetjes Albert




    Hans Bezemer


    -- 2. Zero ended strings is a stupid 60's c-cludge. Copying that into
    Forth is beyond .. . They can't accomodate zero byte in strings, They
    cannot accomodate multiple byte characters.

    Well, the "club" has killed that one, so it bears no longer any
    significance. FYI: I was not in favor of this proposition, it reeked >extremely Forth-83:

    "Since then, in 2016 the Forth-200x committee in favour of eliminating >ambiguous conditions has decided to require “1 CHARS = 1” thus making >systems that have other character sizes than on not compliant to
    _future_ Forth-200x standards [2][3]. Requesting standard systems to
    have byte size characters limit counted strings to the known maximal
    length of 255 characters."

    No. That applies to a string stored in memory.
    A beneficial principle is to disambiguate the type of parameters
    passed around.
    So `WORD requiring a byte count in front of the characters in memory is
    a mistake. So in my core strings are exclusively passed as (addr length)
    and length can be 63 bit. So a I have `GET-FILE:

    (sc -- addr len) Get the content of file name sc (string constant).
    Errors are thrown.

    Also in my core dictionary entries are identified as one address called
    "dea".
    No "name token", because it may not have a name filled in.
    Not "execution token", because the execution behaviour can be changed
    by changing the code field content.
    Not a "word" because what is a word without a name?
    [This was triggered by the horror of n fields in transputer Forth and
    n*n conversions between these fields. (data field >>> forget field ...).
    Never looked back.
    Through jonesforth most Forth's created nowadays sport a uniform
    dea (CDFLN) , because jones borrowed this compelling idea from ciforth,
    and is hard to abandon, once it takes hold. ]

    Groetjes Albert




    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Hans Bezemer on Sun Apr 27 14:11:58 2025
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    Just a shame the very basics are missing. The only thing holding Forth
    back is the refusal to abstract strings.

    ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Mon Apr 28 13:52:14 2025
    In article <03d13185898a1ee00bea4f420aa1a3721b0585f2@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 27/04/2025 8:28 pm, Hans Bezemer wrote:
    ...
    Another handy word is >STRING that converts a "raw" string to a fully qualified string ( a1 n1 -- a2) that can handle a COUNT (you have the carnal knowledge - you take care
    of the "how"). E.g. for counted strings it might be:

    : >STRING swap over over dup char+ rot cmove c! ;

    For forths that have PACK ( a u a2 -- a2 )

    : >STRING ( a u -- a ) over pack ;

    Store a string in allocated memory.
    sc (string constant: a u)
    : $!A DUP ALLOCATE THROW >R
    R@ SWAP CMOVE
    R> ;

    It helps to have SIZE in the memory wordset:
    sva (string variable stored ALLOCATE d)
    : $@A DUP SIZE ;

    The proper mindset is that there are string variables,
    (string areas where a string could be stored and changed)
    and string constants, sc n where you are no supposed
    to change the content of the string.

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From albert@spenarnc.xs4all.nl@21:1/5 to dxforth@gmail.com on Tue Apr 29 11:32:32 2025
    In article <df01f20a7963efffe9f2b2f71a2526b06702d5a3@i2pn2.org>,
    dxf <dxforth@gmail.com> wrote:
    On 28/04/2025 8:39 pm, Hans Bezemer wrote:
    On 28-04-2025 11:22, dxf wrote:
    On 27/04/2025 8:28 pm, Hans Bezemer wrote:
    ...
    Just a shame the very basics are missing. The only thing holding
    Forth back is the refusal to abstract strings. Wanna make it a counted
    string with a cell count? Do it. Wanna keep on doing counted strings? Do
    it. Wanna do ASCIIZ strings? No problem.

    But aren't string primitives a la ANS-Forth the key to flexibility? 
    I've used
    the concatenation primitive  +STRING ( a u a2 u2 -- a2 u+u2 ) 
    countless times.

    : ZPLACE ( c-addr u c-addr2 -- )  zcount +string + 0 swap c! ;

    : ZAPPEND ( c-addr u c-addr2 -- )  zcount + zplace ;


    The problem is: it's defined nowhere. Not in Wil Baden Toolbelt, not
    in ANS Forth, Forth 2012 -

    +STRING was defined in the Open Terminal Architecture spec - a joint project >by Forth Inc and MPE circa 2000.

    +STRING plus-string

    ( c-addr1 len1 c-addr2 len2 - c-addr2 len3 )

    Append the string at c-addr1, for len1 bytes, to the end of the string
    at c-addr2, for len2 bytes. Return the beginning of the destination
    string (c-addr2) and the sum of the two lengths (len3). It is the programmer's responsibility to ensure that there is room at the end of
    the destination string to hold both strings.

    Why it never made it into their forth offerings I don't know - perhaps >because the project was moth-balled?

    It is inferior to a $! $@ $+! scheme.
    A stored string must remember its length.


    and I can't find a good CoMuS list anymore, it seems.

    If you mean Leo Wong's ...

    http://www.murphywong.net/hello/comus.htm

    --
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)