Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

We are not a clone.


devel / comp.lang.forth / Underscoring numbers in Forth

SubjectAuthor
* Underscoring numbers in Forthdxforth
+- Re: Underscoring numbers in Forthdxforth
+* Re: Underscoring numbers in ForthMarcel Hendrix
|+- Re: Underscoring numbers in Forthnone
|`- Re: Underscoring numbers in Forthdxforth
+* Re: Underscoring numbers in ForthAnton Ertl
|`* Re: Underscoring numbers in Forthdxforth
| +- Re: Underscoring numbers in Forthdxforth
| `* Re: Underscoring numbers in ForthAnton Ertl
|  `* Re: Underscoring numbers in Forthdxforth
|   `* Re: Underscoring numbers in ForthAnton Ertl
|    `* Re: Underscoring numbers in Forthdxforth
|     `* Re: Underscoring numbers in Forthdxforth
|      `- Re: Underscoring numbers in Forthdxforth
+* Re: Underscoring numbers in ForthZbig
|+* Re: Underscoring numbers in Forthminf...@arcor.de
||`- Re: Underscoring numbers in ForthZbig
|`* Re: Underscoring numbers in Forthnone
| `* Re: Underscoring numbers in ForthZbig
|  `* Re: Underscoring numbers in ForthAnton Ertl
|   +- Re: Underscoring numbers in ForthZbig
|   +- Re: Underscoring numbers in ForthRon AARON
|   `* Re: Underscoring numbers in ForthZbig
|    `* Re: Underscoring numbers in Forthnone
|     `* Re: Underscoring numbers in ForthZbig
|      +* Re: Underscoring numbers in ForthRon AARON
|      |`* Re: Underscoring numbers in ForthZbig
|      | `* Re: Underscoring numbers in ForthRick C
|      |  +- Re: Underscoring numbers in ForthZbig
|      |  `* Re: Underscoring numbers in ForthZbig
|      |   +- Re: Underscoring numbers in ForthRick C
|      |   +* Re: Underscoring numbers in ForthAnton Ertl
|      |   |+* Re: Underscoring numbers in ForthZbig
|      |   ||+- Re: Underscoring numbers in ForthAnton Ertl
|      |   ||`- Re: Underscoring numbers in ForthJan Coombs
|      |   |`* Re: Underscoring numbers in ForthZbig
|      |   | +- Re: Underscoring numbers in Forthdxforth
|      |   | +* Re: Underscoring numbers in ForthRick C
|      |   | |`* Re: Underscoring numbers in ForthZbig
|      |   | | `* Re: Underscoring numbers in ForthRick C
|      |   | |  `* Re: Underscoring numbers in ForthZbig
|      |   | |   +* Re: Underscoring numbers in ForthRick C
|      |   | |   |+* Re: Underscoring numbers in Forthminf...@arcor.de
|      |   | |   ||`* Re: Underscoring numbers in ForthRick C
|      |   | |   || `- Re: Underscoring numbers in Forthminf...@arcor.de
|      |   | |   |+* Re: Underscoring numbers in ForthZbig
|      |   | |   ||`- Re: Underscoring numbers in ForthRick C
|      |   | |   |`- Re: Underscoring numbers in ForthZbig
|      |   | |   `- Re: Underscoring numbers in Forthdxforth
|      |   | `* Re: Underscoring numbers in ForthAnton Ertl
|      |   |  `* Re: Underscoring numbers in ForthZbig
|      |   |   `- Re: Underscoring numbers in Forthnone
|      |   `* Re: Underscoring numbers in ForthJan Coombs
|      |    `* Re: Underscoring numbers in ForthZbig
|      |     +- Re: Underscoring numbers in ForthS Jack
|      |     `- Re: Underscoring numbers in ForthRick C
|      `- Re: Underscoring numbers in ForthRick C
+* Re: Underscoring numbers in ForthRon AARON
|`* Re: Underscoring numbers in Forthdxforth
| +- Re: Underscoring numbers in ForthRon AARON
| `* Re: Underscoring numbers in ForthStephen Pelc
|  `* Re: Underscoring numbers in ForthAnton Ertl
|   `* Re: Underscoring numbers in ForthStephen Pelc
|    `- Re: Underscoring numbers in ForthAnton Ertl
`* Re: Underscoring numbers in ForthP Falth
 +* Re: Underscoring numbers in Forthminf...@arcor.de
 |`* Re: Underscoring numbers in ForthP Falth
 | +* Re: Underscoring numbers in Forthdxforth
 | |`* Re: Underscoring numbers in ForthBernd Linsel
 | | `* Re: Underscoring numbers in Forthminf...@arcor.de
 | |  `- Re: Underscoring numbers in ForthAnton Ertl
 | `* Re: Underscoring numbers in Forthnone
 |  +- Re: Underscoring numbers in ForthAnton Ertl
 |  `- Re: Underscoring numbers in ForthMarcel Hendrix
 `- Re: Underscoring numbers in ForthZbig

Pages:123
Underscoring numbers in Forth

<tbg467$1rre$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19286&group=comp.lang.forth#19286

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Underscoring numbers in Forth
Date: Sat, 23 Jul 2022 16:24:07 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbg467$1rre$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61294"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sat, 23 Jul 2022 06:24 UTC

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?

Re: Underscoring numbers in Forth

