• A new episode of "Back&Forth" has been uploaded!

    From Hans Bezemer@21:1/5 to All on Sun Oct 9 05:20:52 2022
    This time we'll take a look at Forth compilation - and 4tH.

    https://youtu.be/H0uRX5NLu7c

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Sun Oct 9 08:43:22 2022
    Actually why were you so disgusted with Forth83, that you switched to C? I do realize you might not like the changes — still you could simply stick with fig-Forth (or whichever variant were you using before F83), as many others did, from what I saw.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Zbig on Sun Oct 9 10:34:24 2022
    On Sunday, October 9, 2022 at 5:43:24 PM UTC+2, Zbig wrote:
    Actually why were you so disgusted with Forth83, that you switched to C? I do realize you might not like the changes
    — still you could simply stick with fig-Forth (or whichever variant were you using before F83), as many others did,
    from what I saw.
    Well, frankly - I couldn't find a compiler I actually liked. I tried turnkey a few times - to be greeted with actually nothing.
    F83 I found abhorrent - and C was the up and coming kid on the block in 1984. I am a practical person. I take the tool
    I need for a task, and frankly IMHO Forth was *not* suited for that task.

    TurboCv2 was a breeze to use and it was able to produce executables which took command line arguments and
    provided easy file access. Just what the doctor ordered - since I mostly wrote utilities and tools. I used it as my
    main compiler until the late nineties, until I switched to DJGPP.

    Moving from MS-DOS DJGPP to Linux GCC was pretty painless, BTW. And that was my experience with C - if you
    had a little discipline when designing your programs, moving between compilers and platforms was a breeze. I
    thinks that's one of the reasons everything about 4tH is so darn portable.

    In the spare moments at work I could work on a program with a Windows 4tH compiled by Tiny C and take
    the 4tH source home to continue work on a Linux 4tH compiled by GCC without ever missing a beat.

    I remember porting a Forth program to some free LMI Windows compiler and it was SHEER HORROR. So I
    was glad I had abandoned Forth for C at the time. Since virtually everything I had made in C between 1985 and
    roughly 1995 was still completely usable with only minor changes. I still use programs I designed on TurboCv2
    (including 4tH itself)!

    Although 4tH was about five years at the time, I still did most of my development in C. That gradually changed
    at the turn of the millennium, though, as 4tH got more mature - and less of a toy. So C development was mostly
    confined to development of 4tH itself and application development was mostly done on 4tH.

    4tH can quite easily be compiled on any platform with a half decent C compiler - so when I'm forced to work
    on another platform, it's usually a matter of minutes to get it going. So - I see no reason to abandon it. To me, it's
    a tool that just works.

    <WARNUNG HUMOR>No matter what stupid ideas the Forth standardization committee comes up with,
    in 4tH heaven I'm on Cloud Nine - and I'm the one who calls the shots here now</WARNUNG HUMOR>

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Mon Oct 10 14:19:29 2022
    On 10/10/2022 4:34 am, Hans Bezemer wrote:

    <WARNUNG HUMOR>No matter what stupid ideas the Forth standardization committee comes up with,
    in 4tH heaven I'm on Cloud Nine - and I'm the one who calls the shots here now</WARNUNG HUMOR>

    What leader hasn't said that? :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Oct 10 08:23:47 2022
    F83 I found abhorrent

    Yes, that I was asking my question about: what — in particular — did you find
    that repulsing in F83?

    4tH can quite easily be compiled on any platform with a half decent C compiler

    Indeed it can be compiled under Linux with modest and fast TCC, for example, with no complainings.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From shtps@21:1/5 to All on Mon Oct 10 18:01:24 2022
    Am 09.10.22 um 14:20 schrieb Hans Bezemer:
    This time we'll take a look at Forth compilation - and 4tH.

    https://youtu.be/H0uRX5NLu7c

    Hans Bezemer

    Great stuff. I'm looking forward to the "why" in the next video.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jose Morales@21:1/5 to the.bee...@gmail.com on Mon Oct 10 11:18:17 2022
    Fantastic! really looking forward to the series! BTW, where is the 4tH code at?

    On Sunday, October 9, 2022 at 2:20:54 PM UTC+2, the.bee...@gmail.com wrote:
    This time we'll take a look at Forth compilation - and 4tH.

    https://youtu.be/H0uRX5NLu7c

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Oct 11 03:43:23 2022
    This time we'll take a look at Forth compilation - and 4tH.

    https://youtu.be/H0uRX5NLu7c
    Pretty boring, actually.

    Pretty polarizing, it seems — when reading such contradictory reviews… :D

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Tue Oct 11 21:48:06 2022
    On 11/10/2022 2:23 am, Zbig wrote:
    F83 I found abhorrent

    Yes, that I was asking my question about: what — in particular — did you find
    that repulsing in F83?

    True flag, DO-LOOP, SIGN are some Forth-79 things still in 4tH IIRC.

    If it were me, I'd remove the 'drop' from #> given the times I've
    had to work-around the original but too late now.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to the.beez.speaks@gmail.com on Tue Oct 11 12:38:11 2022
    In article <d039edeb-6bbd-4415-b27f-c0481dd50630n@googlegroups.com>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    This time we'll take a look at Forth compilation - and 4tH.

    https://youtu.be/H0uRX5NLu7c

    Pretty boring, actually.


    Hans Bezemer
    --
    "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 Tue Oct 11 05:14:38 2022
    F83 I found abhorrent

    Yes, that I was asking my question about: what — in particular — did you find
    that repulsing in F83?
    True flag, DO-LOOP, SIGN are some Forth-79 things still in 4tH IIRC.

    Indeed these changes may be annoying for someone accustomed to earlier behaviour — but to the point of taking decision „enough of this! Switching to C”?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Oct 11 07:12:54 2022
    He said he left forth because it lacked the tools he expected. It took another 10 years for Forth to have file functions. There's still no
    standard way of obtaining command-line arguments.

    Well, that's Forth — what is lacking, the user needs to add by himself.
    It doesn't have to be standard. It just should be working.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Wed Oct 12 00:58:52 2022
    On 11/10/2022 11:14 pm, Zbig wrote:
    F83 I found abhorrent

    Yes, that I was asking my question about: what — in particular — did you find
    that repulsing in F83?
    True flag, DO-LOOP, SIGN are some Forth-79 things still in 4tH IIRC.

    Indeed these changes may be annoying for someone accustomed to earlier behaviour — but to the point of taking decision „enough of this! Switching to C”?

    He said he left forth because it lacked the tools he expected. It took
    another 10 years for Forth to have file functions. There's still no
    standard way of obtaining command-line arguments.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Wed Oct 12 02:25:18 2022
    On 12/10/2022 1:12 am, Zbig wrote:
    He said he left forth because it lacked the tools he expected. It took
    another 10 years for Forth to have file functions. There's still no
    standard way of obtaining command-line arguments.

    Well, that's Forth — what is lacking, the user needs to add by himself.
    It doesn't have to be standard. It just should be working.

    It does have to be standard if that's the audience you're trying to attract.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Oct 11 10:10:20 2022
    It does have to be standard if that's the audience you're trying to attract.

    Well said — "if"... ;)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxforth on Tue Oct 11 10:12:33 2022
    On Tuesday, October 11, 2022 at 12:48:09 PM UTC+2, dxforth wrote:
    Yes, that I was asking my question about: what — in particular — did you find
    that repulsing in F83?
    True flag, DO-LOOP, SIGN are some Forth-79 things still in 4tH IIRC.

    (1) TRUE flag - yes big thingy! I'd like to store my flags and retrieve them as the
    very same flag (cannot do in a CHAR). But there is an even more compelling reason why 4tH returns ”1” as the 'TRUE' value. ”-1” is only valid in a 2-complement
    context. What it actually means is ”all bits set”. Mathematically it means nothing,
    contrary to ”1”, which is return value associated with the Iverson bracket.

    (2) DO..LOOP - major thingy! 'DO' puts the limit and the index on the Return Stack,
    but it doesn't decide whether the loop is actually entered. So, every loop is executed
    at least once. After each iteration 'LOOP' decides whether it iterates once more.
    In our opinion it would have been better when 'DO' had made that decision (like any
    other language), but we can still live with that. The real trouble came with DO..+LOOP.
    '+LOOP' is a logical extension. Every single language allows you to change the step.
    But contrary to what one might expect, '+LOOP' doesn't terminate when the loop limit
    is reached or exceeded, but when the loop index crosses "the boundary between the
    loop limit minus one and the loop limit". '+LOOP' doesn't take into account that it is
    counting down. So it iterates until the loop index reaches the loop limit by wrap-around
    arithmetic. I think that's HORRIBLE design. I know why Forth-83 did introduce this
    behavior, but it's pragmatic - and not a sign of good design IMHO.

    (3) LEAVE. 4tH uses a control stack , which has the layout "reference", "address". So,
    DO IF LEAVE THEN LOOP would contain (at "THEN") (BOS -> TOS):
    "DO", "IF", "LEAVE"
    This mean I'd throw an error, since "THEN" expects an "IF" reference - not a "LEAVE".
    The original "LEAVE" was much more consistent IMHO. And nowadays it's something like:
    "RDROP R@ R>". It even doesn't have its own token anymore.

    (4) SIGN. <# #> is already difficult, because you have to define it in reverse:
    <# # # [CHAR] . HOLD #S #>
    Now some smart @ss comes along and thinks, "Hey - this is a weird stack diagram.
    Let's correct it and make it sheer impossible for people to write a number format".
    So yes - I killed that one.

    And yes, the lack of files and command line arguments was another issue. And (probably my error) the inability to make turnkey apps. Another issue: I couldn't
    make OBJ's to link with other languages. I could with e.g. Borland C and Prolog.

    But probably the major reason was - I admit - Forth-79 was such a beautiful system for the ZX Spectrum. I had hacked the thing, so it wrote blocks to BetaDisk.
    You could easily interface it with Z80 assembly (which was a boon on such a limited system. You could patch up the start routine and write the code to disk - so
    essentially you had an executable.

    It was so neat, small and hackable compared to the other choices you had on the Spec.
    Consider this: Native ZX-BASIC left you with 40K free. HiSoft C took something like
    20K, leaving 20K for sourcecode, code and workspace. Forth took only 7K, leaving
    a whopping 33K for your program that were loaded from a 1K block buffer..

    I patched the code, so warning messages were loaded from disk. Which was far easier
    than figuring out what Error #5 meant. It was as if the system was made for the configuration ZX Spectrum/BetaDisk and just needed a little TLC to start blooming.

    The IBM was quite a different beast and Forth felt alien to it. So, in short, Forth-83
    was the straw that broke the camels back. Forth wasn't suited for it and I hated
    programming in it. I felt at that time the effort to learn C was much more rewarding
    than putting that effort into Forth-83.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to Zbig on Tue Oct 11 10:16:41 2022
    On Tuesday, October 11, 2022 at 2:14:40 PM UTC+2, Zbig wrote:
    F83 I found abhorrent

    Yes, that I was asking my question about: what — in particular — did you find
    that repulsing in F83?
    True flag, DO-LOOP, SIGN are some Forth-79 things still in 4tH IIRC.
    Indeed these changes may be annoying for someone accustomed to earlier behaviour — but to the point of taking decision „enough of this! Switching to C”?

    "like" has nothing to do with logic.

    And elegance is for tailors :--)

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Oct 11 10:57:26 2022
    But probably the major reason was - I admit - Forth-79 was such a beautiful system for the ZX Spectrum.

    Just completely off-topic: it reminds me, that somehow I didn't
    see any Forth-79 for PC. Maybe I missed some compiler? Not that
    I'm going to use it for anything — but out of pure curiosity: was there
    any Forth-79 for PC created, that is still somewhere available for download?

    P.S. From what I can see someone released new Forth-79 for Spectrum:
    https://www.sinclairzxworld.com/viewtopic.php?t=4238

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Hans Bezemer on Tue Oct 11 12:57:42 2022
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    The IBM was quite a different beast and Forth felt alien to it. So, in
    short, Forth-83 was the straw that broke the camels back. Forth wasn't
    suited for it and I hated programming in it.

    Are you saying the IBM would have felt less alien if it had run
    Forth-79? The language differences you mention seem pretty minor. I sympathize about the system interface issues. Did F-PC deal with that
    stuff ok? I don't know if F83 ever ran on the PC but the CP/M version
    looked impressive, based on Ting's book. I never actually ran it
    though.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Wed Oct 12 09:06:04 2022
    On 12/10/2022 4:10 am, Zbig wrote:
    It does have to be standard if that's the audience you're trying to attract.

    Well said — "if"... ;)

    ANS was about what - giving existing forthers a cheap thrill? When it was realized post-ANS that nobody was coming, meaningful standardization ceased.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Fox@21:1/5 to Zbig on Tue Oct 11 15:07:10 2022
    On Tuesday, October 11, 2022 at 1:57:28 PM UTC-4, Zbig wrote:
    But probably the major reason was - I admit - Forth-79 was such a beautiful
    system for the ZX Spectrum.
    Just completely off-topic: it reminds me, that somehow I didn't
    see any Forth-79 for PC. Maybe I missed some compiler? Not that
    I'm going to use it for anything — but out of pure curiosity: was there any Forth-79 for PC created, that is still somewhere available for download?

    P.S. From what I can see someone released new Forth-79 for Spectrum: https://www.sinclairzxworld.com/viewtopic.php?t=4238

    MVP Forth by Glenn Hayden was Forth-79 or very close to it.
    Barebones kernel that I used in 1981 or so only had floppy disk access to blocks.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Oct 11 15:20:09 2022
    MVP Forth by Glenn Hayden was Forth-79 or very close to it.
    Barebones kernel that I used in 1981 or so only had floppy disk access to blocks.

    Yes, I like MVP Forth — in fact it's much better than „pure” F79. Glen Haydon
    created nice „crossover” of fig and F79 standards. And it's well documented.
    I'm curious about F79, because somehow I haven't seen any Forth 79
    for PC yet, but it seems unbelievable to me not a single one for PC existed?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Paul Rubin on Wed Oct 12 10:09:43 2022
    On 12/10/2022 6:57 am, Paul Rubin wrote:

    I don't know if F83 ever ran on the PC but the CP/M version
    looked impressive, based on Ting's book.

    F83 ran on the PC. As with CP/M version, it looked anemic
    compared to what C and Pascal compilers of the day could do.
    F-PC tried to be modern but too late as ANS was about to rip
    it all up.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Wed Oct 12 17:10:42 2022
    On 12/10/2022 4:12 am, Hans Bezemer wrote:

    (4) SIGN. <# #> is already difficult, because you have to define it in reverse:
    <# # # [CHAR] . HOLD #S #>
    Now some smart @ss comes along and thinks, "Hey - this is a weird stack diagram.
    Let's correct it and make it sheer impossible for people to write a number format".
    So yes - I killed that one.

    The culprit is #> which assumes there will always be a number on TOS to drop. Handling it externally, ROT disappears:

    TUCK DABS <# # # [CHAR] . HOLD #S 2DROP SIGN #>

    Assuming the remaining number from #S (usually 0. ) is never needed (?), the 2DROP can be built-in:

    TUCK DABS <# # # [CHAR] . HOLD #S SIGN #>

    As I see it, '83 got SIGN right but failed to fix the real problem.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to dxforth on Tue Oct 11 23:36:42 2022
    On Wednesday, October 12, 2022 at 8:10:48 AM UTC+2, dxforth wrote:
    On 12/10/2022 4:12 am, Hans Bezemer wrote:

    (4) SIGN. <# #> is already difficult, because you have to define it in reverse:
    <# # # [CHAR] . HOLD #S #>
    Now some smart @ss comes along and thinks, "Hey - this is a weird stack diagram.
    Let's correct it and make it sheer impossible for people to write a number format".
    So yes - I killed that one.
    The culprit is #> which assumes there will always be a number on TOS to drop. Handling it externally, ROT disappears:

    TUCK DABS <# # # [CHAR] . HOLD #S 2DROP SIGN #>

    Assuming the remaining number from #S (usually 0. ) is never needed (?), the 2DROP can be built-in:

    TUCK DABS <# # # [CHAR] . HOLD #S SIGN #>

    As I see it, '83 got SIGN right but failed to fix the real problem.
    Well, who am I to counter the master of number representations?
    (And you can consider that to be a well deserved compliment).
    I can only say Forth-79 was intuitive for me and simply worked for me.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Paul Rubin on Tue Oct 11 23:17:03 2022
    On Tuesday, October 11, 2022 at 9:57:45 PM UTC+2, Paul Rubin wrote:
    Hans Bezemer <the.bee...@gmail.com> writes:
    The IBM was quite a different beast and Forth felt alien to it. So, in short, Forth-83 was the straw that broke the camels back. Forth wasn't suited for it and I hated programming in it.
    Are you saying the IBM would have felt less alien if it had run
    Forth-79? The language differences you mention seem pretty minor. I sympathize about the system interface issues. Did F-PC deal with that
    stuff ok? I don't know if F83 ever ran on the PC but the CP/M version
    looked impressive, based on Ting's book. I never actually ran it
    No, what I'm saying is that the Spectrum was basically a blob of memory,
    while the IBM was file oriented. On the Spec you manipulated blobs of
    memory. Files were blobs of memory, that were dumped or loaded in
    their entirety. No such thing as reading line by line or writing to disk directly. It had to pass by memory first - and any file actions were
    atomic - like blocks.

    That's what I'm saying. It's an environment that fits C like a glove - and Forth less.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Wed Oct 12 12:04:21 2022
    No, what I'm saying is that the Spectrum was basically a blob of memory, while the IBM was file oriented. On the Spec you manipulated blobs of memory. Files were blobs of memory, that were dumped or loaded in
    their entirety. No such thing as reading line by line or writing to disk directly. It had to pass by memory first - and any file actions were
    atomic - like blocks.

    But — if I'm correct — it was just a matter of using CPM-ish functions
    0Fh, 14h, 15h, 16h of DOS interrupt 21h. In general it would do about the same: put the selected region of memory to mass storage (to disk(ette), in this particular case), in „chunks” — so not as single dump, but within a loop instead.
    But that loop can be internal to word and not „visible on the outside”, anyway.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Thu Oct 13 08:07:06 2022
    On 12/10/2022 5:36 pm, Hans Bezemer wrote:
    On Wednesday, October 12, 2022 at 8:10:48 AM UTC+2, dxforth wrote:
    On 12/10/2022 4:12 am, Hans Bezemer wrote:

    (4) SIGN. <# #> is already difficult, because you have to define it in reverse:
    <# # # [CHAR] . HOLD #S #>
    Now some smart @ss comes along and thinks, "Hey - this is a weird stack diagram.
    Let's correct it and make it sheer impossible for people to write a number format".
    So yes - I killed that one.
    The culprit is #> which assumes there will always be a number on TOS to drop.
    Handling it externally, ROT disappears:

    TUCK DABS <# # # [CHAR] . HOLD #S 2DROP SIGN #>

    Assuming the remaining number from #S (usually 0. ) is never needed (?), the >> 2DROP can be built-in:

    TUCK DABS <# # # [CHAR] . HOLD #S SIGN #>

    As I see it, '83 got SIGN right but failed to fix the real problem.
    Well, who am I to counter the master of number representations?
    (And you can consider that to be a well deserved compliment).
    I can only say Forth-79 was intuitive for me and simply worked for me.

    In 79, while you don't see the ROT, it's still there and it was due to #>. Behind #> was Moore's idea to eliminate the need for 2DROP regardless of whether one terminated with # or #S. I appreciate what Moore was trying
    to do but I'm not sure I'd call it intuitive - more a necessary evil :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Thu Oct 13 08:53:40 2022
    On 13/10/2022 6:04 am, Zbig wrote:
    No, what I'm saying is that the Spectrum was basically a blob of memory,
    while the IBM was file oriented. On the Spec you manipulated blobs of
    memory. Files were blobs of memory, that were dumped or loaded in
    their entirety. No such thing as reading line by line or writing to disk
    directly. It had to pass by memory first - and any file actions were
    atomic - like blocks.

    But — if I'm correct — it was just a matter of using CPM-ish functions 0Fh, 14h, 15h, 16h of DOS interrupt 21h. In general it would do about the same:
    put the selected region of memory to mass storage (to disk(ette), in this particular case), in „chunks” — so not as single dump, but within a loop instead.
    But that loop can be internal to word and not „visible on the outside”, anyway.

    It wasn't until MS-DOS 2 that most would consider the PC 'file oriented'.
    One of the goals in creating DX-Forth was to hide CP/M's block-oriented file-system from the user because it was such a pain to use.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Fox@21:1/5 to Zbig on Wed Oct 12 21:04:42 2022
    On Tuesday, October 11, 2022 at 6:20:11 PM UTC-4, Zbig wrote:
    MVP Forth by Glenn Hayden was Forth-79 or very close to it.
    Barebones kernel that I used in 1981 or so only had floppy disk access to blocks.
    Yes, I like MVP Forth — in fact it's much better than „pure” F79. Glen Haydon
    created nice „crossover” of fig and F79 standards. And it's well documented.
    I'm curious about F79, because somehow I haven't seen any Forth 79
    for PC yet, but it seems unbelievable to me not a single one for PC existed?

    This might be a stretch but HsForth by Jim Kalihan (which I still have)
    is Forth 79 but with the Intel Segmented memory system extensions.
    Jim had a library file that added Forth 83 functionality but out of the box DO/LOOP and VOCABULARY all worked per Forth 79.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Oct 13 03:38:35 2022
    This might be a stretch but HsForth by Jim Kalihan (which I still have)
    is Forth 79 but with the Intel Segmented memory system extensions.
    Jim had a library file that added Forth 83 functionality but out of the box DO/LOOP and VOCABULARY all worked per Forth 79.

    It wasn't free neither shareware, I'm afraid?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to dxforth on Thu Oct 13 14:23:41 2022
    dxforth <dxforth@gmail.com> writes:
    F83 ran on the PC. As with CP/M version, it looked anemic
    compared to what C and Pascal compilers of the day could do.

    Really? Which day would that be? If we take July 31, 1984, the date
    on https://github.com/ForthHub/F83/blob/master/readme.1st, what was
    the C and Pascal competition?

    Microsoft Pascal was so unattractive (the price played a role, but
    probably also the disk-based edit-compile-run cycle (at a time when
    few people had hard disk drives) that Turbo Pascal ate its lunch as
    soon as it appeared.

    Turbo Pascal generated .COM files at the time, which limited code,
    data and stack to 64KB each. It generated relatively naive native
    code, so it looked a bit better than threaded code on speed
    benchmarks, but you could put much less code in the 64KB available; so
    they added overlays in 2.0 (which F83 had to an extent with FORGET).
    Turbo Pascal had an IDE and could IIRC compile and run code without
    having to go to disk. In many respects it had caught up with Forth.

    C was by far not as popular as Pascal on the PC in 1984. Microsoft
    offered MicroSoft C 1.0 at the time, which they had bought from
    Lattice. They only offered large-model support in 2.0 in 1985.

    Turbo C was only introduced in 1987.

    - 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 All on Thu Oct 13 15:01:13 2022
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    [From earlier postings I see that he means the ZX Spectrum; "the IBM" is
    less clear, but probably the IBM PC, i.e., he is probably thinking about
    MS-DOS.]
    On Tuesday, October 11, 2022 at 9:57:45 PM UTC+2, Paul Rubin wrote:
    Hans Bezemer <the.bee...@gmail.com> writes:
    The IBM was quite a different beast and Forth felt alien to it.
    [...]
    No, what I'm saying is that the Spectrum was basically a blob of memory, >while the IBM was file oriented. On the Spec you manipulated blobs of
    memory. Files were blobs of memory, that were dumped or loaded in
    their entirety. No such thing as reading line by line or writing to disk >directly. It had to pass by memory first - and any file actions were
    atomic - like blocks.

    That's what I'm saying. It's an environment that fits C like a glove - and >Forth less.

    MS-DOS with it's CRLF newline files fits C quite badly, because C
    requires '\n' to be one character. They had to introduce "text files" (automatic translation between MS-DOS representation on disk and C
    files in memory) into C for MS-DOS, with lots of resulting problems.

    The Forth-94 standard included the text vs. binary file nonsense, but
    did not give us a newline character; as a result, you better don't
    translate the newlines, and Forth-94's file words fit MS-DOS (and
    Windows) much better than C does. But of course it was a decade after Forth-83.

    - 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 Thu Oct 13 09:59:48 2022
    On Thursday, October 13, 2022 at 5:18:53 PM UTC+2, Anton Ertl wrote:
    MS-DOS with it's CRLF newline files fits C quite badly, because C
    requires '\n' to be one character. They had to introduce "text files" (automatic translation between MS-DOS representation on disk and C
    files in memory) into C for MS-DOS, with lots of resulting problems.
    Well, I don't agree with you here. Admitted, alternative solutions are possible here.
    E.g. In 4tH, if you treat a file like a text file, it will be treated as a text file, gobbling
    up CR, LF and CR/LF delimited files transparently. Contrary to Forth, it doesn't have
    any modifiers. Similar solutions would have been possible in the C library - but
    it would have required far more care and discipline from the user.

    And there are other solutions. But this one was the most transparent for the occasional
    users (in as far as you have occasional users in C). I never had any problems porting
    those programs - one way or another. With the obvious exception of the K&R Coherent
    C compiler.

    The Forth-94 standard included the text vs. binary file nonsense, but
    did not give us a newline character; as a result, you better don't
    translate the newlines, and Forth-94's file words fit MS-DOS (and
    Windows) much better than C does. But of course it was a decade after Forth-83.
    I think files in Forth-94 are a very BAD C-imitation which stick out like a ugly, unForth-like kludge. Sure, if you really want to 4tH will support the wordset almost completely - but unless I want to make a portable or ported program I stay away from it as far as I can.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Anton Ertl on Thu Oct 13 10:08:23 2022
    On Thursday, October 13, 2022 at 5:00:52 PM UTC+2, Anton Ertl wrote:
    Turbo Pascal generated .COM files at the time, which limited code,
    data and stack to 64KB each. It generated relatively naive native
    code, so it looked a bit better than threaded code on speed
    benchmarks, but you could put much less code in the 64KB available; so
    they added overlays in 2.0 (which F83 had to an extent with FORGET).
    Turbo Pascal had an IDE and could IIRC compile and run code without
    having to go to disk. In many respects it had caught up with Forth.
    Yes - but it was a revolutionary concept. It dumped IIRC a 10K runtime
    and then added the program code on top of that. It was quite limited, yes.

    But the compilation speed was mind boggling. I worked with MS-Pascal
    too and this was a tool that worked from the command line (3 passes which
    has to be invoked separately) and.. well, let's say it took a while. I tended to
    run the compilation process in a loop when I had a hangover - and nobody noticed. You couldn't pull that trick with Turbo Pascal. It finished in the blink
    of an eye. And the cursor ended up where the darn thing had found a syntax error. It was amazing for the time - and don't mention the price!

    C was by far not as popular as Pascal on the PC in 1984. (..)
    Turbo C was only introduced in 1987.
    From my own experience I can only agree to that. I was an early TC user.
    One point something. I still use it for the DOS version of 4tH. It didn't compile
    in memory, though. Just edit-compile-link.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Thu Oct 13 11:04:11 2022
    MS-DOS with it's CRLF newline files fits C quite badly, because C
    requires '\n' to be one character. They had to introduce "text files" (automatic translation between MS-DOS representation on disk and C
    files in memory) into C for MS-DOS, with lots of resulting problems.

    The Forth-94 standard included the text vs. binary file nonsense, but
    did not give us a newline character; as a result, you better don't
    translate the newlines

    I believe the solution like the one used in TCL would be better
    (I mean „fconfigure $channel -translation auto / binary / cr / crlf / lf”) https://www.tcl.tk/man/tcl8.4/TclCmd/fconfigure.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Hans Bezemer@21:1/5 to Brian Fox on Thu Oct 13 10:25:18 2022
    On Thursday, October 13, 2022 at 6:04:44 AM UTC+2, Brian Fox wrote:
    This might be a stretch but HsForth by Jim Kalihan (which I still have)
    is Forth 79 but with the Intel Segmented memory system extensions.
    Jim had a library file that added Forth 83 functionality but out of the box DO/LOOP and VOCABULARY all worked per Forth 79.
    It was a stretch - but not for the same reasons I had, I think. We're talking mid-'80-ies. No Internet. No BBS-es (at least - not that popular at the time).

    I read magazines to keep up to date. And Forth was hardly a popular subject
    in the popular magazines. I've never heard of HS Forth. I bought most of my stuff at a convention we had in Holland in those days, called "HCC dagen". I guess my fellow similar aged Dutchies will remember those.

    I often bought so much stuff on one day (paper, hardware, floppies, software) that I had to return the next day to buy the rest, because that was all I could transport on the passenger train.

    I bought most of my software there, often freeware and shareware.
    For a few tenners you got lots of software, like F83, TCOM, F-PC and stuff. "Duh, it says 'Forth compiler', so let's check it out". No disrespect intended -
    but fringe products like HsForth weren't even on the radar. No mag ever reviewed
    those - and even if they had been, I wouldn't have bought a piece of software overseas - with the possible outcome it was a dud anyways.

    Thingies like Wordperfect or Windows NT would have taken up half my monthly salary
    in those days - so often alternative channels were used to obtain those). I once had
    to learn Unix, so after looking at all the options, I couldn't find anything which was
    affordable. Xenix and SCO were in the same price range. I ended up going to Amsterdam to obtain a copy of Coherent, which still was $125 1990-ies dollars. It's still
    one of the most expensive pieces of software I ever bought.

    So yes, that would have been a stretch in the 1985-1995 era. Others may feel differently
    though. Different sized wallet - or other priorities perhaps.

    Hans Bezemer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Fri Oct 14 10:56:44 2022
    On 13/10/2022 9:38 pm, Zbig wrote:
    This might be a stretch but HsForth by Jim Kalihan (which I still have)
    is Forth 79 but with the Intel Segmented memory system extensions.
    Jim had a library file that added Forth 83 functionality but out of the box >> DO/LOOP and VOCABULARY all worked per Forth 79.

    It wasn't free neither shareware, I'm afraid?

    Forth-79 was never around long enough for usable PD systems to develop.
    It was abandoned by its creators almost as soon as it was released.
    Vendors who supported Forth-79 found themselves in a tricky position
    when Forth-83 came along. HS/Forth appears to be one of the hybrid
    systems that took aspects of Forth-83 without fully committing e.g.
    I read HSF used all bits set for true flag.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Anton Ertl on Fri Oct 14 11:51:13 2022
    On 14/10/2022 1:23 am, Anton Ertl wrote:
    dxforth <dxforth@gmail.com> writes:
    F83 ran on the PC. As with CP/M version, it looked anemic
    compared to what C and Pascal compilers of the day could do.

    Really? Which day would that be? If we take July 31, 1984, the date
    on https://github.com/ForthHub/F83/blob/master/readme.1st, what was
    the C and Pascal competition?

    http://www.z80.eu/pas-compiler.html
    http://www.z80.eu/c-compiler.html

    To my knowledge not a single CP/M Forth provided anything like the file interfaces offered by these systems. The thinking seemed to be 'since
    forth was extensible, we can leave that to the users'. Before I could implement ANS file I/O on DX-Forth for CP/M I needed to see how those C compilers did it - something vendors of the day could and should have
    done 35 years ago if Forth was to be competitive.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Hans Bezemer on Fri Oct 14 13:07:15 2022
    On 14/10/2022 3:59 am, Hans Bezemer wrote:

    I think files in Forth-94 are a very BAD C-imitation which stick out like a ugly, unForth-like kludge.

    Never having been a 'C user' I never noticed. The ability to access a named file of one's choice and read/write data in amounts and to a position as determined by the user strikes me as a very basic requirement. If the complaint
    be ANS didn't bury it under a forth layer, perhaps it's for the better :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Rubin@21:1/5 to Anton Ertl on Fri Oct 14 02:02:03 2022
    anton@mips.complang.tuwien.ac.at (Anton Ertl) writes:

    If we take July 31, 1984, the date on https://github.com/ForthHub/F83/blob/master/readme.1st...
    Turbo Pascal generated .COM files at the time, which limited code,
    data and stack to 64KB each.

    Did F83 have something like large model? I had thought it was a 16 bit
    system ported from CP/M. F-PC was later and fancier but I don't know if
    even that had large model. If F83 couldn't use more than 64k of memory
    then it's behind Turbo Pascal, which sounds like it could use separate
    segments so up to 192k. Of course with assembly code in F83 you could
    access higher memory, but probably in TP as well.

    Here are a couple of famous remarks about TP:

    https://prog21.dadgum.com/116.html
    https://prog21.dadgum.com/47.html

    BDS C for CP/M was from 1979. I don't know if it was adapted to the PC.
    There were some other C or C-subset compilers around for the PC early
    on, though. I remember Mix Power C but it must have been sometime later.
    There were also a bunch of variants on "Small C".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to the.beez.speaks@gmail.com on Fri Oct 14 10:52:08 2022
    In article <c66fa475-0870-4817-a827-7fc964488e5fn@googlegroups.com>,
    Hans Bezemer <the.beez.speaks@gmail.com> wrote:
    <SNIP>
    I think files in Forth-94 are a very BAD C-imitation which stick out like a >ugly, unForth-like kludge. Sure, if you really want to 4tH will support the >wordset almost completely - but unless I want to make a portable or ported >program I stay away from it as far as I can.

    I'm surprised. The file wordset has served me quite well.
    Regards 2021 taxes I analysed a comma separated file dumped by my bank to
    add the tax deductions for charitable organisations.
    I used GET-FILE that reads a file to HERE and the simple
    $@ $! $+! $/ $\ $C+ wordset.

    Hans Bezemer

    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 Paul Rubin@21:1/5 to Hans Bezemer on Fri Oct 14 02:22:30 2022
    Hans Bezemer <the.beez.speaks@gmail.com> writes:
    No, what I'm saying is that the Spectrum was basically a blob of memory, while the IBM was file oriented.

    Ah ok, it's not really a Forth 79 vs 83 language issue then, but rather,
    the problem was the not so great state of the runtime libraries in early
    PC Forths. Sounds reasonable.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to zbigniew2011@gmail.com on Fri Oct 14 11:22:46 2022
    In article <01236893-3110-4c79-8cb3-ddf24b844a71n@googlegroups.com>,
    Zbig <zbigniew2011@gmail.com> wrote:
    MS-DOS with it's CRLF newline files fits C quite badly, because C
    requires '\n' to be one character. They had to introduce "text files"
    (automatic translation between MS-DOS representation on disk and C
    files in memory) into C for MS-DOS, with lots of resulting problems.

    The Forth-94 standard included the text vs. binary file nonsense, but
    did not give us a newline character; as a result, you better don't
    translate the newlines

    I believe the solution like the one used in TCL would be better
    (I mean „fconfigure $channel -translation auto / binary / cr / crlf / lf”) >https://www.tcl.tk/man/tcl8.4/TclCmd/fconfigure.html

    The only good thing about line endings that you can get rid of them
    using -TRAILING . If you want to generate a text file your Forth
    probably has CR.

    There is a trap. Do not try to e.g. generate Apple or Windows text
    files on a Unix system. Generate native text files, and then convert
    to another Operating System at hand while using proper transport procedures. You would be surprised at the way text files look on VMS.

    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 Fri Oct 14 03:15:50 2022
    There is a trap. Do not try to e.g. generate Apple or Windows text
    files on a Unix system. Generate native text files, and then convert
    to another Operating System at hand while using proper transport procedures.
    This is exactly what I was talking about: TCL's „fconfigure -translation {inMode outMode}”
    is „conversion on the fly”, in the real time. During data transmission.

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