• Re: Underscoring numbers in Forth

    From Ron AARON@21:1/5 to Zbig on Mon Jul 25 12:22:28 2022
    On 25/07/2022 11:53, Zbig wrote:
    BTW: I think if „space” is too difficult to use it as „thousand
    separator”,
    ignored by Forth, I got a better „candidate”: Vertical Tab (0Bh):
    — it's practically unused anywhere
    — it could be entered with, say, Shift-Space
    — it could be displayed as, guess what, just a single space
    Terrible bad idea, because it can be visually discerned from a space.
    Tab is not a glyph, but a control of mechanical type writers.

    Mechanical type writers aren't used (since very long time) anymore,
    so VT can be „misused” for more practical things than controlling non-existant — and not available anymore — hardware.

    True enough; but the point that you can't see it unless a special font
    is used, is a valid one.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Jul 25 02:28:17 2022
    I got a better „candidate”: Vertical Tab (0Bh):
    — it's practically unused anywhere
    — it could be entered with, say, Shift-Space
    — it could be displayed as, guess what, just a single space
    Terrible bad idea, because it can be visually discerned from a space.
    Tab is not a glyph, but a control of mechanical type writers.

    Mechanical type writers aren't used (since very long time) anymore,
    so VT can be „misused” for more practical things than controlling non-existant — and not available anymore — hardware.
    True enough; but the point that you can't see it unless a special font
    is used, is a valid one.

    Maybe my assumption is different, but actually I don't see any need to make
    it visible. I treat it as kind of „hard space” („non-breakable”) used sometimes
    in text editors. I see its supposed invisibility rather as advantage.
    Of course if for some particular reasons that character should be visible, underscore
    may be good enough.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zbig on Mon Jul 25 09:05:29 2022
    On Monday, July 25, 2022 at 5:28:18 AM UTC-4, Zbig wrote:
    I got a better „candidate”: Vertical Tab (0Bh):
    — it's practically unused anywhere
    — it could be entered with, say, Shift-Space
    — it could be displayed as, guess what, just a single space
    Terrible bad idea, because it can be visually discerned from a space. >> Tab is not a glyph, but a control of mechanical type writers.

    Mechanical type writers aren't used (since very long time) anymore,
    so VT can be „misused” for more practical things than controlling non-existant — and not available anymore — hardware.
    True enough; but the point that you can't see it unless a special font
    is used, is a valid one.
    Maybe my assumption is different, but actually I don't see any need to make it visible. I treat it as kind of „hard space” („non-breakable”) used sometimes
    in text editors. I see its supposed invisibility rather as advantage.
    Of course if for some particular reasons that character should be visible, underscore
    may be good enough.

    I don't follow this. The entire point of a thousands separator is to facilitate humans reading large numbers or small fractions. Wouldn't this separator be ignored by any computer reading the number?

    --

    Rick C.

    -- Get 1,000 miles of free Supercharging
    -- Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zbig on Mon Jul 25 09:02:39 2022
    On Monday, July 25, 2022 at 4:53:17 AM UTC-4, Zbig wrote:
    BTW: I think if „space” is too difficult to use it as „thousand >separator”,
    ignored by Forth, I got a better „candidate”: Vertical Tab (0Bh): >— it's practically unused anywhere
    — it could be entered with, say, Shift-Space
    — it could be displayed as, guess what, just a single space
    Terrible bad idea, because it can be visually discerned from a space.
    Tab is not a glyph, but a control of mechanical type writers.
    Mechanical type writers aren't used (since very long time) anymore,
    so VT can be „misused” for more practical things than controlling non-existant — and not available anymore — hardware.

    That is true, but a thousands separator is not one of them because it's not a printable character. If it can't be printed, no human can easily discern it in the character stream without a neural connection to a magnetometer.

    --

    Rick C.

    - Get 1,000 miles of free Supercharging
    - Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Jul 25 09:10:22 2022
    Like this:
    284 985 000 234,23

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Jul 25 09:07:56 2022
    The entire point of a thousands separator is to facilitate humans
    reading large numbers or small fractions.

    Speaking for myself: I use space for this, and it works for me.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Zbig on Mon Jul 25 17:02:11 2022
    Zbig <zbigniew2011@gmail.com> writes:
    284 985 000 234,23

    Great. So how should a Forth text interpreter know that this is one
    number, not four? And you should a human reading this as Forth code
    know that?

    - 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 Rick C@21:1/5 to Zbig on Mon Jul 25 10:02:02 2022
    On Monday, July 25, 2022 at 12:10:23 PM UTC-4, Zbig wrote:
    Like this:
    284 985 000 234,23

    Ok, but that would not be seen by Forth at a single number. Do you get that's what the thread is about? Finding a way of notating thousand separators that is both machine readable and human recognizable? Or maybe I've missed the point?

    --

    Rick C.

    -+ Get 1,000 miles of free Supercharging
    -+ Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Jul 25 14:29:03 2022
    Great. So how should a Forth text interpreter know that this is one
    number, not four? And you should a human reading this as Forth code
    know that?

    That's why I proposed VT for that. The operator, by pressing Shift-Space inserts VT between _groups_ of digits of the single number.
    On the screen it looks like „ordinary” spaces — exactly, like in case of „ordinary space” and „non-breakable space” (in case of text editor).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Jul 25 15:03:39 2022
    Actually employing VT could have another advantage: consider all
    these „hyphenated words”. They wouldn't have to be hyphenated
    any longer. Instead of „pseudo space” VT could „link” two strings
    that comprise such word — making it look more natural.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Tue Jul 26 13:16:19 2022
    On 26/07/2022 08:03, Zbig wrote:
    Actually employing VT could have another advantage: consider all
    these „hyphenated words”. They wouldn't have to be hyphenated
    any longer. Instead of „pseudo space” VT could „link” two strings that comprise such word — making it look more natural.

    A word-processor too ...

    Is there anything Forth can't do? :)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to dxforth on Tue Jul 26 13:41:26 2022
    On 25/07/2022 14:07, dxforth wrote:

    : strip ( c-addr u -- c-addr2 u2 )
    <# 2dup 1- over + do
    i c@ [char] _ over - if hold else drop then
    -1 +loop #> ;

    Won't work on zero-length strings but irrelevant here.

    Cheaper and without the quirk:

    : strip ( c-addr u -- c-addr2 u2 )
    <# begin dup while
    1- 2dup + c@ [char] _ over - if hold else drop then
    repeat #> ;

    In DX-Forth cheaper still is:

    : strip ( c-addr u -- c-addr2 u2 )
    <# begin dup while
    1- 2dup + c@ [char] _ of else hold then
    repeat #> ;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zbig on Tue Jul 26 00:05:46 2022
    On Monday, July 25, 2022 at 6:03:41 PM UTC-4, Zbig wrote:
    Actually employing VT could have another advantage: consider all
    these „hyphenated words”. They wouldn't have to be hyphenated
    any longer. Instead of „pseudo space” VT could „link” two strings that comprise such word — making it look more natural.

    So you want to limit the ability to write Forth code to the use of special editors, custom designed for this Forth?

    Why can't you see the issues this would cause???

    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004

    --

    Rick C.

    +- Get 1,000 miles of free Supercharging
    +- Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to Zbig on Tue Jul 26 06:57:32 2022
    Zbig <zbigniew2011@gmail.com> writes:
    Great. So how should a Forth text interpreter know that this is one=20
    number, not four? And you should a human reading this as Forth code=20
    know that?

    That's why I proposed VT for that. The operator, by pressing Shift-Space >inserts VT between _groups_ of digits of the single number.
    On the screen it looks like =E2=80=9Eordinary=E2=80=9D spaces =E2=80=94 exa= >ctly, like in case of
    =E2=80=9Eordinary space=E2=80=9D and =E2=80=9Enon-breakable space=E2=80=9D = >(in case of text editor).

    So how should a human reading this as Forth code know that

    284 985 000 234,23

    is one number, not four.

    Apart from that, reality check:

    Here's what is displayed by xterm for a VT:

    s\" 123\v456" cr type
    123
    456 ok

    And here's what xterm gives me when I input a Shift-Space:

    key cr .
    32 ok

    That's not the ASCII code for vt, it's the ASCII code for Space.

    - 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 Zbig on Tue Jul 26 07:05:31 2022
    Zbig <zbigniew2011@gmail.com> writes:
    Actually employing VT could have another advantage: consider all
    these =E2=80=9Ehyphenated words=E2=80=9D. They wouldn't have to be hyphena= >ted
    any longer. Instead of =E2=80=9Epseudo space=E2=80=9D VT could =E2=80=9Elin= >k=E2=80=9D two strings
    that comprise such word =E2=80=94 making it look more natural.

    Again, how should a human see the difference between

    unused-words

    and

    unused words

    if you replace the "-" by something that looks like a space?

    - 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 Zbig@21:1/5 to All on Tue Jul 26 02:51:30 2022
    So you want to limit the ability to write Forth code to the use of special editors, custom designed for this Forth?

    No.

    Why can't you see the issues this would cause???

    What issues — in particular?

    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004

    It depends, whether the groups od digits are separated by space — or „connected” by VT.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Jul 26 02:55:08 2022
    Again, how should a human see the difference between

    unused-words

    and

    unused words

    if you replace the "-" by something that looks like a space?

    Sometimes it may create a problem indeed, but taking a peek
    into glossary usually should help.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to zbigniew2011@gmail.com on Tue Jul 26 12:37:43 2022
    In article <d0a77c03-31f3-4ed7-a94a-f908fa7c4c7fn@googlegroups.com>,
    Zbig <zbigniew2011@gmail.com> wrote:
    Again, how should a human see the difference between

    unused-words

    and

    unused words

    if you replace the "-" by something that looks like a space?

    Sometimes it may create a problem indeed, but taking a peek
    into glossary usually should help.

    Seriously?
    It make as much sense as for Republicans to ban condoms,
    because they want less abortions.

    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 Rick C@21:1/5 to Zbig on Tue Jul 26 09:24:51 2022
    On Tuesday, July 26, 2022 at 5:51:32 AM UTC-4, Zbig wrote:
    So you want to limit the ability to write Forth code to the use of special editors, custom designed for this Forth?
    No.
    Why can't you see the issues this would cause???
    What issues — in particular?
    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004
    It depends, whether the groups od digits are separated by space — or „connected” by VT.

    That's the point, innit? YOU CAN'T TELL WHEN READING IT!!!

    Why can't you grasp this fail?

    --

    Rick C.

    ++ Get 1,000 miles of free Supercharging
    ++ Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Jul 26 09:31:34 2022
    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004
    It depends, whether the groups od digits are separated by space — or „connected” by VT.
    That's the point, innit? YOU CAN'T TELL WHEN READING IT!!!

    Why can't you grasp this fail?

    1. You wrote about text interpreter -- did you mean 'human' of Forth?
    Forth won't have any problem, it'll find VT there.

    2. If you mean human: if you want the others to understand you, you
    have to be precise in your statements. So it's enough to separate two
    numbers with TWO (or more) spaces, while keeping the groups of digits „connected” still with SINGLE VT (shown as single space).

    I honestly don't understand why are you put so much effort into creating problem out of nothing. You want to be properly understood? Be precise,
    that's all.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zbig on Tue Jul 26 13:06:33 2022
    On Tuesday, July 26, 2022 at 12:31:35 PM UTC-4, Zbig wrote:
    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004
    It depends, whether the groups od digits are separated by space — or „connected” by VT.
    That's the point, innit? YOU CAN'T TELL WHEN READING IT!!!

    Why can't you grasp this fail?
    1. You wrote about text interpreter -- did you mean 'human' of Forth?
    Forth won't have any problem, it'll find VT there.

    Yes, but you then had to ask what I typed, showing the short coming, that a human can't tell. That was my point... unless you are not a human after all.


    2. If you mean human: if you want the others to understand you, you
    have to be precise in your statements. So it's enough to separate two numbers with TWO (or more) spaces, while keeping the groups of digits „connected” still with SINGLE VT (shown as single space).

    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345


    I honestly don't understand why are you put so much effort into creating problem out of nothing. You want to be properly understood? Be precise, that's all.

    Yes, you don't understand. That's the point.

    --

    Rick C.

    --- Get 1,000 miles of free Supercharging
    --- Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to gnuarm.del...@gmail.com on Tue Jul 26 13:51:24 2022
    gnuarm.del...@gmail.com schrieb am Dienstag, 26. Juli 2022 um 22:06:34 UTC+2:
    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345

    At least there is a space between N and 7 in this geo coordinate: 38°17′10″N 76°24′42″W

    Very helpful. ;o)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to gnuarm.del...@gmail.com on Tue Jul 26 15:09:23 2022
    gnuarm.del...@gmail.com schrieb am Mittwoch, 27. Juli 2022 um 00:02:55 UTC+2:
    On Tuesday, July 26, 2022 at 4:51:25 PM UTC-4, minf...@arcor.de wrote:
    gnuarm.del...@gmail.com schrieb am Dienstag, 26. Juli 2022 um 22:06:34 UTC+2:
    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345
    At least there is a space between N and 7 in this geo coordinate: 38°17′10″N 76°24′42″W

    Very helpful. ;o)
    So if you had a few spaces (not vertical tabs) in your coordinate, 38° 17′ 10″ N 76° 24′ 42″ W, I believe Forth would read the number 38, then treat ° as a word, no? I suppose ' would be a problem, since that is already in use. ", however,
    is not in use, so that would be good. I suppose if you were looking for coordinates in text, you could redefine ' for a bit, then restore it to mean "tick". Or do I not understand how numbers are read?

    The issue is that real world number inputs often require a real parser.
    Single hidden or visible separators won't do the job.

    Modern Forths offer recognizers or s.th.similar to do it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Jul 26 15:14:32 2022
    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004
    It depends, whether the groups od digits are separated by space — or „connected” by VT.
    That's the point, innit? YOU CAN'T TELL WHEN READING IT!!!

    Why can't you grasp this fail?
    1. You wrote about text interpreter -- did you mean 'human' of Forth? Forth won't have any problem, it'll find VT there.
    Yes, but you then had to ask what I typed, showing the short coming, that a human can't tell. That was my point... unless you are not a human after all.

    If you write something like this: 001_002_003 004 -- I'll also have to ask you a question, what actually you typed.
    It doesn't depend on the selected separator character.

    2. If you mean human: if you want the others to understand you, you
    have to be precise in your statements. So it's enough to separate two numbers with TWO (or more) spaces, while keeping the groups of digits „connected” still with SINGLE VT (shown as single space).
    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345

    Maybe now it's the time for me to ask a question — you have already made
    a fair use out of your question quota: does your Forth interpreter — and/or your computer screen — „compress” spaces like Google News interface?
    Or it doesn't?

    I honestly don't understand why are you put so much effort into creating problem out of nothing. You want to be properly understood? Be precise, that's all.
    Yes, you don't understand. That's the point.

    Never understood the people that insist on looking for the problems where
    there aren't any. I'm not a psychologist, you know, so I don't have to.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to minf...@arcor.de on Tue Jul 26 15:02:54 2022
    On Tuesday, July 26, 2022 at 4:51:25 PM UTC-4, minf...@arcor.de wrote:
    gnuarm.del...@gmail.com schrieb am Dienstag, 26. Juli 2022 um 22:06:34 UTC+2:
    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345
    At least there is a space between N and 7 in this geo coordinate: 38°17′10″N 76°24′42″W

    Very helpful. ;o)

    So if you had a few spaces (not vertical tabs) in your coordinate, 38° 17′ 10″ N 76° 24′ 42″ W, I believe Forth would read the number 38, then treat ° as a word, no? I suppose ' would be a problem, since that is already in use. ", however,
    is not in use, so that would be good. I suppose if you were looking for coordinates in text, you could redefine ' for a bit, then restore it to mean "tick". Or do I not understand how numbers are read?

    --

    Rick C.

    --+ Get 1,000 miles of free Supercharging
    --+ Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Tue Jul 26 15:27:03 2022
    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345

    Maybe this will explain some more to you:

    DPUSH: PUSH DX
    APUSH: PUSH AX
    NEXT: LODSW
    MOV BX,AX
    NEXT1: MOV DX,BX
    INC DX
    JMP [BX]

    Pretty deformatted, right?
    So I guess you'll insist on using underscore by macroassemblers,
    instead of spaces and tabs — while I don't care.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zbig on Tue Jul 26 20:13:25 2022
    On Tuesday, July 26, 2022 at 6:14:33 PM UTC-4, Zbig wrote:
    There's still the problem of humans reading the code. Tell me how this will be interpreted by the text interpreter.

    001 002 003 004
    It depends, whether the groups od digits are separated by space — or „connected” by VT.
    That's the point, innit? YOU CAN'T TELL WHEN READING IT!!!

    Why can't you grasp this fail?
    1. You wrote about text interpreter -- did you mean 'human' of Forth? Forth won't have any problem, it'll find VT there.
    Yes, but you then had to ask what I typed, showing the short coming, that a human can't tell. That was my point... unless you are not a human after all.
    If you write something like this: 001_002_003 004 -- I'll also have to ask you
    a question, what actually you typed.
    It doesn't depend on the selected separator character.

    I don't follow. If the convention in use is to separate thousands with the underscore, it is clear what the numbers are, 1002003 and 4. I don't follow your thinking here.


    2. If you mean human: if you want the others to understand you, you
    have to be precise in your statements. So it's enough to separate two numbers with TWO (or more) spaces, while keeping the groups of digits „connected” still with SINGLE VT (shown as single space).
    Ok, how many spaces did I type to separate these digits?

    0123 4567 8901 2345
    Maybe now it's the time for me to ask a question — you have already made
    a fair use out of your question quota: does your Forth interpreter — and/or
    your computer screen — „compress” spaces like Google News interface? Or it doesn't?

    It has been more than once I've copied programs from Google Groups. I also use a text editor that will replace spaces with tab characters when the alignment is right. That's why I mentioned previously that special editors would be needed. I've seen
    few editors that will allow you to enter a vertical tab character.


    I honestly don't understand why are you put so much effort into creating problem out of nothing. You want to be properly understood? Be precise, that's all.
    Yes, you don't understand. That's the point.
    Never understood the people that insist on looking for the problems where there aren't any. I'm not a psychologist, you know, so I don't have to.

    Your "solution" is a problem in solution clothing.

    --

    Rick C.

    -+- Get 1,000 miles of free Supercharging
    -+- Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to Zbig on Wed Jul 27 14:22:46 2022
    On 27/07/2022 02:31, Zbig wrote:

    I honestly don't understand why are you put so much effort into creating problem out of nothing.

    My thoughts too. Underscore in numbers as a *programmer* convenience is
    on the increase and causes no compatibility issue in Forth (AFAIK).
    The only control characters I ever want to see in source code is line-ends
    and TABs. I'd rather not have to deal with TABs but I'll put up with them.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Coombs@21:1/5 to Zbig on Mon Aug 1 11:42:18 2022
    XPost: Jan Coombs <jan4comp.lang.forth@murray-microft.co.uk>

    On Mon, 25 Jul 2022 14:29:03 -0700 (PDT)
    Zbig <zbigniew2011@gmail.com> wrote:

    Great. So how should a Forth text interpreter know that this is one number, not four? And you should a human reading this as Forth code
    know that?

    That's why I proposed VT for that. The operator, by pressing Shift-Space inserts VT between _groups_ of digits of the single number.
    On the screen it looks like „ordinary” spaces — exactly, like in case of
    „ordinary space” and „non-breakable space” (in case of text editor).

    Entering shift-space into gforth and python3:

    $ gforth
    Gforth 0.7.9_20201217
    Authors: Anton Ertl, Bernd Paysan, Jens Wilke et al., for more type `authors' Copyright © 2019 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
    key . 32 ok
    ekey . 32 ok


    $ python3
    Python 3.7.3 (default, Jan 22 2021, 20:04:44)
    [GCC 8.3.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    i=input(); i, ord(i)
    (' ', 32)



    So it seems that more work is involved in demonstrating this proposal.

    Jan Coombs

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jan Coombs@21:1/5 to Zbig on Mon Aug 1 11:51:56 2022
    On Mon, 25 Jul 2022 09:10:22 -0700 (PDT)
    Zbig <zbigniew2011@gmail.com> wrote:

    Like this:
    284 985 000 234,23

    or '284 985 000 234.23' depending on locale?

    '284_985_000_234,23' has fewer problems to resolve. Ugly as it might look, it is clearly one forth item.

    Jan Coombs

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Aug 1 04:48:29 2022
    Like this:
    284 985 000 234,23
    or '284 985 000 234.23' depending on locale?

    '284_985_000_234,23' has fewer problems to resolve. Ugly as it might look, it is clearly one forth item.

    I was trying to explain, that there are EXACTLY THE SAME „problems
    to resolve” whether you connect the 3-digits groups with underscore,
    or with VT — but in latter case it just... looks better.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From S Jack@21:1/5 to All on Mon Aug 1 10:03:26 2022
    go
    ( note: DCX is alias for DECIMAL )
    --
    -- Formatted numeric output
    --
    +ofmt \ disable format of numeric output
    i. dcx 256 hex . ==> 100
    i. dcx 256. hex d. ==> 100
    i. dcx -1 hex . ==> -1
    i. dcx -1 hex u. ==> FFFFFFFF
    i. dcx -1. hex ud. ==> FFFFFFFFFFFFFFFF
    -ofmt \ enabled format of numeric output
    i. dcx 256 hex . ==> 0x0100
    i. dcx 256. hex d. ==> 0x0100
    i. dcx -1 hex . ==> -0x0001
    i. dcx -1 hex u. ==> 0xFFFF_FFFF
    i. dcx -1. hex ud. ==> 0xFFFF_FFFF_FFFF_FFFF
    --
    -- Comma, underscore, and/or period separators in numeric input
    --
    +ofmt
    dcx
    i. 123456789 . ==> 123456789
    i. 1,234,567,89 . ==> 123456789
    i. 1_234,567_89 . ==> 123456789
    i. 1,234_567,89 . ==> 123456789
    -ofmt
    i. 123456789 . ==> 123,456,789
    i. 1,234,567,89 . ==> 123,456,789
    i. 1_234,567_89 . ==> 123,456,789
    i. 1,234_567,89 . ==> 123,456,789
    +ofmt
    i. 1234567.89 d. ==> 123456789
    i. 1,234,567.89 d. ==> 123456789
    i. 1_234_567.89 d. ==> 123456789
    i. 1,234_567.89 d. ==> 123456789
    i. 1.234.567.89 d. ==> 123456789
    -ofmt
    i. 1234567.89 d. ==> 123,456,789
    i. 1,234,567.89 d. ==> 123,456,789
    i. 1_234_567.89 d. ==> 123,456,789
    i. 1,234_567.89 d. ==> 123,456,789
    i. 1.234.567.89 d. ==> 123,456,789
    +ofmt
    i. dcx 123456789 hex . ==> 75BCD15
    i. dcx 1,234,567,89 hex . ==> 75BCD15
    i. dcx 1_234,567_89 hex . ==> 75BCD15
    i. dcx 1,234_567,89 hex . ==> 75BCD15
    -ofmt
    i. dcx 123456789 hex . ==> 0x075B_CD15
    i. dcx 1,234,567,89 hex . ==> 0x075B_CD15
    i. dcx 1_234,567_89 hex . ==> 0x075B_CD15
    i. dcx 1,234_567,89 hex . ==> 0x075B_CD15
    +ofmt
    i. dcx 1234567.89 hex d. ==> 75BCD15
    i. dcx 1,234,567.89 hex d. ==> 75BCD15
    i. dcx 1_234_567.89 hex d. ==> 75BCD15
    i. dcx 1,234_567.89 hex d. ==> 75BCD15
    i. dcx 1.234.567.89 hex d. ==> 75BCD15
    -ofmt
    i. dcx 1234567.89 hex d. ==> 0x075B_CD15
    i. dcx 1,234,567.89 hex d. ==> 0x075B_CD15
    i. dcx 1_234_567.89 hex d. ==> 0x075B_CD15
    i. dcx 1,234_567.89 hex d. ==> 0x075B_CD15
    i. dcx 1.234.567.89 hex d. ==> 0x075B_CD15
    --
    -- Field and format
    --
    25 fld ! \ field width 25 characters
    +ofmt
    i. dcx 123456789 x. ==> 123456789
    i. dcx 123456789 hex x. ==> 75BCD15
    i. dcx 123456789. hex dx. ==> 75BCD15.
    i. dcx 12345.6789 hex dx. ==> 75B.CD15
    i. dcx -1 hex ux. ==> FFFFFFFF
    i. dcx -1. hex udx. ==> FFFFFFFFFFFFFFFF.
    -ofmt
    i. dcx 123456789 x. ==> 123,456,789
    i. dcx 123456789 hex x. ==> 0x075B_CD15
    i. dcx 123456789. hex dx. ==> 0x075B_CD15.
    i. dcx 12345.6789 hex dx. ==> 0x075B.CD15
    i. dcx -1 hex ux. ==> 0xFFFF_FFFF
    i. dcx -1. hex udx. ==> 0xFFFF_FFFF_FFFF_FFFF.

    -fin-
    --
    me

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rick C@21:1/5 to Zbig on Mon Aug 1 11:50:40 2022
    On Monday, August 1, 2022 at 7:48:30 AM UTC-4, Zbig wrote:
    Like this:
    284 985 000 234,23
    or '284 985 000 234.23' depending on locale?

    '284_985_000_234,23' has fewer problems to resolve. Ugly as it might look, it is clearly one forth item.
    I was trying to explain, that there are EXACTLY THE SAME „problems
    to resolve” whether you connect the 3-digits groups with underscore,
    or with VT — but in latter case it just... looks better.

    There are two HUGE differences in the two proposals. When you use an underscore, every editor in the world will work with that, while some editors may not work with the VT character. The other is that when looking at code, humans can't tell the
    difference between multiple numbers and a single number. Since VT gives the appearance of a space, there's no way for a human to tell what is in the code.

    This would make Forth the ultimate write only language.

    --

    Rick C.

    -++ Get 1,000 miles of free Supercharging
    -++ Tesla referral code - https://ts.la/richard11209

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From P Falth@21:1/5 to dxforth on Mon Aug 22 06:59:52 2022
    On Saturday, 23 July 2022 at 08:24:09 UTC+2, dxforth wrote:
    32/64-bit machines have increased the risk of entering numbers incorrectly. Should the Forth interpreter be allowed to ignore certain punctuation e.g. underscore in numbers? What would be the issues?

    Usual suspects pre-answered.

    Q. Why the underscore character?
    A. It's not one of the characters Forth Inc uses to denote a double number. It's increasingly used in programming languages for this purpose. Even
    XPL0 has it.

    A. ANS didn't see the need for it.
    Q. Are you married?

    Q. Should >NUMBER process the underscore?
    A. No - for the same reason SCAN shouldn't handle TABs - it makes it weaker.

    Q. Then you'll need a routine to strip the underscores and a temporary buffer
    to hold the result. What do you suggest?
    A. The HOLD buffer.

    Q. Won't it interfere with numeric output?
    A. Input/output are usually mutually exclusive.

    Q. Won't the HOLD buffer need to be larger to hold the punctuation?
    A. Assuming worst case and one underscore per 4 characters, 20% larger.

    Q. Is all this just c.l.f. speculation - or have you implemented it?
    A. Implemented

    Q. Has it broken anything?
    A. Not AFAIK

    Q. What did it cost?
    A. 34 bytes on 8086, 39 bytes on 8080

    Q. Can't it be done using recognizers?
    A. If so, probably at more cost.

    Q. Will you keep it?
    A. Good question. For 16-bit integers its value may be marginal. How often do you enter values in binary?

    I got interested in this suggestion and implemented it.
    I thought the underscore was a bit ugly so implemented a word to set the grouping char

    : SET-GROUPING-CHAR ( xchar --)
    0 grping !
    dup 32 > and grping xc!+ drop ;

    I also set the grouping different based on BASE.
    Decimal and octal group 3 digits
    Hex 4 and binary 8.

    After that I started testing different chars. Today I use ´ ( $B4 acute accent)
    I think that ties the numbers together while _ puts them apart

    123´456´789 ok.
    . 123´456´789 ok
    '_' set-grouping-char ok
    123_456_789 ok.
    . 123_456_789 ok

    I also tried out the space as suggested by Zbig but not using VT.
    At codepoint $A0 there is a non breaking space char

    $a0 set-grouping-char ok
    123456789 ok.
    . 123 456 789 ok

    it gets more difficult to input without remapping a key.
    ´ is nice as it is (on my Swedish keyboard) next to the + key on the top row no shift or alt key needed to input it.

    But using the non breaking space I can now make words with spaces in them!

    : Hej Peter ." Ciao Peter" ; ok
    Hej Peter Ciao Peter ok

    This of course looks even more confusing then spaces in numbers!

    For me this improves readability enormously! Thanks for the suggestion.

    BR
    Peter

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to P Falth on Mon Aug 22 07:44:00 2022
    P Falth schrieb am Montag, 22. August 2022 um 15:59:54 UTC+2:
    On Saturday, 23 July 2022 at 08:24:09 UTC+2, dxforth wrote:
    32/64-bit machines have increased the risk of entering numbers incorrectly.
    Should the Forth interpreter be allowed to ignore certain punctuation e.g. underscore in numbers? What would be the issues?

    Usual suspects pre-answered.

    Q. Why the underscore character?
    A. It's not one of the characters Forth Inc uses to denote a double number.
    It's increasingly used in programming languages for this purpose. Even XPL0 has it.

    A. ANS didn't see the need for it.
    Q. Are you married?

    Q. Should >NUMBER process the underscore?
    A. No - for the same reason SCAN shouldn't handle TABs - it makes it weaker.

    Q. Then you'll need a routine to strip the underscores and a temporary buffer
    to hold the result. What do you suggest?
    A. The HOLD buffer.

    Q. Won't it interfere with numeric output?
    A. Input/output are usually mutually exclusive.

    Q. Won't the HOLD buffer need to be larger to hold the punctuation?
    A. Assuming worst case and one underscore per 4 characters, 20% larger.

    Q. Is all this just c.l.f. speculation - or have you implemented it?
    A. Implemented

    Q. Has it broken anything?
    A. Not AFAIK

    Q. What did it cost?
    A. 34 bytes on 8086, 39 bytes on 8080

    Q. Can't it be done using recognizers?
    A. If so, probably at more cost.

    Q. Will you keep it?
    A. Good question. For 16-bit integers its value may be marginal. How often do you enter values in binary?

    I got interested in this suggestion and implemented it.
    I thought the underscore was a bit ugly so implemented a word to set the grouping char

    : SET-GROUPING-CHAR ( xchar --)
    0 grping !
    dup 32 > and grping xc!+ drop ;

    I also set the grouping different based on BASE.
    Decimal and octal group 3 digits
    Hex 4 and binary 8.

    After that I started testing different chars. Today I use ´ ( $B4 acute accent)
    I think that ties the numbers together while _ puts them apart

    123´456´789 ok.
    . 123´456´789 ok
    '_' set-grouping-char ok
    123_456_789 ok.
    . 123_456_789 ok

    I also tried out the space as suggested by Zbig but not using VT.
    At codepoint $A0 there is a non breaking space char

    $a0 set-grouping-char ok
    123456789 ok.
    . 123 456 789 ok

    it gets more difficult to input without remapping a key.
    ´ is nice as it is (on my Swedish keyboard) next to the + key on the top row
    no shift or alt key needed to input it.

    But using the non breaking space I can now make words with spaces in them!

    : Hej Peter ." Ciao Peter" ; ok
    Hej Peter Ciao Peter ok

    This of course looks even more confusing then spaces in numbers!

    For me this improves readability enormously! Thanks for the suggestion.


    Fine! I am just wondering if ´ ie $B4 is the same in most codepages/locales.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Zbig@21:1/5 to All on Mon Aug 22 10:34:08 2022
    : Hej Peter ." Ciao Peter" ; ok
    Hej Peter Ciao Peter ok

    This of course looks even more confusing then spaces in numbers!

    It may look confusing in your simplistic example — when you pasted it
    like this, indeed it's difficult to tell, what is Forth word, and what is an effect of its execution — still it doesn't have to look any confusing in
    real program / Forth screen.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From P Falth@21:1/5 to minf...@arcor.de on Mon Aug 22 13:50:53 2022
    On Monday, 22 August 2022 at 16:44:02 UTC+2, minf...@arcor.de wrote:
    P Falth schrieb am Montag, 22. August 2022 um 15:59:54 UTC+2:
    On Saturday, 23 July 2022 at 08:24:09 UTC+2, dxforth wrote:
    32/64-bit machines have increased the risk of entering numbers incorrectly.
    Should the Forth interpreter be allowed to ignore certain punctuation e.g.
    underscore in numbers? What would be the issues?

    Usual suspects pre-answered.

    Q. Why the underscore character?
    A. It's not one of the characters Forth Inc uses to denote a double number.
    It's increasingly used in programming languages for this purpose. Even XPL0 has it.

    A. ANS didn't see the need for it.
    Q. Are you married?

    Q. Should >NUMBER process the underscore?
    A. No - for the same reason SCAN shouldn't handle TABs - it makes it weaker.

    Q. Then you'll need a routine to strip the underscores and a temporary buffer
    to hold the result. What do you suggest?
    A. The HOLD buffer.

    Q. Won't it interfere with numeric output?
    A. Input/output are usually mutually exclusive.

    Q. Won't the HOLD buffer need to be larger to hold the punctuation?
    A. Assuming worst case and one underscore per 4 characters, 20% larger.

    Q. Is all this just c.l.f. speculation - or have you implemented it?
    A. Implemented

    Q. Has it broken anything?
    A. Not AFAIK

    Q. What did it cost?
    A. 34 bytes on 8086, 39 bytes on 8080

    Q. Can't it be done using recognizers?
    A. If so, probably at more cost.

    Q. Will you keep it?
    A. Good question. For 16-bit integers its value may be marginal. How often
    do you enter values in binary?

    I got interested in this suggestion and implemented it.
    I thought the underscore was a bit ugly so implemented a word to set the grouping char

    : SET-GROUPING-CHAR ( xchar --)
    0 grping !
    dup 32 > and grping xc!+ drop ;

    I also set the grouping different based on BASE.
    Decimal and octal group 3 digits
    Hex 4 and binary 8.

    After that I started testing different chars. Today I use ´ ( $B4 acute accent)
    I think that ties the numbers together while _ puts them apart

    123´456´789 ok.
    . 123´456´789 ok
    '_' set-grouping-char ok
    123_456_789 ok.
    . 123_456_789 ok

    I also tried out the space as suggested by Zbig but not using VT.
    At codepoint $A0 there is a non breaking space char

    $a0 set-grouping-char ok
    123456789 ok.
    . 123 456 789 ok

    it gets more difficult to input without remapping a key.
    ´ is nice as it is (on my Swedish keyboard) next to the + key on the top row
    no shift or alt key needed to input it.

    But using the non breaking space I can now make words with spaces in them!

    : Hej Peter ." Ciao Peter" ; ok
    Hej Peter Ciao Peter ok

    This of course looks even more confusing then spaces in numbers!

    For me this improves readability enormously! Thanks for the suggestion.

    Fine! I am just wondering if ´ ie $B4 is the same in most codepages/locales.

    My systems require input to be utf8 encoded Unicode and will output utf8 streams.
    It has worked for over 20 years like that on both Windows and Linux.
    ´at $B4 is present in Windows 1252 and Linux Latin 1 codepages.
    Is there any reason to not use Unicode and utf8 today on Windows and Linux?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From dxforth@21:1/5 to P Falth on Tue Aug 23 13:21:30 2022
    On 23/08/2022 06:50, P Falth wrote:
    ...
    My systems require input to be utf8 encoded Unicode and will output utf8 streams.
    It has worked for over 20 years like that on both Windows and Linux.
    ´at $B4 is present in Windows 1252 and Linux Latin 1 codepages.
    Is there any reason to not use Unicode and utf8 today on Windows and Linux?

    String literals and comment fields excepted, there's not a lot of reason to
    use UTF-8 in programming code.

    Underscore in numbers is about convention. Several programming languages have adopted it as a programmer convenience. It might bemuse other languages to know Forth had no problem giving comma et al new meanings but drew the line at underscore.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From none) (albert@21:1/5 to peter.m.falth@gmail.com on Tue Aug 23 12:23:18 2022
    In article <8619d421-e8b5-4075-8dec-3813a60f6f8cn@googlegroups.com>,
    P Falth <peter.m.falth@gmail.com> wrote:
    On Monday, 22 August 2022 at 16:44:02 UTC+2, minf...@arcor.de wrote:
    P Falth schrieb am Montag, 22. August 2022 um 15:59:54 UTC+2:
    On Saturday, 23 July 2022 at 08:24:09 UTC+2, dxforth wrote:
    32/64-bit machines have increased the risk of entering numbers incorrectly.
    Should the Forth interpreter be allowed to ignore certain punctuation e.g.
    underscore in numbers? What would be the issues?

    Usual suspects pre-answered.

    Q. Why the underscore character?
    A. It's not one of the characters Forth Inc uses to denote a double number.
    It's increasingly used in programming languages for this purpose. Even >> > > XPL0 has it.

    A. ANS didn't see the need for it.
    Q. Are you married?

    Q. Should >NUMBER process the underscore?
    A. No - for the same reason SCAN shouldn't handle TABs - it makes it weaker.

    Q. Then you'll need a routine to strip the underscores and a temporary buffer
    to hold the result. What do you suggest?
    A. The HOLD buffer.

    Q. Won't it interfere with numeric output?
    A. Input/output are usually mutually exclusive.

    Q. Won't the HOLD buffer need to be larger to hold the punctuation?
    A. Assuming worst case and one underscore per 4 characters, 20% larger. >> > >
    Q. Is all this just c.l.f. speculation - or have you implemented it?
    A. Implemented

    Q. Has it broken anything?
    A. Not AFAIK

    Q. What did it cost?
    A. 34 bytes on 8086, 39 bytes on 8080

    Q. Can't it be done using recognizers?
    A. If so, probably at more cost.

    Q. Will you keep it?
    A. Good question. For 16-bit integers its value may be marginal. How often
    do you enter values in binary?

    I got interested in this suggestion and implemented it.
    I thought the underscore was a bit ugly so implemented a word to set the grouping char

    : SET-GROUPING-CHAR ( xchar --)
    0 grping !
    dup 32 > and grping xc!+ drop ;

    I also set the grouping different based on BASE.
    Decimal and octal group 3 digits
    Hex 4 and binary 8.

    After that I started testing different chars. Today I use ´ ( $B4 acute accent)
    I think that ties the numbers together while _ puts them apart

    123´456´789 ok.
    . 123´456´789 ok
    '_' set-grouping-char ok
    123_456_789 ok.
    . 123_456_789 ok

    I also tried out the space as suggested by Zbig but not using VT.
    At codepoint $A0 there is a non breaking space char

    $a0 set-grouping-char ok
    123456789 ok.
    . 123 456 789 ok

    it gets more difficult to input without remapping a key.
    ´ is nice as it is (on my Swedish keyboard) next to the + key on the top row
    no shift or alt key needed to input it.

    But using the non breaking space I can now make words with spaces in them! >> >
    : Hej Peter ." Ciao Peter" ; ok
    Hej Peter Ciao Peter ok

    This of course looks even more confusing then spaces in numbers!

    For me this improves readability enormously! Thanks for the suggestion.

    Fine! I am just wondering if ´ ie $B4 is the same in most codepages/locales.

    My systems require input to be utf8 encoded Unicode and will output utf8 streams.
    It has worked for over 20 years like that on both Windows and Linux.
    ´at $B4 is present in Windows 1252 and Linux Latin 1 codepages.
    Is there any reason to not use Unicode and utf8 today on Windows and Linux?

    There is a good reason to junk { BL WORD } in favor of TOKEN / NAME or whatever.

    NAME ( -- addr n ) get a blank surrounded token from the input stream
    with appropriate side effects on the input stream.

    The only requirements that looking up -- SEARCH-LIST -- has to follow is looking up this string, whatever its content.
    Then encoding of the characters shouldn't be a concern of the Forth system.
    In fact I have used escape sequences as Forth words. The action is what function keys that generate those codes are supposed to do.

    The talk about character encodings can be separated from dictionary and
    word lookups.

    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 albert@cherry. on Tue Aug 23 10:40:24 2022
    albert@cherry.(none) (albert) writes:
    There is a good reason to junk { BL WORD } in favor of TOKEN / NAME or whatever.

    NAME ( -- addr n ) get a blank surrounded token from the input stream
    with appropriate side effects on the input stream.

    PARSE-NAME has been standardized: <https://forth-standard.org/standard/core/PARSE-NAME>

    Then encoding of the characters shouldn't be a concern of the Forth system.

    UTF-8 worked nicely in the systems I tried that were not designed for
    it, with two exceptions: Editing on the command line did not work
    properly; and pointing out the error on a line did not work properly.
    Parsing worked fine.

    The virtue of UTF-8 is that it works well for most code that is
    written for handling ASCII, and that's what we see.

    - 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 Bernd Linsel@21:1/5 to dxforth on Tue Aug 23 17:46:52 2022
    On 23.08.2022 05:21, dxforth wrote:
    On 23/08/2022 06:50, P Falth wrote:
    ... My systems require input to be utf8 encoded Unicode and will
    output utf8 streams. It has worked for over 20 years like that on
    both Windows and Linux. 'at $B4 is present in Windows 1252 and
    Linux Latin 1 codepages. Is there any reason to not use Unicode and
    utf8 today on Windows and Linux?

    String literals and comment fields excepted, there's not a lot of
    reason to use UTF-8 in programming code.

    Underscore in numbers is about convention. Several programming
    languages have adopted it as a programmer convenience. It might
    bemuse other languages to know Forth had no problem giving comma et
    al new meanings but drew the line at underscore.


    I really do like writing literals in sources in UTF-8, since my system
    fully supports it and has not the faintest will to use antiquated or
    strange things like CP1252, ISO-8859-xxx, UTF-16, but one gets quickly
    used to writing sources in ASCII with hex escapes again when
    collaborating with Windows people who are not willing or able to save
    edited files as UTF-8 and all your special characters (for me,
    especially measurement units containing characters like u+00B0
    (Degrees), u+00B5 (greek mu for micro prefix), u+202F (narrow no-break
    space between value and measurement unit) etc. are lost every time one
    of these moron^H^H^H^H^Hfolks changed something.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From minforth@arcor.de@21:1/5 to Bernd Linsel on Tue Aug 23 09:50:12 2022
    Bernd Linsel schrieb am Dienstag, 23. August 2022 um 17:46:57 UTC+2:
    On 23.08.2022 05:21, dxforth wrote:
    On 23/08/2022 06:50, P Falth wrote:
    ... My systems require input to be utf8 encoded Unicode and will
    output utf8 streams. It has worked for over 20 years like that on
    both Windows and Linux. 'at $B4 is present in Windows 1252 and
    Linux Latin 1 codepages. Is there any reason to not use Unicode and
    utf8 today on Windows and Linux?

    String literals and comment fields excepted, there's not a lot of
    reason to use UTF-8 in programming code.

    Underscore in numbers is about convention. Several programming
    languages have adopted it as a programmer convenience. It might
    bemuse other languages to know Forth had no problem giving comma et
    al new meanings but drew the line at underscore.

    I really do like writing literals in sources in UTF-8, since my system
    fully supports it and has not the faintest will to use antiquated or
    strange things like CP1252, ISO-8859-xxx, UTF-16, but one gets quickly
    used to writing sources in ASCII with hex escapes again when
    collaborating with Windows people who are not willing or able to save
    edited files as UTF-8 and all your special characters (for me,
    especially measurement units containing characters like u+00B0
    (Degrees), u+00B5 (greek mu for micro prefix), u+202F (narrow no-break
    space between value and measurement unit) etc. are lost every time one
    of these moron^H^H^H^H^Hfolks changed something.

    Not wanting to contradict, but lots of Forth programs run on small systems where UTF-8 is not present, even when the programs are developped on feature-rich desktops.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Hendrix@21:1/5 to none albert on Tue Aug 23 10:11:53 2022
    On Tuesday, August 23, 2022 at 12:23:22 PM UTC+2, none albert wrote:
    [..]
    123麓456麓789 ok.
    . 123麓456麓789 ok
    [..]
    麓at $B4 is present in Windows 1252 and Linux Latin 1 codepages.
    Is there any reason to not use Unicode and utf8 today on Windows and Linux?

    According to the quoted stuff, quite a few :--)

    -marcel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anton Ertl@21:1/5 to minf...@arcor.de on Wed Aug 24 07:38:19 2022
    "minf...@arcor.de" <minforth@arcor.de> writes:
    Not wanting to contradict, but lots of Forth programs run on small systems >where UTF-8 is not present, even when the programs are developped on >feature-rich desktops.

    UTF-8-encoded strings are just sequences of bytes for nearly all the
    code that deals with it. That's why it works so well for code that
    has been written for ASCII; that's also just bytes. So a small system
    has no problem dealing with UTF-8, and a statement like "UTF-8 is not
    present" makes little sense.

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