<tbg4j2$1v64$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19287&group=comp.lang.forth#19287

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sat, 23 Jul 2022 16:30:58 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbg4j2$1v64$1@gioia.aioe.org>
References: <tbg467$1rre$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="64708"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sat, 23 Jul 2022 06:30 UTC

On 23/07/2022 16:24, dxforth wrote:
>
> 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. Hang on - doesn't the buffer hold the _converted_ string?
A. Correct. The HOLD buffer doesn't need to be larger.

Re: Underscoring numbers in Forth

<7ac8f1a1-c173-4dff-930f-2e29aa5990ccn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19288&group=comp.lang.forth#19288

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:450e:b0:6b6:ada:55e3 with SMTP id t14-20020a05620a450e00b006b60ada55e3mr2598499qkp.304.1658563347116;
Sat, 23 Jul 2022 01:02:27 -0700 (PDT)
X-Received: by 2002:a05:620a:470f:b0:6b5:f0ec:743c with SMTP id
bs15-20020a05620a470f00b006b5f0ec743cmr2666969qkb.75.1658563346918; Sat, 23
Jul 2022 01:02:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 23 Jul 2022 01:02:26 -0700 (PDT)
In-Reply-To: <tbg467$1rre$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:79ba:acfe:1f04:ba5f;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:79ba:acfe:1f04:ba5f
References: <tbg467$1rre$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7ac8f1a1-c173-4dff-930f-2e29aa5990ccn@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Sat, 23 Jul 2022 08:02:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2279
 by: Marcel Hendrix - Sat, 23 Jul 2022 08:02 UTC

On Saturday, July 23, 2022 at 8:24:09 AM 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.
>
> Q. Should >NUMBER process the underscore?
> A. No - for the same reason SCAN shouldn't handle TABs - it makes it weaker.
>
[..]
> Q. Has it broken anything?
> A. Not AFAIK
[..]

What exactly is your idea?

"... certain punctuation e.g. underscore ... "

I guess you are talking about integer single precision, i.e. you want
_1000, 1_000, 10_00, 100_0, 1000_, _1__0_0_0____ all to map to 1000
in the current BASE? This_is_dead_beef ?

When >NUMBER doesn't handle it, how does it get recognized as an
integer by the rest of the system? Why not have the application filter
it when it wants to support this?

-marcel

Re: Underscoring numbers in Forth

<nnd$34f890f5$47037c72@740f50009e9d9fa7>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19289&group=comp.lang.forth#19289

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <tbg467$1rre$1@gioia.aioe.org> <7ac8f1a1-c173-4dff-930f-2e29aa5990ccn@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$34f890f5$47037c72@740f50009e9d9fa7>
Organization: KPN B.V.
Date: Sat, 23 Jul 2022 12:16:46 +0200
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 60
Injection-Date: Sat, 23 Jul 2022 12:16:46 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2946
 by: none - Sat, 23 Jul 2022 10:16 UTC

In article <7ac8f1a1-c173-4dff-930f-2e29aa5990ccn@googlegroups.com>,
Marcel Hendrix <mhx@iae.nl> wrote:
>On Saturday, July 23, 2022 at 8:24:09 AM 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.
>>
>> Q. Should >NUMBER process the underscore?
>> A. No - for the same reason SCAN shouldn't handle TABs - it makes it weaker.
>>
>[..]
>> Q. Has it broken anything?
>> A. Not AFAIK
>[..]
>
>What exactly is your idea?
>
>"... certain punctuation e.g. underscore ... "
>
>I guess you are talking about integer single precision, i.e. you want
>_1000, 1_000, 10_00, 100_0, 1000_, _1__0_0_0____ all to map to 1000
>in the current BASE? This_is_dead_beef ?
>
>When >NUMBER doesn't handle it, how does it get recognized as an
>integer by the rest of the system? Why not have the application filter
>it when it wants to support this?

>NUMBER is carefully designed to be interruptable.
It could handle extra characters, e.g. a traditional use of
finding the place of the decimal point (for fixed point numbers).

0. "1111.1111" >NUMBER OVER C@ &. = IF OVER DPL ! /STRING THEN >NUMBER

Handling _ without changing >NUMBER, but yet using is, is left as an
exercise for the reader.

I admit that >NUMBER is a reasonable factor, but I don't care a bit
about the suggestion to use in a Forth kernel (political correct Forth).
So it is not used in ciforth, and could be relegated to a loadable extension.

>
>-marcel

&. is a notation that replace '.' in
A decimal point in the middle of a word is non-standard.

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

Re: Underscoring numbers in Forth

<2022Jul23.135041@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19291&group=comp.lang.forth#19291

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sat, 23 Jul 2022 11:50:41 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 84
Message-ID: <2022Jul23.135041@mips.complang.tuwien.ac.at>
References: <tbg467$1rre$1@gioia.aioe.org>
Injection-Info: reader01.eternal-september.org; posting-host="afd66c9b49b03bd6a7d81461bf137455";
logging-data="4074945"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gZTigmahSMefjupElqYnX"
Cancel-Lock: sha1:3ITigrOLUeUPGB9X2MLVtD4zAW4=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sat, 23 Jul 2022 11:50 UTC

dxforth <dxforth@gmail.com> writes:
>32/64-bit machines have increased the risk of entering numbers incorrectly.

And reading the entered numbers. Who can tell quickly what order of
magnitude 1000000000000 has?

