• The newest episode of "Back&Forth" is out!

    From Hans Bezemer@21:1/5 to All on Fri Jul 29 10:39:18 2022
    You can see it here: https://www.youtube.com/watch?v=1a2rvx0x7k8

    This time we test a quote from Michael Dell. Was he right - or not?

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Sun Jul 31 13:43:45 2022
    On 30/07/2022 03:39, Hans Bezemer wrote:
    You can see it here: https://www.youtube.com/watch?v=1a2rvx0x7k8

    This time we test a quote from Michael Dell. Was he right - or not?

    Hans Bezemer

    How to recognize a 'smart person'? By their success. Which is too
    late. All the rabbits have been pulled from that particular hat.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to dxforth on Sat Jul 30 23:00:16 2022
    On Sunday, July 31, 2022 at 5:43:50 AM UTC+2, dxforth wrote:
    On 30/07/2022 03:39, Hans Bezemer wrote:
    You can see it here: https://www.youtube.com/watch?v=1a2rvx0x7k8

    This time we test a quote from Michael Dell. Was he right - or not?
    [..]
    How to recognize a 'smart person'? By their success. Which is too
    late. All the rabbits have been pulled from that particular hat.

    The world is full of smart people that don't have success,
    and certainly not with everything that they do.

    Dell's original statement makes no logical sense. What would happen
    if everybody followed his advice (given of course that we can even
    test smartness objectively)?

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_Kasprzak?=@21:1/5 to Marcel Hendrix on Sun Jul 31 00:34:31 2022
    In response to:
    How to recognize a 'smart person'? By their success. Which is too
    late. All the rabbits have been pulled from that particular hat.

    Marcel Hendrix wrote:
    The world is full of smart people that don't have success,
    and certainly not with everything that they do.

    Hi Marcel, nice to see you.
    Your statement looks like you are talking about yourself.
    Don't make a bitter victim of yourself. Nobody needs it.
    You better get a grip and start competing with Stephen, who of you will write the best 64-bit Forth.
    iForth was the first big 64-bit Forth on the market, but you made iForth too weird to be successful.
    And too expansive.
    You wrote on your weird web page: "It is not my intention to take away business from regular Forth vendors."
    And you didn't.
    But you can still succeed. You have the knowledge, don't waste it.
    It's not like this, than Stephen has already taken all the rabbits out of that particular hat.
    His 64-bit VFX Forth is still going through a transition. Quite a few things don't work in it yet. For example (tested under Linux) when you SET-SIZE the dictionary to 3GB and SAVE and reload VFX Forth and you ALLOT 2GB of data, then newly written words
    are compiled wrong, becuase VFX Forth always CALLs them using relative 32-bit signed displacement. Even his disassembler then disassembly wrong that situation. But of course this is why we dream about 64-bit Forths, to have multi-gigabyte dictionaries at
    our disposal.
    Well, Marcel, you have something to do. Be the first and waste no more time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to siarc...@gmail.com on Sun Jul 31 01:36:48 2022
    On Sunday, July 31, 2022 at 9:34:32 AM UTC+2, siarc...@gmail.com wrote:
    [..]
    The world is full of smart people that don't have success,
    and certainly not with everything that they do.
    Hi Marcel, nice to see you.
    Your statement looks like you are talking about yourself.
    Don't make a bitter victim of yourself. Nobody needs it.
    [..]

    I was just making a simple observation. Your conclusion says
    more about you than about me.

    iForth is *exactly* where I want it to be.

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Pelc@21:1/5 to All on Sun Jul 31 11:00:50 2022
    On 31 Jul 2022 at 09:34:31 CEST, "Michał Kasprzak" <siarczek83@gmail.com> wrote:

    Hi Marcel, nice to see you.
    Your statement looks like you are talking about yourself.
    Don't make a bitter victim of yourself. Nobody needs it.
    You better get a grip and start competing with Stephen, who of you will write the best 64-bit Forth.

    Since native code optimising Forths arrived, Marcel has always been one of the few Forth implementers I respect.

    Vendors all (including MPE) make some decisions that others will argue with, but we always have good reason for those decisions.

    His 64-bit VFX Forth is still going through a transition. Quite a few things don't work in it yet. For example (tested under Linux) when you SET-SIZE the dictionary to 3GB and SAVE and reload VFX Forth and you ALLOT 2GB of data, then newly written words are compiled wrong, becuase VFX Forth always CALLs them using relative 32-bit signed displacement. Even his disassembler then disassembly wrong that situation. But of course this is why we dream about 64-bit Forths, to have multi-gigabyte dictionaries at our disposal.

    Well the, write a multi-gigabyte app. The largest Forth app I know of compiles 1.4 million lines of code to 33 Mb in 29 seconds with 32 bit VFX Forth.
    "Well, Michal, you have something to do. Be the first and waste no more time." I will even update the call code to handle long offsets (at some future time).

    The point you raise is complicated by address randomisation in modern
    operating systems. To perform a call into an ALLOCATEd memory section (yes,
    not ALLOTted), you need know the base address of the section, and how to
    search it. If the section is saved as a binary, it will not be at the same offset when next called from a reloaded binary. Before you go on, you have
    some design decisions to make so that a suitable notation can be found. Relocatable binary overlays in 32 bit Forths (see VFX) were all but abandoned by the major applications over a decade ago after we enhanced the compilation speed.
    "Well, Michal, you have something to do. Be the first and waste no more time."

    Yes, MPE is making a transition to 64 bit systems, and some of the requests
    are surprising. We will consolidate these requests when our second 64 bit target (ARM64) is up and running. Although I sometimes sound snarky, I do appreciate your input - a different perspective is always welcome.

    Stephen

    --
    Stephen Pelc, stephen@vfxforth.com
    MicroProcessor Engineering, Ltd. - More Real, Less Time
    133 Hill Lane, Southampton SO15 5AF, England
    tel: +44 (0)23 8063 1441, +44 (0)78 0390 3612,
    +34 649 662 974
    http://www.mpeforth.com - free VFX Forth downloads

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to siarczek83@gmail.com on Sun Jul 31 14:19:53 2022
    In article <550dee06-bb4b-4c56-8650-c29d524a7b6en@googlegroups.com>,
    Micha Kasprzak <siarczek83@gmail.com> wrote:
    In response to:
    How to recognize a 'smart person'? By their success. Which is too
    late. All the rabbits have been pulled from that particular hat.

    Marcel Hendrix wrote:
    The world is full of smart people that don't have success,
    and certainly not with everything that they do.

    Hi Marcel, nice to see you.
    Your statement looks like you are talking about yourself.
    Don't make a bitter victim of yourself. Nobody needs it.
    You better get a grip and start competing with Stephen, who of you will write the best 64-bit Forth.
    iForth was the first big 64-bit Forth on the market, but you made iForth too weird to be successful.
    And too expansive.

    ciforth had a 64 bit version way earlier than iforth.
    Not "on the market" however, it is GPL-ed.

    You wrote on your weird web page: "It is not my intention to take away business from regular Forth vendors."
    And you didn't.
    It is a misconception that a GPL-ed Forth takes away business, there Marcel
    is wrong.
    A vendor could customize ciforth, sell it, and could provide maintenance for
    a fee. She would adhere to one restriction, the source has to supplied to
    the customers, and the customers only.

    But you can still succeed. You have the knowledge, don't waste it.
    It's not like this, than Stephen has already taken all the rabbits out of that particular hat.
    His 64-bit VFX Forth is still going through a transition. Quite a few things don't work in it yet. For example (tested under Linux) when you SET-SIZE the
    dictionary to 3GB and SAVE and reload VFX Forth and you ALLOT 2GB of data, then newly written words are compiled wrong, becuase VFX Forth always CALLs them
    using relative 32-bit signed displacement. Even his disassembler then disassembly wrong that situation. But of course this is why we dream about 64-bit
    Forths, to have multi-gigabyte dictionaries at our disposal.
    Well, Marcel, you have something to do. Be the first and waste no more time.

    ciforth has gbyte dictionary space since a long time, actually
    since its first version.
    The default is a couple of Megabytes, but you can grow.

    ~/PROJECT/ciforths/ciforth$ lina -g 8000 linaG8

    ~/PROJECT/ciforths/ciforth$ linaG8 -a
    WANT UNUSED DEC.
    OK
    UNUSED 0 DEC.
    0,000,000,000,000,000,000,000,000,000,008,455,589,344 OK
    BYE

    (Sorry for using double precious 64 bit numbers.)
    How far you can go, has more to do with limits in Linux or swap space
    whatever, than with limits in ciforth.

    I use lina8G routinely for solving demanding projecteuler
    problems.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Stephen Pelc on Sun Jul 31 16:13:19 2022
    Stephen Pelc <stephen@vfxforth.com> writes:
    On 31 Jul 2022 at 09:34:31 CEST, "Michał Kasprzak" <siarczek83@gmail.com>
    For example (tested under Linux) when you SET-SIZE the
    dictionary to 3GB and SAVE and reload VFX Forth and you ALLOT 2GB of data, >> then newly written words are compiled wrong, becuase VFX Forth always CALLs >> them using relative 32-bit signed displacement. Even his disassembler then >> disassembly wrong that situation. But of course this is why we dream about >> 64-bit Forths, to have multi-gigabyte dictionaries at our disposal.

    Well the, write a multi-gigabyte app. The largest Forth app I know of compiles >1.4 million lines of code to 33 Mb in 29 seconds with 32 bit VFX Forth.

    It's not necessary to have many source lines to replicate his findings
    and experience this limitation of VFX:

    [c8b:~:83448] vfx64
    VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64
    © MicroProcessor Engineering Ltd, 1998-2021

    3 1024 * 1024 * 1024 * set-size ok
    save /tmp/vfx3G
    933409 bytes saved to /tmp/vfx3G ok
    bye
    [c8b:~:83449] /tmp/vfx3G
    VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64
    © MicroProcessor Engineering Ltd, 1998-2021

    : foo ." foo" ; ok
    2 1024 * 1024 * 1024 * allot ok
    : bar foo ; ok
    bar
    ... register dump elided ...
    --- RS top ---
    $0000:0000:804E:3EB5 BAR
    $0000:0000:0042:7312 (INTERPRET)
    $0000:0000:0042:7893 DEFER
    $0000:0000:0042:7D71 CATCH
    ...
    Signal number SIGSEGV
    at address 0000:0001:004E:3E60, probably in * outside dictionary *

    Press E to exit, R to restart, other to continue:

    Err# -57005 ERR: Linux Exception
    bar
    ^

    SEE BAR also does not work.

    If the ALLOT allots only 1GB, everything works fine.

    Let's compare:

    [~/gforth:131787] gforth -m 3G
    Gforth 0.7.9_20220729
    Authors: Anton Ertl, Bernd Paysan, Jens Wilke et al., for more type `authors' Copyright © 2022 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
    Type `help' for basic help
    : foo ." foo" ; ok
    2 1024 * 1024 * 1024 * allot ok
    : bar foo ; ok
    bar foo ok

    Also tested and works with 0.7.3.

    If VFX would put the native code into a separate section, one really
    would need to write Fo
  • From Krishna Myneni@21:1/5 to Anton Ertl on Sun Jul 31 13:28:59 2022
    On 7/31/22 11:13, Anton Ertl wrote:
    ...

    : foo ." foo" ; ok
    2 1024 * 1024 * 1024 * allot ok
    : bar foo ; ok
    bar
    ... register dump elided ...
    --- RS top ---
    $0000:0000:804E:3EB5 BAR
    $0000:0000:0042:7312 (INTERPRET)
    $0000:0000:0042:7893 DEFER
    $0000:0000:0042:7D71 CATCH
    ...
    Signal number SIGSEGV
    at address 0000:0001:004E:3E60, probably in * outside dictionary *

    ...

    Or it can be supported out of the box, with a dynamic dictionary. In kForth-32/64,

    ----
    2 1024 * 1024 * 1024 * constant BUFSIZE
    ok
    : foo ." foo" ;
    ok
    create buf BUFSIZE allot
    ok
    : bar foo ;
    ok
    bar
    foo ok
    buf BUFSIZE 1 cells - + ?
    0 ok
    forget buf
    ok
    ----

    Sections are an improvement over the monolithic dictionary, but I prefer
    to use a completely dynamic dictionary.

    --
    Krishna

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to All on Mon Aug 1 13:00:20 2022
    On 31/07/2022 17:34, Michał Kasprzak wrote:
    In response to:
    How to recognize a 'smart person'? By their success. Which is too
    late. All the rabbits have been pulled from that particular hat.

    Marcel Hendrix wrote:
    The world is full of smart people that don't have success,
    and certainly not with everything that they do.

    Hi Marcel, nice to see you.
    Your statement looks like you are talking about yourself.
    Don't make a bitter victim of yourself. Nobody needs it.
    You better get a grip and start competing with Stephen, who of you will write the best 64-bit Forth.
    iForth was the first big 64-bit Forth on the market, but you made iForth too weird to be successful.
    And too expansive.
    You wrote on your weird web page: "It is not my intention to take away business from regular Forth vendors."
    And you didn't.
    But you can still succeed. You have the knowledge, don't waste it.
    It's not like this, than Stephen has already taken all the rabbits out of that particular hat.
    His 64-bit VFX Forth is still going through a transition. Quite a few things don't work in it yet. For example (tested under Linux) when you SET-SIZE the dictionary to 3GB and SAVE and reload VFX Forth and you ALLOT 2GB of data, then newly written
    words are compiled wrong, becuase VFX Forth always CALLs them using relative 32-bit signed displacement. Even his disassembler then disassembly wrong that situation. But of course this is why we dream about 64-bit Forths, to have multi-gigabyte
    dictionaries at our disposal.
    Well, Marcel, you have something to do. Be the first and waste no more time.

    Oh dear. What will become of the world when the consumer starts asking for more?

    https://youtu.be/upD6cB9Rzvk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jurgen Pitaske@21:1/5 to dxforth on Sun Jul 31 23:14:03 2022
    On Monday, 1 August 2022 at 04:00:28 UTC+1, dxforth wrote:
    On 31/07/2022 17:34, Michał Kasprzak wrote:
    In response to:
    How to recognize a 'smart person'? By their success. Which is too
    late. All the rabbits have been pulled from that particular hat.

    Marcel Hendrix wrote:
    The world is full of smart people that don't have success,
    and certainly not with everything that they do.

    Hi Marcel, nice to see you.
    Your statement looks like you are talking about yourself.
    Don't make a bitter victim of yourself. Nobody needs it.
    You better get a grip and start competing with Stephen, who of you will write the best 64-bit Forth.
    iForth was the first big 64-bit Forth on the market, but you made iForth too weird to be successful.
    And too expansive.
    You wrote on your weird web page: "It is not my intention to take away business from regular Forth vendors."
    And you didn't.
    But you can still succeed. You have the knowledge, don't waste it.
    It's not like this, than Stephen has already taken all the rabbits out of that particular hat.
    His 64-bit VFX Forth is still going through a transition. Quite a few things don't work in it yet. For example (tested under Linux) when you SET-SIZE the dictionary to 3GB and SAVE and reload VFX Forth and you ALLOT 2GB of data, then newly written
    words are compiled wrong, becuase VFX Forth always CALLs them using relative 32-bit signed displacement. Even his disassembler then disassembly wrong that situation. But of course this is why we dream about 64-bit Forths, to have multi-gigabyte
    dictionaries at our disposal.
    Well, Marcel, you have something to do. Be the first and waste no more time.
    Oh dear. What will become of the world when the consumer starts asking for more?

    https://youtu.be/upD6cB9Rzvk

    WHAT?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Stephen Pelc@21:1/5 to All on Mon Aug 1 07:04:20 2022
    On 31 Jul 2022 at 18:13:19 CEST, "Anton Ertl" <Anton Ertl> wrote:

    It's not necessary to have many source lines to replicate his findings
    and experience this limitation of VFX:

    Blah, blah, blah ...

    I have never doubted that the failure exists. What is the use case of 2 GB ALLOT and not using the space? We/I/MPE have made the assumption that all code is in one contiguous section. Show me a use case that breaks this. The only cases that make sense are transient code in ALLOCATEd memory and code in
    binary overlays. Only the first has been asked for by an MPE client - see Examples/transients.fth.

    Stephen

    P.S. Chuck has repeatedly warned us against coding for problem that don't
    exist until they may exist.

    --
    Stephen Pelc, stephen@vfxforth.com
    MicroProcessor Engineering, Ltd. - More Real, Less Time
    133 Hill Lane, Southampton SO15 5AF, England
    tel: +44 (0)23 8063 1441, +44 (0)78 0390 3612,
    +34 649 662 974
    http://www.mpeforth.com - free VFX Forth downloads

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to Stephen Pelc on Mon Aug 1 10:45:14 2022
    On 01/08/2022 10:04, Stephen Pelc wrote:
    On 31 Jul 2022 at 18:13:19 CEST, "Anton Ertl" <Anton Ertl> wrote:

    It's not necessary to have many source lines to replicate his findings
    and experience this limitation of VFX:

    Blah, blah, blah ...

    I have never doubted that the failure exists. What is the use case of 2 GB ALLOT and not using the space? We/I/MPE have made the assumption that all code
    is in one contiguous section. Show me a use case that breaks this. The only cases that make sense are transient code in ALLOCATEd memory and code in binary overlays. Only the first has been asked for by an MPE client - see Examples/transients.fth.

    Stephen

    P.S. Chuck has repeatedly warned us against coding for problem that don't exist until they may exist.

    I would also posit that a 2GB chunk of code is either something created dynamically for a special use (e.g. rainbow trees or the like), or (more likely) a poor implementation of something.

    In almost 40 years of coding, I've never written a program that needed
    2G of code space (or, for that matter, 100M). Data space on the other
    hand, well, that's another story.

    I would also be very skeptical that a program requiring 2G of code space
    was tested and stable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Ron AARON on Mon Aug 1 18:40:37 2022
    On 1/08/2022 17:45, Ron AARON wrote:

    I would also posit that a 2GB chunk of code is either something created dynamically for a special use (e.g. rainbow trees or the like), or (more likely) a poor implementation of something.

    In almost 40 years of coding, I've never written a program that needed
    2G of code space (or, for that matter, 100M). Data space on the other
    hand, well, that's another story.

    I would also be very skeptical that a program requiring 2G of code space
    was tested and stable.

    Do we know what 64-bit compilers in other domains are providing? When competing for users, personal experience and needs isn't necessarily the deciding factor. E.g. when Forth Inc implemented 200x character literals
    they said they didn't agree with it. Satisfying customer expectations is
    what clinched it - as misguided as those expectations may have been.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Stephen Pelc on Mon Aug 1 07:33:50 2022
    Stephen Pelc <stephen@vfxforth.com> writes:
    Blah, blah, blah ...

    Very mature.

    What is the use case of 2 GB
    ALLOT and not using the space?

    That's a minimal example, not a use case.

    We/I/MPE have made the assumption that all code
    is in one contiguous section.

    If your assumption is that there are no sequences like:

    : ... ;

    ... allot
    \ or
    ... , ... ,

    : ... ;

    in Forth code, that assumption is wrong for many Forth programs. I
    certainly don't write Forth code satisfying your constraint.

    And actually, even if the source code satisfies your constraint, the
    same problem can happen:

    [c8b:~:83465] /tmp/vfx3G
    VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64
    © MicroProcessor Engineering Ltd, 1998-2021

    create foo 5 , 2 1024 * 1024 * 1024 * allot ok
    : bar foo @ . ; ok
    bar
    ... register and stack dump ...
    Signal number SIGSEGV
    at address 0000:0000:804E:3EA8, probably in BAR

    Press E to exit, R to restart, other to continue:

    Err# -57005 ERR: Linux Exception
    bar
    ^

    Show me a use case that breaks this.

    Pretty much all code I know of breaks your assumption. I don't know
    of a usage case that put more the 2GB in the dictionary, with a colon definition at the end, though.

    Ramanujan's taxi
    <http://www.complang.tuwien.ac.at/forth/programs/taxi.fs> will take a
    lot of dictionary memory, depending on the parameters; e.g., for the
    taxi numbers up to 9000 development Gforth takes 2.7GB. But:

    1) The numbers are all created words, with no colon definition
    following after, so VFX64 may be able to handle this use case. But of
    course the user might define a colon definition later, for whatever
    reason.

    2) VFX's hashing is not designed for millions of wordlist entries, and therefore taxi is so slow on VFX that I have no patience to wait for
    it to finish computing taxi numbers up to 9000 to check 1. I guess
    that will save VFX from being used for large taxi numbers by other
    users, too.

    The only
    cases that make sense are transient code in ALLOCATEd memory and code in >binary overlays.

    It makes a lot of sense to put permanently used data in the dictionary
    and then save the system, so you don't have to construct it again.
    Forth programmers do it all the time. Doing it with more than 2GB of
    data is still almost non-existent, but I expect that data memory usage
    grows even in Forth as computers grow.

    P.S. Chuck has repeatedly warned us against coding for problem that don't >exist until they may exist.

    Mixing code and data has resulted in slowdowns in VFX already many
    years ago, and instead of eliminating it, you tried workarounds for
    that with mixed success (but you are not alone in that). Now you are
    pointed to another problem resulting from this mixing, but you claim
    it does not exist.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to Anton Ertl on Mon Aug 1 10:36:08 2022
    On Sun, 31 Jul 2022 16:13:19 GMT
    anton@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
    []

    Inside Gorth you can display the sections as follows:

    Like it! An easily identifiable search term! Let all forths be so renamed!
    []

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Mon Aug 1 12:02:39 2022
    In article <2022Aug1.093350@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Stephen Pelc <stephen@vfxforth.com> writes:
    Blah, blah, blah ...

    Very mature.

    What is the use case of 2 GB
    ALLOT and not using the space?

    That's a minimal example, not a use case.

    We/I/MPE have made the assumption that all code
    is in one contiguous section.

    If your assumption is that there are no sequences like:

    : ... ;

    ... allot
    \ or
    ... , ... ,

    : ... ;

    in Forth code, that assumption is wrong for many Forth programs. I
    certainly don't write Forth code satisfying your constraint.

    I have a lot of project euler examples, and it is just not practical
    to have enormous space allotted, and then go on compiling.
    So I adopt a strategy
    - in experimental stage / test stage : small buffer
    - in production I re-allot buffers in run time mostly running a
    compiled program typically using (if must be) a 8 Gbyte space.

    You must understand that MPE make her customisers happy, not
    cater for academic objections.

    Mixing code and data has resulted in slowdowns in VFX already many
    years ago, and instead of eliminating it, you tried workarounds for
    that with mixed success (but you are not alone in that). Now you are
    pointed to another problem resulting from this mixing, but you claim
    it does not exist.

    Which other systems do work arounds? The only systems that comes to mind
    are kforth and iforth. Others seem to be not involved in humongous
    system.


    - anton

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to albert on Mon Aug 1 20:37:08 2022
    On 1/08/2022 20:02, albert wrote:
    In article <2022Aug1.093350@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    ...
    in Forth code, that assumption is wrong for many Forth programs. I >>certainly don't write Forth code satisfying your constraint.

    I have a lot of project euler examples, and it is just not practical
    to have enormous space allotted, and then go on compiling.
    So I adopt a strategy
    - in experimental stage / test stage : small buffer
    - in production I re-allot buffers in run time mostly running a
    compiled program typically using (if must be) a 8 Gbyte space.

    You must understand that MPE make her customisers happy, not
    cater for academic objections.

    Customers - existing customers who bought a 32-bit product? This is a
    64-bit product presumably aimed at customers with 64-bit applications
    in mind. Will they be happy is the question vendors will be pondering.
    I'm happy with 16-bits :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to dxforth on Mon Aug 1 14:51:25 2022
    On 01/08/2022 11:40, dxforth wrote:
    On 1/08/2022 17:45, Ron AARON wrote:

    I would also posit that a 2GB chunk of code is either something created
    dynamically for a special use (e.g. rainbow trees or the like), or (more
    likely) a poor implementation of something.

    In almost 40 years of coding, I've never written a program that needed
    2G of code space (or, for that matter, 100M). Data space on the other
    hand, well, that's another story.

    I would also be very skeptical that a program requiring 2G of code space
    was tested and stable.

    Do we know what 64-bit compilers in other domains are providing? When competing for users, personal experience and needs isn't necessarily the deciding factor. E.g. when Forth Inc implemented 200x character literals they said they didn't agree with it. Satisfying customer expectations is what clinched it - as misguided as those expectations may have been.

    I guess a good question would be what are the limits of gcc 64-bit (say,
    Intel) versions? I never tried to compile such an enormous program, and
    from my experience I think it would probably take a very long time, and
    then give up.

    But that's just talk; I never tried it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@cherry. on Mon Aug 1 10:26:49 2022
    albert@cherry.(none) (albert) writes:
    I have a lot of project euler examples, and it is just not practical
    to have enormous space allotted, and then go on compiling.

    Why not? Works just fine in Gforth, you just need to tell it what
    dictionary size you want.

    So I adopt a strategy
    - in experimental stage / test stage : small buffer
    - in production I re-allot buffers in run time mostly running a
    compiled program typically using (if must be) a 8 Gbyte space.

    Sounds to me like you have the use cases that Stephen Pelc asks for,
    not just one, but several. But you then change it to work around a
    limitation of the Forth system you are using (ciforth?).

    You must understand that MPE make her customisers happy, not
    cater for academic objections.

    If you have encountered this limitation several times, do you think
    that commercial customers will not run into it at some time? MPE can
    choose to wait until the customers are unhappy, and act then, or be
    more proactive. The perverse thing is that the former approach may be perceived by the customers as a better service than the latter. As
    Stephen Pelc likes to write: You get what you pay for.

    Mixing code and data has resulted in slowdowns in VFX already many
    years ago, and instead of eliminating it, you tried workarounds for
    that with mixed success (but you are not alone in that). Now you are >>pointed to another problem resulting from this mixing, but you claim
    it does not exist.

    Which other systems do work arounds?

    The typical workaround is to use padding between code and data so they
    are not in the same cache line. This seems to be pretty common. Let's see how

    The only systems that comes to mind
    are kforth and iforth. Others seem to be not involved in humongous
    system.

    Small systems are affected by slowdowns from code/data mixing as much
    as large or homungous systems are. Let's see how things turn out in
    various systems:

    hex
    here here $-40 and constant x \ the start of the cache line of here at the start
    cr x - . .( offset of here at the start from the start of its cache line )
    cr here x - . .( after defining x )
    : x. [ cr here x - . .( start of x. ) ] cr here x - . type
    [ cr here x - . .( end of x. ) ] ; s" after x." x.
    create y s" start of y" x. 1 , s" end of y" x.
    create z s" start of z" x. 2 , s" end of z" x.
    : foo [ s" start of foo" x. ] 1 . [ s" end of foo" x. ] ; s" after foo" x.
    : bar [ s" start of bar" x. ] 1 . [ s" end of bar" x. ] ; s" after bar" x.
    cr x here x - dump
    cr

    The results are:

    g07 g10 if lxf sf v64
    10 0 0 38 8 0 here at the start - start of its cache line
    40 30 70 38 28 38 after defining x
    68 58 8A 38 3F 70 start of x.
    C0 B8 D7 38 59 9C end of x.
    C8 C0 D8 38 59 9D after x.
    F0 E8 4F0 38 74 D0 start of y
    F8 F0 4F8 3C 78 D8 end of y
    120 118 510 3C 94 110 start of z
    128 120 518 40 98 118 end of z
    150 148 94A 40 CF 150 start of foo
    170 168 95D 40 DF 162 end of foo
    178 170 960 40 DF 163 after foo
    1A0 198 98A 40 EF 1A0 start of bar
    1C0 1B8 99D 40 FF 1B2 end of bar
    1C8 1C0 9A0 40 FF 1B3 after bar

    g07, g10: Gforth (0.7, and development version); 64-bit cells, don't
    align code or data to cache-line boundaries; uses something like
    threaded code in the dictionary, native code is elsewhere.

    if: iForth puts a lot of padding between stretches of code and
    stretches of data, every time it switches.

    lxf: lfx only puts the "," data in this code in the dictionary,
    headers and code are obviously elsewhere.

    sf: SwiftForth apparently does not pad to cache-line boundaries
    between x and x (but then x is a constant), does not do such padding
    between x. and y, but seems to do cache-line padding between z and
    foo.

    v64: VFX64 seems to pad a lot between all words, enough to put them in different cache lines.

    I notice that even systems that mix data and native code (iForth,
    SwiftForth, VFX) don't pad between the end of a colon definition and
    the invocation of HERE. This means that we may see performance
    problems for code patterns like:

    : ... ;
    here ... \ allocate some data with , or ALLOT
    constant ...

    Let's measure it:

    hex
    : foo #100000000 2dup swap ! 2dup swap cell+ ! 0 do fdup dup f! loop [ here cr . ] ;
    cr here .
    falign here 3 floats allot constant x
    cr x . decimal
    3e x foo drop fdrop

    I had to make sure that the alignment of iForth does not interfere, so
    I inserted some gratuitious code before the loop; for VFX64 5.11 RC2
    [build 0112] I had to then insert a 48 allot before loading the code
    above.

    Results (on a Ryzen 5800X)

    cycles
    932_020_442 gforth-fast development
    13_886_103_537 iforth
    622_600_649 lxf
    8_809_460_083 VFX64

    The penalty used to be higher on earlier CPUs, but it's still
    significant.

    Someone might say that this is a contrived use case. It is not. You
    might think that instead of

    falign here 3 floats allot constant x

    one would write

    create x 3 floats allot

    but in the standard CREATE produces data fields that are not
    guaranteed to be FALIGNed, so the latter is non-standard code, and the
    former is a workaround for this shortcoming of the standard.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Ron AARON on Mon Aug 1 12:57:30 2022
    Ron AARON <clf@8th-dev.com> writes:
    On 01/08/2022 11:40, dxforth wrote:
    Do we know what 64-bit compilers in other domains are providing? When
    competing for users, personal experience and needs isn't necessarily the
    deciding factor. E.g. when Forth Inc implemented 200x character literals
    they said they didn't agree with it. Satisfying customer expectations is
    what clinched it - as misguided as those expectations may have been.

    I guess a good question would be what are the limits of gcc 64-bit (say, >Intel) versions? I never tried to compile such an enormous program, and
    from my experience I think it would probably take a very long time, and
    then give up.

    But that's just talk; I never tried it.

    Ok, I tried a C version of the Forth program that VFX5.11 crashed on:

    The Forth program:

    : foo ." foo" ;
    2 1024 * 1024 * 1024 * allot
    : bar foo ;
    bar

    [c8b:/tmp:83565] cat xxx.c
    #include <stdio.h>

    void foo() {
    printf("foo");
    }

    char x[2L*1024*1024*1024];

    int main() {
    foo();
    return 0;
    }

    [c8b:/tmp:83566] time gcc -O xxx.c

    real 0m0.032s
    user 0m0.019s
    sys 0m0.013s
    [c8b:/tmp:83567] ls -l a.out
    -rwxr-xr-x 1 anton 29015 16656 Aug 1 15:04 a.out*
    [c8b:/tmp:83568] size a.out
    text data bss dec hex filename
    1507 584 2147483680 2147485771 8000084b a.out [c8b:/tmp:83569] ./a.out
    foo[c8b:/tmp:83570]
    [c8b:/tmp:83570] objdump -d a.out
    ...
    0000000000001135 <foo>:
    1135: 48 83 ec 08 sub $0x8,%rsp
    1139: 48 8d 3d c4 0e 00 00 lea 0xec4(%rip),%rdi # 2004 <_IO_stdin_used+0x4>
    1140: b8 00 00 00 00 mov $0x0,%eax
    1145: e8 e6 fe ff ff callq 1030 <printf@plt>
    114a: 48 83 c4 08 add $0x8,%rsp
    114e: c3 retq

    000000000000114f <main>:
    114f: 48 83 ec 08 sub $0x8,%rsp
    1153: b8 00 00 00 00 mov $0x0,%eax
    1158: e8 d8 ff ff ff callq 1135 <foo>
    115d: b8 00 00 00 00 mov $0x0,%eax
    1162: 48 83 c4 08 add $0x8,%rsp
    1166: c3 retq
    1167: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
    116e: 00 00

    Somehow gcc has no problem with source code that interleaves code and
    big data. It does not even take long in this case.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Mon Aug 1 15:23:33 2022
    In article <2022Aug1.122649@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@cherry.(none) (albert) writes:
    I have a lot of project euler examples, and it is just not practical
    to have enormous space allotted, and then go on compiling.

    Why not? Works just fine in Gforth, you just need to tell it what
    dictionary size you want.

    <SNIP>
    Small systems are affected by slowdowns from code/data mixing as much
    as large or homungous systems are. Let's see how things turn out in
    various systems:

    I can assemble a version of ciforth where all code is collated in a
    small space. With a indirect threading Forth the rest is data.
    Would that worth while to try, even only as an experiment?
    <SNIP>
    Results (on a Ryzen 5800X)

    cycles
    932_020_442 gforth-fast development
    13_886_103_537 iforth
    622_600_649 lxf
    8_809_460_083 VFX64

    The penalty used to be higher on earlier CPUs, but it's still
    significant.

    I understand lower is better. Does that mean in this benchmark
    iforth is an order of magnitude slower that gforth-fast?
    Unbelievable!

    <SNIP>

    - anton
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to Anton Ertl on Mon Aug 1 17:30:52 2022
    On 01/08/2022 15:57, Anton Ertl wrote:
    Ron AARON <clf@8th-dev.com> writes:
    On 01/08/2022 11:40, dxforth wrote:
    Do we know what 64-bit compilers in other domains are providing? When
    competing for users, personal experience and needs isn't necessarily the >>> deciding factor. E.g. when Forth Inc implemented 200x character literals >>> they said they didn't agree with it. Satisfying customer expectations is >>> what clinched it - as misguided as those expectations may have been.

    I guess a good question would be what are the limits of gcc 64-bit (say,
    Intel) versions? I never tried to compile such an enormous program, and >>from my experience I think it would probably take a very long time, and
    then give up.

    But that's just talk; I never tried it.

    Ok, I tried a C version of the Forth program that VFX5.11 crashed on:

    The Forth program:

    : foo ." foo" ;
    2 1024 * 1024 * 1024 * allot
    : bar foo ;
    bar

    [c8b:/tmp:83565] cat xxx.c
    #include <stdio.h>

    void foo() {
    printf("foo");
    }

    char x[2L*1024*1024*1024];

    int main() {
    foo();
    return 0;
    }

    [c8b:/tmp:83566] time gcc -O xxx.c

    real 0m0.032s
    user 0m0.019s
    sys 0m0.013s
    [c8b:/tmp:83567] ls -l a.out
    -rwxr-xr-x 1 anton 29015 16656 Aug 1 15:04 a.out*
    [c8b:/tmp:83568] size a.out
    text data bss dec hex filename
    1507 584 2147483680 2147485771 8000084b a.out [c8b:/tmp:83569] ./a.out
    foo[c8b:/tmp:83570]
    [c8b:/tmp:83570] objdump -d a.out
    ...
    0000000000001135 <foo>:
    1135: 48 83 ec 08 sub $0x8,%rsp
    1139: 48 8d 3d c4 0e 00 00 lea 0xec4(%rip),%rdi # 2004 <_IO_stdin_used+0x4>
    1140: b8 00 00 00 00 mov $0x0,%eax
    1145: e8 e6 fe ff ff callq 1030 <printf@plt>
    114a: 48 83 c4 08 add $0x8,%rsp
    114e: c3 retq

    000000000000114f <main>:
    114f: 48 83 ec 08 sub $0x8,%rsp
    1153: b8 00 00 00 00 mov $0x0,%eax
    1158: e8 d8 ff ff ff callq 1135 <foo>
    115d: b8 00 00 00 00 mov $0x0,%eax
    1162: 48 83 c4 08 add $0x8,%rsp
    1166: c3 retq
    1167: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1)
    116e: 00 00

    Somehow gcc has no problem with source code that interleaves code and
    big data. It does not even take long in this case.

    - anton

    Mmmm. Well, in that case the variable 'x' is in the BSS section, so it
    takes no space in the executable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@cherry. on Mon Aug 1 15:29:54 2022
    albert@cherry.(none) (albert) writes:
    In article <2022Aug1.122649@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Small systems are affected by slowdowns from code/data mixing as much
    as large or homungous systems are. Let's see how things turn out in >>various systems:

    I can assemble a version of ciforth where all code is collated in a
    small space. With a indirect threading Forth the rest is data.
    Would that worth while to try, even only as an experiment?

    I expect similar results as for gforth-itc, which I insert below.

    If you currently have the primitives interspersed with data that is
    written frequently, you may suffer slowdowns (and for the Pentium and
    K6, even for data that is read or written frequently). It will not be
    for the code that I used for the native-code systems, but serious
    slowdowns have occured due to this problem in native-code systems;
    e.g. bigForth is slower than gforth-0.7 by a factor of 5 due to this
    problem. And if your system has this problem, I would not be
    surprised if there is a workload where it actually consumes a
    significant amount of time.

    <SNIP>
    Results (on a Ryzen 5800X)

    cycles
    932_020_442 gforth-fast development
    1_010_111_863 gforth-itc development
    13_886_103_537 iforth
    622_600_649 lxf
    8_809_460_083 VFX64

    The penalty used to be higher on earlier CPUs, but it's still
    significant.

    I understand lower is better. Does that mean in this benchmark
    iforth is an order of magnitude slower that gforth-fast?

    For this particular workload on a Ryzen 5800X. Let's see how it is on
    a Skylake:

    cycles
    960_117_265 gforth-fast development
    1_179_253_079 gforth-itc development
    36_382_128_951 iForth
    702_392_164 lxf

    Unbelievable!

    It's just a microbenchmark that points to an Achilles heal of iForth.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to Anton Ertl on Mon Aug 1 11:54:08 2022
    On Monday, August 1, 2022 at 2:45:23 PM UTC+2, Anton Ertl wrote:
    [..]
    Which other systems do work arounds?
    The typical workaround is to use padding between code and data so they
    are not in the same cache line. This seems to be pretty common. Let's see how >The only systems that comes to mind
    are kforth and iforth. Others seem to be not involved in humongous
    system.
    Small systems are affected by slowdowns from code/data mixing as much
    as large or homungous systems are. Let's see how things turn out in
    various systems:
    [..]
    I notice that even systems that mix data and native code (iForth,
    SwiftForth, VFX) don't pad between the end of a colon definition and
    the invocation of HERE. This means that we may see performance
    problems for code patterns like:
    [..]
    I had to make sure that the alignment of iForth does not interfere, so
    I inserted some gratuitious code before the loop; for VFX64 5.11 RC2
    [build 0112] I had to then insert a 48 allot before loading the code
    above.

    Results (on a Ryzen 5800X)

    Same here.

    cycles
    932_020_442 gforth-fast development
    13_886_103_537 iforth
    622_600_649 lxf
    8_809_460_083 VFX64

    The penalty used to be higher on earlier CPUs, but it's still
    significant.

    Slightly modified (I wanted ticks, and check F! vs DF!), maybe that is significant?

    hex
    : foo1
    ticks-reset cr ." foo1 takes " [ticks
    #100000000 2dup swap ! 2dup swap cell+ ! 0 do fdup dup f! loop [ here cr . ] ticks]
    ticks? (n,3) ." ticks" ;

    : foo2
    ticks-reset cr ." foo2 takes " [ticks
    #100000000 2dup swap ! 2dup swap cell+ ! 0 do fdup dup f! loop [ here cr . ] ticks]
    ticks? (n,3) ." ticks" ;

    FORTH> in
    13407D1
    1340941
    13409E0
    13409E0
    foo1 takes 485,739,712 ticks
    foo2 takes 485,579,048 ticks ok
    13_886_103_537 ????

    FORTH> .signon

    iForth version 6.9.109, generated 18:39:31, September 27, 2021.
    x86_64 binary, native floating-point, extended precision.
    Copyright 1996 - 2021 Marcel Hendrix.
    ok
    FORTH> .ticker-info
    AMD Ryzen 7 5800X 8-Core Processor, TICKS-GET uses iTSC at 4192MHz

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Paul Rubin on Mon Aug 1 11:51:32 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    there are only 9000*9000/2 numbers to consider, which is about 4e7...
    So you would need a bit vector of about 5MB, not anything like 2.7GB.

    No wait, that won't work. Need more coffee. Sorry. It still seems
    like enough to make a list of the 4e7 sums, sort it, and check for
    duplicates. So you need 64 bits per sum instead of 1 bit, i.e. around
    300MB. I hope I have it right this time. Maybe I will code it and see.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Mon Aug 1 11:37:59 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Ramanujan's taxi
    <http://www.complang.tuwien.ac.at/forth/programs/taxi.fs> will take a
    lot of dictionary memory, depending on the parameters; e.g., for the
    taxi numbers up to 9000 development Gforth takes 2.7GB....

    I've gotta say this trick of using a text interpreter wordlist as a
    general purpose lookup structure still makes me cringe. It would be
    nice to have a hash table library that you could ALLOCATE space for.

    In this particular case, if I understand the algorithm, there are only 9000*9000/2 numbers to consider, which is about 4e7. For each pair
    (i,j) you would compute s=i**3+j**3 and check whether you had already
    seen another pair with that sum. So you would need a bit vector of
    about 5MB, not anything like 2.7GB. Whenever you find a match, you
    would check that s for ways of expressing it as the sum of two cubes,
    which can be done quickly enough in various straightforward ways.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to Paul Rubin on Mon Aug 1 11:58:20 2022
    Paul Rubin schrieb am Montag, 1. August 2022 um 20:51:34 UTC+2:
    Paul Rubin <no.e...@nospam.invalid> writes:
    there are only 9000*9000/2 numbers to consider, which is about 4e7...
    So you would need a bit vector of about 5MB, not anything like 2.7GB.
    No wait, that won't work. Need more coffee. Sorry. It still seems
    like enough to make a list of the 4e7 sums, sort it, and check for duplicates. So you need 64 bits per sum instead of 1 bit, i.e. around
    300MB. I hope I have it right this time. Maybe I will code it and see.

    Be aware that taxi.fs is mainly for testing execute-parsing that
    sets up its own temporary wordlists internally. It seems rather inefficient
    to me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to minf...@arcor.de on Mon Aug 1 12:23:27 2022
    "minf...@arcor.de" <minforth@arcor.de> writes:
    Be aware that taxi.fs is mainly for testing execute-parsing that sets
    up its own temporary wordlists internally. It seems rather inefficient
    to me.

    I see, that is reasonable for the purpose then. I coded a
    straightforward C++ version of the method I mentioned, using std::vector
    and std::sort. It is also inefficient, I guess. The sorting step took
    around 20 seconds on my laptop. I'm sure optimizations are possible. I
    found a total of 35969 re-occurrences of sums. I didn't check for
    triples, quadruples, etc. I'm sure optimizations are possible.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to minf...@arcor.de on Mon Aug 1 20:45:39 2022
    "minf...@arcor.de" <minforth@arcor.de> writes:
    Be aware that taxi.fs is mainly for testing execute-parsing that
    sets up its own temporary wordlists internally. It seems rather inefficient >to me.

    EXECUTE-PARSING can be implemented in a system-specific way without
    changing the search order, or as a standard program, but that needs to
    change the search order, as well as other overheads.

    taxi.fs is for solving Ramanujan's taxi problem, not for testing EXECUTE-PARSING. Unfortunately, standard Forth allows supplying the
    name of a defined word only through the input stream, which means that
    a mechanism to convert a string on the stack to the input stream is
    needed; EXECUTE-PARSING is that mechanism. It's certainly not as
    efficient as passing c-addr u on the data stack, but if somebody makes
    the mistake of creating a parsing word (such as Forth defining words),
    the greater efficiency of direct passing on the stack is not
    available.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Marcel Hendrix on Mon Aug 1 20:34:00 2022
    Marcel Hendrix <mhx@iae.nl> writes:
    On Monday, August 1, 2022 at 2:45:23 PM UTC+2, Anton Ertl wrote:
    I notice that even systems that mix data and native code (iForth,
    SwiftForth, VFX) don't pad between the end of a colon definition and
    the invocation of HERE. This means that we may see performance
    problems for code patterns like:
    [..]
    I had to make sure that the alignment of iForth does not interfere, so
    I inserted some gratuitious code before the loop; for VFX64 5.11 RC2
    [build 0112] I had to then insert a 48 allot before loading the code
    above.

    Results (on a Ryzen 5800X)

    Same here.

    cycles
    932_020_442 gforth-fast development
    13_886_103_537 iforth
    622_600_649 lxf
    8_809_460_083 VFX64

    The penalty used to be higher on earlier CPUs, but it's still
    significant.

    Slightly modified (I wanted ticks, and check F! vs DF!), maybe that is significant?

    hex
    : foo1
    ticks-reset cr ." foo1 takes " [ticks
    #100000000 2dup swap ! 2dup swap cell+ ! 0 do fdup dup f! loop [ here cr . ] ticks]
    ticks? (n,3) ." ticks" ;

    : foo2
    ticks-reset cr ." foo2 takes " [ticks
    #100000000 2dup swap ! 2dup swap cell+ ! 0 do fdup dup f! loop [ here cr . ] ticks]
    ticks? (n,3) ." ticks" ;

    FORTH> in
    13407D1
    1340941
    13409E0
    13409E0
    foo1 takes 485,739,712 ticks
    foo2 takes 485,579,048 ticks ok
    13_886_103_537 ????

    You don't show the data and the call here, which is highly relevant.
    The end of the loop and the data have to be in the same cache line to demonstrate the problem. Here you put 'ticks] ticks? (n,3) ." ticks"'
    after the loop, and some other stuff before, which changes the
    alignment. Try it with my original code and put the measurement code
    around the call to foo. And if details in your compiler have changed,
    the code may need changing in order to demonstrate the problem.

    Of course, the good thing is that the problem will rarely occur in the
    wild; but OTOH, you might do some seemingly innocuous change, and see a significant slowdown, if you are unlucky.

    The version I am using is:

    iForth version 5.0.27, generated 18:00:58, March 22, 2017.
    x86_64 binary, native floating-point, extended precision.
    Copyright 1996 - 2017 Marcel Hendrix.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Ron AARON on Mon Aug 1 23:35:50 2022
    Ron AARON <clf@8th-dev.com> wrote:
    On 01/08/2022 11:40, dxforth wrote:
    On 1/08/2022 17:45, Ron AARON wrote:

    I would also posit that a 2GB chunk of code is either something created
    dynamically for a special use (e.g. rainbow trees or the like), or (more >> likely) a poor implementation of something.

    In almost 40 years of coding, I've never written a program that needed
    2G of code space (or, for that matter, 100M). Data space on the other
    hand, well, that's another story.

    I would also be very skeptical that a program requiring 2G of code space >> was tested and stable.

    Do we know what 64-bit compilers in other domains are providing? When competing for users, personal experience and needs isn't necessarily the deciding factor. E.g. when Forth Inc implemented 200x character literals they said they didn't agree with it. Satisfying customer expectations is what clinched it - as misguided as those expectations may have been.

    I guess a good question would be what are the limits of gcc 64-bit (say, Intel) versions? I never tried to compile such an enormous program, and
    from my experience I think it would probably take a very long time, and
    then give up.

    AFAIK single part of program is limited to 2G. If you are lucky
    (like in Anton example) up to 4G may work. This is due to signed
    32-bit offsets. IIUC gcc itself does not do anything very smart,
    simply marks sections as code, initialized data (writeable),
    read-only data and zero initalized data. On Linux assemble+linker
    puts data after code.

    If you need bigger program you are supposed to split it into
    parts: main program is a part but every shared library counts
    as separate part. So you may have 1000 shared libraries each
    say 1G of code for total 1000G. If you need single piece of
    data that is bigger than 2G you are supposed to dynamically
    allocate it, say using malloc. To initalize such data you
    need extra code (which in same languages may be generated
    by compiler).

    More generally, as long as single function stays below 2G
    (with resonable margin) linker could insert intermedate
    jumps (similar to what is used to implement shared libraries)
    to allow calls to arbitrary locations. To allow big static
    data is more tricky: such data must be addressed by pointers.
    gcc folks wrote that uniformly accessing all data via
    pointers causes about 7% slowdown, which was deemed to
    high cost compared to benefits.

    OTOH most dynamic languages that generate native code
    seem to use general model: main cost is due to data
    and it is hard to avoid. And some costs are due
    to language features and would appear anyway.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to antispam@math.uni.wroc.pl on Tue Aug 2 07:00:19 2022
    On 02/08/2022 2:35, antispam@math.uni.wroc.pl wrote:
    Ron AARON <clf@8th-dev.com> wrote:
    On 01/08/2022 11:40, dxforth wrote:
    On 1/08/2022 17:45, Ron AARON wrote:

    I would also posit that a 2GB chunk of code is either something created >>>> dynamically for a special use (e.g. rainbow trees or the like), or (more >>>> likely) a poor implementation of something.

    In almost 40 years of coding, I've never written a program that needed >>>> 2G of code space (or, for that matter, 100M). Data space on the other
    hand, well, that's another story.

    I would also be very skeptical that a program requiring 2G of code space >>>> was tested and stable.

    Do we know what 64-bit compilers in other domains are providing? When
    competing for users, personal experience and needs isn't necessarily the >>> deciding factor. E.g. when Forth Inc implemented 200x character literals >>> they said they didn't agree with it. Satisfying customer expectations is >>> what clinched it - as misguided as those expectations may have been.

    I guess a good question would be what are the limits of gcc 64-bit (say,
    Intel) versions? I never tried to compile such an enormous program, and
    from my experience I think it would probably take a very long time, and
    then give up.

    AFAIK single part of program is limited to 2G. If you are lucky
    (like in Anton example) up to 4G may work. This is due to signed
    32-bit offsets. IIUC gcc itself does not do anything very smart,
    simply marks sections as code, initialized data (writeable),
    read-only data and zero initalized data. On Linux assemble+linker
    puts data after code.

    Yes, exactly. In particular, in the example Anton posted directly after
    my posting this question, the "huge" array was simply a pointer to BSS,
    which is just allocated by the OS upon loading the executable (subject
    to system memory constraints, of course).

    My question was directed at the TEXT segment size, e.g. how much
    functional code can be stuffed into an executable. I think the answer
    is: "that depends".

    I think you're correct that a 2G limitation on individual code segments
    is in place, though the linker can stitch together any number of such
    segments. At run-time, only the "live" parts of the code will be mmap-ed
    so unless the programmer created a function 2G in size (!) that probably wouldn't be itself an issue on most modern systems.

    If you need bigger program you are supposed to split it into
    parts: main program is a part but every shared library counts
    as separate part. So you may have 1000 shared libraries each
    say 1G of code for total 1000G. If you need single piece of
    data that is bigger than 2G you are supposed to dynamically
    allocate it, say using malloc. To initalize such data you
    need extra code (which in same languages may be generated
    by compiler).

    You could probably have multiple 2G chunks of code linked together
    statically, though you would also probably be waiting a while for the
    link to complete.

    For data, it's less interesting. The most reasonable thing is, of
    course, to put huge data chunks external to the program and load them at
    need; but if you had to, you could probably include massive data chunks
    (each less than 2G) and "manually" stitch them together (e.g. an array
    of pointers to each chunk, or similar).

    More generally, as long as single function stays below 2G
    (with resonable margin) linker could insert intermedate
    jumps (similar to what is used to implement shared libraries)
    to allow calls to arbitrary locations. To allow big static
    data is more tricky: such data must be addressed by pointers.
    gcc folks wrote that uniformly accessing all data via
    pointers causes about 7% slowdown, which was deemed to
    high cost compared to benefits.

    Right, which is why loading huge data externally, via mmap or the
    equivalent is what makes sense. Let the OS do the heavy lifting and
    access the huge data like a big array of bytes (etc).

    OTOH most dynamic languages that generate native code
    seem to use general model: main cost is due to data
    and it is hard to avoid. And some costs are due
    to language features and would appear anyway.

    True enough.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to Anton Ertl on Mon Aug 1 23:14:29 2022
    On Monday, August 1, 2022 at 10:45:08 PM UTC+2, Anton Ertl wrote:
    Marcel Hendrix <m...@iae.nl> writes:
    On Monday, August 1, 2022 at 2:45:23 PM UTC+2, Anton Ertl wrote:
    [..]
    The end of the loop and the data have to be in the same cache line to demonstrate the problem.
    [..]

    Thanks! I was missing this explanation of what you were trying to accomplish.

    Of course, the good thing is that the problem will rarely occur in the
    wild; but OTOH, you might do some seemingly innocuous change, and see a significant slowdown, if you are unlucky.
    [..]
    Indeed, that is why I attempted to duplicate your test.

    I assume the possibility to comma data straight after code is deliberate,
    given the conventional use of DOES> . There is not much I can do for now,
    apart from an extra ";" action.

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Marcel Hendrix on Tue Aug 2 07:54:04 2022
    Marcel Hendrix <mhx@iae.nl> writes:
    I assume the possibility to comma data straight after code is deliberate, >given the conventional use of DOES> .

    The conventional use of DOES> is to comma after a CREATE; iForth
    covers that already.

    There are several reasons why one would comma or allot data
    without a preceding CREATE:

    * As mentioned, one reason is that you want to allocate FP data, and
    need FALIGNed memory, which CREATE does not give you.

    * Or you don't need a CREATE, because you store the address of the
    piece of memory in some other place.

    There is not much I can do for now,
    apart from an extra ";" action.

    The simplest approach is to always align HERE to the next boundary (64
    bytes for post-Pentium 4 CPUs, 1024 bytes for the Pentium 4) at the
    ";".

    If you don't want to waste so much space (which could reduce cache utilization), one approach is to remember the HERE before (BHERE) and
    after (AHERE) that alignment. If you start a colon definition, and
    the HERE is the same as the HERE after the alignment, nothing was
    allocated and you can change the HERE to the one before the alignment
    before the colon definition starts.

    This approach is standard, but might confuse users: "Why does the
    colon definition after the HERE start at an address before that
    reported by the HERE?" You could avoid the confusion by updating
    BHERE to be the same as AHERE, when HERE is invoked.

    - 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Ron AARON on Tue Aug 2 08:51:05 2022
    Ron AARON <clf@8th-dev.com> writes:
    On 02/08/2022 2:35, antispam@math.uni.wroc.pl wrote:
    AFAIK single part of program is limited to 2G. If you are lucky
    (like in Anton example) up to 4G may work. This is due to signed
    32-bit offsets. IIUC gcc itself does not do anything very smart,
    simply marks sections as code, initialized data (writeable),
    read-only data and zero initalized data. On Linux assemble+linker
    puts data after code.

    Yes, exactly. In particular, in the example Anton posted directly after
    my posting this question, the "huge" array was simply a pointer to BSS,
    which is just allocated by the OS upon loading the executable (subject
    to system memory constraints, of course).

    That's the point. In the source code there is a C function, an array,
    and another C function, and gcc handles this just fine by putting the
    functions into the text segment, and the array in the bss segment. By contrast, VFX does not do this separation, and fails.

    If I increase the array to 5GB, gcc still compiles it just fine.
    However, if I initialize the array (so it goes into the data rather
    than the bss segment), I get a linker error:

    [c8b:/tmp:83579] time gcc -Wall -O xxx.c /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o: in function `deregister_tm_clones':
    crtstuff.c:(.text+0x3): relocation truncated to fit: R_X86_64_PC32 against `.tm_clone_table'
    crtstuff.c:(.text+0xa): relocation truncated to fit: R_X86_64_PC32 against symbol `__TMC_END__' defined in .data section in a.out
    /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o: in function `register_tm_clones': crtstuff.c:(.text+0x33): relocation truncated to fit: R_X86_64_PC32 against `.tm_clone_table'
    crtstuff.c:(.text+0x3a): relocation truncated to fit: R_X86_64_PC32 against symbol `__TMC_END__' defined in .data section in a.out
    /usr/lib/gcc/x86_64-linux-gnu/10/crtbeginS.o: in function `__do_global_dtors_aux':
    crtstuff.c:(.text+0x72): relocation truncated to fit: R_X86_64_PC32 against `.bss'
    crtstuff.c:(.text+0x9a): relocation truncated to fit: R_X86_64_PC32 against `.bss'
    collect2: error: ld returned 1 exit status

    real 0m1.958s
    user 0m0.230s
    sys 0m1.511s

    Interestingly, the compiler itself has no problem processing this
    source code and generating an object file for it:

    [c8b:/tmp:83581] cat xxx.c
    #include <stdio.h>

    extern char x[];

    void foo() {
    printf(x);
    }

    char x[5L*1024*1024*1024]="foo";

    int main() {
    foo();
    return 0;
    }

    [c8b:/tmp:83582] time gcc -c -Wall -O xxx.c

    real 0m2.822s
    user 0m0.492s
    sys 0m2.043s
    [c8b:/tmp:83583] size xxx.o
    text data bss dec hex filename
    122 5368709120 0 5368709242 14000007a xxx.o

    Maybe one can get the linker to behave with linker flags, but one can
    say that with initialized data, the C ecosystem does not do better
    than VFX (and worse than Gforth).

    My question was directed at the TEXT segment size, e.g. how much
    functional code can be stuffed into an executable. I think the answer
    is: "that depends".

    Given that they don't manage data segments beyond 2GB (at least by
    default), they probably don't manage text segments beyond 2GB,
    either. I doubt there is user demand for that; despite C++, code
    segments, and also the sum of r-x mappings (i.e., code summed across
    all shared objects) in single processes tends to be much smaller than
    2GB. I dimly remember summing up the sizes of all text segments in
    binaries and libraries in my Linux system, and getting less than 2GB.

    At run-time, only the "live" parts of the code will be mmap-ed

    What makes you think so? Why should anyone track liveness of code
    (whatever that is), and unmap regions that are dead? If there is a
    memory crunch, code that has been demand-paged in and has not been
    used in a while will be droped from main memory, to be demand-paged
    back in when it is needed; but it's mapped all the time.

    More generally, as long as single function stays below 2G
    (with resonable margin) linker could insert intermedate
    jumps (similar to what is used to implement shared libraries)
    to allow calls to arbitrary locations. To allow big static
    data is more tricky: such data must be addressed by pointers.
    gcc folks wrote that uniformly accessing all data via
    pointers causes about 7% slowdown, which was deemed to
    high cost compared to benefits.

    The alternative is what? Do you have a reference to this claim?

    Right, which is why loading huge data externally, via mmap or the
    equivalent is what makes sense. Let the OS do the heavy lifting and
    access the huge data like a big array of bytes (etc).

    If it's in a binary, it's also loaded by the loader with mmap(). The
    advantage is that you as programmer do not need to write the mmap()
    call. OTOH, you typically have such huge amounts of data as files and
    not as source code, so using mmap() may be less 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 2022: http://www.euroforth.org/ef22/cfp.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to Anton Ertl on Tue Aug 2 16:02:33 2022
    On 02/08/2022 11:51, Anton Ertl wrote:
    Ron AARON <clf@8th-dev.com> writes:
    On 02/08/2022 2:35, antispam@math.uni.wroc.pl wrote:
    AFAIK single part of program is limited to 2G. If you are lucky
    (like in Anton example) up to 4G may work. This is due to signed
    32-bit offsets. IIUC gcc itself does not do anything very smart,
    simply marks sections as code, initialized data (writeable),
    read-only data and zero initalized data. On Linux assemble+linker
    puts data after code.

    Yes, exactly. In particular, in the example Anton posted directly after
    my posting this question, the "huge" array was simply a pointer to BSS,
    which is just allocated by the OS upon loading the executable (subject
    to system memory constraints, of course).

    That's the point. In the source code there is a C function, an array,
    and another C function, and gcc handles this just fine by putting the functions into the text segment, and the array in the bss segment. By contrast, VFX does not do this separation, and fails.

    Ah, I didn't know that. Seems either a bug fix or an optimization should
    be done there, then.
    If I increase the array to 5GB, gcc still compiles it just fine.
    However, if I initialize the array (so it goes into the data rather
    than the bss segment), I get a linker error:

    Right. So as I somewhat expected. Well, never had the need for 5G of initialized data in my executables, and really have a hard time
    imagining why that could be a good idea.

    Maybe one can get the linker to behave with linker flags, but one can
    say that with initialized data, the C ecosystem does not do better
    than VFX (and worse than Gforth).

    Well, yes, perhaps some flags to ld would be useful, though I wouldn't
    really count on it.


    My question was directed at the TEXT segment size, e.g. how much
    functional code can be stuffed into an executable. I think the answer
    is: "that depends".

    Given that they don't manage data segments beyond 2GB (at least by
    default), they probably don't manage text segments beyond 2GB,
    either. I doubt there is user demand for that; despite C++, code
    segments, and also the sum of r-x mappings (i.e., code summed across
    all shared objects) in single processes tends to be much smaller than
    2GB. I dimly remember summing up the sizes of all text segments in
    binaries and libraries in my Linux system, and getting less than 2GB.

    At run-time, only the "live" parts of the code will be mmap-ed

    What makes you think so? Why should anyone track liveness of code
    (whatever that is), and unmap regions that are dead?

    My understanding is that bits get mapped in as needed. I mean, yes,
    perhaps the entire EXE is mmaped but that means only the 'live' part --
    e.g. that which is being read (or has been read) gets mapped onto
    physical memory. So you can mmap something bigger than physical memory
    and still access it (not all at once, though). At least, that's what I
    recall from when I was messing w/ mmap().

    If there is a
    memory crunch, code that has been demand-paged in and has not been
    used in a while will be droped from main memory, to be demand-paged
    back in when it is needed; but it's mapped all the time.

    I think we're saying the same thing.


    More generally, as long as single function stays below 2G
    (with resonable margin) linker could insert intermedate
    jumps (similar to what is used to implement shared libraries)
    to allow calls to arbitrary locations. To allow big static
    data is more tricky: such data must be addressed by pointers.
    gcc folks wrote that uniformly accessing all data via
    pointers causes about 7% slowdown, which was deemed to
    high cost compared to benefits.

    The alternative is what? Do you have a reference to this claim?

    Right, which is why loading huge data externally, via mmap or the
    equivalent is what makes sense. Let the OS do the heavy lifting and
    access the huge data like a big array of bytes (etc).

    If it's in a binary, it's also loaded by the loader with mmap(). The advantage is that you as programmer do not need to write the mmap()
    call. OTOH, you typically have such huge amounts of data as files and
    not as source code, so using mmap() may be less work.

    And it will not have any effect on the link stage, which could fail as
    you noticed.


    - anton

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to albert on Tue Aug 2 16:05:44 2022
    On 02/08/2022 15:23, albert wrote:
    In article <tca7gk$18tnv$1@dont-email.me>, Ron AARON <clf@8th-dev.com> wrote:
    Yes, exactly. In particular, in the example Anton posted directly after
    my posting this question, the "huge" array was simply a pointer to BSS,
    which is just allocated by the OS upon loading the executable (subject
    to system memory constraints, of course).

    My question was directed at the TEXT segment size, e.g. how much
    functional code can be stuffed into an executable. I think the answer
    is: "that depends".

    I think you're correct that a 2G limitation on individual code segments
    is in place, though the linker can stitch together any number of such
    segments. At run-time, only the "live" parts of the code will be mmap-ed
    so unless the programmer created a function 2G in size (!) that probably
    wouldn't be itself an issue on most modern systems.

    ciforth has a classic uniform memory space. Linux put no constraint
    to this.

    S[ 3 ] OK ~/euler$ lina8G -a
    5,000,000,000 ALLOT
    OK
    '+ >CFA CONSTANT +code
    OK
    WANT ASSEMBLER
    OK
    CODE +' +code HERE 100 MOVE 110 ALLOT
    OK
    OK
    1 2 +'
    OK
    .S

    S[ 3 ] OK
    OK
    BYE

    What I've done here is copy the relocatable code to HERE.
    So there you have it, machine code 5 gbyte up in the air.

    [SAVE-SYSTEM is not working but that is my fault.
    I guessed nobody would SAVE-SYSTEm beyond 2 gbyte.]

    That's rather the point, though. Not sure ELF etc can handle 2G+
    segments (or the OS loader). Never tried it, though.




    If you need bigger program you are supposed to split it into
    parts: main program is a part but every shared library counts
    as separate part. So you may have 1000 shared libraries each
    say 1G of code for total 1000G. If you need single piece of
    data that is bigger than 2G you are supposed to dynamically
    allocate it, say using malloc. To initalize such data you
    need extra code (which in same languages may be generated
    by compiler).

    You could probably have multiple 2G chunks of code linked together
    statically, though you would also probably be waiting a while for the
    link to complete.

    If you have 1000 shared libraries, you have to think about static
    linking. In the old days, you linked in exactly the code that you
    needed. Nowadays you link if there is no tomorrow.


    For data, it's less interesting. The most reasonable thing is, of
    course, to put huge data chunks external to the program and load them at
    need; but if you had to, you could probably include massive data chunks
    (each less than 2G) and "manually" stitch them together (e.g. an array
    of pointers to each chunk, or similar).


    Right, which is why loading huge data externally, via mmap or the
    equivalent is what makes sense. Let the OS do the heavy lifting and
    access the huge data like a big array of bytes (etc).

    I prefer a huge swap space over mmap.

    I don't understand this. Are you referring to having Linux have a huge
    swap file? That doesn't make mmap() work any differently AFAIK.



    <SNIP>

    Groetjes Albert

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to clf@8th-dev.com on Tue Aug 2 14:23:20 2022
    In article <tca7gk$18tnv$1@dont-email.me>, Ron AARON <clf@8th-dev.com> wrote: >Yes, exactly. In particular, in the example Anton posted directly after
    my posting this question, the "huge" array was simply a pointer to BSS,
    which is just allocated by the OS upon loading the executable (subject
    to system memory constraints, of course).

    My question was directed at the TEXT segment size, e.g. how much
    functional code can be stuffed into an executable. I think the answer
    is: "that depends".

    I think you're correct that a 2G limitation on individual code segments
    is in place, though the linker can stitch together any number of such >segments. At run-time, only the "live" parts of the code will be mmap-ed
    so unless the programmer created a function 2G in size (!) that probably >wouldn't be itself an issue on most modern systems.

    ciforth has a classic uniform memory space. Linux put no constraint
    to this.

    S[ 3 ] OK ~/euler$ lina8G -a
    5,000,000,000 ALLOT
    OK
    '+ >CFA CONSTANT +code
    OK
    WANT ASSEMBLER
    OK
    CODE +' +code HERE 100 MOVE 110 ALLOT
    OK
    OK
    1 2 +'
    OK
    .S

    S[ 3 ] OK
    OK
    BYE

    What I've done here is copy the relocatable code to HERE.
    So there you have it, machine code 5 gbyte up in the air.

    [SAVE-SYSTEM is not working but that is my fault.
    I guessed nobody would SAVE-SYSTEm beyond 2 gbyte.]



    If you need bigger program you are supposed to split it into
    parts: main program is a part but every shared library counts
    as separate part. So you may have 1000 shared libraries each
    say 1G of code for total 1000G. If you need single piece of
    data that is bigger than 2G you are supposed to dynamically
    allocate it, say using malloc. To initalize such data you
    need extra code (which in same languages may be generated
    by compiler).

    You could probably have multiple 2G chunks of code linked together >statically, though you would also probably be waiting a while for the
    link to complete.

    If you have 1000 shared libraries, you have to think about static
    linking. In the old days, you linked in exactly the code that you
    needed. Nowadays you link if there is no tomorrow.


    For data, it's less interesting. The most reasonable thing is, of
    course, to put huge data chunks external to the program and load them at >need; but if you had to, you could probably include massive data chunks
    (each less than 2G) and "manually" stitch them together (e.g. an array
    of pointers to each chunk, or similar).


    Right, which is why loading huge data externally, via mmap or the
    equivalent is what makes sense. Let the OS do the heavy lifting and
    access the huge data like a big array of bytes (etc).

    I prefer a huge swap space over mmap.


    <SNIP>

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Anton Ertl on Tue Aug 2 14:01:26 2022
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Ron AARON <clf@8th-dev.com> writes:
    On 02/08/2022 2:35, antispam@math.uni.wroc.pl wrote:
    AFAIK single part of program is limited to 2G. If you are lucky
    (like in Anton example) up to 4G may work. This is due to signed
    32-bit offsets. IIUC gcc itself does not do anything very smart,
    simply marks sections as code, initialized data (writeable),
    read-only data and zero initalized data. On Linux assemble+linker
    puts data after code.

    Yes, exactly. In particular, in the example Anton posted directly after
    my posting this question, the "huge" array was simply a pointer to BSS, >which is just allocated by the OS upon loading the executable (subject
    to system memory constraints, of course).

    That's the point. In the source code there is a C function, an array,
    and another C function, and gcc handles this just fine by putting the functions into the text segment, and the array in the bss segment. By contrast, VFX does not do this separation, and fails.

    If I increase the array to 5GB, gcc still compiles it just fine.
    However, if I initialize the array (so it goes into the data rather
    than the bss segment), I get a linker error:

    The point is that in your original example you do not _use_
    addresses beyond 2G. Initialization has similar effect to
    use. To see trouble without initialization one needs more
    complicated example (probably could be simplified, but
    accessing data _after_ long array is essential):

    #include <stdio.h>

    void foo(char * s) {
    printf(s);
    }

    char x[2L*1024*1024*1024];
    char y[4];

    void bar(char * s, long a) {
    s[a] = 'f';
    s[a+1] = '\n';
    s[a+2] = 0;
    foo(s);
    }

    int main() {
    bar(x, 2L*1024*1024*1024 - 16);
    bar(y, 0);
    return 0;
    }

    which gives:

    /tmp/cctU82y9.o: in function `main':
    foo4.c:(.text+0x8e): relocation truncated to fit: R_X86_64_PC32 against symbol `y' defined in .bss section in /tmp/cctU82y9.o
    collect2: error: ld returned 1 exit status

    Maybe one can get the linker to behave with linker flags, but one can
    say that with initialized data, the C ecosystem does not do better
    than VFX (and worse than Gforth).

    Yes.

    <snip>
    At run-time, only the "live" parts of the code will be mmap-ed

    What makes you think so? Why should anyone track liveness of code
    (whatever that is), and unmap regions that are dead? If there is a
    memory crunch, code that has been demand-paged in and has not been
    used in a while will be droped from main memory, to be demand-paged
    back in when it is needed; but it's mapped all the time.

    IIUC mappings are per shared library. Shared libraried are
    may be loaded by default, by many apps load them dynamically,
    so only needed ones are loaded.

    More generally, as long as single function stays below 2G
    (with resonable margin) linker could insert intermedate
    jumps (similar to what is used to implement shared libraries)
    to allow calls to arbitrary locations. To allow big static
    data is more tricky: such data must be addressed by pointers.
    gcc folks wrote that uniformly accessing all data via
    pointers causes about 7% slowdown, which was deemed to
    high cost compared to benefits.

    The alternative is what? Do you have a reference to this claim?

    Sorry, do not have papers handy. This was probably in poceedings
    of GCC sunmit when they reported initial AMD-64 port (so rather
    old info).

    Concerning alternatives, currently gcc simply assumemes that
    offset will fit into instruction. So store to array may look
    like:

    movb $102, x(%rip)

    With far data one needs sequences like

    movabs x, %rsi
    movb $102, (%rsi)

    or

    movq x_addr, %rsi
    movb $102, (%rsi)

    If the second has shorter instruction part, but needs extra place
    for address of x. So if x is used once, then the first sequence
    needs less place. If address can be reused, then second version
    may be shorter. And one needs similar for calls (and maybe jumps
    if you want to allow huge functions).

    Remark1: It seems that main problem is due to data. And even
    if data is small: the problem is that when code is huge some
    parts of code will be at distance larger than 2G from data.
    In C layout is determined by linker so compiler for far
    model must conservativly assume that _all_ data needs large
    offsets.

    Remark2: Const is mainly due to extra indirection. If you
    already have indirection (like in thread Forth), then cost
    was already paid and large offsets are essentially free.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@cherry. on Tue Aug 2 13:17:02 2022
    albert@cherry.(none) (albert) writes:
    I prefer a huge swap space over mmap.

    That's not an alternative.

    Apart from that, have you tried a huge swap space?

    My experience is that swap space on HDDs has become impractical a
    while ago, because RAM has become so big that paging out and paging in
    a significant fraction of that just takes too long. I have not tried
    it on SSDs (we configure without swap space these days), but when I
    recently thought I would run a 100GB process on a 128GB machine, and
    the process actually needed 200GB, I was glad that the OOM killer
    killed the process without much ado instead of swapping it to the
    SSDs.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to Anton Ertl on Tue Aug 2 18:33:41 2022
    On 02/08/2022 16:17, Anton Ertl wrote:> albert@cherry.(none) (albert)
    writes:
    I prefer a huge swap space over mmap.

    That's not an alternative.

    Apart from that, have you tried a huge swap space?

    My experience is that swap space on HDDs has become impractical a
    while ago, because RAM has become so big that paging out and paging in
    a significant fraction of that just takes too long. I have not tried
    it on SSDs (we configure without swap space these days), but when I
    recently thought I would run a 100GB process on a 128GB machine, and
    the process actually needed 200GB, I was glad that the OOM killer
    killed the process without much ado instead of swapping it to the
    SSDs.

    Indeed, exactly my experience. My laptop's got NVMe disks, and it's the happiest machine I've ever had ... never swap, just a joy.


    - anton

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Tue Aug 2 14:28:49 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    gcc handles this just fine by putting the functions into the text
    segment, and the array in the bss segment. By contrast, VFX does not
    do this separation, and fails.

    That seems like a traditional Forth approach, having code and data in
    the same dictionary segment. Microcontroller Forths often have multiple segments (e.g. code goes in flash memory) but you switch segments
    manually. I guess workstation Forths could use it too, some of the time.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paul Rubin on Wed Aug 3 09:23:22 2022
    On 3/08/2022 07:28, Paul Rubin wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    gcc handles this just fine by putting the functions into the text
    segment, and the array in the bss segment. By contrast, VFX does not
    do this separation, and fails.

    That seems like a traditional Forth approach, having code and data in
    the same dictionary segment. Microcontroller Forths often have multiple segments (e.g. code goes in flash memory) but you switch segments
    manually. I guess workstation Forths could use it too, some of the time.

    Depends what you mean by 'code'. ANS defines HERE as "data" space but
    nothing to distinguish whether it's ROM (initialized) or RAM (uninitialized) data. There was discussion BUFFER: might have a role but ISTM this was more 'after the fact' of its inclusion. AFAIK back in the day of polyForth,
    CREATE referenced data in ROM and VARIABLE referenced data in RAM.
    VARIABLE ... n ALLOT was how one assigned n+2 bytes of RAM.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Wed Aug 3 07:49:13 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    gcc handles this just fine by putting the functions into the text
    segment, and the array in the bss segment. By contrast, VFX does not
    do this separation, and fails.

    That seems like a traditional Forth approach, having code and data in
    the same dictionary segment.

    Certainly. But not an important one. Some Forth systems have
    separated headers (also untraditional), some separated uninitialized
    RAM (also untraditional); separating native code should be no 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to dxforth on Wed Aug 3 08:04:34 2022
    dxforth <dxforth@gmail.com> writes:
    There was discussion BUFFER: might have a role but ISTM this was more
    'after the fact' of its inclusion.

    That actually was the key point for standardizing BUFFER:. Proponents
    argued that the Forth-94 alternative

    create <name> <size> allot

    requires initialized RAM (i.e., more ROM space in their cross-compiled
    systems for keeping the initial RAM contents), while with BUFFER: the
    RAM is uninitialized and does not need space in ROM.

    But for desktop VFX64, BUFFER: seems to use the same memory as ALLOT;
    When I changed the 2GB ALLOT into a 2GB BUFFER: in my example, VFX
    5.11 still crashes.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to Anton Ertl on Wed Aug 3 01:22:22 2022
    On Wednesday, August 3, 2022 at 10:04:08 AM UTC+2, Anton Ertl wrote:
    Paul Rubin <no.e...@nospam.invalid> writes:
    [..]
    That seems like a traditional Forth approach, having code and data in
    the same dictionary segment.
    Certainly. But not an important one. Some Forth systems have
    separated headers (also untraditional), some separated uninitialized
    RAM (also untraditional); separating native code should be no problem.

    No problem to implement, but once I had it, I'd certainly start making
    use of the fact that data is contiguous. E.g., record names can be done
    very elegantly, and matrices would be just a collection of named vectors.
    Not sure that would help portability :--)

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to no.email@nospam.invalid on Wed Aug 3 10:33:42 2022
    In article <8735efolmg.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    Ramanujan's taxi
    <http://www.complang.tuwien.ac.at/forth/programs/taxi.fs> will take a
    lot of dictionary memory, depending on the parameters; e.g., for the
    taxi numbers up to 9000 development Gforth takes 2.7GB....

    I've gotta say this trick of using a text interpreter wordlist as a
    general purpose lookup structure still makes me cringe. It would be
    nice to have a hash table library that you could ALLOCATE space for.

    The program sort of works in ciforth. Dictionary space is not a problem. ciforth is doing a linear search for words.
    After 1140 minutes of running I killed it, having advanced to
    1140 out of 9000. If you need a hash table, use a hash table.

    [In this case a hash table is not needed, just a regular table,
    saving space too.]


    In this particular case, if I understand the algorithm, there are only >9000*9000/2 numbers to consider, which is about 4e7. For each pair
    (i,j) you would compute s=i**3+j**3 and check whether you had already
    seen another pair with that sum. So you would need a bit vector of
    about 5MB, not anything like 2.7GB. Whenever you find a match, you
    would check that s for ways of expressing it as the sum of two cubes,
    which can be done quickly enough in various straightforward ways.

    Or you could have a byte array of 2 *9000^2 counters, 200 mbyte.
    These contain the number of time the index appears as a sum of cubes.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Wed Aug 3 10:47:18 2022
    In article <2022Aug1.172954@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@cherry.(none) (albert) writes:
    In article <2022Aug1.122649@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Small systems are affected by slowdowns from code/data mixing as much
    as large or homungous systems are. Let's see how things turn out in >>>various systems:

    I can assemble a version of ciforth where all code is collated in a
    small space. With a indirect threading Forth the rest is data.
    Would that worth while to try, even only as an experiment?

    I expect similar results as for gforth-itc, which I insert below.

    If you currently have the primitives interspersed with data that is
    written frequently, you may suffer slowdowns (and for the Pentium and
    K6, even for data that is read or written frequently). It will not be
    for the code that I used for the native-code systems, but serious
    slowdowns have occured due to this problem in native-code systems;
    e.g. bigForth is slower than gforth-0.7 by a factor of 5 due to this
    problem. And if your system has this problem, I would not be
    surprised if there is a workload where it actually consumes a
    significant amount of time.

    Example:

    In colorforth there may be three segments involved with a single
    definition, show by this fragment:

    ..
    MHEADER drop
    ( 0000,04C4 ) :X_drop MOV, X| T| DX'| MEM| H L,
    ( 0000,04CA ) MOV, X| F| DX'| MEM| list L,
    ( 0000,04D0 ) MOVI, B| ZO| [DX] -53 IB,
    ( 0000,04D3 ) INC, X| MEM| H L,
    ( 0000,04D9 ) RET,
    MHEADER ?dup
    ( 0000,04DA ) :X_?dup MOV, X| T| DX'| MEM| H L,
    ( 0000,04E0 ) DEC|X, DX|
    ( 0000,04E1 ) CMP, X| F| DX'| MEM| list L,
    ( 0000,04E7 ) J, Z| N| X_dup RB,
    ( 0000,04E9 ) CMPI, B| ZO| [DX] -53 IB,
    ( 0000,04EC ) J, Z| N| X_dup RB,
    ( 0000,04EE ) MOV, X| F| DX'| MEM| H L,
    ( 0000,04F4 ) RET,
    ..
    A sufficiently powerful assembler could take care of this easily
    by segment's, which maintain their own pointers.

    0 0 SEGMENT DEFAULT:
    \ Define segments for tables. They are to overwrite empty places in ``DEFAULT:''
    ForthHuff ForthHuff SEGMENT ForthHuff:
    ForthXT ForthXT SEGMENT ForthXT:
    MacroHuff MacroHuff SEGMENT MacroHuff:
    MacroXT MacroXT SEGMENT MacroXT:

    \ Macro header for "name".
    \ Add execution address and colorname to appropriate segments.
    : MHEADER _AP_ MacroXT: AS-, (WORD) >CN MacroHuff: AS-, DEFAULT: ;

    HEADER place the current program counter (in the DEFAULT: segment)
    in the ForthXT segment.
    Then parse the name, converts it to a colorname and places in the
    Huffman segment.
    Then continue with the DEFAULT: segment.

    - anton


    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Marcel Hendrix on Wed Aug 3 09:03:42 2022
    Marcel Hendrix <mhx@iae.nl> writes:
    No problem to implement, but once I had it, I'd certainly start making
    use of the fact that data is contiguous. E.g., record names can be done
    very elegantly, and matrices would be just a collection of named vectors.

    Sounds to me like you are thinking of separated headers, not separated
    code.

    Not sure that would help portability :--)

    One way towards portability is to stay conservative when writing
    programs, and refrain from using non-portable features.

    Another way is to convince the other system implementors to also
    provide the feature you like. That's pretty tough going with Forth
    system implementors, but if you provide an example that shows how
    record names can be done very elegantly, and that constructing
    matrixes as a collection of named vectors is actually a
    frequent-enough use case that the workaround of separating the names
    at the source-code level is not good enough, I am game.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to albert@cherry. on Wed Aug 3 02:44:58 2022
    albert@cherry.(none) (albert) writes:
    Or you could have a byte array of 2 *9000^2 counters, 200 mbyte.
    These contain the number of time the index appears as a sum of cubes.

    I'm missing something there, I just used an array of 9000^2 64-bit ints
    and sorted them to find duplicates. Compiled with g++ -O it takes about
    3 seconds on my laptop. It took a bit over 20 seconds without -O.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to Anton Ertl on Wed Aug 3 03:08:09 2022
    On Wednesday, August 3, 2022 at 11:12:32 AM UTC+2, Anton Ertl wrote:
    Marcel Hendrix <m...@iae.nl> writes:
    No problem to implement, but once I had it, I'd certainly start making
    use of the fact that data is contiguous. E.g., record names can be done >very elegantly, and matrices would be just a collection of named vectors. Sounds to me like you are thinking of separated headers, not separated
    code.

    Indeed, I was taking iForth's separated headers for granted already.
    Without them the listed features don't apply.

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to no.email@nospam.invalid on Wed Aug 3 13:00:43 2022
    In article <87h72tmzj9.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    albert@cherry.(none) (albert) writes:
    Or you could have a byte array of 2 *9000^2 counters, 200 mbyte.
    These contain the number of time the index appears as a sum of cubes.

    I'm missing something there, I just used an array of 9000^2 64-bit ints
    and sorted them to find duplicates. Compiled with g++ -O it takes about
    3 seconds on my laptop. It took a bit over 20 seconds without -O.

    Probably even more straightforward.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Anton Ertl on Wed Aug 3 20:33:45 2022
    On 3/08/2022 18:04, Anton Ertl wrote:
    dxforth <dxforth@gmail.com> writes:
    There was discussion BUFFER: might have a role but ISTM this was more >>'after the fact' of its inclusion.

    That actually was the key point for standardizing BUFFER:. Proponents
    argued that the Forth-94 alternative

    create <name> <size> allot

    requires initialized RAM (i.e., more ROM space in their cross-compiled systems for keeping the initial RAM contents), while with BUFFER: the
    RAM is uninitialized and does not need space in ROM.

    ANS certainly allowed the arbitrary allocation of RAM using CREATE ...
    ALLOT . Countless applications depend upon it.

    But for desktop VFX64, BUFFER: seems to use the same memory as ALLOT;
    When I changed the 2GB ALLOT into a 2GB BUFFER: in my example, VFX
    5.11 still crashes.

    Which begs the question why introduce BUFFER: into a standard and systems
    that have no concept of CDATA IDATA UDATA.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Wed Aug 3 10:50:04 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    I've gotta say this trick of using a text interpreter wordlist as a
    general purpose lookup structure still makes me cringe.

    Why?

    It would be
    nice to have a hash table library that you could ALLOCATE space for.

    Why?

    Forth has lookup tables built-in in the form of wordlists, just as
    Python has them built-in under the name dict. Why should one add a
    library for a feature that is already built-in? But if you want a
    library, IIRC the FFL includes such a component.

    Wordlists admittedly have a few disadvantages for the purpose:

    * Case insensitive, so in the taxi program I converted the numbers to
    decimal representation instead of using the binary representation.
    Gforth addresses that with TABLE, which gives you a case-insensitive
    wordlist (in development Gforth, TABLE entries are also not recorded
    for LOCATE etc.)

    * Insertion happens with defining words, and in Forth defining words
    take the key from the input stream. You have to use EXECUTE-PARSING
    or (Gforth) NEXTNAME to be able to pass the key on the stack.

    * Defining words produce word headers which contain more data than
    your average hash table entry needs. In Gforth, a word header with
    a key <=1 cell takes 5 cells (more if the key is longer), plus ~3
    cells in Gforth's hash table. So if memory is tight, a different
    approach is called for.

    It would be interesting to see how the code would look with the kind
    of data structure you have in mind, and how it would perform.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Thu Aug 4 13:34:48 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    I'm missing something there, I just used an array of 9000^2 64-bit ints
    and sorted them to find duplicates. Compiled with g++ -O it takes about
    3 seconds on my laptop.

    The original code
    <https://www.complang.tuwien.ac.at/forth/programs/taxi.fs> was not
    designed for speed, but this, of course, posed a challenge.

    So I changed the lookup table to use a custom hash table instead of a
    wordlist <https://www.complang.tuwien.ac.at/forth/programs/taxi2.4th>.
    Now the code is much longer, but runs much faster. It also runs fast
    on VFX64:

    s cycles instructions
    93.8 450_123_704_079 969_728_193_458 gforth-fast 9000 taxi.fs
    3.35 16_039_014_129 10_085_237_291 gforth-fast 9000 taxi2.4th
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th

    Command lines:
    LC_NUMERIC=prog perf stat -e cycles -e instructions ~/nfstmp/gforth-amd64/gforth-fast -m3G -e ": wordlist table ; 9000 include taxi.fs bye" >/dev/null
    LC_NUMERIC=prog perf stat -e cycles -e instructions ~/nfstmp/gforth-amd64/gforth-fast -e "include taxi2.4th 9000 taxi cr solutions @ . bye" >/dev/null
    LC_NUMERIC=prog perf stat -e cycles -e instructions vfx64 "include taxi2.4th 9000 taxi cr solutions @ . bye" >/dev/null

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_Kasprzak?=@21:1/5 to All on Sat Aug 6 04:19:20 2022
    You really shine like a star, Anton :) You convinced me that you have the brain of a real scientist, not "pseudo" as Hugh Aguilar once suggested :)
    You wrote so many brilliant thoughts in this short thread: I never thought that Forth in a virtual machine had a chance to be faster than the native one, dozens of times more. As Albert said, unbelievable :)
    Your Taxi example proves well that it is worth making a list of words working in O(1) time. I was captivated by Albert's story of how he had to kill his Forth's task! It was very dramatic and I felt sorry for you, Albert ;)
    And then another misfortune befell Albert: the saving of long programs in ciforth does not work. I liked how you admitted your mistake, Albert :) I hope it will start working soon!
    Anton's next big thought is to take word lists as the dictionaries. It seems to me an extremely influential and future-oriented idea!
    Because of Anton's beautiful mind, I propose a new nickname for Anton Ertl: Zombie :)
    You can see that our Zombie loves Forth, he loves to see subtle nuances in the statements of others and to dominate them with the possibilities of his brain ;)
    Please Sir I Want Some More
    The mysterious anonymous dxforth is a great artist :) For him I suggest a nickname: Oliver :) Even after a few days, thinking about his comment makes me laugh :)
    I have been waiting 2 days for the results of the new Zombie's Taxi2 test on Ciforth Albert!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to All on Sat Aug 6 05:45:16 2022
    The Metaverse is beta-testing its Jester prototype...

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Sat Aug 6 17:44:40 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    s cycles instructions
    3.35 16_039_014_129 10_085_237_291 gforth-fast 9000 taxi2.4th
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th

    Wow, that is basically as fast as g++ -O2 with a stdlib vector and the
    library sort function, which seemed simpler to me than using a hash
    table. It uses around 300MB. Most of the cpu time is spent sorting.
    I'd be interested to know how much memory the hash table uses.

    ================================================================

    #include <vector>
    #include <stdint.h>
    #include <iostream>
    #include <algorithm>

    typedef int64_t xint;
    const xint nmax = 9000;

    int main() {
    std::vector<xint> v;
    xint i,j;
    for (i = 1; i < nmax; i++)
    for (j = i; j < nmax; j++)
    v.push_back(i*i*i + j*j*j);
    std::sort(v.begin(), v.end());

    int dups = 0;
    for (i = 0; i < v.size() - 2; i++) {
    if (v[i] == v[i+1]) {
    std::cout << "dup " << v[i] << "\n";
    dups++;
    }
    }
    std::cout << dups << " dups\n";
    }

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Paul Rubin on Sun Aug 7 13:18:22 2022
    Paul Rubin <no.email@nospam.invalid> wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    s cycles instructions
    3.35 16_039_014_129 10_085_237_291 gforth-fast 9000 taxi2.4th
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th

    Wow, that is basically as fast as g++ -O2 with a stdlib vector and the library sort function, which seemed simpler to me than using a hash
    table. It uses around 300MB. Most of the cpu time is spent sorting.
    I'd be interested to know how much memory the hash table uses.

    Sorting is slow. I have coded heapsort and used it to
    solve taxi problem:

    http://www.math.uni.wroc.pl/~hebisch/prog/taxi_hs.fs

    Using lina64 it takes several minutes when numbers are bounded
    by 9000. AFAICS almost all execution time goes into heapsort,
    so replacing it by hash table should give faster program.

    Note 1: I pack one number and sum of cubes into a word. From
    then one can reconstruct the second number. I use intege-only
    exact cube root routine (it will produce nonsense if number is not
    a cube). FP root probably would be faster, but I wanted to
    stay in Core wordset.

    Note 2: I wanted to stay in Core wordset so my heapsort is rather
    ugly. Without optimization my heapsort is quite inefficient as
    there are tons of stack manipulations which are equivalent to
    much simpler code (but Forth would need to recognize it). For
    heapsort one really should use locals, it would be more readible
    and probably more efficient (with old gforth version using
    locals is about 20% faster).

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Sun Aug 7 13:32:18 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    s cycles instructions
    3.35 16_039_014_129 10_085_237_291 gforth-fast 9000 taxi2.4th
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th

    Wow, that is basically as fast as g++ -O2 with a stdlib vector and the >library sort function, which seemed simpler to me than using a hash
    table.

    More exactly,

    s cycles instructions
    3.35 16_039_014_129 10_085_237_291 gforth-fast 9000 taxi2.4th
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th
    1.70 8_053_294_428 10_664_441_167 a.out (taxi.cc binary)

    It uses around 300MB. Most of the cpu time is spent sorting.
    I'd be interested to know how much memory the hash table uses.

    It has 64M entries (of which 40M are used), each with 32 bytes, so
    2GB. But taxi2.4th does more than taxi.cc: It does not just output
    the sum, but also the constituent numbers. For just outputting the
    sums that occur more than once, an 8-byte entry would be good enough,
    i.e. 512MB.

    One could store the constituent numbers instead of the sum, and use
    only 2 bytes per constituent number, i.e., 4 bytes per entry. This
    would result in 256MB, but checking for a cache hit would be more
    expensive (probably minor change compared to the cache miss cost of
    the hash table access), and one could output the sum and the
    constituent numbers. In order to see whether this is the first
    duplicate or an additional one (what taxi2.4th does), one would need
    an additional bit, but given that each constituent number fits in 14
    bits, one can still manage with 32 bits per entry.

    I have been thinking about a cache-blocking implementation of the
    hashing variant to reduce the memory-access overhead (and also memory consumption, but that's less important at these sizes), but have not
    found the time to implement it.

    #include <vector>
    #include <stdint.h>
    #include <iostream>
    #include <algorithm>

    typedef int64_t xint;
    const xint nmax = 9000;

    int main() {
    std::vector<xint> v;
    xint i,j;
    for (i = 1; i < nmax; i++)
    for (j = i; j < nmax; j++)
    v.push_back(i*i*i + j*j*j);
    std::sort(v.begin(), v.end());

    int dups = 0;
    for (i = 0; i < v.size() - 2; i++) {
    if (v[i] == v[i+1]) {
    std::cout << "dup " << v[i] << "\n";
    dups++;
    }
    }
    std::cout << dups << " dups\n";
    }

    That's substantially shorter than

    https://rosettacode.org/wiki/Taxicab_numbers#C.2B.2B

    but then the two programs do different things.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Sun Aug 7 15:20:56 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th
    1.70 8_053_294_428 10_664_441_167 a.out (taxi.cc binary)

    Nice.

    But taxi2.4th does more than taxi.cc: It does not just output
    the sum, but also the constituent numbers.

    Yes, I thought about storing those, but it is easy enough to recover the constituent numbers given the sum. Given the sum s, you just find all
    the k <- [1...9000] where t=s-k**3 is itself a cube. There are at most cuberoot(2 * 9000**2) = 545 such cubes, so you can just precompute a
    hash table of 545 entries, and then check each t with a single lookup.
    I didn't bother implementing that but might do so.

    In fact maybe it's enough to check all the sums of two cubes that way by
    "brute force" rather than messing with large hash tables or sorted
    lists. I might try that too.

    One could store the constituent numbers instead of the sum,

    I don't quite understand the reasoning about cache misses but it's ok, I
    can think about it some more. I do expect that the sorting method had
    good cache locality since it just grows a vector and then uses something
    like quicksort.
    That's substantially shorter than https://rosettacode.org/wiki/Taxicab_numbers#C.2B.2B
    but then the two programs do different things.

    Ah nice, it didn't occur to me to look on Rosetta.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Paul Rubin on Mon Aug 8 00:59:02 2022
    Paul Rubin <no.email@nospam.invalid> wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th
    1.70 8_053_294_428 10_664_441_167 a.out (taxi.cc binary)

    Nice.

    But taxi2.4th does more than taxi.cc: It does not just output
    the sum, but also the constituent numbers.

    Yes, I thought about storing those, but it is easy enough to recover the constituent numbers given the sum. Given the sum s, you just find all
    the k <- [1...9000] where t=s-k**3 is itself a cube. There are at most cuberoot(2 * 9000**2) = 545 such cubes, so you can just precompute a
    hash table of 545 entries, and then check each t with a single lookup.
    I didn't bother implementing that but might do so.

    Hmm, AFAICS for each sum you need to iterate over k. Assuming
    limit on number N (in our case 9000) and M sums we get complexity
    N*M for this step. M is 35760, significantly larger than N.

    In fact maybe it's enough to check all the sums of two cubes that way by "brute force" rather than messing with large hash tables or sorted
    lists. I might try that too.

    You mean generate sums and then check for alternative representaion?
    Due to number of coincidencies you seem to be getting much higher
    runtime to save space usage. AFAICS much simpler is to hash
    sums getting numers in range 0 to N^2 (about twice of number
    of sums) and use bitvector to check for _possible_ duplicates.
    Then do second pass putting sums, but only the ones which
    passed filtering via bitvector.

    One could store the constituent numbers instead of the sum,

    I don't quite understand the reasoning about cache misses but it's ok, I
    can think about it some more. I do expect that the sorting method had
    good cache locality since it just grows a vector and then uses something
    like quicksort.

    heapsort have rather poor cache locality. quicksort is
    significantly better, but at the size here there will be
    few passes trough RAM, doable in time of order second,
    but still it will work not at CPU speed but at sequential
    DRAM speed.

    BTW: A friend used similar number theoretic problems to
    select computer with best memory performance. And at
    that time (about 15 years ago) there was substantial
    variation with Intel lagging behind AMD (later Intel
    improved quite a lot).

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to antispam@math.uni.wroc.pl on Sun Aug 7 23:07:05 2022
    antispam@math.uni.wroc.pl writes:
    Hmm, AFAICS for each sum you need to iterate over k. Assuming
    limit on number N (in our case 9000) and M sums we get complexity
    N*M for this step. M is 35760, significantly larger than N.

    This check takes about 20 nsec on an i5-3570S using std::unordered_map. 9000*35760*20e-9 is about 6 sec, hmm. I will code the rest and give it
    a try.

    You mean generate sums and then check for alternative representaion?

    Yes. By the above timing it is indeed pretty slow.
    9000*4500*9000*20e-9 is around 2 hours. But the memory footprint is
    very small. In principle the method could work on a microcomputer.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Mon Aug 8 09:33:49 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    1.56 7_353_893_755 2_627_580_253 vfx64 9000 taxi2.4th
    1.70 8_053_294_428 10_664_441_167 a.out (taxi.cc binary)

    Nice.

    But taxi2.4th does more than taxi.cc: It does not just output
    the sum, but also the constituent numbers.

    Yes, I thought about storing those, but it is easy enough to recover the >constituent numbers given the sum. Given the sum s, you just find all
    the k <- [1...9000] where t=s-k**3 is itself a cube. There are at most >cuberoot(2 * 9000**2) = 545 such cubes, so you can just precompute a
    hash table of 545 entries, and then check each t with a single lookup.

    I don't follow your reasoning. Where is the 2 * 9000**2 coming from?
    It seems to me that there are up to 9000 cube roots (because there are
    9000 possible summands), but of course you can also look them up in a
    hash table. But overall the code is going to become quite a bit larger.

    You can also store i,j instead of the sum, and do the sort with a
    comparison that compares i^3+j^3 (C++ sort can do that, no?).
    However, given that you perform many more comparisons than my hashing
    approach does (which performs ~30M comparisons; sorting requires about
    1G comparisons (or is it half of that? Anyway, significantly more).

    One could store the constituent numbers instead of the sum,

    I don't quite understand the reasoning about cache misses

    Sorry, I meant that checking for a hash table hit would be more
    expensive: Instead of comparing the sums, I would have to recompute
    the sum from the constituent numbers and then compare that.

    I do expect that the sorting method had
    good cache locality since it just grows a vector and then uses something
    like quicksort.

    Quicksort and mergesort have relatively good cache locality, but many
    more memory accesses than the hash-table approach.

    Basically, with the hashing approach and such a large hash table,
    every hash table access, i.e., each of the 40M sums will cause a cache
    miss; and of course clearing the 2GB will cause another 32M cache
    misses. The 30M hash conflicts should lead to another cache miss in
    half of the cases, i.e., in 15M cases. So I estimate the total cache
    misses to be 87M. I observe the number of
    l2_cache_misses_from_dc_misses to be 100M (I only get "not supported"
    when I ask for L3 numbers, but there should be little difference
    between L2 and L3 numbers for this program).

    With the sorting approach and something like quicksort, with 8-byte
    records there are ~5M cache lines; you access all of them once for
    generating the numbers, and once for each recursion level, about 10
    times until you are within a 512KB L2 cache (of the Ryzen 5800X) and
    14 times until you are within the 32KB data cache, i.e., ~55M L2
    misses overall and ~75M L2 accesses.

    If you used 32-byte records like I do, there would be 20M cache lines,
    and two additional recursions until you are inside the cache level
    under consideration; this would result in ~260M L2 cache misses and
    ~340M L2 cache accesses.

    Reality check: I see the following numbers on the Ryzen 5800X.

    taxi2.4th
    gforth-fast vfx64 taxi.cc
    187_333_032 218_295_645 147_818_881 l2_cache_accesses_from_dc_misses 102_958_191 117_248_139 6_476_984 l2_cache_misses_from_dc_misses

    The first line also counts hardware prefetch accesses, the second line apparently does not count them.

    The differences between gforth-fast and VFX64 are interesting; my
    expectation was that they would produce the same numbers for these
    events; I have no explanation for the differences.

    For taxi.cc the upper number is twice as high as expected. I have no explanation for that. The lower number is much lower than expected; I
    think that the reason for that is that hardware prefetchers work well
    for quicksort and mergesort, and the l2 misses from the prefetchers
    are not included in that number.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_Kasprzak?=@21:1/5 to All on Mon Aug 8 08:22:54 2022
    We have already talked about the fact that VFX Forth does not support 64-bit memory space with dignity.
    Zombie (Anton) pressed Stephen to fix it, instead of bypassing the problem.
    (I suggest a nickname for Albert van der Horst: Pony, because he wrote on his website: "I have this Miami Vice poney tail".)
    Then it turned out that Pony's Ciforth can't save 64-bit memory space as a turnkey application. (Where are you Pony, I'm worried about you!)
    It looks like these problems will not be resolved by the 1948 age generation group (1948 is a very good year, like wine!). Too much marketing.
    Since iForth is not downloadable, there is only one more 64-bit Forth available for the general user: Zombie's Gforth.
    So, Zombie, is it possible to save a standalone turnkey application in Gforth, or do we people of the world don't have any 64-bit Forth that can correctly write a multi-gigabyte 64-bit turnkey application?
    Let us make it clear that saving a data file (you'd've called it Image Files) that needs an additional Forth to load is not a standalone turnkey application.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Mon Aug 8 10:29:02 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I don't follow your reasoning. Where is the 2 * 9000**2 coming from?

    Oops, I meant 2 * 9000**3 not **2. The idea is that you could have a
    taxicab number n=a**3+b**3=c**3+d**3. If a and b are both close to
    9000, then n is around 2*9000**3. So having a set of cubes going up
    to 2*9000**3 (around 11000 in the set) is a simple upper bound. One
    could actually do better but 11000 is small enough.

    It seems to me that there are up to 9000 cube roots (because there are
    9000 possible summands), but of course you can also look them up in a
    hash table. But overall the code is going to become quite a bit larger.

    Using std::unordered_map in C++ is pretty simple. At the moment I only
    use std::unordered_set to check whether something is a cube, but I'll
    make the change and post the code later.

    You can also store i,j instead of the sum, and do the sort with a
    comparison that compares i^3+j^3 (C++ sort can do that, no?).

    Nice, that is a good idea. It cuts the memory usage in half.

    sorting requires about 1G comparisons (or is it half of that? Anyway, significantly more).

    I believe quicksort is about 1.3 n log2(n), so around 1G. It can be parallelized but the C++ stdlib doesn't do that. I wonder if there is
    an implementation around that does.

    I also tried simply checking each number for the taxicab property by
    "brute force" and this took 72 minutes (i5-3570S) to get up to 9000.
    Your Ryzen is maybe 2x as fast.

    Since I have a 4 core computer and that method is "embarassingly
    parallel", that could be under 20 minutes with some refactoring that I
    don't feel likely to bother trying. On your 16 core Ryzen, it's down to
    maybe 2.5 minutes. I wonder if this could be done straightforwardly on
    a GPU.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Wed Aug 10 12:05:29 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I don't follow your reasoning. Where is the 2 * 9000**2 coming from?

    It occurs to me also that taxi.cc doesn't quite work, because it doesn't
    detect taxicab numbers n=a^3+b^3=c^3+d^3 where a,b < 9000 but c or d
    is >= 9000.

    Example: 8831^3 + 8971^3 = 2199^3 + 11187^3.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Wed Aug 10 21:24:20 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I don't follow your reasoning. Where is the 2 * 9000**2 coming from?

    It occurs to me also that taxi.cc doesn't quite work, because it doesn't >detect taxicab numbers n=a^3+b^3=c^3+d^3 where a,b < 9000 but c or d
    is >= 9000.

    Yes, but it has that in common with taxi.fs and taxi2.4th (and some
    other programs that I saw on the 'net).

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to antispam@math.uni.wroc.pl on Sun Aug 14 11:20:04 2022
    antispam@math.uni.wroc.pl writes:
    Note 1: I pack one number and sum of cubes into a word. From
    then one can reconstruct the second number.

    Clever!

    For
    heapsort one really should use locals, it would be more readible
    and probably more efficient (with old gforth version using
    locals is about 20% faster).

    Could you publish your locals version?

    I have thought about using the heap as a priority queue for the taxi
    problem, as follows:

    for i in 2...9000 do
    insert-into-heap(i, 1, sumcubes(i,1)) (sorted by the sumcubes element) old_t=0
    while heap not empty do
    extract-smallest(i, j, t)
    if t=oldt
    report found taxi number
    j:=j+1
    if j<i
    insert-into-heap(i,j, sumcubes(i,j));

    The heap should only contain 9000 numbers, rather than 9000^2/2,
    reducing the number of inner loop iterations by a factor of 2, and,
    more importantly, these numbers fit in the L2 cache and the data-cache
    hit rate should not be too bad, either. And of course it means that
    we need much less memory.

    Unfortunately, it's unclear to me how to get from your SIFT word to insert-into-heap and extract-smallest.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From antispam@math.uni.wroc.pl@21:1/5 to Anton Ertl on Sun Aug 14 22:44:04 2022
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    antispam@math.uni.wroc.pl writes:

    For
    heapsort one really should use locals, it would be more readible
    and probably more efficient (with old gforth version using
    locals is about 20% faster).

    Could you publish your locals version?

    \ Classic heapsort with locals
    : sift
    {: rra ra ir ii | jj :}
    ii 2* 1+ to jj
    BEGIN jj ir < WHILE
    jj 1+ ir < IF
    ra jj CELLS + DUP @ SWAP CELL+ @ < IF
    jj 1+ TO jj
    THEN
    THEN
    ra jj CELLS + @ DUP rra > IF
    ra ii CELLS + !
    jj TO ii
    jj DUP + 1+ TO jj
    ELSE
    DROP
    ir TO jj
    THEN
    REPEAT
    rra ra ii CELLS + !
    ;

    : heapsort
    {: ra n | rra :}
    0 n 1- 2/ DO
    ra I CELLS + @ ra n I sift
    -1 +LOOP
    1 n 1 - DO
    ra I CELLS + DUP @ TO rra
    ra @ SWAP !
    I 1 = IF
    rra ra !
    ELSE
    rra ra I 0 sift
    THEN
    -1 +LOOP
    ;

    Apparently Gforth 0.7.3 from 2008 only supports old syntax
    for locals, but the above works with Gforth 0.7.9 from 2015.

    For use in taxi program interface is the same as version
    without locals.

    I have thought about using the heap as a priority queue for the taxi
    problem, as follows:

    for i in 2...9000 do
    insert-into-heap(i, 1, sumcubes(i,1)) (sorted by the sumcubes element) old_t=0
    while heap not empty do
    extract-smallest(i, j, t)
    if t=oldt
    report found taxi number
    j:=j+1
    if j<i
    insert-into-heap(i,j, sumcubes(i,j));

    The heap should only contain 9000 numbers, rather than 9000^2/2,
    reducing the number of inner loop iterations by a factor of 2,

    AFAICS the set of pairs is exactly the same as in earlier versions.

    and,
    more importantly, these numbers fit in the L2 cache and the data-cache
    hit rate should not be too bad, either. And of course it means that
    we need much less memory.

    Unfortunately, it's unclear to me how to get from your SIFT word to insert-into-heap and extract-smallest.

    heapsort is based on extracting _largest_ element from the
    heap. To extract smallest one have to reverse all comparisons
    for array elements. sift is intended to allow fast initial
    creation of heap from array, it is faster than doing insert-into-heap
    in a loop. So one needs separate implementation of insert-into-heap.
    Changed sift and insert_into_heap and extract_smallest below

    : sift
    {: rra ra ir ii | jj :}
    ii 2 * 1+ to jj
    BEGIN jj ir < WHILE
    jj 1+ ir < IF
    ra jj CELLS + DUP @ SWAP CELL+ @ > IF
    jj 1+ TO jj
    THEN
    THEN
    ra jj CELLS + @ DUP rra < IF
    ra ii CELLS + !
    jj TO ii
    jj DUP + 1+ TO jj
    ELSE
    DROP
    ir TO jj
    THEN
    REPEAT
    rra ra ii CELLS + !
    ;

    : insert_into_heap
    \ jj is index of free place
    \ val is value to insert
    \ ii is index of place below jj
    {: ra n val | jj ii :}
    n 1- TO jj
    jj 1- 2/ TO ii
    BEGIN
    ii 0< INVERT WHILE
    ra ii CELLS + @ DUP val > IF
    ra jj CELLS + !
    ii TO jj
    jj 1- 2/ TO ii
    ELSE
    DROP
    -1 TO ii
    THEN
    REPEAT
    val ra n jj sift
    ;

    : extract_smallest
    {: ra n :}
    ra @ \ return value
    1 n < IF
    n 1- TO n
    ra n CELLS + @ ra n 0 sift
    THEN
    ;

    Note that insert_into_heap expect n to be number of elements
    _after_ insertion (that is we count free place as an element)
    while extract_smallest expects n to be number of elements
    before extraction.

    --
    Waldek Hebisch

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to siarczek83@gmail.com on Tue Aug 16 13:54:49 2022
    In article <c09ea832-589c-4a04-8f87-ba2c271c09ean@googlegroups.com>,
    Micha Kasprzak <siarczek83@gmail.com> wrote:
    We have already talked about the fact that VFX Forth does not support
    64-bit memory space with dignity.
    Zombie (Anton) pressed Stephen to fix it, instead of bypassing the problem. >(I suggest a nickname for Albert van der Horst: Pony, because he wrote on
    his website: "I have this Miami Vice poney tail".)
    Then it turned out that Pony's Ciforth can't save 64-bit memory space as a >turnkey application. (Where are you Pony, I'm worried about you!)
    It looks like these problems will not be resolved by the 1948 age
    generation group (1948 is a very good year, like wine!). Too much
    marketing.

    It is actually a defect in WRITE-FILE. I did not head the warning
    that the system call could write less bytes than requested.
    So ciforth's WRITE-FILE is not able to write more than 2 Gbyte at once.

    There is an ugly fix.
    Before loading SAVE-SYSTEM you could revector PUT-FILE like so:

    \ -------------------- 8< ------------------------------------
    : WRITE-FILE1 BEGIN
    DUP >R ROT DUP >R ROT DUP >R .S 1 XOS DUP 0 MIN THROW R>
    SWAP - DUP WHILE R> OVER + SWAP R> REPEAT RDROP RDROP ;

    : PUT-FILE1
    0 CREATE-FILE THROW DUP >R WRITE-FILE1 THROW R> CLOSE-FILE THROW
    ;

    'PUT-FILE1 'PUT-FILE 3 CELLS MOVE
    \ BM 4,000,000,000 "hoax" PUT-FILE
    \ .S

    \ -------------------- 8< ------------------------------------


    Since iForth is not downloadable, there is only one more 64-bit Forth >available for the general user: Zombie's Gforth.
    So, Zombie, is it possible to save a standalone turnkey application in >Gforth, or do we people of the world don't have any 64-bit Forth that can >correctly write a multi-gigabyte 64-bit turnkey application?
    Let us make it clear that saving a data file (you'd've called it Image
    Files) that needs an additional Forth to load is not a standalone turnkey >application.

    The cases for SAVE-SYSTEM where more than 2 gByte is containing
    useful data is limited.

    Groetjes
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_Kasprzak?=@21:1/5 to On Tuesday none albert on Tue Aug 16 16:40:06 2022
    Hello Pony! I am very happy to see you in good condition!
    Where have you been all this time? I was worried about you, that something happened to you. You disappeared so suddenly.
    It's not the same here without you.


    On Tuesday none albert wrote:

    It is actually a defect in WRITE-FILE. I did not head the warning
    that the system call could write less bytes than requested.
    So ciforth's WRITE-FILE is not able to write more than 2 Gbyte at once.
    There is an ugly fix.
    Before loading SAVE-SYSTEM you could revector PUT-FILE like so:
    \ -------------------- 8< ------------------------------------
    : WRITE-FILE1 BEGIN
    DUP >R ROT DUP >R ROT DUP >R .S 1 XOS DUP 0 MIN THROW R>
    SWAP - DUP WHILE R> OVER + SWAP R> REPEAT RDROP RDROP ;

    : PUT-FILE1
    0 CREATE-FILE THROW DUP >R WRITE-FILE1 THROW R> CLOSE-FILE THROW
    ;

    'PUT-FILE1 'PUT-FILE 3 CELLS MOVE
    \ BM 4,000,000,000 "hoax" PUT-FILE
    \ .S

    \ -------------------- 8< ------------------------------------


    Pony, you overestimate me if you think I can use your Ciforth.
    I really tried to use Ciforth.
    I will describe to you my first impression from the first contact with Ciforth. Encouraged by your stories of what Ciforth can do I tried to find and download it.
    I wanted to download lina for Debian from https://home.hccnet.nl/a.w.m.van.der.horst/lina.html
    in debian package form and this is where the first problems appeared. I saw 404 Not Found.
    I downloaded an archive from somewhere else. I started lina, tested 1 2 + .
    It works but then I didn't know what else could be done in Ciforth.
    I read the manual and even saw the word list on the green background on the internet.
    Still nothing would work, not even work bye
    I had to kill your Ciforth to get out of it.
    However, I did not give up.
    I've seen here before that you are using a strange WANT
    I thought maybe this is your version of INCLUDE and that you made all the words optional and that you have to load them before using them.
    While looking for information on how to use WANT, I accidentally came across a suggestion that capital letters do matter!
    So i started Ciforth again and exited via BYE
    And it worked so I was happy again and wanted to see what the disassembly of different words looks like.
    Unfortunately, despite some effort, I was unable to load or run any disassembler.
    I gave up here. Forgive me, Pony, for being too dumb to use the Ciforth.
    You are right when you wrote: "You must understand that MPE make her customisers happy, not cater for academic objections."
    But the good news is, you can make people happy too!
    You could prepare a special rich-featured Ciforth release for dumbs, with all your extras and especially a working disassembler.
    I will be very happy to test it.
    Is your Ciforth at all a native Forth?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to siarczek83@gmail.com on Wed Aug 17 17:41:45 2022
    In article <f676bb72-d553-4d23-87ee-3acd97d10630n@googlegroups.com>,
    Micha Kasprzak <siarczek83@gmail.com> wrote:
    Hello Pony! I am very happy to see you in good condition!
    Where have you been all this time? I was worried about you, that something happened to you. You disappeared so suddenly.
    It's not the same here without you.
    Did it occur to you it is holiday season?

    <SNIP>
    I wanted to download lina for Debian from >https://home.hccnet.nl/a.w.m.van.der.horst/lina.html
    in debian package form and this is where the first problems appeared. I saw 404 Not Found.
    I downloaded an archive from somewhere else. I started lina, tested 1 2 + .

    My e-mail address is real, and you can contact me for problems.
    Please have one problem per e-mail, and include paste and copy stuff.

    It works but then I didn't know what else could be done in Ciforth.
    I read the manual and even saw the word list on the green background on the internet.

    The html is not documentation, it is a quick reference.
    The documentation comes in three forms pdf, info, and ps,
    with identical content. Skim through it quickly and you
    can find most things back.

    Still nothing would work, not even work bye

    This addressed in page 2 of chapter 3, gentle introduction.

    <SNIP>
    I've seen here before that you are using a strange WANT

    WANT is a superior library mechanism over INCLUDE or REQUIRE.
    I would like you to use the term unfamiliar instead of strange.

    <SNIP>

    You could prepare a special rich-featured Ciforth release for dumbs,
    with all your extras and especially a working disassembler.

    ??? lina doesn't contain a disassembler. It doesn't make sense in view
    of the existance of the separate program ciasdis.
    The assembler in the library is compatible with ciasdis and only
    intended to assemble words that are tested prior with ciasdis.

    lina64 -a
    WANT ASSEMBLERi86
    CODE aap POP, AX| NEXT, END-CODE
    1 2 3 .S aap .S
    S[ 1 2 3 ]
    S[ 1 2 ] OK

    Contrary to other Forth's, you can inspect words by SEE and
    you have recompilable content for high level code.
    It make no sense to disassemble lina code words. They are
    trivial, and the code is present in the source anyway.
    Moreover you are not forced to use yet another unfamiliar Forth
    assembly syntax, for the source comes in several equivalent
    format's: fasm, nasm, gas.
    You can choose the assembler you are familiar with.

    I will be very happy to test it.
    Is your Ciforth at all a native Forth?

    lina is an abbreviation of linux native. Here "native" means
    that it is a single regular executable.
    The term "native" is used loosely and may have a different
    meaning in other contexts.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_Kasprzak?=@21:1/5 to You on Sat Aug 20 04:25:17 2022
    Hello Pony!
    You wrote:
    lina64 -a
    WANT ASSEMBLERi86
    CODE aap POP, AX| NEXT, END-CODE
    1 2 3 .S aap .S
    S[ 1 2 3 ]
    S[ 1 2 ] OK
    It looks like you are implementing the main data stack called the parameter stack using the CPU stack.
    Since I am unfamiliar with such an idea, I ask is it really so?
    The typical solution in native Forths is that the return stack is implemented with the rsp register. This is natural as the processor places the return addresses of the called words there.
    Native Forths usually implement the data stack using the rbp register.
    Where is your return stack then?
    I need this information because I plan to write Mouse's Ugly Heapsort word in the x64 assembler for all of you and I will have to propose the most universal interface possible between all your Forths and the x64 assembler.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to siarczek83@gmail.com on Sat Aug 20 14:14:33 2022
    In article <a0e0ff97-5341-43c0-87a5-293b193b5563n@googlegroups.com>,
    Micha Kasprzak <siarczek83@gmail.com> wrote:
    Hello Pony!
    You wrote:
    lina64 -a
    WANT ASSEMBLERi86
    CODE aap POP, AX| NEXT, END-CODE
    1 2 3 .S aap .S
    S[ 1 2 3 ]
    S[ 1 2 ] OK
    It looks like you are implementing the main data stack called the parameter stack using the CPU stack.
    Since I am unfamiliar with such an idea, I ask is it really so?
    The typical solution in native Forths is that the return stack is implemented with the rsp register. This is natural as
    the processor places the return addresses of the called words there.
    Native Forths usually implement the data stack using the rbp register.
    Where is your return stack then?
    I need this information because I plan to write Mouse's Ugly Heapsort word in the x64 assembler for all of you and I will
    have to propose the most universal interface possible between all your Forths and the x64 assembler.

    You have the source of lina, in a single file, in a familiar assembler format. The register assignments are documented in this file.

    The assignment of registers go back a long tradition for indirect threaded
    i86 Forth's. Version 3.x of ciforth is in fact an isofication of
    fig-Forth 2.x 8086 . This version is present till this day as version
    0.1 in ciforth cvs archive.

    Estimating your experience the undertaking of an assembler project of this magnitude is daunting.
    You have to do this on top of an existing Forth. Then you have to learn
    the particular format of a Forth assembler.
    Good luck!

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to All on Tue Aug 30 10:44:33 2022
    Why not try something like this. This guy's brilliant.

    https://youtu.be/7r83N3c2kPw

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Wayne morellini on Tue Aug 30 11:29:33 2022
    Wayne morellini <waynemorellini@gmail.com> writes:
    Why not try something like this. This guy's brilliant. https://youtu.be/7r83N3c2kPw

    I only watched a few minutes but that looks pretty good. I liked the
    song at the beginning. I started wondering how well a BASIC style
    line-number editor would work for Forth, and then remembered Forth
    usually used screen editors. That made me realize BASIC is even older
    than Forth. The line number editor came from the days when BASIC was
    normally used on printing terminals. Specifically Teletype Model 33's
    or maybe even older models. Good times.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Wayne morellini on Tue Aug 30 13:57:32 2022
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote:
    Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.

    So answer this question: why should I make something I don't like to watch myself?

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Wed Aug 31 10:10:38 2022
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote:
    Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.

    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Tue Aug 30 18:50:46 2022
    On Wednesday, August 31, 2022 at 10:10:50 AM UTC+10, dxforth wrote:
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote:
    Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.
    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)

    The guy is energetic and exciting, that's how he does it. People like energetic clowns (within reason).
    The song with him dancing with his Apple 2 was a classic. Maybe somebody could do one with
    a 144. :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Tue Aug 30 19:00:35 2022
    On Wednesday, August 31, 2022 at 10:10:50 AM UTC+10, dxforth wrote:
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote:
    Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.
    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)
    BTW some of these guys type so fast. I saw of guy on a video last week, immensely
    faster. It might have been an part of an instructional video on advanced Commodore 64
    graphics coding, or some sort of embedded stuff. But, like Hans, I'm not interested in
    watching that, but this video was interesting because he could pull it off, and jumped and
    train people by reflecting on the thinking of the process, is a racy jump cut kind of style.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Wayne morellini on Wed Aug 31 13:01:55 2022
    On 31/08/2022 11:50 am, Wayne morellini wrote:
    On Wednesday, August 31, 2022 at 10:10:50 AM UTC+10, dxforth wrote:
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote: >>>> Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.
    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)

    The guy is energetic and exciting, that's how he does it. People like energetic clowns (within reason).
    The song with him dancing with his Apple 2 was a classic. Maybe somebody could do one with
    a 144. :)

    Ah - so he was trying to be a clown. That requires talent.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Wayne morellini on Tue Aug 30 19:35:38 2022
    On Wednesday, August 31, 2022 at 12:00:37 PM UTC+10, Wayne morellini wrote:
    On Wednesday, August 31, 2022 at 10:10:50 AM UTC+10, dxforth wrote:
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote:
    Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.
    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)
    BTW some of these guys type so fast. I saw of guy on a video last week, immensely
    faster. It might have been an part of an instructional video on advanced Commodore 64
    graphics coding, or some sort of embedded stuff. But, like Hans, I'm not interested in
    watching that, but this video was interesting because he could pull it off, and jumped and
    train people by reflecting on the thinking of the process, is a racy jump cut kind of style.
    Ah, that's the point, this guy was more about entertaining and training the audience rather
    than expressing himself. So, He worked in with the audience's emotional content. Maybe
    I should do a video on stacking three coins to prove the concept. You could work that into
    a video in stacks. "You don't take from the bottom of the stack, because that would be a
    first in first out buffer". Then show coins stacked on their sides in a holder to illustrate first
    in first out buffering. Then back to the stack, "But taking from further down a stack is often
    slower because it's more awkward" showing taking coins out from the middle. Then, "But
    taking and swapping around the top three coins is easy". Then you move into putting
    values on the coins to illustrate value manipulation more. A step through levels of,
    concepts into data manipulating program flow and factoring etc.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paul Rubin on Wed Aug 31 13:28:04 2022
    On 31/08/2022 4:29 am, Paul Rubin wrote:
    Wayne morellini <waynemorellini@gmail.com> writes:
    Why not try something like this. This guy's brilliant.
    https://youtu.be/7r83N3c2kPw

    I only watched a few minutes but that looks pretty good. I liked the
    song at the beginning. I started wondering how well a BASIC style line-number editor would work for Forth, and then remembered Forth
    usually used screen editors. That made me realize BASIC is even older
    than Forth. The line number editor came from the days when BASIC was normally used on printing terminals. Specifically Teletype Model 33's
    or maybe even older models. Good times.

    IBM expected customers to use a line editor in 1981 - never mind the
    machine had full-screen video capability :(

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Tue Aug 30 22:38:53 2022
    On Wednesday, August 31, 2022 at 1:01:59 PM UTC+10, dxforth wrote:
    On 31/08/2022 11:50 am, Wayne morellini wrote:
    On Wednesday, August 31, 2022 at 10:10:50 AM UTC+10, dxforth wrote:
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote: >>>> Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.
    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)

    The guy is energetic and exciting, that's how he does it. People like energetic clowns (within reason).
    The song with him dancing with his Apple 2 was a classic. Maybe somebody could do one with
    a 144. :)
    Ah - so he was trying to be a clown. That requires talent.
    Clowning around, funning around, or being over the top, loud, fast, classically the sort of impressions
    used of American soldiers in world war 2. The English and Northern Europeans will probably get it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Tue Aug 30 22:34:59 2022
    On Wednesday, August 31, 2022 at 1:01:59 PM UTC+10, dxforth wrote:
    On 31/08/2022 11:50 am, Wayne morellini wrote:
    On Wednesday, August 31, 2022 at 10:10:50 AM UTC+10, dxforth wrote:
    On 31/08/2022 6:57 am, Hans Bezemer wrote:
    On Tuesday, August 30, 2022 at 7:44:35 PM UTC+2, Wayne morellini wrote: >>>> Why not try something like this. This guy's brilliant.
    Well, the best way I can explain that I'm not doing his stuff is that I don't like it.

    For starters - it's MUCH too long to my taste. And I don't like a guy typing in an entire
    program line by line. That's just boring. I don't like videos that entirely consist of
    terminal sessions anyway.
    It must be a 'Big Brother' thing. Who'd have thought there'd be an audience for
    watching people making and correcting mistakes? Wouldn't have happened in 1981 :)

    The guy is energetic and exciting, that's how he does it. People like energetic clowns (within reason).
    The song with him dancing with his Apple 2 was a classic. Maybe somebody could do one with
    a 144. :)
    Ah - so he was trying to be a clown. That requires talent.

    Well, it's Australian terminology, it might be perfectly acceptable in America, but not there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Wayne morellini on Wed Aug 31 01:24:24 2022
    On Wednesday, August 31, 2022 at 7:38:54 AM UTC+2, Wayne morellini wrote:
    Clowning around, funning around, or being over the top, loud, fast, classically the sort of impressions
    used of American soldiers in world war 2. The English and Northern Europeans will probably get it.
    It's the kind of Benny Hill humor that works for the Germans. But not me. I loved all my computers till
    the caps blew, even gave 'em names - but I never danced around with them or kissed them.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Wed Aug 31 20:47:23 2022
    On 31/08/2022 6:24 pm, Hans Bezemer wrote:
    On Wednesday, August 31, 2022 at 7:38:54 AM UTC+2, Wayne morellini wrote:
    Clowning around, funning around, or being over the top, loud, fast, classically the sort of impressions
    used of American soldiers in world war 2. The English and Northern Europeans will probably get it.

    It's the kind of Benny Hill humor that works for the Germans. But not me. I loved all my computers till
    the caps blew, even gave 'em names - but I never danced around with them or kissed them.

    The English got their humour from programming those ZX things, having
    been told it was 'a computer' :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to dxforth@gmail.com on Wed Aug 31 13:48:10 2022
    In article <temkg4$17is$1@gioia.aioe.org>, dxforth <dxforth@gmail.com> wrote: >On 31/08/2022 4:29 am, Paul Rubin wrote:
    Wayne morellini <waynemorellini@gmail.com> writes:
    Why not try something like this. This guy's brilliant.
    https://youtu.be/7r83N3c2kPw

    I only watched a few minutes but that looks pretty good. I liked the
    song at the beginning. I started wondering how well a BASIC style
    line-number editor would work for Forth, and then remembered Forth
    usually used screen editors. That made me realize BASIC is even older
    than Forth. The line number editor came from the days when BASIC was
    normally used on printing terminals. Specifically Teletype Model 33's
    or maybe even older models. Good times.

    IBM expected customers to use a line editor in 1981 - never mind the
    machine had full-screen video capability :(

    I developed FORTRAN programs for Shell on the IBM 360, using a 24x80
    terminal green monochrome terminal. Maybe I (Shell) was a priviledged
    customer (AD 1979/1980).

    Groetjes Albert



    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Wed Aug 31 06:03:54 2022
    It might have been an part of an instructional video on advanced Commodore 64
    graphics coding, or some sort of embedded stuff.

    What's the sense of creating videos about „advanced Commodore 64 graphics coding”,
    when it's perfectly possible to do much more interesting things with TCL/Tk on your
    Windows/Linux/Mac machine — and using much more sensible language than CBM BASIC?
    One can create graphics application easily, comfortably, in the language as extensible as
    Forth — and directly on the machines they are using right now; no need to buy retro-hardware
    neither to use any emulators.

    (and I write this as Commodore user since late 1984)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Zbig on Wed Aug 31 17:00:37 2022
    Zbig <zbigniew2011@gmail.com> writes:
    What's the sense of creating videos about =E2=80=9Eadvanced Commodore 64 gr= >aphics coding=E2=80=9D,
    when it's perfectly possible to do much more interesting things with TCL/Tk=
    on your
    Windows/Linux/Mac machine =E2=80=94 and using much more sensible language t= >han CBM BASIC?

    I think the attraction of retrocomputing is that the old computers are
    easier to understand, and their limits provide a manageable challenge.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Wed Aug 31 16:43:53 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    I started wondering how well a BASIC style
    line-number editor would work for Forth, and then remembered Forth
    usually used screen editors. That made me realize BASIC is even older
    than Forth. The line number editor came from the days when BASIC was >normally used on printing terminals.

    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    BASIC's use of line numbers is brilliant: They serve double duty as
    editing interface and for control flow. As editing interface:

    <number> <commands>

    specifies where the line is inserted, and allows replacing an existing
    line. IIRC:

    <number>

    deletes the line. I found it very intuitive (after having started
    programming on a TI-58C, which was programmed in a
    machine-language-like way, with consecutive step numbers and goto).

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to dxforth on Wed Aug 31 18:02:39 2022
    On Wed, 31 Aug 2022 20:47:23 +1000
    dxforth <dxforth@gmail.com> wrote:

    On 31/08/2022 6:24 pm, Hans Bezemer wrote:
    On Wednesday, August 31, 2022 at 7:38:54 AM UTC+2, Wayne morellini wrote:
    Clowning around, funning around, or being over the top, loud, fast, classically the sort of impressions
    used of American soldiers in world war 2. The English and Northern Europeans will probably get it.

    It's the kind of Benny Hill humor that works for the Germans. But not me. I loved all my computers till
    the caps blew, even gave 'em names - but I never danced around with them or kissed them.

    Same procedure as last year?

    The English got their humour from programming those ZX things, having
    been told it was 'a computer' :)


    If only we'd bought Jupiter Ace's we'd have been so much better off.
    Benny Hill seems to have been even more popular in the US.

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kerr-Mudd, John@21:1/5 to albert@cherry. on Wed Aug 31 18:09:23 2022
    On Wed, 31 Aug 2022 13:48:10 +0200
    albert@cherry.(none) (albert) wrote:

    In article <temkg4$17is$1@gioia.aioe.org>, dxforth <dxforth@gmail.com> wrote:
    On 31/08/2022 4:29 am, Paul Rubin wrote:
    Wayne morellini <waynemorellini@gmail.com> writes:
    Why not try something like this. This guy's brilliant.
    https://youtu.be/7r83N3c2kPw

    I only watched a few minutes but that looks pretty good. I liked the
    song at the beginning. I started wondering how well a BASIC style
    line-number editor would work for Forth, and then remembered Forth
    usually used screen editors. That made me realize BASIC is even older
    than Forth. The line number editor came from the days when BASIC was
    normally used on printing terminals. Specifically Teletype Model 33's
    or maybe even older models. Good times.

    IBM expected customers to use a line editor in 1981 - never mind the >machine had full-screen video capability :(

    I developed FORTRAN programs for Shell on the IBM 360, using a 24x80
    terminal green monochrome terminal. Maybe I (Shell) was a priviledged
    Orange was also available.
    customer (AD 1979/1980).


    But did you have a full-screen editor? Ok, probably as SPF was out by
    then. I started with a line editor. I never saw Forth on the mainframe.

    --
    Bah, and indeed Humbug.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Wed Aug 31 10:15:22 2022
    I think the attraction of retrocomputing is that the old computers are easier to understand, and their limits provide a manageable challenge.

    FOR YOU — I mean the real professional — they are easier to understand (their FW, their electronics etc.). But the average user will have even more trouble with them than with any modern — very advanced and complicated — machine: „what do I click”? „Where is anything clickable”? „Wait… where is the
    mouse”?!
    As for programming: have a look at modest TCL and Tk 8.4.20 packages — they do contain fine docs and demo (started with "sh widget") showing what can
    be done with this and displaying source code.
    TCL is somewhat Pascal/C-like — just easier, extensible and interpreted. Ideal
    for novices (that dislike Forth). And having many extensions available, with Tcllib on the first place.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Thu Sep 1 15:05:58 2022
    On 1/09/2022 3:15 am, Zbig wrote:
    I think the attraction of retrocomputing is that the old computers are
    easier to understand, and their limits provide a manageable challenge.

    FOR YOU — I mean the real professional — they are easier to understand (their FW, their electronics etc.). But the average user will have even more trouble with them than with any modern — very advanced and complicated — machine: „what do I click”? „Where is anything clickable”? „Wait… where is the
    mouse”?!
    As for programming: have a look at modest TCL and Tk 8.4.20 packages — they do contain fine docs and demo (started with "sh widget") showing what can
    be done with this and displaying source code.
    TCL is somewhat Pascal/C-like — just easier, extensible and interpreted. Ideal
    for novices (that dislike Forth). And having many extensions available, with Tcllib on the first place.

    We've made technology into our master. Today's systems are so complex that even the gurus can't trace the source of a fault. And faults there are aplenty.
    If a day goes by where I don't have to consult google for a solution to a problem caused by Windows, MAIL or some other great life-enhancing APP, then I'm feeling lucky for having dodged another bullet. I can only wonder how young folk will fare in a world they can no longer understand nor control.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Anton Ertl on Thu Sep 1 14:38:03 2022
    On 1/09/2022 2:43 am, Anton Ertl wrote:
    Paul Rubin <no.email@nospam.invalid> writes:
    I started wondering how well a BASIC style
    line-number editor would work for Forth, and then remembered Forth
    usually used screen editors. That made me realize BASIC is even older
    than Forth. The line number editor came from the days when BASIC was
    normally used on printing terminals.

    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    BASIC's use of line numbers is brilliant: They serve double duty as
    editing interface and for control flow.

    Control structures are for wimps. Real programmers dispense with the
    syntactic sugar and use GOTO directly - the way God (FORTRAN) intended.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to the.bee...@gmail.com on Wed Aug 31 22:07:53 2022
    On Wednesday, August 31, 2022 at 6:24:25 PM UTC+10, the.bee...@gmail.com wrote:
    On Wednesday, August 31, 2022 at 7:38:54 AM UTC+2, Wayne morellini wrote:
    Clowning around, funning around, or being over the top, loud, fast, classically the sort of impressions
    used of American soldiers in world war 2. The English and Northern Europeans will probably get it.
    It's the kind of Benny Hill humor that works for the Germans. But not me. I loved all my computers till
    the caps blew, even gave 'em names - but I never danced around with them or kissed them.

    Hans Bezemer

    Sorry, I'm a bit of a comedian, writer with a little ties into the productions industry. That is why I try to play
    It so serious here. So, I can see the differences in comedy, the guy is different from Benny Hill style of
    slapstick. It virtually makes me cringe, the way he handles his machine in that clip (for instance, one fall smashed
    Apple 2 case). But slap stick would be so much rougher, even for their style of more moderate script. As it is
    a dummy Apple 2 would have been desirable. To set up a .pre modern style of Benny Hill:
    A guy's wife is telling him, off for collecting computers, that it, sort of conversation. Latter in the day, the guy is
    walking by a mime doing a juggling routine, with an apple 2 undermine arm and an MSc under the other, he has,
    just bought. Who does he spot in the distance walking in his direction, his wife. In fright, the guy chucks both
    computers over his shoulder before she see's him, straight into the mimes juggling hands without him noticing.
    Classic slapstick comedy. From there the guy either looks around and stunned shock sees the mime juggling the
    Apple 2 and Mac (let's put an lithium ion battery pack add on to the Mac, so it has a lit screen for better visual
    affect, after the mime accidentally powers it up when it hits his hands) and looks back to towards his wife,
    pretending he doesn't know about it, when she notices him and looks at the mime juggling the computers. His wife
    Eventually points this put as he is trying to innocently greet her, he pretends not to realise what she is talking about,
    and hesitantly turns around and feigning shock sees the mime juggling the Apple 2 and Mac. He pretends to be as
    stunned as she is at this innocently unusual sight. He either escorts his wife away innocently and looking over his
    shoulder indicates to the me he wants his computers back, without her seeing, or as well, the mime indicates he is
    going keep the computers or he wants money, with the guy angrily scowling over his shoulder and shaking his fist.
    Or, the wife could see through the ruze and get stuck into him, the mime think this is funny and smiles, or takes fright
    and chicks back the computers and then him or him and maybe then his wife, or just both, start trying to juggle the
    computers, and catch hold of them before they hit the ground or they do
    And so forth. I wish I could write again. This is just simple stuff while I'm well enough.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Wed Aug 31 22:07:07 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    I guess I'm not familiar with it. The screen editors I've seen used
    cursor keys etc. They were written for 16 lins x 64 chars "screens".
    AFAIR I never tried to actually use one though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Wed Aug 31 22:19:27 2022
    On Wednesday, August 31, 2022 at 11:03:55 PM UTC+10, Zbig wrote:
    It might have been an part of an instructional video on advanced Commodore 64
    graphics coding, or some sort of embedded stuff.
    What's the sense of creating videos about „advanced Commodore 64 graphics coding”,
    when it's perfectly possible to do much more interesting things with TCL/Tk on your
    Windows/Linux/Mac machine — and using much more sensible language than CBM BASIC?
    One can create graphics application easily, comfortably, in the language as extensible as
    Forth — and directly on the machines they are using right now; no need to buy retro-hardware
    neither to use any emulators.

    (and I write this as Commodore user since late 1984)

    It's a hobby industry, and they use assembler for this. The guy charges a packet for those videos.
    If people want to do that instead of postage stamp collection and buying bikes or cars,
    that's up to them. Not much harm done.

    There are a whole series of register and memory swapping techniques they use to get dozens and
    dozens of different colours, and even old VHS like video quality. Pretty interesting stuff for them.
    But explains why I could get my 80×50 16 colour graphics mode assembly routine to work in the
    the 1980's. There were undocumented quirks. In the other thread somebody mentioned a timing
    Issue as well. I could have gone for 80x100 or more resolution, but wanted square pixels. I wanted
    To do a 160x100 16 colour plus mode and a rotational interlace any resolution higher colour mode,
    but sold it and bought an Amiga. I'm actually looking at using some of this on the video device.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paul Rubin on Thu Sep 1 16:35:49 2022
    On 1/09/2022 3:07 pm, Paul Rubin wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    I guess I'm not familiar with it. The screen editors I've seen used
    cursor keys etc. They were written for 16 lins x 64 chars "screens".
    AFAIR I never tried to actually use one though.

    Fig-Forth Installation Manual included source for a line-based
    editor to get you up and running.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Thu Sep 1 08:30:05 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    I guess I'm not familiar with it. The screen editors I've seen used
    cursor keys etc.

    Apart from my own (on a C64) I have never see one of those. For the command-line-oriented variant, see <http://git.savannah.gnu.org/cgit/gforth.git/plain/blocked.fb>

    It's in blocks format, so you can view it with Forth, or also in Emacs
    with gforth.el loaded.

    Unfortunately, while it says which words are good for what:

    |m marks current position a goes to marked position
    |c moves cursor by n chars t goes to line n and inserts
    |i inserts d deletes marked area
    |r replaces marked area f search and mark
    |il insert a line dl delete a line
    |qx gives a quick index nx gives next index
    |bx gives previous index
    |n goes to next screen b goes to previous screen
    |l goes to screen n v goes to current screen
    |s searches until screen n y yank deleted string

    ... it does not have stack effects for the words or tell where the
    inserted code is coming from (typically from the rest of the line
    after the word).

    This implementation uses AT-XY for highlighting the current position,
    so it won't work on a classic paper terminal (or dumb terminal), but
    if you disable that, it should do ok on a dumb terminal.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Brinkhoff@21:1/5 to Paul Rubin on Thu Sep 1 10:10:42 2022
    Paul Rubin wrote:
    Anton Ertl wrote:
    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    I guess I'm not familiar with it. The screen editors I've seen used
    cursor keys etc. They were written for 16 lins x 64 chars "screens".

    That's the screen format, but it doesn't necessarily have to display on
    a screen.

    I have a day job programming Forth and we use screen format source code.
    But we use an Emacs mode that displays a regular text file in 16-line
    blocks, and adds command for screen-based editing. Regular text files integrate better with other tooling like git. A small program converts
    the files into the 1K blocks Forth wants.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to no.email@nospam.invalid on Thu Sep 1 12:56:25 2022
    In article <87mtbjy96s.fsf@nightsong.com>,
    Paul Rubin <no.email@nospam.invalid> wrote:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    I guess I'm not familiar with it. The screen editors I've seen used
    cursor keys etc. They were written for 16 lins x 64 chars "screens".
    AFAIR I never tried to actually use one though.

    The MSDOS with its addressable character memory supports
    screen editing using cursors movement.
    The msdos version of mina has a wordstar like editor:

    [ excerpt of the mina documentation ]
    -------------------------------
    The editor for editing screens is a very simple screen editor.
    For editing files from within thisforth you just use Your Favorite
    Editor (forthpxref({Manual})).

    The editor becomes available after forthsamp({WANT EDITOR})
    and is invoked by forthsamp({<number> EDIT}) or forthcode({E-S}) for
    the current screen at forthcode({SCR}).

    A screen is copied to the video screen. When you exit, what you
    see within the blue cadre, is copied back into the screen.

    This editor has Wordstar compatible commands.
    No function key works, only control keys.

    ^E ^S ^D ^X <Enter> <Tab> : Cursor up left right down. Next line. Tab.

    ^A ^F : Cursor word left, right.

    ^G ^T ^Y : Delete char, word, line.

    ^Z ^U : Undelete word, line.

    ^W ^P : Undelete word and pop. Undelete line and pop.

    ^J ^O : Join lines, Open (split) line.

    ESC Q / ESC q : quit (abondon edit and do not update.)

    ESC x (or whatever, not q): exit editing, save and update.

    Word and line deletes stack up at the bottom of the screen.
    ^P and ^W pop this stack.
    In all other case the
    last deleted item remains available for multiple undeletes.

    Editing outside of the blue cadre allows useful tricks.

    Small sequences perform useful actions:

    swap lines ^Y ^E ^P.
    delete line without stacking <ret> ^E ^J ^O

    --------------------------------------------------------

    This editor could be added to a to a more powerful 32 and 64 bit
    system using AT-XY. Nowadays it is much easier to edit the normal
    ascii precursor file and convert to a block file in a split second, so
    I considered it not worth while.

    The screen goes back to the Osborne. I discarded the cumbersome
    "starting forth" type editor immediately.
    In the CPM context of the Osborne, the editor was much more useful,
    as screens were actually used.

    I considered this API as brilliant, standing on the shoulders of
    giants, Wordstar standing on the shoulders of IBM.

    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Sep 1 03:50:57 2022
    I can only wonder how young folk will fare in a world they can no longer understand nor control.

    They are going to rely on Siri and Alexa.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Sep 1 03:57:00 2022
    It's a hobby industry, and they use assembler for this. The guy charges a packet for those videos.
    If people want to do that instead of postage stamp collection and buying bikes or cars,
    that's up to them. Not much harm done.

    Assembler-related videos are for different audience than the one about BASIC.
    I can see that reading C-64 forums; not that often the guys that are tinkering with that hopeless CBM BASIC (created by (in)famous Bill, BTW) are switching
    to assembler. They even seldom switch to better BASICs, available for C-64
    (not to mention more sensible languages, like Forth or Pascal).

    Actually the best BASIC available for 8-bit machines was... Comal-80.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Lars Brinkhoff on Thu Sep 1 21:34:49 2022
    On 1/09/2022 8:10 pm, Lars Brinkhoff wrote:
    Paul Rubin wrote:
    Anton Ertl wrote:
    "Screen editor" is ambiguous in Forth. The classic Forth screen
    editor uses an interface that is designed for a paper terminal.

    I guess I'm not familiar with it. The screen editors I've seen used
    cursor keys etc. They were written for 16 lins x 64 chars "screens".

    That's the screen format, but it doesn't necessarily have to display on
    a screen.

    I have a day job programming Forth and we use screen format source code.
    But we use an Emacs mode that displays a regular text file in 16-line
    blocks, and adds command for screen-based editing. Regular text files integrate better with other tooling like git. A small program converts
    the files into the 1K blocks Forth wants.

    Curious why your Forth "wants" blocks - is it not a hosted system?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Thu Sep 1 22:07:34 2022
    On 1/09/2022 8:50 pm, Zbig wrote:
    I can only wonder how young folk will fare in a world they can no longer understand nor control.

    They are going to rely on Siri and Alexa.

    That's our insane dream for them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Sep 1 04:21:55 2022
    For a professional retrocomputing has little appeal, because the
    paying customers have recent hardware.

    I meant ability to understand it all — not necessarily the real interest.

    For the present user these older machines are about as cryptic as the
    modern ones — or even more, because they aren't that „user friendly”.

    And it's not even about machines; for example: a few years ago I saw
    a video on YT explaining that most of these old games („Space Invaders” etc.) are much too difficult for kids of today.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Zbig on Thu Sep 1 11:10:40 2022
    Zbig <zbigniew2011@gmail.com> writes:
    I think the attraction of retrocomputing is that the old computers are=20
    easier to understand, and their limits provide a manageable challenge.

    FOR YOU =E2=80=94 I mean the real professional =E2=80=94 they are easier to=
    understand
    (their FW, their electronics etc.).

    For a professional retrocomputing has little appeal, because the
    paying customers have recent hardware.

    Retrocomputing is an amateur thing. Not all amateur programmers are
    into retrocomputing, but certainly the proportion of amateurs in
    retrocomputing (compared to up-to-date computing) is higher than in
    the professional realm.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxforth on Thu Sep 1 06:12:41 2022
    On Thursday, September 1, 2022 at 7:06:00 AM UTC+2, dxforth wrote:
    We've made technology into our master. Today's systems are so complex that even the gurus can't trace the source of a fault. And faults there are aplenty.
    If a day goes by where I don't have to consult google for a solution to a problem caused by Windows, MAIL or some other great life-enhancing APP, then I'm feeling lucky for having dodged another bullet. I can only wonder how young folk will fare in a world they can no longer understand nor control.

    So very true. I see that in my line of work all the time. People who don't have a
    clue of how the internals work are put on high profile jobs - like half competent
    Java programmers. They use LOADS of libraries - and don't have a clue of how they work. They just know the API.

    All seems fine when a single user does a single job, but when the load comes
    on the system becomes slow and unpredictable. Take a five page trace dump
    ten times a day and they're called in to fix it since "they are the experts".

    And they have absolutely NO IDEA what layer triggers this junk - or why. I've seen projects been abandoned because of that.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxforth on Thu Sep 1 06:14:29 2022
    On Thursday, September 1, 2022 at 8:35:53 AM UTC+2, dxforth wrote:
    Fig-Forth Installation Manual included source for a line-based
    editor to get you up and running.
    That's about the same editor that still resides in 4tH. Something I
    took with me from my ZX Spectrum Forth. So I've been working with
    the same editor for nearly 40 years. ;-)

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Sep 1 06:09:34 2022
    I think it's the fun of doing something elaborate with very few resources. I get a kick out of that
    when doing fixed point calculation in my own uBasic/4tH. Or cramming an entire structure using
    bitfields in a 32 bit signed integer, so I can do a 3D adventure game with a single 256 element
    array.

    That's different story — I referred to the assumptions of „advanced graphics coding”.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Anton Ertl on Thu Sep 1 22:26:45 2022
    On 1/09/2022 9:10 pm, Anton Ertl wrote:
    Zbig <zbigniew2011@gmail.com> writes:
    I think the attraction of retrocomputing is that the old computers are=20 >>> easier to understand, and their limits provide a manageable challenge.

    FOR YOU =E2=80=94 I mean the real professional =E2=80=94 they are easier to= >> understand
    (their FW, their electronics etc.).

    For a professional retrocomputing has little appeal, because the
    paying customers have recent hardware.

    Retrocomputing is an amateur thing. Not all amateur programmers are
    into retrocomputing, but certainly the proportion of amateurs in retrocomputing (compared to up-to-date computing) is higher than in
    the professional realm.

    Not sure how they do it, but I've encountered middle-aged professionals
    who are into retrocomputing as a hobby. For them the 80's is still
    within memory though they must have been quite young at the time. It
    would have been magic for them then but now they're in a position to
    understand how it worked. Can't really do that with iPhones.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Zbig on Thu Sep 1 06:03:02 2022
    On Wednesday, August 31, 2022 at 3:03:55 PM UTC+2, Zbig wrote:
    It might have been an part of an instructional video on advanced Commodore 64
    graphics coding, or some sort of embedded stuff.
    What's the sense of creating videos about „advanced Commodore 64 graphics coding”,
    when it's perfectly possible to do much more interesting things with TCL/Tk on your
    Windows/Linux/Mac machine — and using much more sensible language than CBM BASIC?
    One can create graphics application easily, comfortably, in the language as extensible as
    Forth — and directly on the machines they are using right now; no need to buy retro-hardware
    neither to use any emulators.
    I think it's the fun of doing something elaborate with very few resources. I get a kick out of that
    when doing fixed point calculation in my own uBasic/4tH. Or cramming an entire structure using
    bitfields in a 32 bit signed integer, so I can do a 3D adventure game with a single 256 element
    array.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Fox@21:1/5 to All on Thu Sep 1 06:15:40 2022
    On Thursday, September 1, 2022 at 8:26:47 AM UTC-4, dxforth wrote:

    There are a lot of people on atariage.com who fill that bill in the TI-99 forum.
    IT professionals who are 40 to 50, who remember that
    machine and have developed hardware and software for it just
    because they can.
    Some of the stuff created:
    - porting video games considered impossible in the '80s
    - 1M paged RAM card
    - FPGA enhanced video processor
    - RPi based disk interface with web access
    - A simple web browser (via the RPI)
    -audio encoders that convert recordings to phonemes,
    data is played through the speech synthesizer chip.
    -Ported GCC (on PC) to TI-99a (partial but usable)
    - and of course three Forth systems :-)
    and more...
    (on a machine released in 1978)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to dxforth on Thu Sep 1 16:29:47 2022
    dxforth <dxforth@gmail.com> writes:
    Not sure how they do it, but I've encountered middle-aged professionals
    who are into retrocomputing as a hobby. For them the 80's is still
    within memory though they must have been quite young at the time. It
    would have been magic for them then but now they're in a position to >understand how it worked.

    I don't know how young they would have been at the time, but I got a
    C64 in 1982 at 15; some months later the book "64 intern" appeared
    which contained lots of information about the hardware and
    programming, and I could then explore the C64 down to the metal.

    These days I don't have a desire to write software for this hardware.
    Why do you develop for the 8086 (and 8080?)?

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to Anton Ertl on Thu Sep 1 10:25:15 2022
    On Thursday, September 1, 2022 at 6:53:55 PM UTC+2, Anton Ertl wrote:
    [..]
    I don't know how young they would have been at the time, but I got a
    C64 in 1982 at 15; some months later the book "64 intern" appeared
    which contained lots of information about the hardware and
    programming, and I could then explore the C64 down to the metal.

    These days I don't have a desire to write software for this hardware.
    Why do you develop for the 8086 (and 8080?)?

    I'm older and the fascination started after I left the university.
    In 1973 Dijkstra had just left TU/e and the high-priests didn't
    let us near the Burroughs 7700 -- we had to toil on an 8008 :--)

    I never felt sentimental about any of my computers, not even the
    ones that I built from scratch (a Z80-based from Elektor and the
    M68000 kit from C't). I guess it has to do with the age when you
    first encounter them.

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Marcel Hendrix on Fri Sep 2 08:02:18 2022
    On 2/09/2022 3:25 am, Marcel Hendrix wrote:
    On Thursday, September 1, 2022 at 6:53:55 PM UTC+2, Anton Ertl wrote:
    [..]
    I don't know how young they would have been at the time, but I got a
    C64 in 1982 at 15; some months later the book "64 intern" appeared
    which contained lots of information about the hardware and
    programming, and I could then explore the C64 down to the metal.

    These days I don't have a desire to write software for this hardware.
    Why do you develop for the 8086 (and 8080?)?

    I'm older and the fascination started after I left the university.
    In 1973 Dijkstra had just left TU/e and the high-priests didn't
    let us near the Burroughs 7700 -- we had to toil on an 8008 :--)

    I never felt sentimental about any of my computers, not even the
    ones that I built from scratch (a Z80-based from Elektor and the
    M68000 kit from C't). I guess it has to do with the age when you
    first encounter them.

    Being involved in electronics at a time when 'computers in a chip'
    were appearing made a big impression. What fascinates me now (which
    I didn't know then) was the level of sophistication of the programmers
    of the time e.g. this relocating Z80 assembler from 1977:

    https://retrotechnology.com/herbs_stuff/zasm.pdf

    No IT professionals in white coats here - just young, very clever,
    enthusiastic amateurs. As for the 8008 with its quirky limited
    architecture, it's amazing what they managed to get that chip to do.
    Today it's all spoon-fed and what's produced is, well, bland. I've
    seen no advancement (software-wise) from what was available in 2000.
    In some ways I think it's gone backwards. Today MAIL struggles to
    do what Outlook Express did then. Everything is more integrated but
    it's also more buggy and nobody seems to want (or can't) fix it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to dxforth on Thu Sep 1 16:07:20 2022
    On Friday, September 2, 2022 at 12:02:20 AM UTC+2, dxforth wrote:
    [..]
    No IT professionals in white coats here - just young, very clever, enthusiastic amateurs. As for the 8008 with its quirky limited
    architecture, it's amazing what they managed to get that chip to do.
    Today it's all spoon-fed and what's produced is, well, bland. I've
    seen no advancement (software-wise) from what was available in 2000.
    In some ways I think it's gone backwards.

    The percentage of really smart people stays the same. They're not
    working on the things we know already or that we find valuable.

    Another way to look at it is that were many thousands of enthusiastic
    amateurs in 'those days.' However, almost all of them failed, and we only remember the few that succeeded.

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Marcel Hendrix on Fri Sep 2 13:21:44 2022
    On 2/09/2022 9:07 am, Marcel Hendrix wrote:
    On Friday, September 2, 2022 at 12:02:20 AM UTC+2, dxforth wrote:
    [..]
    No IT professionals in white coats here - just young, very clever,
    enthusiastic amateurs. As for the 8008 with its quirky limited
    architecture, it's amazing what they managed to get that chip to do.
    Today it's all spoon-fed and what's produced is, well, bland. I've
    seen no advancement (software-wise) from what was available in 2000.
    In some ways I think it's gone backwards.

    The percentage of really smart people stays the same. They're not
    working on the things we know already or that we find valuable.

    Yes, very likely. Our notions of what's valuable is tied to products
    we use today - which is already of the past. I don't bemoan real
    innovation - which isn't about control or getting rich. True
    innovation is a disruptor. It threatens mega corporations who are
    all about control. If they can't buy it out, they'll try to bankrupt
    it. At least for a while as none have managed to stop human thought.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxforth on Fri Sep 2 00:28:45 2022
    On Friday, September 2, 2022 at 5:21:47 AM UTC+2, dxforth wrote:
    I don't bemoan real
    innovation - which isn't about control or getting rich. True
    innovation is a disruptor. It threatens mega corporations who are
    all about control. If they can't buy it out, they'll try to bankrupt
    it. At least for a while as none have managed to stop human thought.
    There is a very nice and detailed story of it in "The barbarians led by
    Bill Gates". A startup company was busy developing an early tablet or
    PDA. Microsoft developed a product they NEVER intended to release,
    just to be able to say "we'll take this market anyway, so no need to buy
    this niche product". And they got away with it.

    Sure, this is not the only story of MS killing up and coming technology (Netscape, Java, Linux) but is a nice illustration how large companies
    operate. They are willing to invest money and manpower for no other
    purpose than to kill off the competition.

    Add to that that businesses are quite conservative and tend to follow
    the market leader just to avoid risks (to avoid inner-company politics
    kicking in) and you got yourself a monopoly.

    Can anyone explain to me why companies STILL use MS Office (instead
    of LibreOffice) while most of the users don't even use a hair of its possibilities and are willing to pay a pretty bundle for it and go through
    all the hassle of licence management (which may be one of the most
    complex parts of ITSM)?

    I know lots of companies that pay for the FULL package, just to avoid
    these very disrupting licencing audits.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Fri Sep 2 05:51:37 2022
    Can anyone explain to me why companies STILL use MS Office (instead
    of LibreOffice) while most of the users don't even use a hair of its possibilities and are willing to pay a pretty bundle for it and go through all the hassle of licence management (which may be one of the most
    complex parts of ITSM)?

    My guess is, that for two main reasons:
    — easy data exchange (no problem with file format)
    — to avoid opinion of kind: „they are so poor, that they
    have to use some free software; they can't afford MS Office”

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Fox@21:1/5 to the.bee...@gmail.com on Fri Sep 2 06:15:23 2022
    On Friday, September 2, 2022 at 3:28:47 AM UTC-4, the.bee...@gmail.com wrote:

    Can anyone explain to me why companies STILL use MS Office (instead
    of LibreOffice) while most of the users don't even use a hair of its possibilities and are willing to pay a pretty bundle for it and go through all the hassle of licence management (which may be one of the most
    complex parts of ITSM)?

    I know lots of companies that pay for the FULL package, just to avoid
    these very disrupting licencing audits.

    Hans Bezemer

    Having lead the Canadian arm of an American fortune 500 company it's simple priority management Hans.
    In companies that generate real money these costs are trivial, senior managers don't have to explain WHY they spent the money and it's tax deductible.
    There are more important things to worry about in that realm.
    (Making more money comes to mind. You know that pursuit of infinite growth thing) :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Fri Sep 2 11:10:22 2022
    On Thursday, September 1, 2022 at 11:09:36 PM UTC+10, Zbig wrote:
    I think it's the fun of doing something elaborate with very few resources. I get a kick out of that
    when doing fixed point calculation in my own uBasic/4tH. Or cramming an entire structure using
    bitfields in a 32 bit signed integer, so I can do a 3D adventure game with a single 256 element
    array.
    That's different story — I referred to the assumptions of „advanced graphics coding”.

    Don't misread things. It's advanced relative to the system. You could say that that itself is advanced to just using a high level language to draw stuff.
    On a system technically a lot more advanced.

    What Hans described is the truth of it, it's for the thrill, like my interest in doing a modern retro alternative, and milder retro upgrade to a zx81 design. If the fan base was there, it could justify doing the product financially. But, I've come up
    with an idea to do it more cheaply and simply, in a way that represents what they could have done, it's going be too hard to find an 6 micron, or whatever they used, lab to do an proof of concept update. But, it occured to me, how difficult would it be
    to modify a zx81 fpga image, to simulate the improvments, approximately as they could have come out of a fab. I had come here tonight to start a thread to ask what people with expert thought, but I'm a bit too tired.


    Anybody know?

    I've had bad liver problems now, and have to cut back daily spend to $10-$20AU a day, to make it through. Fortunately I've stocked up on other treatments previously. $10 her probably buys you $3.33 or something spending power in the US. So, thos stiff
    is going into the top much basket
    If I find somebody who has done a zx81 fpga, who would like to implement the mods, that would be sufficient to show things, and you never know, maybe implement a b or p 17 or something, as well as the z80.

    Btw: Zbig, another appeal, is the games are fun, and a different better experience some of them, compared to various modem game play.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Brinkhoff@21:1/5 to dxforth on Fri Sep 2 17:38:44 2022
    dxforth wrote:
    Curious why your Forth "wants" blocks - is it not a hosted system?

    It's this one:
    https://github.com/ablevm/able-forth

    This Forth is hosted, but it doesn't have any file I/O, so all data has
    to be inside the memory image when it starts up. There's a bootstrap
    image with the basic system, but additional code is compiled by putting
    source screen blocks into the image and then loading it.

    One benefit of doing this is security. When Forth is up and running, no
    code can access or wreak havoc with the host file system.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Fri Sep 2 11:59:41 2022
    On Thursday, September 1, 2022 at 8:57:01 PM UTC+10, Zbig wrote:
    It's a hobby industry, and they use assembler for this. The guy charges a packet for those videos.
    If people want to do that instead of postage stamp collection and buying bikes or cars,
    that's up to them. Not much harm done.
    Assembler-related videos are for different audience than the one about BASIC. I can see that reading C-64 forums; not that often the guys that are tinkering
    with that hopeless CBM BASIC (created by (in)famous Bill, BTW) are switching to assembler. They even seldom switch to better BASICs, available for C-64 (not to mention more sensible languages, like Forth or Pascal).

    Actually the best BASIC available for 8-bit machines was... Comal-80.

    Is it as good as white lightning, they did after their Firth, later sold as laser basic
    by Ocean or somebody.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Fri Sep 2 11:27:07 2022
    Anybody know?

    If you meant „that thrill” — isn't it more thrilling to create something using
    „ordinary” off-the-shelf parts, instead of using FPGAs, for example: https://sites.google.com/site/retroelec/retroelecs-electronics-projects/r162

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Fri Sep 2 13:26:47 2022
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,

    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.

    they did after their Firth, later sold as laser basic by Ocean or somebody.

    No, „they” didn't do it. Google for Comal-80 and you'll see.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Brian Fox on Fri Sep 2 15:02:27 2022
    On Friday, September 2, 2022 at 3:15:24 PM UTC+2, Brian Fox wrote:
    Having lead the Canadian arm of an American fortune 500 company it's simple priority management Hans.
    In companies that generate real money these costs are trivial, senior managers don't have to explain WHY they spent the money and it's tax deductible.
    There are more important things to worry about in that realm.
    (Making more money comes to mind. You know that pursuit of infinite growth thing) :)
    Yeah - as if you're the first one telling me that story. But if you add to that the effort
    in lost business days, the extra amount of workforce involved in it all - and all the hardware
    and software you have to invest to get it all running, it adds up to some pretty nice sum.

    And I know it, because I was involved in several projects concerning this, calculating the
    total cost (and total savings) involved. I tell you what the real reason is: fear - or better:
    uncertainty. Most of these petty managers can't handle a total redesign of their environment -
    whatever savings or other benefits it brings on the long run. They're too chicken to have
    such a bold vision, because they're risk avoiders - and frankly, lack every bit of vision.

    Sure, not all managers can be Elon Musk, but most even lack even the most basic skills for
    leadership. They buy all the books, follow all the $1000 a day courses - but they will never
    ever be leaders.

    If you want to be a leader, just go your way. Then look back. If no one is following you,
    then you know.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Fox@21:1/5 to the.bee...@gmail.com on Fri Sep 2 17:10:30 2022
    On Friday, September 2, 2022 at 6:02:29 PM UTC-4, the.bee...@gmail.com wrote:

    Sure, not all managers can be Elon Musk, but most even lack even the most basic skills for
    leadership. They buy all the books, follow all the $1000 a day courses - but they will never
    ever be leaders.

    If you want to be a leader, just go your way. Then look back. If no one is following you,
    then you know.

    Hans Bezemer

    I can' t disagree with you there. Due to my unusual career path, I didn't quite match
    the thinking of the $1000/day course people.
    I was accused of "innovation" which is kind of slur in some corporate circles. :)
    To me it seemed like "common sense".
    I know our team got results and some things went international ...
    I never looked back much. ;-)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to the.bee...@gmail.com on Fri Sep 2 19:33:20 2022
    On Saturday, September 3, 2022 at 8:02:29 AM UTC+10, the.bee...@gmail.com wrote:
    On Friday, September 2, 2022 at 3:15:24 PM UTC+2, Brian Fox wrote:
    Having lead the Canadian arm of an American fortune 500 company it's simple priority management Hans.
    In companies that generate real money these costs are trivial, senior managers don't have to explain WHY they spent the money and it's tax deductible.
    There are more important things to worry about in that realm.
    (Making more money comes to mind. You know that pursuit of infinite growth thing) :)
    Yeah - as if you're the first one telling me that story. But if you add to that the effort
    in lost business days, the extra amount of workforce involved in it all - and all the hardware
    and software you have to invest to get it all running, it adds up to some pretty nice sum.

    And I know it, because I was involved in several projects concerning this, calculating the
    total cost (and total savings) involved. I tell you what the real reason is: fear - or better:
    uncertainty. Most of these petty managers can't handle a total redesign of their environment -
    whatever savings or other benefits it brings on the long run. They're too chicken to have
    such a bold vision, because they're risk avoiders - and frankly, lack every bit of vision.

    Sure, not all managers can be Elon Musk, but most even lack even the most basic skills for
    leadership. They buy all the books, follow all the $1000 a day courses - but they will never
    ever be leaders.

    If you want to be a leader, just go your way. Then look back. If no one is following you,
    then you know.

    Hans Bezemer

    I'll back Hans up here. You even find this out from savvy industry experienced lecturers.
    I didn't need to be taught myself much of this here, I could see it. We get enough people like
    that too, all trying to chicken hen peck others who get out of line with their abject failure.l to
    advance mentally and in rebelling. Their subconscious (inner man) crushed crippling them.
    Of course we are talking about two types of these people there.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Lars Brinkhoff on Sat Sep 3 12:52:32 2022
    On 3/09/2022 3:38 am, Lars Brinkhoff wrote:
    dxforth wrote:
    Curious why your Forth "wants" blocks - is it not a hosted system?

    It's this one:
    https://github.com/ablevm/able-forth

    This Forth is hosted, but it doesn't have any file I/O, so all data has
    to be inside the memory image when it starts up. There's a bootstrap
    image with the basic system, but additional code is compiled by putting source screen blocks into the image and then loading it.

    One benefit of doing this is security. When Forth is up and running, no
    code can access or wreak havoc with the host file system.

    Thanks. I knew there had to be an explanation :) In my case 'I' wanted screens (over text). Being a hosted system that meant tools to manipulate screen files. So I created SCOPY - one of the more fulfilling (from a programming and use perspective) utils I've written.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Fri Sep 2 19:24:58 2022
    On Saturday, September 3, 2022 at 6:26:48 AM UTC+10, Zbig wrote:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.

    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Fri Sep 2 20:03:37 2022
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.

    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lars Brinkhoff@21:1/5 to dxforth on Sat Sep 3 05:48:58 2022
    dxforth wrote:
    Thanks. I knew there had to be an explanation :) In my case 'I' wanted screens (over text).

    I didn't use the screen format before this project, so it's a new
    experience. I think it's interesting. It certainly encourages the good
    habit of keeping definitions to be shorter than 16 lines!

    In the end, I think there's not a large diffence between using screens
    or files. The conveniences of using a regular text editor (Emacs) with
    added screen commands make it a wash. Of course, a traditional Forth line-based screen editor will be a more spartan experience.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Brian Fox on Sat Sep 3 06:15:06 2022
    On Saturday, September 3, 2022 at 2:10:31 AM UTC+2, Brian Fox wrote:
    I can' t disagree with you there. Due to my unusual career path, I didn't quite match
    the thinking of the $1000/day course people.
    I was accused of "innovation" which is kind of slur in some corporate circles. :)
    To me it seemed like "common sense".
    I know our team got results and some things went international ...
    I never looked back much. ;-)

    For those who prefer (arguably) the most controversial language in the world - how can our experiences differ. I had the good fortune to work with a few
    (a handful in total - go figure in a 40y career) very GOOD managers.

    I was tasked to introduce Configuration Management (ITSM) in a greenfield. There
    were over 20 IBM engineers(!) working on a custom IT service management
    system. I took a look at it and told the guy it wouldn't work. He told me that could not be, so he tried the thing himself. And found out.

    So he said how I would would wanna do it. I said I'll program something myself for the time being. Best way to find out the specifications. So a week later all people were invited to a company meeting and he said "We failed with IBM. We're not gonna do it in MS Access and I'm sure we're gonna succeed". You got to have a few big hairy ones IMHO to tell that to close to a thousand employees and still feel you're credible.

    Now I didn't roll this out company wide at first, but just one or two departments.
    And quickly (while slowly expanding over the entire company) we moved the backends to SQL server. In the meanwhile I'd figured out how to implement a semantic datamodel on a relational database, so datamodel maintenance
    was effectively reduced to zero.

    Then we started merging the standalone DB's to a single instance (it's semantic DB, so we could). We replaced the MS Access GUIs with web GUIs. To make a
    long story short - after I left the company they outsourced the entire thing to IBM
    and the system was left running until 2015, because IBM didn't have a thing that
    even came close.

    Now that was a guy with vision - who listened to his employees and was not afraid to write off a few million because he knew a bad decision had been made.

    It's scary how scarce guys like these are.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Lars Brinkhoff on Sat Sep 3 16:58:53 2022
    Lars Brinkhoff <lars.spam@nocrew.org> writes:
    This Forth is hosted, but it doesn't have any file I/O, so all data has
    to be inside the memory image when it starts up. There's a bootstrap
    image with the basic system, but additional code is compiled by putting >source screen blocks into the image and then loading it.

    Even (or especially) with the source code loaded into memory as
    read-only code, I fail to see the advantage of using screens rather
    than newline-separated lines. The Forth-side processing may be a
    little simpler, but that's balanced by having to write a converter and
    always converting the code before building the image.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sat Sep 3 10:00:08 2022
    On Saturday, September 3, 2022 at 1:03:38 PM UTC+10, Zbig wrote:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.

    Sorry, I didn't say the two ever were connected, I asked if it was as good, or something. If you can read then
    please don't criticise sufficient information, or get things so wrong and falsely accuse people. There's enough
    stuff happening around the forum.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Valencia@21:1/5 to Anton Ertl on Sat Sep 3 11:06:25 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    ... I fail to see the advantage of using screens rather
    than newline-separated lines.

    Screen-oriented source didn't "click" with me until I used it along with
    shadow screens for code comments. Of course, this was in the context of ForthOS, which embedded block source within a very simple, very resilient filesystem.

    http://sources.vsta.org/forthos/fs.html

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Lars Brinkhoff on Sat Sep 3 11:38:20 2022
    Lars Brinkhoff <lars.spam@nocrew.org> writes:
    I think it's interesting. It certainly encourages the good habit of
    keeping definitions to be shorter than 16 lines!

    I thought the 64 char lines were also somewhat constraining, especially
    if you write stack comments inside definitions. I guess the workaround
    was shadow screens, so you sort of had a comment line for each program
    line.

    I think someone did a Forth a while back where screens were 2K bytes
    instead of 1K. So each screen had 24 lines of 80 chars per line, plus a
    title line, plus 48 bytes used for metadata of some sort.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Andy Valencia on Sat Sep 3 11:45:15 2022
    Andy Valencia <vandys@vsta.org> writes:
    http://sources.vsta.org/forthos/fs.html

    This is nice, I had seen it before but forgotten the specifics. It must
    have been what I was remembering when I mentioned a 25x80 screen system
    in another post a couple of minutes ago. Obviously I got some of the
    specifics wrong in that post. Or I may have had a similar idea myself,
    that differed in its details.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sat Sep 3 11:45:43 2022
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Sorry, I didn't say the two ever were connected

    Yes, you did:

    Actually the best BASIC available for 8-bit machines was... Comal-80.

    Is it as good as white lightning, they did after their Firth, later sold as laser basic
    by Ocean or somebody.

    If you weren't referring to Comal-80 — which I was talking about — then what actually
    you were referring to?

    So again: „use Google, Luke”.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sat Sep 3 20:57:23 2022
    On Sunday, September 4, 2022 at 4:45:45 AM UTC+10, Zbig wrote:
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Sorry, I didn't say the two ever were connected
    Yes, you did:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning, they did after their Firth, later sold as laser basic
    by Ocean or somebody.

    If you weren't referring to Comal-80 — which I was talking about — then what actually
    you were referring to?

    So again: „use Google, Luke”.

    Please stop stirring. Anybody can see I'm not calling itwhitelighting and comparing
    it to itself, instead of asking how it compares to a second product. If you are saying that
    Comal-80 is a newer version of the same product (still a second or third product) that's better,
    than say it, rather than trying to act smart.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sat Sep 3 21:37:15 2022
    On Saturday, September 3, 2022 at 1:03:38 PM UTC+10, Zbig wrote:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.

    Well, it was more accurate, it was white lightning basic they did after the original white lightning forth, then
    they did laser basic by Ocean, as I said.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sat Sep 3 21:29:13 2022
    On Sunday, September 4, 2022 at 4:45:45 AM UTC+10, Zbig wrote:
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Sorry, I didn't say the two ever were connected
    Yes, you did:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning, they did after their Firth, later sold as laser basic
    by Ocean or somebody.

    If you weren't referring to Comal-80 — which I was talking about — then what actually
    you were referring to?

    So again: „use Google, Luke”.

    Read about white lightning basic and laser basic here:

    https://archive.org/stream/White_Lightning_BASIC_Lightning/White_Lightning_BASIC_Lightning_djvu.txt

    http://www.jimbrooks.org/archive/programming/forth/WhiteLightningFORTH_BasicLightning_LaserBasic_OasisSoftware.php

    https://www.everygamegoing.com/larticle/Laser-Basic-000/41607/

    Except for ForthOS, white lightning is one of the few legendary
    Forth works out there, which morphed into basic and machine code versions.

    I still haven't found a reference to it becoming Comal-80. But, there is another
    language they are using for cross development in the retro scene now.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paul Rubin on Sun Sep 4 19:24:33 2022
    On 4/09/2022 4:38 am, Paul Rubin wrote:
    Lars Brinkhoff <lars.spam@nocrew.org> writes:
    I think it's interesting. It certainly encourages the good habit of
    keeping definitions to be shorter than 16 lines!

    I thought the 64 char lines were also somewhat constraining, especially
    if you write stack comments inside definitions. I guess the workaround
    was shadow screens, so you sort of had a comment line for each program
    line.

    I think someone did a Forth a while back where screens were 2K bytes
    instead of 1K. So each screen had 24 lines of 80 chars per line, plus a title line, plus 48 bytes used for metadata of some sort.

    Screens are not the problem; it's whether you hate them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Sep 4 02:40:22 2022
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Well, it was more accurate, it was white lightning basic they did after the original white lightning forth, then
    they did laser basic by Ocean, as I said.

    Obviously you have no idea what are you talking about.
    „White Lightning” and „Basic Lightning” were two completely different products.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Sep 4 02:39:00 2022
    niedziela, 4 września 2022 o 05:57:24 UTC+2 Wayne morellini napisał(a):
    On Sunday, September 4, 2022 at 4:45:45 AM UTC+10, Zbig wrote:
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Sorry, I didn't say the two ever were connected
    Yes, you did:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning, they did after their Firth, later sold as laser basic
    by Ocean or somebody.

    If you weren't referring to Comal-80 — which I was talking about — then what actually
    you were referring to?

    So again: „use Google, Luke”.
    Please stop stirring. Anybody can see I'm not calling itwhitelighting and comparing

    Indeed „Anybody can see” for oneself — I don't need to copy-paste anything more.

    it to itself, instead of asking how it compares to a second product. If you are saying that
    Comal-80 is a newer version of the same product (still a second or third product) that's better,
    than say it, rather than trying to act smart.

    Rubbish.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Sun Sep 4 14:38:18 2022
    In article <2022Sep3.185853@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Lars Brinkhoff <lars.spam@nocrew.org> writes:
    This Forth is hosted, but it doesn't have any file I/O, so all data has
    to be inside the memory image when it starts up. There's a bootstrap
    image with the basic system, but additional code is compiled by putting >>source screen blocks into the image and then loading it.

    Even (or especially) with the source code loaded into memory as
    read-only code, I fail to see the advantage of using screens rather
    than newline-separated lines. The Forth-side processing may be a
    little simpler, but that's balanced by having to write a converter and
    always converting the code before building the image.

    Then there is no advantage to "simpler" screens without line breaks.
    My screen are simple 1K byte files.
    I like the property that screens provide a means to break code in
    neat little packets.
    Sacrificing 1 in 64 characters for a line break is not a big deal.
    A simple \ using PARSE works portably for this.


    - anton
    Groetjes Albert
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Sep 4 07:54:37 2022
    My screen are simple 1K byte files.
    I like the property that screens provide a means to break code in
    neat little packets.
    Sacrificing 1 in 64 characters for a line break is not a big deal.

    Maybe it isn't — but, actually, if the screens are viewed/edited with dedicated tools, then why „sacrifice” any characters at all?
    And even outside Forth creating ad hoc screen viewer is rather trivial
    (I mean e.g. TCL's „read channelId numChars”).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Sun Sep 4 08:48:53 2022
    On Sunday, September 4, 2022 at 7:24:38 PM UTC+10, dxforth wrote:
    On 4/09/2022 4:38 am, Paul Rubin wrote:
    Lars Brinkhoff <lars...@nocrew.org> writes:
    I think it's interesting. It certainly encourages the good habit of
    keeping definitions to be shorter than 16 lines!

    I thought the 64 char lines were also somewhat constraining, especially
    if you write stack comments inside definitions. I guess the workaround
    was shadow screens, so you sort of had a comment line for each program line.

    I think someone did a Forth a while back where screens were 2K bytes instead of 1K. So each screen had 24 lines of 80 chars per line, plus a title line, plus 48 bytes used for metadata of some sort.
    Screens are not the problem; it's whether you hate them.

    :)

    I remember when Code Warrior came out. It was a popular language development System. I had thought, if only there was a forth version (actually, was there ever?).
    It was about innovative esse, not something too Forth.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sun Sep 4 08:55:15 2022
    On Sunday, September 4, 2022 at 7:40:23 PM UTC+10, Zbig wrote:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Well, it was more accurate, it was white lightning basic they did after the original white lightning forth, then
    they did laser basic by Ocean, as I said.
    Obviously you have no idea what are you talking about.
    „White Lightning” and „Basic Lightning” were two completely different products.

    I'm not the one who is acting such. If you think they used entirely different routines..
    It was a game development orientated platform. I doubt they didn't transfer optimised
    Game code from one to another, which would be the heart link I metaphorically referred
    to, but I note that useful idea in English doesn't transfer too well to all cultures.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sun Sep 4 08:49:56 2022
    On Sunday, September 4, 2022 at 7:39:01 PM UTC+10, Zbig wrote:
    niedziela, 4 września 2022 o 05:57:24 UTC+2 Wayne morellini napisał(a):
    On Sunday, September 4, 2022 at 4:45:45 AM UTC+10, Zbig wrote:
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Sorry, I didn't say the two ever were connected
    Yes, you did:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning, they did after their Firth, later sold as laser basic
    by Ocean or somebody.

    If you weren't referring to Comal-80 — which I was talking about — then what actually
    you were referring to?

    So again: „use Google, Luke”.
    Please stop stirring. Anybody can see I'm not calling itwhitelighting and comparing
    Indeed „Anybody can see” for oneself — I don't need to copy-paste anything more.
    it to itself, instead of asking how it compares to a second product. If you are saying that
    Comal-80 is a newer version of the same product (still a second or third product) that's better,
    than say it, rather than trying to act smart.
    Rubbish.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Sep 4 09:28:48 2022
    niedziela, 4 września 2022 o 17:55:17 UTC+2 Wayne morellini napisał(a):
    On Sunday, September 4, 2022 at 7:40:23 PM UTC+10, Zbig wrote:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Well, it was more accurate, it was white lightning basic they did after the original white lightning forth, then
    they did laser basic by Ocean, as I said.
    Obviously you have no idea what are you talking about.
    „White Lightning” and „Basic Lightning” were two completely different products.
    I'm not the one who is acting such. If you think they used entirely different routines..
    It was a game development orientated platform. I doubt they didn't transfer optimised
    Game code from one to another, which would be the heart link I metaphorically referred
    to, but I note that useful idea in English doesn't transfer too well to all cultures.

    „White Lightning” was Forth, while „Basic Lightning” was BASIC. Neither was related to Comal-80.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Sep 4 09:44:53 2022
    „White Lightning” was Forth, while „Basic Lightning” was BASIC. Neither was related to Comal-80.
    Again, enough said, I never said differently, we can see.

    Sure, you were just „using a metaphore”.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sun Sep 4 09:40:37 2022
    On Monday, September 5, 2022 at 2:28:50 AM UTC+10, Zbig wrote:
    niedziela, 4 września 2022 o 17:55:17 UTC+2 Wayne morellini napisał(a):
    On Sunday, September 4, 2022 at 7:40:23 PM UTC+10, Zbig wrote:
    Actually the best BASIC available for 8-bit machines was... Comal-80.
    Is it as good as white lightning,
    No, „White Lightning” is Forth („apples to oranges”), Comal-80 is Pascal-like BASIC.
    they did after their Firth, later sold as laser basic by Ocean or somebody.
    No, „they” didn't do it. Google for Comal-80 and you'll see.
    What are you taking about. They did a further then they did a basic, the basic was eventually
    called laser basic or something. I did look u the history to try and contact the old developers.
    Oh, yeah — „or something”; how precisely and accurately described.

    Comal-80 has no connection to White Lightning whatsoever — I told you: google for this, recall the facts.
    Well, it was more accurate, it was white lightning basic they did after the original white lightning forth, then
    they did laser basic by Ocean, as I said.
    Obviously you have no idea what are you talking about.
    „White Lightning” and „Basic Lightning” were two completely different products.
    I'm not the one who is acting such. If you think they used entirely different routines..
    It was a game development orientated platform. I doubt they didn't transfer optimised
    Game code from one to another, which would be the heart link I metaphorically referred
    to, but I note that useful idea in English doesn't transfer too well to all cultures.
    „White Lightning” was Forth, while „Basic Lightning” was BASIC. Neither was related to Comal-80.

    Again, enough said, I never said differently, we can see.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to Zbig on Sun Sep 4 09:55:18 2022
    On Monday, September 5, 2022 at 2:44:54 AM UTC+10, Zbig wrote:
    „White Lightning” was Forth, while „Basic Lightning” was BASIC. Neither was related to Comal-80.
    Again, enough said, I never said differently, we can see.
    Sure, you were just „using a metaphore”.
    Actually, that is the wrong term. The fact they probably share the same game engine routines, is what I was
    getting at, as it's plain I couldn't be saying that they were the same generally.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Andy Valencia on Sun Sep 4 16:43:26 2022
    Andy Valencia <vandys@vsta.org> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    ... I fail to see the advantage of using screens rather
    than newline-separated lines.

    Screen-oriented source didn't "click" with me until I used it along with >shadow screens for code comments.

    I used screens for Forth on the C64 (so for ~10 years), with
    40x25 screens, and a full-screen editor I had written myself. I did
    not have shadow screens, but I did not miss them.

    For other programming languages and in other settings I used
    newline-separated files for the source code, with the editors
    available for that. They allowed more flexibility and were less
    cumbersome: no messy shifting of words between screens when some code
    needed growing; and I can have a word and the next one on the display
    at a time, even if they would be on different screens in a
    screen-based system.

    So when I got a more modern OS below my Forth system, I switched to
    using newline-separated files and never looked back. And from what I
    see on other hosted systems, it was the same for most others. This
    also integrates better with the rest of the tools on these OSs, e.g.,
    git and grep.

    Of course, this was in the context of
    ForthOS, which embedded block source within a very simple, very resilient >filesystem.

    Sure, in certain environments, such as the ones where Forth
    originated, or the C64, and apparently also ForthOS, the
    implementation simplicity of screen files outweighs the costs.

    But for the use of Lars Brinkhoff, where there is no editing in the
    Forth system, and the blocks are converted from newline-separated
    files, I doubt that there is a significant difference in overall
    complexity.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Sun Sep 4 10:18:07 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I used screens for Forth on the C64 (so for ~10 years), with
    40x25 screens...

    Were the 40 char lines horribly constraining?

    no messy shifting of words between screens when some code
    needed growing

    Would a typical approach be to split the growing screen into two, rather
    than shifting code from one screen to some other existing one? Or was
    disk space (such as on floppies) usually also scarce?

    Sure, in certain environments, such as the ones where Forth
    originated, or the C64, and apparently also ForthOS, the
    implementation simplicity of screen files outweighs the costs.

    I saved an old Jonah Thomas post (originally from 2003 though I came
    across it much later) that made an impression on me. A quote from it:

    Blocks gave an integrated editor, and fast integrated compiling,
    and a sort of paged virtual memory, and something you could easily
    turn into a somewhat inferior database, etc. It wasn't the best
    solution for very much but it gave an easy adequate solution for a
    whole lot.

    I've never used a blocks system but the above quote always made me
    wonder what it was like.

    I've played with the idea of a resident Forth using blocks on a modern
    MCU, but I think it would be better to use files when there is enough
    storage, or a cross-compiler when there is not.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to albert@cherry. on Sun Sep 4 17:03:38 2022
    albert@cherry.(none) (albert) writes:
    Sacrificing 1 in 64 characters for a line break is not a big deal.

    At least in classical Forth you cannot continue on the first character
    of the next line in a screen if you used the last character of the
    previous line for a word; you need at least one space between words.
    So even if you fill the screen with code, there is no memory advantage
    to the screen (maybe for the last newline).

    I, however, prefer to group code into lines to reflect the structure
    of the code, which leads to some lines being much shorter than others.
    In that setting, newline separation is more memory-efficient than the
    fixed line length of screens.

    I measured the memory overhead of screens using the example of <http://git.savannah.gnu.org/cgit/gforth.git/plain/blocked.fb>, which
    is written in a much more horizontal style than I tend to use:

    [~/gforth:132645] gforth -e ': b>n ( c-addr u -- ) slurp-file ( c-addr1 u1 ) bounds ?do i 64 -trailing type cr 64 +loop ; s" blocked.fb" b>n bye' >blocked.fs
    [~/gforth:132646] ls -l blocked.f*
    -rw-r--r-- 1 anton users 4096 Oct 1 2020 blocked.fb
    -rw-r--r-- 1 anton users 2629 Sep 4 19:39 blocked.fs

    So even for this horizontal code, the memory advantage of
    new-line-separated files is more than a factor of 1.5.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to albert on Mon Sep 5 04:04:00 2022
    On 4/09/2022 10:38 pm, albert wrote:
    In article <2022Sep3.185853@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    Lars Brinkhoff <lars.spam@nocrew.org> writes:
    This Forth is hosted, but it doesn't have any file I/O, so all data has
    to be inside the memory image when it starts up. There's a bootstrap
    image with the basic system, but additional code is compiled by putting
    source screen blocks into the image and then loading it.

    Even (or especially) with the source code loaded into memory as
    read-only code, I fail to see the advantage of using screens rather
    than newline-separated lines. The Forth-side processing may be a
    little simpler, but that's balanced by having to write a converter and
    always converting the code before building the image.

    Then there is no advantage to "simpler" screens without line breaks.
    My screen are simple 1K byte files.
    I like the property that screens provide a means to break code in
    neat little packets.
    Sacrificing 1 in 64 characters for a line break is not a big deal.
    A simple \ using PARSE works portably for this.

    C64 UltraForth had a clever way of implementing 1K screens. Since
    a C64 screen only needed 1000 characters (40x25), UF had the first
    24 lines consist of 41 chars and the last line 40 chars. The 41st
    character (just a space) being off the screen, effectively behaved
    like a line terminator with the result the last character of the
    previous line could never run into the next line (unlike regular
    64x16 screens).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Anton Ertl on Mon Sep 5 04:53:57 2022
    On 5/09/2022 2:43 am, Anton Ertl wrote:
    ...
    For other programming languages and in other settings I used newline-separated files for the source code, with the editors
    available for that. They allowed more flexibility and were less
    cumbersome: no messy shifting of words between screens when some code
    needed growing; and I can have a word and the next one on the display
    at a time, even if they would be on different screens in a
    screen-based system.

    So when I got a more modern OS below my Forth system, I switched to
    using newline-separated files and never looked back.

    With any tool one optimizes it to do the most needed tasks easily.
    It's as true for screen editors as it is for regular editors. Screens
    aren't a problem for those who use them. They are however a problem
    for those who see screens as holding Forth back.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Valencia@21:1/5 to Paul Rubin on Sun Sep 4 12:11:50 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    I think someone did a Forth a while back where screens were 2K bytes
    instead of 1K. So each screen had 24 lines of 80 chars per line, plus a title line, plus 48 bytes used for metadata of some sort.

    My ForthOS?

    I used 4k; 2k for source, 2k for shadow (when used as Forth source). 25x80 = 2,000 bytes, so 4,000 for source and comments. 96 left for filesystem metadata.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Andy Valencia on Sun Sep 4 13:08:42 2022
    Andy Valencia <vandys@vsta.org> writes:
    My ForthOS? I used 4k; 2k for source, 2k for shadow (when used as
    Forth source).

    Yes, must have been. As an unrelated question regarding your locals:

    http://sources.vsta.org/forthos/scopes.html

    Where were the locals stored? I.e. were they on a stack? Asking
    because of the perennial locals debate here. I once wrote a word that I
    think would have been quite hard to write without locals, because it was recursive, so couldn't have used VARIABLEs instead of either a separate explicit stack, or horrendous use of PICK to reach into stack cells used
    by earlier call frames.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Valencia@21:1/5 to Paul Rubin on Sun Sep 4 16:48:31 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    ... As an unrelated question regarding your locals:
    http://sources.vsta.org/forthos/scopes.html
    Where were the locals stored? I.e. were they on a stack?

    If you look at: https://vsta.org/cgi-bin/fview.py?path=/src/extras.txt

    The function init{ arranges the storage on the return stack. With
    the obvious end-of-function hooks to cause cleanup.

    There's some extra hair for the { arg1 arg2 ... -- X Y } so that
    it can verify the stack on exit has the size expected for that
    many arguments turned into that many return values.

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to Anton Ertl on Mon Sep 5 07:14:45 2022
    On 04/09/2022 19:43, Anton Ertl wrote:
    ...
    So when I got a more modern OS below my Forth system, I switched to
    using newline-separated files and never looked back. And from what I
    see on other hosted systems, it was the same for most others. This
    also integrates better with the rest of the tools on these OSs, e.g.,
    git and grep ...

    Indeed, this.

    Neither Reva nor 8th have had screens support, because both are
    OS-hosted and can rely on using normal file IO routines and normal files.

    Since I'm a vim user, this has been most useful to me...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Ron AARON on Mon Sep 5 16:08:58 2022
    On 5/09/2022 2:14 pm, Ron AARON wrote:


    On 04/09/2022 19:43, Anton Ertl wrote:
    ...
    So when I got a more modern OS below my Forth system, I switched to
    using newline-separated files and never looked back.  And from what I
    see on other hosted systems, it was the same for most others.  This
    also integrates better with the rest of the tools on these OSs, e.g.,
    git and grep ...

    Indeed, this.

    Neither Reva nor 8th have had screens support, because both are OS-hosted and can rely on using normal file IO routines and normal files.

    OS-hosting doesn't automatically support text-based forth source.
    INCLUDE-FILE represents a layer on top of the basic OS functions.
    So it comes down to the implementation whether it supports text or
    block layers - or both. And that will be a matter of preference.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron AARON@21:1/5 to dxforth on Mon Sep 5 09:57:15 2022
    On 05/09/2022 9:08, dxforth wrote:
    On 5/09/2022 2:14 pm, Ron AARON wrote:


    On 04/09/2022 19:43, Anton Ertl wrote:
    ...
    So when I got a more modern OS below my Forth system, I switched to
    using newline-separated files and never looked back.  And from what I
    see on other hosted systems, it was the same for most others.  This
    also integrates better with the rest of the tools on these OSs, e.g.,
    git and grep ...

    Indeed, this.

    Neither Reva nor 8th have had screens support, because both are
    OS-hosted and can rely on using normal file IO routines and normal files.

    OS-hosting doesn't automatically support text-based forth source. INCLUDE-FILE represents a layer on top of the basic OS functions.
    So it comes down to the implementation whether it supports text or
    block layers - or both.  And that will be a matter of preference.

    Yes of course. The point is that using external tools (vim, grep, awk,
    etc) is useful and convenient, and much easier with normal OS files than
    with screens (depending on how screens are implemented).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Ron AARON on Mon Sep 5 18:05:07 2022
    On 5/09/2022 4:57 pm, Ron AARON wrote:
    On 05/09/2022 9:08, dxforth wrote:
    On 5/09/2022 2:14 pm, Ron AARON wrote:


    On 04/09/2022 19:43, Anton Ertl wrote:
    ...
    So when I got a more modern OS below my Forth system, I switched to
    using newline-separated files and never looked back.  And from what I >>>> see on other hosted systems, it was the same for most others.  This
    also integrates better with the rest of the tools on these OSs, e.g.,
    git and grep ...

    Indeed, this.

    Neither Reva nor 8th have had screens support, because both are OS-hosted and can rely on using normal file IO routines and normal files.

    OS-hosting doesn't automatically support text-based forth source.
    INCLUDE-FILE represents a layer on top of the basic OS functions.
    So it comes down to the implementation whether it supports text or
    block layers - or both.  And that will be a matter of preference.

    Yes of course. The point is that using external tools (vim, grep, awk, etc) is useful and convenient, and much easier with normal OS files than with screens (depending on how screens are implemented).


    Just because MASM requires external tools to compose and edit source,
    it doesn't follow forth should. Apparently there are things called 'programmers editors' - which presumably means it would be unproductive
    for me to continue using a regular editor. In fact I don't feel
    disadvantaged at all. Same goes for screen files. After all these
    years my screen editor still has no 'Find'. I guess I never had a
    serious enough use for it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Paul Rubin on Mon Sep 5 08:05:39 2022
    Paul Rubin <no.email@nospam.invalid> writes:
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:
    I used screens for Forth on the C64 (so for ~10 years), with
    40x25 screens...

    Were the 40 char lines horribly constraining?

    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines preferable, but there is alwas some limit.

    no messy shifting of words between screens when some code
    needed growing

    Would a typical approach be to split the growing screen into two, rather
    than shifting code from one screen to some other existing one? Or was
    disk space (such as on floppies) usually also scarce?

    I don't remember how I dealt with the problem. A floppy on the C64
    could hold 170 screens as I stored them (i.e., without file system),
    and I did not find that constraining.

    I saved an old Jonah Thomas post (originally from 2003 though I came
    across it much later) that made an impression on me. A quote from it:

    Blocks gave an integrated editor, and fast integrated compiling,
    and a sort of paged virtual memory, and something you could easily
    turn into a somewhat inferior database, etc. It wasn't the best
    solution for very much but it gave an easy adequate solution for a
    whole lot.

    I've never used a blocks system but the above quote always made me
    wonder what it was like.

    Yes, the advantage of screens on the C64 was that the editor was
    relatively small, and only a part of the source code needed to be kept
    in memory, so I could edit the code from within the Forth system and
    directly load it, and even load it piecewise (FORGETing the last few
    screens and reloading the fixed ones), which was useful, because
    loading everything still took quite a bit of time.

    By contrast, an editor (as I envisioned it) for newline-separated
    files would have consumed more code space, kept the whole file in
    memory, and I would have supported only loading complete files (the
    files could be short, though).

    I never used the blocks for data.

    I've played with the idea of a resident Forth using blocks on a modern
    MCU, but I think it would be better to use files when there is enough >storage, or a cross-compiler when there is not.

    There are some who think that the flash that comes with modern MCUs is
    a good reason to go back to blocks and screens. I don't think so,
    because with an erase block size of 16KB and a single-byte write
    granularity (as one of these devices has), a 1KB (or 2KB) screen does
    not fit the erase block size well, nor does it make a good use of the
    fine write granularity. I have discussed an alternative approach at
    length in <2019Apr19.185811@mips.complang.tuwien.ac.at> or as video in
    German at
    <https://wiki.forth-ev.de/doku.php/events:ft2019:anton-flash>.

    - 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 2022: https://euro.theforth.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Anton Ertl on Mon Sep 5 02:44:10 2022
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote:
    I never used the blocks for data.
    I wrote a library for screen based (binary) strings - although I never used it for an application. Furthermore, I used screens for scripting the multitasking 4tH variant "4tsH". The advantage here was one can do I/O on screens in a single context.

    Here the 4tH code for the former. Your mileage on ANS Forth may vary: https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/vmem.4th

    Hans Bezemer

    ---8<---
    Although computers have lots of memory nowadays, you may find yourself in a situation where you don't have enough memory to cater for your needs. In that case you may resort to using 4tH's virtual memory library.

    4tH's virtual memory library uses block files, so you may need to create one before you can use it. Since block files are character-oriented you need to include another library if you need numerical data:

    include lib/vmem.4th
    include lib/ncoding.4th

    That's all so let's define some variables and open the block file we created previously:

    variable n1 nell vallot latest ! does> paging ;
    variable s1   32 vallot latest ! does> paging ;
    variable s2  128 vallot latest ! does> paging ;
    variable s3  512 vallot latest ! does> paging ;
    variable s4  512 vallot latest ! does> paging ;

    s" vmemtest.scr" open-blockfile

    When setting this up, you have to take three things in consideration:  

    1. Although it isn't required, you'd better define virtual memory variables in order, from the smallest to the largest;  
    2. The size of a virtual memory variable may not exceed "B/BUF" address units; 3. You have to make sure that all data fits in the block  file. Take into consideration that no variable can span two blocks, so there'll be some overhead. The easiest solution is not to take any risks and simply oversize it - disk space is relatively
    cheap.

      Now you can access them like any other variable:

    2960 n1 n! &

    s" This is a virtual memory string" s1 place &

    It looks (almost) completely normal, doesn't it? Except for that ampersand, of course. This ampersand has to be added every time you write to a virtual memory variable. It signals to the underlying block management system that the block is now "dirty".
    If you think that's too cumbersome for your taste, you may adopt another solution - it's not that complicated.

    Reading a variable is no problem at all: do as you've always done:

    n1 n@ . s1 count type cr

    And what about arrays? Well, first of all they have to be character based. And they're restricted to "B/BUF" address units. Or are they? As a matter of fact, they don't - but they do need some special treatment.

    First of all, you have to think of the element size, which must be a power of two and may not exceed "B/BUF" address units. Second, you need to know how many rows you require. Now we can define it:

    64 constant /row
    80 constant #row

    variable a1 20 nells vallot latest !
    does> swap nells +paging ;

    variable a2 /row #row * vallot latest !
    does> swap /row * +paging ;

    So "a1" is an integer arrays and "a2" is a string array. So far, so good. But what have we defined at the 'DOES>' part? Well, to address an array we're going to write:

    5 a1 10 a2

    Which will return the addresses of the sixth element of "a1" and the eleventh element of "a2" - we're counting from zero. Consequently, we pass the element number and the address of the array to the 'DOES>' part of the definition.

    That's were the 'SWAP' comes in, since that one puts the element number on top, which we multiply with the element size to get the offset of that specific element in the array. Then we pass the whole bunch to "+PAGING". That's where the magic begins! If
    you e.g. prefer a more FSL-like array, now you know what to do..

    The same rules apply here, if you want to write to a variable don't forget the ampersand:

    2960 5 a1 n! &

    s" This is a virtual memory string" 10 a2 place &

    And you can just as easily retrieve it:

    5 a1 n@ . 10 a2 count type cr

    That's all!  When you're done, you'll have to close your blockfile, of course. But that ain't too tricky:

    close-blockfile
    ---8<---

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Anton Ertl on Mon Sep 5 02:34:49 2022
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote:
    Were the 40 char lines horribly constraining?
    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines preferable, but there is alwas some limit.
    I can't speak for the C64, but the crudely converted FIG editor was close to unusable on the ZX Spectrum - since that one had 32*22 lines. Which meant
    the thing was scrolling off screen all the time.

    It was NOT the fault of the editor itself, though. Once used on a standard 80*25
    screen it was perfectly usable. I was busy interfacing a 64 chars driver with my ZX Spectrum Forth, but then the IBM PC came and I never finished it.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to Anton Ertl on Mon Sep 5 14:31:07 2022
    In article <2022Sep4.190338@mips.complang.tuwien.ac.at>,
    Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
    albert@cherry.(none) (albert) writes:
    Sacrificing 1 in 64 characters for a line break is not a big deal.

    At least in classical Forth you cannot continue on the first character
    of the next line in a screen if you used the last character of the
    previous line for a word; you need at least one space between words.
    So even if you fill the screen with code, there is no memory advantage
    to the screen (maybe for the last newline).

    I, however, prefer to group code into lines to reflect the structure
    of the code, which leads to some lines being much shorter than others.
    In that setting, newline separation is more memory-efficient than the
    fixed line length of screens.

    I measured the memory overhead of screens using the example of ><http://git.savannah.gnu.org/cgit/gforth.git/plain/blocked.fb>, which
    is written in a much more horizontal style than I tend to use:

    [~/gforth:132645] gforth -e ': b>n ( c-addr u -- ) slurp-file ( c-addr1 u1 ) bounds ?do i 64 -trailing type cr 64 +loop ; s" blocked.fb" b>n bye' >blocked.fs
    [~/gforth:132646] ls -l blocked.f*
    -rw-r--r-- 1 anton users 4096 Oct 1 2020 blocked.fb
    -rw-r--r-- 1 anton users 2629 Sep 4 19:39 blocked.fs

    So even for this horizontal code, the memory advantage of
    new-line-separated files is more than a factor of 1.5.

    In a more realistic example of options.frt+blocks.frt versus
    forth.lab the memory advantage is 2.2. (ciforth Intel 5.4.#)
    This is offset with another advantage: forth.lab is structured
    database of sorts with a search mechanism and a conditional
    loading mechanism.


    - anton
    --
    "in our communism country Viet Nam, people are forced to be
    alive and in the western country like US, people are free to
    die from Covid 19 lol" duc ha
    albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From S Jack@21:1/5 to All on Mon Sep 5 08:43:35 2022
    Still use classic blocks and get by with simple fig line editor.
    One time in the past make the simplest and dirtiest line editor
    for fun, something a notch above CAT . Ended up using it on a regular
    basis so I had to upgrade it some to be tolerable. The fig editor is
    way much nicer; have no complaints.
    --
    me

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From S Jack@21:1/5 to All on Mon Sep 5 09:51:10 2022
    DOS has a small simplistic line editor. Likely not too many users are
    aware of it and most who do just ignore it as something not much of
    use. Because it was there I invested the 20 minutes to learn it.
    Shortly afterwards, I was visiting my sister. Someone have given her
    two DOS systems and neither one would load; she asked if I would look
    at it. I could see that neither system had all the functions needed
    to load up but functions combined from the two would be sufficient;
    just needed to extract some functions from one and add to the other.
    However, if DOS doesn't load, hardly anything works. One thing that
    would load and run in the non configured environment was the little
    line editor. With it, still fresh in my mind, I was able setup some configuration, extract and combine needed functions and create a
    working DOS. My sister was impressed.
    --
    me

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Sep 5 13:51:25 2022
    Just because MASM requires external tools to compose and edit source,
    it doesn't follow forth should. Apparently there are things called 'programmers editors' - which presumably means it would be unproductive
    for me to continue using a regular editor. In fact I don't feel disadvantaged at all.

    Creating a „programmer's editor” with assumption, that during editing time one will always deal with single 1024B-sized „unit” never-mind-what — and,
    apart of that, actually „unformatted” (no CR/LF) — makes the design much simpler. And even in case of some malfunction of such editor — it will create a mess in that currently edited screen rather than spoiling the whole file.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Tue Sep 6 11:06:44 2022
    On 5/09/2022 7:34 pm, Hans Bezemer wrote:
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote:
    Were the 40 char lines horribly constraining?
    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines
    preferable, but there is alwas some limit.
    I can't speak for the C64, but the crudely converted FIG editor was close to unusable on the ZX Spectrum - since that one had 32*22 lines. Which meant
    the thing was scrolling off screen all the time.

    It was NOT the fault of the editor itself, though. Once used on a standard 80*25
    screen it was perfectly usable. I was busy interfacing a 64 chars driver with my ZX Spectrum Forth, but then the IBM PC came and I never finished it.

    AFAIK it was more usual to have screens match the video properties of the machine. The VIC-20 presented challenges due to the limited display. One forth got around it with a scrolling 64x16 full-screen editor.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Mon Sep 5 20:26:59 2022
    On Tuesday, September 6, 2022 at 11:06:50 AM UTC+10, dxforth wrote:
    On 5/09/2022 7:34 pm, Hans Bezemer wrote:
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote:
    Were the 40 char lines horribly constraining?
    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines
    preferable, but there is alwas some limit.
    I can't speak for the C64, but the crudely converted FIG editor was close to
    unusable on the ZX Spectrum - since that one had 32*22 lines. Which meant the thing was scrolling off screen all the time.

    It was NOT the fault of the editor itself, though. Once used on a standard 80*25
    screen it was perfectly usable. I was busy interfacing a 64 chars driver with
    my ZX Spectrum Forth, but then the IBM PC came and I never finished it.
    AFAIK it was more usual to have screens match the video properties of the machine. The VIC-20 presented challenges due to the limited display. One forth got around it with a scrolling 64x16 full-screen editor.

    Much like using Google groups on a phone in desktops, as the mobile version won't let you start a thread or reply for years now, and likely do it much better,
    as even now what I'm typing is off screen, and sometimes it just flash repositions
    on and off screen every key stroke (not to mention not truncating lines to the regular length). Those days weren't as bad as they seem. Just now bad programmers and designers have more opportunity to stuff it up. Like a dog chasing it's tail trying to fix everything.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Wayne morellini on Tue Sep 6 15:02:37 2022
    On 6/09/2022 1:26 pm, Wayne morellini wrote:
    On Tuesday, September 6, 2022 at 11:06:50 AM UTC+10, dxforth wrote:
    On 5/09/2022 7:34 pm, Hans Bezemer wrote:
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote:
    Were the 40 char lines horribly constraining?
    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines >>>> preferable, but there is alwas some limit.
    I can't speak for the C64, but the crudely converted FIG editor was close to
    unusable on the ZX Spectrum - since that one had 32*22 lines. Which meant >>> the thing was scrolling off screen all the time.

    It was NOT the fault of the editor itself, though. Once used on a standard 80*25
    screen it was perfectly usable. I was busy interfacing a 64 chars driver with
    my ZX Spectrum Forth, but then the IBM PC came and I never finished it.
    AFAIK it was more usual to have screens match the video properties of the
    machine. The VIC-20 presented challenges due to the limited display. One
    forth got around it with a scrolling 64x16 full-screen editor.

    Much like using Google groups on a phone in desktops, as the mobile version won't let you start a thread or reply for years now, and likely do it much better,
    as even now what I'm typing is off screen, and sometimes it just flash repositions
    on and off screen every key stroke (not to mention not truncating lines to the
    regular length). Those days weren't as bad as they seem. Just now bad programmers and designers have more opportunity to stuff it up. Like a dog chasing it's tail trying to fix everything.

    Did that several years ago while waiting to be connected to the NBN.
    From your description it appears nothing has changed...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Mon Sep 5 23:47:27 2022
    On Tuesday, September 6, 2022 at 3:02:43 PM UTC+10, dxforth wrote:
    On 6/09/2022 1:26 pm, Wayne morellini wrote:
    On Tuesday, September 6, 2022 at 11:06:50 AM UTC+10, dxforth wrote:
    On 5/09/2022 7:34 pm, Hans Bezemer wrote:
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote: >>>>> Were the 40 char lines horribly constraining?
    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines >>>> preferable, but there is alwas some limit.
    I can't speak for the C64, but the crudely converted FIG editor was close to
    unusable on the ZX Spectrum - since that one had 32*22 lines. Which meant >>> the thing was scrolling off screen all the time.

    It was NOT the fault of the editor itself, though. Once used on a standard 80*25
    screen it was perfectly usable. I was busy interfacing a 64 chars driver with
    my ZX Spectrum Forth, but then the IBM PC came and I never finished it. >> AFAIK it was more usual to have screens match the video properties of the >> machine. The VIC-20 presented challenges due to the limited display. One >> forth got around it with a scrolling 64x16 full-screen editor.

    Much like using Google groups on a phone in desktops, as the mobile version won't let you start a thread or reply for years now, and likely do it much better,
    as even now what I'm typing is off screen, and sometimes it just flash repositions
    on and off screen every key stroke (not to mention not truncating lines to the
    regular length). Those days weren't as bad as they seem. Just now bad programmers and designers have more opportunity to stuff it up. Like a dog chasing it's tail trying to fix everything.
    Did that several years ago while waiting to be connected to the NBN.
    From your description it appears nothing has changed...

    It's just totally abnormal. I've had good success contacting companies and pointing
    Issues and improvements, but hardly anything with google groups here. It's like they
    don't even test the phone version on an actual phone rather than a tablet in portrait
    mode. Somebody is going just take them out one day, and they are going be left wondering why they are hemorrhaging customers (because you didn't bother to keep
    an eye on the workers designing and implementing things, "sherlock").

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andy Valencia@21:1/5 to S Jack on Tue Sep 6 06:34:38 2022
    S Jack <sdwjack69@gmail.com> writes:
    Still use classic blocks and get by with simple fig line editor.
    One time in the past make the simplest and dirtiest line editor
    for fun, something a notch above CAT . Ended up using it on a regular
    basis so I had to upgrade it some to be tolerable. The fig editor is
    way much nicer; have no complaints.

    I wrote a vi/vim-ish clone for ForthOS.

    http://sources.vsta.org/forthos/vi.html

    https://vsta.org/cgi-bin/fview.py?path=/src/vi.txt

    Two aspects have come up here in recent weeks.

    I was writing all the usual TTY code to move cursor, calculate changes, insert/delete lines. Then I looked at my monitor and said "what am I
    doing?". The editor just upates its buffer, then a single call into the TTY driver makes it the contents of the screen. Tossed all that code and complexity.

    WRT filling up a source screen, the editor has Zi (vim command prefix "Z",
    "i" == "insert") which splits the source screen at the cursor, pushing
    the lower half into a new, following block (growing the size of the source
    file by 1 block).

    Andy Valencia
    Home page: https://www.vsta.org/andy/
    To contact me: https://www.vsta.org/contact/andy.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Andy Valencia on Wed Sep 7 01:58:08 2022
    On 6/09/2022 11:34 pm, Andy Valencia wrote:

    WRT filling up a source screen, the editor has Zi (vim command prefix "Z", "i" == "insert") which splits the source screen at the cursor, pushing
    the lower half into a new, following block (growing the size of the source file by 1 block).

    It's a wonder how the ground-breaking game Starflight ever got off the
    ground. Written in screens and sold a million. How is that possible? :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Wayne morellini@21:1/5 to dxforth on Tue Sep 6 17:19:07 2022
    On Tuesday, September 6, 2022 at 3:02:43 PM UTC+10, dxforth wrote:
    On 6/09/2022 1:26 pm, Wayne morellini wrote:
    On Tuesday, September 6, 2022 at 11:06:50 AM UTC+10, dxforth wrote:
    On 5/09/2022 7:34 pm, Hans Bezemer wrote:
    On Monday, September 5, 2022 at 10:38:41 AM UTC+2, Anton Ertl wrote: >>>>> Were the 40 char lines horribly constraining?
    Not particularly. It was the display width of the C64. Of course, I
    found the 80-wide screens (and later windows) on more capable machines >>>> preferable, but there is alwas some limit.
    I can't speak for the C64, but the crudely converted FIG editor was close to
    unusable on the ZX Spectrum - since that one had 32*22 lines. Which meant >>> the thing was scrolling off screen all the time.

    It was NOT the fault of the editor itself, though. Once used on a standard 80*25
    screen it was perfectly usable. I was busy interfacing a 64 chars driver with
    my ZX Spectrum Forth, but then the IBM PC came and I never finished it. >> AFAIK it was more usual to have screens match the video properties of the >> machine. The VIC-20 presented challenges due to the limited display. One >> forth got around it with a scrolling 64x16 full-screen editor.

    Much like using Google groups on a phone in desktops, as the mobile version won't let you start a thread or reply for years now, and likely do it much better,
    as even now what I'm typing is off screen, and sometimes it just flash repositions
    on and off screen every key stroke (not to mention not truncating lines to the
    regular length). Those days weren't as bad as they seem. Just now bad programmers and designers have more opportunity to stuff it up. Like a dog chasing it's tail trying to fix everything.
    Did that several years ago while waiting to be connected to the NBN.
    From your description it appears nothing has changed...

    Just sent in a large bug and improvement report to them, also requesting
    posting by email (like a mailing list). Using that would resolve most issues.

    Have a good day.

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