It's also about outputted numbers. Yes, I can write an output routine
that outputs 8_888_888_888_888 for readability, but if I cannot cut
that number and paste it back in (which I occasionally have to do), I
shy away from that.

>Should the Forth interpreter be allowed to ignore certain punctuation e.g.
>underscore in numbers?

It is allowed that already.

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

Very sensible. Who are you and what have you done to dxforth:-)

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

I don't see strong reasons either way.

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

No such buffer is needed. That's the beauty of >NUMBER, which has
been designed for a very similar use case:

: >number_ ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )
\ like >number, but ignores _
begin
>number
dup 0> while
over c@ '_' = while
1 /string
repeat then ;

Whould the buffer option be smaller?

: >number_ ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )
\ not tested or debugged
holdbuf >r
begin
over c@ dup digit? if
drop r> c!+ r>
else
'_' <> if
holdbuf r> over - 2swap 2>r >number 2drop 2r> exit then
again ;

Do you manage any better?

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

Says who?

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

What makes you think so?

>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 have been thinking about adding this feature for a while. I expect
that I will do so at some point in the future.

- 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

Re: Underscoring numbers in Forth

<tbgvgk$62i$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19294&group=comp.lang.forth#19294

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 00:10:27 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbgvgk$62i$1@gioia.aioe.org>
References: <tbg467$1rre$1@gioia.aioe.org>
<7ac8f1a1-c173-4dff-930f-2e29aa5990ccn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="6226"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sat, 23 Jul 2022 14:10 UTC

On 23/07/2022 18:02, Marcel Hendrix wrote:
>
> What exactly is your idea?
>
> "... certain punctuation e.g. underscore ... "
>
> I guess you are talking about integer single precision, i.e. you want
> _1000, 1_000, 10_00, 100_0, 1000_, _1__0_0_0____ all to map to 1000
> in the current BASE? This_is_dead_beef ?

Any character string representing a number sent to the forth interpreter.
The idea is to strip the underscores just before forth tries to convert
the string to a number. The catch is it mustn't be found in the dictionary
which is classically searched first. This effectively means you can't
use underscore in a word name - or risk your number being found.

Re: Underscoring numbers in Forth

<034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19295&group=comp.lang.forth#19295

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:c448:0:b0:473:efea:483f with SMTP id t8-20020a0cc448000000b00473efea483fmr3822817qvi.3.1658586513904;
Sat, 23 Jul 2022 07:28:33 -0700 (PDT)
X-Received: by 2002:a05:6214:1bca:b0:474:4a5:6ba8 with SMTP id
m10-20020a0562141bca00b0047404a56ba8mr3895953qvc.114.1658586513724; Sat, 23
Jul 2022 07:28:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 23 Jul 2022 07:28:33 -0700 (PDT)
In-Reply-To: <tbg467$1rre$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a;
posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a
References: <tbg467$1rre$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Sat, 23 Jul 2022 14:28:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1787
 by: Zbig - Sat, 23 Jul 2022 14:28 UTC

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

No such risk in case of underscore; to enter underscore character one has
to press Shift-Minus — it can be done only on purpose.
I believe one character that could be ignored the way you propose is space.
When entering long numbers it may be comfortable to, for example, separate
thousands by adding single space among them. It's easier to check the input
before final Enter-press.

Re: Underscoring numbers in Forth

<cba97bfa-6d96-4e0b-8ad6-065d75801e94n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19298&group=comp.lang.forth#19298

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:470e:b0:6b5:ed19:5a with SMTP id bs14-20020a05620a470e00b006b5ed19005amr4514373qkb.55.1658612741813;
Sat, 23 Jul 2022 14:45:41 -0700 (PDT)
X-Received: by 2002:ad4:5de4:0:b0:474:2384:a0e9 with SMTP id
jn4-20020ad45de4000000b004742384a0e9mr5374478qvb.79.1658612741671; Sat, 23
Jul 2022 14:45:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 23 Jul 2022 14:45:41 -0700 (PDT)
In-Reply-To: <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=193.80.121.153; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 193.80.121.153
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cba97bfa-6d96-4e0b-8ad6-065d75801e94n@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Sat, 23 Jul 2022 21:45:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1992
 by: minf...@arcor.de - Sat, 23 Jul 2022 21:45 UTC

Zbig schrieb am Samstag, 23. Juli 2022 um 16:28:34 UTC+2:
> > 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?
> No such risk in case of underscore; to enter underscore character one has
> to press Shift-Minus — it can be done only on purpose.
> I believe one character that could be ignored the way you propose is space.
> When entering long numbers it may be comfortable to, for example, separate
> thousands by adding single space among them. It's easier to check the input
> before final Enter-press.

You are timidly entering the gritty realm of locales ... ;-)

Re: Underscoring numbers in Forth

<bbdb9d6e-d4f6-488d-816b-5c43c1b447a2n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19299&group=comp.lang.forth#19299

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:290d:b0:6b5:cecc:1cab with SMTP id m13-20020a05620a290d00b006b5cecc1cabmr4567855qkp.465.1658615862073;
Sat, 23 Jul 2022 15:37:42 -0700 (PDT)
X-Received: by 2002:a05:622a:1e0e:b0:31f:1931:b2ab with SMTP id
br14-20020a05622a1e0e00b0031f1931b2abmr5290632qtb.686.1658615861906; Sat, 23
Jul 2022 15:37:41 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 23 Jul 2022 15:37:41 -0700 (PDT)
In-Reply-To: <cba97bfa-6d96-4e0b-8ad6-065d75801e94n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a;
posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
<cba97bfa-6d96-4e0b-8ad6-065d75801e94n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bbdb9d6e-d4f6-488d-816b-5c43c1b447a2n@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Sat, 23 Jul 2022 22:37:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2305
 by: Zbig - Sat, 23 Jul 2022 22:37 UTC

> > > 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?
> > No such risk in case of underscore; to enter underscore character one has
> > to press Shift-Minus — it can be done only on purpose.
> > I believe one character that could be ignored the way you propose is space.
> > When entering long numbers it may be comfortable to, for example, separate
> > thousands by adding single space among them. It's easier to check the input
> > before final Enter-press.
> You are timidly entering the gritty realm of locales ... ;-)

Not quite. I'm of course aware, that some countries use comma and dot for said
"thousand separators", but both comma and dot characters are usually interpreted
as "double" mark in Forth. So only the space can be used as "separator".

Re: Underscoring numbers in Forth

<tbidsr$hdg$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19302&group=comp.lang.forth#19302

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 13:22:03 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbidsr$hdg$1@gioia.aioe.org>
References: <tbg467$1rre$1@gioia.aioe.org>
<2022Jul23.135041@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="17840"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sun, 24 Jul 2022 03:22 UTC

On 23/07/2022 21:50, Anton Ertl wrote:
> dxforth <dxforth@gmail.com> writes:
> ...
>>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.
>
> No such buffer is needed. That's the beauty of >NUMBER, which has
> been designed for a very similar use case:
>
> : >number_ ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )
> \ like >number, but ignores _
> begin
> >number
> dup 0> while
> over c@ '_' = while
> 1 /string
> repeat then ;

The idea was to avoid separate number converters.

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

Humans - who use the same mouth to eat and speak.

>
>>Q. Can't it be done using recognizers?
>>A. If so, probably at more cost.
>
> What makes you think so?

The 30 odd bytes I spent would be hard to beat.

My implementation is sound enough. It's the potential for underscored
numbers to collide with dictionary entries that's the problem. 200x
character literals have the same issue but there the risk is manageable
since it involves strings of 3 characters only one of which is variable.
What comes from trying to import foreign ideas into Forth.

Re: Underscoring numbers in Forth

<tbigk5$1829$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19303&group=comp.lang.forth#19303

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 14:08:36 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbigk5$1829$1@gioia.aioe.org>
References: <tbg467$1rre$1@gioia.aioe.org>
<2022Jul23.135041@mips.complang.tuwien.ac.at> <tbidsr$hdg$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="41033"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sun, 24 Jul 2022 04:08 UTC

On 24/07/2022 13:22, dxforth wrote:
>
> It's the potential for underscored
> numbers to collide with dictionary entries that's the problem.

Collisions might be reduced sufficiently by requiring underscored
numbers begin with an underscore. Not fool-proof but then neither
were 200x character literals.

Re: Underscoring numbers in Forth

<tbihm4$csvp$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19304&group=comp.lang.forth#19304

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: clf...@8th-dev.com (Ron AARON)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 07:26:43 +0300
Organization: A noiseless patient Spider
Lines: 9
Message-ID: <tbihm4$csvp$1@dont-email.me>
References: <tbg467$1rre$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Jul 2022 04:26:44 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="a01db4f81b8c675c8cbda7b33932bd38";
logging-data="422905"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tDgItAYyVYcFdFzMmh97B"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:xL5rOl7ZzjXuqxnApnRrBkFsnDU=
Content-Language: en-US
In-Reply-To: <tbg467$1rre$1@gioia.aioe.org>
 by: Ron AARON - Sun, 24 Jul 2022 04:26 UTC

On 23/07/2022 9:24, 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?

I implemented underscores-in-numbers a while back in 8th, at no
perceivable cost. Makes large numbers much easier to understand.

Re: Underscoring numbers in Forth

<tbiijp$1pvc$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19306&group=comp.lang.forth#19306

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 14:42:32 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbiijp$1pvc$1@gioia.aioe.org>
References: <tbg467$1rre$1@gioia.aioe.org> <tbihm4$csvp$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="59372"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sun, 24 Jul 2022 04:42 UTC

On 24/07/2022 14:26, Ron AARON wrote:
>
>
> On 23/07/2022 9:24, 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?
>
> I implemented underscores-in-numbers a while back in 8th, at no
> perceivable cost. Makes large numbers much easier to understand.

What about dictionary collisions - or does 8th handle numbers differently?
Any class of number or just integers?

Re: Underscoring numbers in Forth

<tbikhg$dh2g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19307&group=comp.lang.forth#19307

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: clf...@8th-dev.com (Ron AARON)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 08:15:28 +0300
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <tbikhg$dh2g$1@dont-email.me>
References: <tbg467$1rre$1@gioia.aioe.org> <tbihm4$csvp$1@dont-email.me>
<tbiijp$1pvc$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Jul 2022 05:15:28 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="a01db4f81b8c675c8cbda7b33932bd38";
logging-data="443472"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19FgkpUj05w29FXCMZGFuIW"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:ruffDAxjXLzyjsylaBcNvN7no/0=
In-Reply-To: <tbiijp$1pvc$1@gioia.aioe.org>
Content-Language: en-US
 by: Ron AARON - Sun, 24 Jul 2022 05:15 UTC

On 24/07/2022 7:42, dxforth wrote:
> On 24/07/2022 14:26, Ron AARON wrote:
>>
>>
>> On 23/07/2022 9:24, 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?
>>
>> I implemented underscores-in-numbers a while back in 8th, at no
>> perceivable cost. Makes large numbers much easier to understand.
>
> What about dictionary collisions - or does 8th handle numbers differently?
> Any class of number or just integers?

The dictionary is searched first, so : 123_456 ; will be found if
"123_456" is entered. Numbers are attempted to be parsed after words, so
it's possible to override e.g. "8" if you wanted to.

Any kind of number allows the underscore, including "big integers" and
"big floats". The underscore is simply ignored inside number parsing.

Re: Underscoring numbers in Forth

<tbivt9$g8cj$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19315&group=comp.lang.forth#19315

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.swapon.de!news.freedyn.de!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 08:29:29 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <tbivt9$g8cj$1@dont-email.me>
References: <tbg467$1rre$1@gioia.aioe.org> <tbihm4$csvp$1@dont-email.me> <tbiijp$1pvc$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 24 Jul 2022 08:29:29 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="02bbac57d5567ce5d932b428c5ab2823";
logging-data="532883"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/+JYklRGOMPp+Gkhr4zmm"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:BN7QCj5rO8tKoc4dEbuH505EhMM=
X-Usenapp: v1.22/l - Full License
 by: Stephen Pelc - Sun, 24 Jul 2022 08:29 UTC

On 24 Jul 2022 at 06:42:32 CEST, "dxforth" <dxforth@gmail.com> wrote:

>> I implemented underscores-in-numbers a while back in 8th, at no
>> perceivable cost. Makes large numbers much easier to understand.
>
> What about dictionary collisions - or does 8th handle numbers differently?
> Any class of number or just integers?

Once you have decided that numbers should have an ignoreable character
you might as well replace all occurrences of that literal by a variable. Once
you have a variable, you can now choose the ignoreable character at
run-time, e.g.
':' ign-char !

You can use a similar mechanism for the DP and FP separators. Since
a variable is larger than a byte, you can treat the variables as n-char
arrays in which any match satisfies. VFX has used this mechanism for
decades to allow users to have locale-sensitive DP and FP numbers.
Since we made this change there have been no whines from the
standards lawyers and no technical support issues.

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

Re: Underscoring numbers in Forth

<2022Jul24.113547@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19317&group=comp.lang.forth#19317

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 09:35:47 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 74
Message-ID: <2022Jul24.113547@mips.complang.tuwien.ac.at>
References: <tbg467$1rre$1@gioia.aioe.org> <2022Jul23.135041@mips.complang.tuwien.ac.at> <tbidsr$hdg$1@gioia.aioe.org>
Injection-Info: reader01.eternal-september.org; posting-host="80828522b5a55344739309f76d137e47";
logging-data="575765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18GHaM12ZcGNl1Qge6MDfqW"
Cancel-Lock: sha1:Cp2I0G7Rkr26Rxi38zPfOYzxosc=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sun, 24 Jul 2022 09:35 UTC

dxforth <dxforth@gmail.com> writes:
>On 23/07/2022 21:50, Anton Ertl wrote:
>> dxforth <dxforth@gmail.com> writes:
>> ...
>>>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.
>>
>> No such buffer is needed. That's the beauty of >NUMBER, which has
>> been designed for a very similar use case:
>>
>> : >number_ ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )
>> \ like >number, but ignores _
>> begin
>> >number
>> dup 0> while
>> over c@ '_' = while
>> 1 /string
>> repeat then ;
>
>The idea was to avoid separate number converters.

I have no idea what you mean with that.

>>>Q. Won't it interfere with numeric output?
>>>A. Input/output are usually mutually exclusive.
>>
>> Says who?
>
>Humans - who use the same mouth to eat and speak.

And the relevance to conversion from strings to numbers and numbers to
strings is?

>>>Q. Can't it be done using recognizers?
>>>A. If so, probably at more cost.
>>
>> What makes you think so?
>
>The 30 odd bytes I spent would be hard to beat.

Moving the goalposts? I did not ask about beating.

Why makes you think that the cost would be higher rather than just the
same if one applies the same change to a pluggable number recognizer
rather than a hardwired one?

>It's the potential for underscored
>numbers to collide with dictionary entries that's the problem.

That's no problem, just like the potential for other numbers to
collide with dictionary entries is no problem:

Dictionary entries are searched first, so if you have a word _ or __
or _1 or 1_ etc., it will be found before the number recognizer tries
to convert it into a number. The conventional way to avoid a number
being shadowed by a dictionary entry is to start the number with one
of the digits 0-9 (and avoiding dictionary entries that start with
these digits, albeit there are some exceptions that prove this rule).

>200x character literals have the same issue

It's the same non-issue for the same reason. And, guess what, no
problems have been reported to us, neither for the Forth-2012
character literals ('a', implemented in Gforth since 0.7 (2008)), nor
for Gforth's older syntax ('a, implemented in Gforth since the first
public release (1996)).

- 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

Re: Underscoring numbers in Forth

<2022Jul24.120523@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19318&group=comp.lang.forth#19318

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 10:05:23 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 39
Message-ID: <2022Jul24.120523@mips.complang.tuwien.ac.at>
References: <tbg467$1rre$1@gioia.aioe.org> <tbihm4$csvp$1@dont-email.me> <tbiijp$1pvc$1@gioia.aioe.org> <tbivt9$g8cj$1@dont-email.me>
Injection-Info: reader01.eternal-september.org; posting-host="80828522b5a55344739309f76d137e47";
logging-data="586728"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+KVBSfkqyVVXs7gGxD3AQB"
Cancel-Lock: sha1:sgkYNv8WG5BvD+P5XUJLZpc0rCE=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sun, 24 Jul 2022 10:05 UTC

Stephen Pelc <stephen@vfxforth.com> writes:
>Once you have decided that numbers should have an ignoreable character
>you might as well replace all occurrences of that literal by a variable. Once
>you have a variable, you can now choose the ignoreable character at
>run-time, e.g.
> ':' ign-char !

That may be a way for vendors to placate their customers if they all
want some different ignore-character, but if you want a common
language for exchanging libraries, studying programs etc, it's a bad
idea. And given that no other viable ignore-characters apart from _
has been proposed (I don't consider space, comma, and dot to be a
viable ignore-characters in Forth) despite the frequent urge to
bike-shed such small changes to death, why propose this misfeature in
your first posting on this topic?

Your example is especially nasty because ':' is a double indicator in
SwiftForth. So someone following your suggestion would produce
programs that behave quite differently in SwiftForth.

>You can use a similar mechanism for the DP and FP separators.

Also bad ideas for language commonality. If you want to accept
decimal comma, accept it in addition to the decimal point. No need
for variables.

>Since we made this change there have been [...] no technical support issues.

If library authors made use of this misfeature, and an application
author would trip over that, would you get a support call? I guess,
though, that library authors are smart enough to stay clear of it.
But if a "feature" is best avoided, why provide it at all?

- 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

Re: Underscoring numbers in Forth

<nnd$4111728d$7b6c241c@2b3d160f88bab759>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19319&group=comp.lang.forth#19319

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$4111728d$7b6c241c@2b3d160f88bab759>
Organization: KPN B.V.
Date: Sun, 24 Jul 2022 14:03:28 +0200
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 23
Injection-Date: Sun, 24 Jul 2022 14:03:28 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1766
 by: none - Sun, 24 Jul 2022 12:03 UTC

In article <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>,
Zbig <zbigniew2011@gmail.com> 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?
>
>No such risk in case of underscore; to enter underscore character one has
>to press Shift-Minus — it can be done only on purpose.
>I believe one character that could be ignored the way you propose is space.
>When entering long numbers it may be comfortable to, for example, separate
>thousands by adding single space among them. It's easier to check the input
>before final Enter-press.

Using spaces in numbers? In Forth this is a bad idea.
Underscores, yes.

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

Re: Underscoring numbers in Forth

<dcaa8062-356e-4245-9613-fe612c5c254en@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19321&group=comp.lang.forth#19321

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:d86:b0:6a7:92ff:cfbc with SMTP id q6-20020a05620a0d8600b006a792ffcfbcmr6157959qkl.176.1658666011675;
Sun, 24 Jul 2022 05:33:31 -0700 (PDT)
X-Received: by 2002:a05:620a:1919:b0:6b5:e309:bc15 with SMTP id
bj25-20020a05620a191900b006b5e309bc15mr5716686qkb.404.1658666011477; Sun, 24
Jul 2022 05:33:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 24 Jul 2022 05:33:31 -0700 (PDT)
In-Reply-To: <nnd$4111728d$7b6c241c@2b3d160f88bab759>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a;
posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
<nnd$4111728d$7b6c241c@2b3d160f88bab759>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dcaa8062-356e-4245-9613-fe612c5c254en@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Sun, 24 Jul 2022 12:33:31 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1396
 by: Zbig - Sun, 24 Jul 2022 12:33 UTC

> Using spaces in numbers? In Forth this is a bad idea.
> Underscores, yes.

Who, apart of Forth programmer, will use underscore when entering
any number?

Re: Underscoring numbers in Forth

<2022Jul24.145348@mips.complang.tuwien.ac.at>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19322&group=comp.lang.forth#19322

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 12:53:48 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 22
Message-ID: <2022Jul24.145348@mips.complang.tuwien.ac.at>
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com> <nnd$4111728d$7b6c241c@2b3d160f88bab759> <dcaa8062-356e-4245-9613-fe612c5c254en@googlegroups.com>
Injection-Info: reader01.eternal-september.org; posting-host="80828522b5a55344739309f76d137e47";
logging-data="649487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uLK52miKXc2yTQhqce/VR"
Cancel-Lock: sha1:LZC0gv4NvLIqZ+H4Rk5mqJg1Q2Q=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sun, 24 Jul 2022 12:53 UTC

Zbig <zbigniew2011@gmail.com> writes:
>Who, apart of Forth programmer, will use underscore when entering
>any number?

Accoding to
<https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping>:

|maritime "21_450"

and (more relevant):

|Ada, C# (from version 7.0[34]), D, Haskell (from GHC version 8.6.1),
|Java, Kotlin,[35] OCaml, Perl, Python (from version 3.6), PHP (from
|version 7.4[36]), Ruby, Go (from version 1.13), Rust, Julia, and
|Swift use the underscore (_) character for this purpose

- 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

Re: Underscoring numbers in Forth

<015b2c27-f830-448d-8615-866681db8afan@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19323&group=comp.lang.forth#19323

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:d83:b0:6a7:a68c:6118 with SMTP id q3-20020a05620a0d8300b006a7a68c6118mr6163423qkl.337.1658668755889;
Sun, 24 Jul 2022 06:19:15 -0700 (PDT)
X-Received: by 2002:a05:620a:1641:b0:6b5:bef0:e30 with SMTP id
c1-20020a05620a164100b006b5bef00e30mr5955280qko.478.1658668755524; Sun, 24
Jul 2022 06:19:15 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 24 Jul 2022 06:19:15 -0700 (PDT)
In-Reply-To: <2022Jul24.145348@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a;
posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
<nnd$4111728d$7b6c241c@2b3d160f88bab759> <dcaa8062-356e-4245-9613-fe612c5c254en@googlegroups.com>
<2022Jul24.145348@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <015b2c27-f830-448d-8615-866681db8afan@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Sun, 24 Jul 2022 13:19:15 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2599
 by: Zbig - Sun, 24 Jul 2022 13:19 UTC

> >Who, apart of Forth programmer, will use underscore when entering
> >any number?
> Accoding to
> <https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping>:
>
> |maritime "21_450"

Correction: apart of Forth programmer and a sailor.

> and (more relevant):
>
> |Ada, C# (from version 7.0[34]), D, Haskell (from GHC version 8.6.1),
> |Java, Kotlin,[35] OCaml, Perl, Python (from version 3.6), PHP (from
> |version 7.4[36]), Ruby, Go (from version 1.13), Rust, Julia, and
> |Swift use the underscore (_) character for this purpose

OK, so I'm asking the same question to creators of Ada, C# (from version
7.0[34]), D, Haskell (from GHC version 8.6.1), Java, Kotlin,[35] OCaml, Perl,
Python (from version 3.6), PHP (from version 7.4[36]), Ruby, Go (from
version 1.13), Rust, Julia, and Swift: who, apart of the sailors and apart
of the programmers, that were told "use underscore" — indeed uses
underscore when entering any numbers?

The question is serious; I never saw anyone, who was using underscore
to enter number — well, maybe indeed it's commonly used somewhere
for that purpose (like I had no idea some sailors use that).

Re: Underscoring numbers in Forth

<tbjhau$kfs9$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19324&group=comp.lang.forth#19324

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: clf...@8th-dev.com (Ron AARON)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 16:26:54 +0300
Organization: A noiseless patient Spider
Lines: 23
Message-ID: <tbjhau$kfs9$1@dont-email.me>
References: <tbg467$1rre$1@gioia.aioe.org>
<034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
<nnd$4111728d$7b6c241c@2b3d160f88bab759>
<dcaa8062-356e-4245-9613-fe612c5c254en@googlegroups.com>
<2022Jul24.145348@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 24 Jul 2022 13:26:54 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="a01db4f81b8c675c8cbda7b33932bd38";
logging-data="671625"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19jg0K9Ft0roF0dPXavXVJD"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:O3Q7nHIAD1Nj9kMN+JzRNi6my94=
In-Reply-To: <2022Jul24.145348@mips.complang.tuwien.ac.at>
Content-Language: en-US
 by: Ron AARON - Sun, 24 Jul 2022 13:26 UTC

On 24/07/2022 15:53, Anton Ertl wrote:
> Zbig <zbigniew2011@gmail.com> writes:
>> Who, apart of Forth programmer, will use underscore when entering
>> any number?
>
> Accoding to
> <https://en.wikipedia.org/wiki/Decimal_separator#Digit_grouping>:
>
> |maritime "21_450"
>
> and (more relevant):
>
> |Ada, C# (from version 7.0[34]), D, Haskell (from GHC version 8.6.1),
> |Java, Kotlin,[35] OCaml, Perl, Python (from version 3.6), PHP (from
> |version 7.4[36]), Ruby, Go (from version 1.13), Rust, Julia, and
> |Swift use the underscore (_) character for this purpose
>
> - anton

Indeed; it was because someone asked for it based on Python's example,
that I did eventually add it into 8th.

Re: Underscoring numbers in Forth

<tbjjdh$1lq3$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19325&group=comp.lang.forth#19325

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!7AktqsUqy5CCvnKa3S0Dkw.user.46.165.242.75.POSTED!not-for-mail
From: dxfo...@gmail.com (dxforth)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Mon, 25 Jul 2022 00:02:25 +1000
Organization: Aioe.org NNTP Server
Message-ID: <tbjjdh$1lq3$1@gioia.aioe.org>
References: <tbg467$1rre$1@gioia.aioe.org>
<2022Jul23.135041@mips.complang.tuwien.ac.at> <tbidsr$hdg$1@gioia.aioe.org>
<2022Jul24.113547@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="55107"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sun, 24 Jul 2022 14:02 UTC

On 24/07/2022 19:35, Anton Ertl wrote:
> dxforth <dxforth@gmail.com> writes:
>>On 23/07/2022 21:50, Anton Ertl wrote:
>>> dxforth <dxforth@gmail.com> writes:
>>> ...
>>>>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.
>>>
>>> No such buffer is needed. That's the beauty of >NUMBER, which has
>>> been designed for a very similar use case:
>>>
>>> : >number_ ( ud1 c-addr1 u1 -- ud2 c-addr2 u2 )
>>> \ like >number, but ignores _
>>> begin
>>> >number
>>> dup 0> while
>>> over c@ '_' = while
>>> 1 /string
>>> repeat then ;
>>
>>The idea was to avoid separate number converters.
>
> I have no idea what you mean with that.

You just created one. Will you create another for floats?

>
>>>>Q. Won't it interfere with numeric output?
>>>>A. Input/output are usually mutually exclusive.
>>>
>>> Says who?
>>
>>Humans - who use the same mouth to eat and speak.
>
> And the relevance to conversion from strings to numbers and numbers to
> strings is?

I see no reason for them to collide.

>
>>>>Q. Can't it be done using recognizers?
>>>>A. If so, probably at more cost.
>>>
>>> What makes you think so?
>>
>>The 30 odd bytes I spent would be hard to beat.
>
> Moving the goalposts? I did not ask about beating.
>
> Why makes you think that the cost would be higher rather than just the
> same if one applies the same change to a pluggable number recognizer
> rather than a hardwired one?

Feel free to show the code for the plug-in.

>>It's the potential for underscored
>>numbers to collide with dictionary entries that's the problem.
>
> That's no problem, just like the potential for other numbers to
> collide with dictionary entries is no problem:
>
> Dictionary entries are searched first, so if you have a word _ or __
> or _1 or 1_ etc., it will be found before the number recognizer tries
> to convert it into a number. The conventional way to avoid a number
> being shadowed by a dictionary entry is to start the number with one
> of the digits 0-9 (and avoiding dictionary entries that start with
> these digits, albeit there are some exceptions that prove this rule).

Fair enough

>
>>200x character literals have the same issue
>
> It's the same non-issue for the same reason. And, guess what, no
> problems have been reported to us, neither for the Forth-2012
> character literals ('a', implemented in Gforth since 0.7 (2008)), nor
> for Gforth's older syntax ('a, implemented in Gforth since the first
> public release (1996)).
>
> - anton

Re: Underscoring numbers in Forth

<b087485d-393c-4e22-acf0-a98d20301fben@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19326&group=comp.lang.forth#19326

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:13cf:b0:6b5:ed16:fc69 with SMTP id g15-20020a05620a13cf00b006b5ed16fc69mr6362706qkl.416.1658672279882;
Sun, 24 Jul 2022 07:17:59 -0700 (PDT)
X-Received: by 2002:a37:bf81:0:b0:6b5:cdb6:d35c with SMTP id
p123-20020a37bf81000000b006b5cdb6d35cmr6166980qkf.185.1658672279660; Sun, 24
Jul 2022 07:17:59 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 24 Jul 2022 07:17:59 -0700 (PDT)
In-Reply-To: <2022Jul24.145348@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a;
posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 2a02:a31d:a141:5b00:3176:cc50:14b9:1f4a
References: <tbg467$1rre$1@gioia.aioe.org> <034d9af5-154a-431d-a469-f7054b9c0bb1n@googlegroups.com>
<nnd$4111728d$7b6c241c@2b3d160f88bab759> <dcaa8062-356e-4245-9613-fe612c5c254en@googlegroups.com>
<2022Jul24.145348@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b087485d-393c-4e22-acf0-a98d20301fben@googlegroups.com>
Subject: Re: Underscoring numbers in Forth
From: zbigniew...@gmail.com (Zbig)
Injection-Date: Sun, 24 Jul 2022 14:17:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1816
 by: Zbig - Sun, 24 Jul 2022 14:17 UTC

> |Swift use the underscore (_) character for this purpose

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

Re: Underscoring numbers in Forth

<tbjku1$lckg$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19327&group=comp.lang.forth#19327

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: Underscoring numbers in Forth
Date: Sun, 24 Jul 2022 14:28:17 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <tbjku1$lckg$1@dont-email.me>
References: <tbg467$1rre$1@gioia.aioe.org> <tbihm4$csvp$1@dont-email.me> <tbiijp$1pvc$1@gioia.aioe.org> <tbivt9$g8cj$1@dont-email.me> <2022Jul24.120523@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 24 Jul 2022 14:28:17 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="02bbac57d5567ce5d932b428c5ab2823";
logging-data="701072"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PGG5OhKHfPpUrJsRkiAYn"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:BsKcyn4Bev0QOUlgl3D/ktRtQUc=
X-Usenapp: v1.22/l - Full License
 by: Stephen Pelc - Sun, 24 Jul 2022 14:28 UTC

On 24 Jul 2022 at 12:05:23 CEST, "Anton Ertl" <Anton Ertl> wrote:

Your response is a typical "not invented here" response.

The DP and FP character definitions solve a *real* issue in that the
Forth standard approach cannot be used for real-world data entry.
The DP and FP char solution allows the double and FP data entry
routines to be used for data entry in various locales.

> Your example is especially nasty because ':' is a double indicator in
> SwiftForth. So someone following your suggestion would produce
> programs that behave quite differently in SwiftForth.

I have a dispute resolution protocol in a contract (yes, really) that includes
the line:
"Dispute resolution processes include the consumption of alcoholic
beverages, food and laughter."
Leon at Forth Inc and I are perfectly capable of finding a resolution.

> Also bad ideas for language commonality. If you want to accept
> decimal comma, accept it in addition to the decimal point. No need
> for variables.

I think that you do not understand locales.

Stephen

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

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor