Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

We can defeat gravity. The problem is the paperwork involved.


devel / comp.lang.forth / Re: Handling unsupported line-endings

SubjectAuthor
* Handling unsupported line-endingsdxforth
+* Re: Handling unsupported line-endingsHeinrich Hohl
|`* Re: Handling unsupported line-endingsdxforth
| `* Re: Handling unsupported line-endingsHeinrich Hohl
|  +* Re: Handling unsupported line-endingsdxforth
|  |`- Re: Handling unsupported line-endingsdxforth
|  +* Re: Handling unsupported line-endingsminf...@arcor.de
|  |`- Re: Handling unsupported line-endingsdxforth
|  `* Re: Handling unsupported line-endingsAnton Ertl
|   +* Re: Handling unsupported line-endingsHeinrich Hohl
|   |`- Re: Handling unsupported line-endingsAnton Ertl
|   `* Re: Handling unsupported line-endingsNickolay Kolchin
|    +* Re: Handling unsupported line-endingsdxforth
|    |+* Re: Handling unsupported line-endingsdxforth
|    ||`* Re: Handling unsupported line-endingsAnton Ertl
|    || `* Re: Handling unsupported line-endingsdxforth
|    ||  +* Re: Handling unsupported line-endingsdxforth
|    ||  |`* Re: Handling unsupported line-endingsAnton Ertl
|    ||  | `* Re: Handling unsupported line-endingsdxforth
|    ||  |  +- Re: Handling unsupported line-endingsdxforth
|    ||  |  `* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |   `* Re: Handling unsupported line-endingsdxforth
|    ||  |    `* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |     `* Re: Handling unsupported line-endingsdxforth
|    ||  |      `* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |       `* Re: Handling unsupported line-endingsdxforth
|    ||  |        `* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |         `* Re: Handling unsupported line-endingsdxforth
|    ||  |          `* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |           `* Re: Handling unsupported line-endingsdxforth
|    ||  |            `* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |             `* Re: Handling unsupported line-endingsdxforth
|    ||  |              +* Re: Handling unsupported line-endingsAnton Ertl
|    ||  |              |`* Re: Handling unsupported line-endingsdxforth
|    ||  |              | `* Re: Handling unsupported line-endingsRuvim
|    ||  |              |  +* Re: Handling unsupported line-endingsdxforth
|    ||  |              |  |`* Re: Handling unsupported line-endingsRuvim
|    ||  |              |  | `* Re: Handling unsupported line-endingsdxforth
|    ||  |              |  |  `- Re: Handling unsupported line-endingsRuvim
|    ||  |              |  `* Re: Handling unsupported line-endingsNickolay Kolchin
|    ||  |              |   `* Re: Handling unsupported line-endingsRon AARON
|    ||  |              |    `* Re: Handling unsupported line-endingsdxforth
|    ||  |              |     `* Re: Handling unsupported line-endingsRon AARON
|    ||  |              |      `* Re: Handling unsupported line-endingsdxforth
|    ||  |              |       `- Re: Handling unsupported line-endingsRon AARON
|    ||  |              `* Re: Handling unsupported line-endingsdxforth
|    ||  |               `- Re: Handling unsupported line-endingsdxforth
|    ||  `* Re: Handling unsupported line-endingsAnton Ertl
|    ||   `* Re: Handling unsupported line-endingsdxforth
|    ||    `- Re: Handling unsupported line-endingsAnton Ertl
|    |`* Re: Handling unsupported line-endingsNickolay Kolchin
|    | +* Re: Handling unsupported line-endingsdxforth
|    | |`* Re: Handling unsupported line-endingsNickolay Kolchin
|    | | +* Re: Handling unsupported line-endingsdxforth
|    | | |`- Re: Handling unsupported line-endingsNickolay Kolchin
|    | | +* Re: Handling unsupported line-endingsAnton Ertl
|    | | |`* Re: Handling unsupported line-endingsNickolay Kolchin
|    | | | `* Re: Handling unsupported line-endingsAnton Ertl
|    | | |  `- Re: Handling unsupported line-endingsdxforth
|    | | `* Re: Handling unsupported line-endingsHeinrich Hohl
|    | |  `* Re: Handling unsupported line-endingsNickolay Kolchin
|    | |   `* Re: Handling unsupported line-endingsRon AARON
|    | |    `* Re: Handling unsupported line-endingsNickolay Kolchin
|    | |     +* Re: Handling unsupported line-endingspahihu
|    | |     |+- Re: Handling unsupported line-endingsNickolay Kolchin
|    | |     |`- Re: Handling unsupported line-endingsRon AARON
|    | |     `* Re: Handling unsupported line-endingsRon AARON
|    | |      +* Re: Handling unsupported line-endingsNickolay Kolchin
|    | |      |`- Re: Handling unsupported line-endingsRon AARON
|    | |      `- Re: Handling unsupported line-endingsdxforth
|    | `- Re: Handling unsupported line-endingsAnton Ertl
|    +* Re: Handling unsupported line-endingsAnton Ertl
|    |`- Re: Handling unsupported line-endingsNickolay Kolchin
|    `* Re: Handling unsupported line-endingsMarcel Hendrix
|     +- Re: Handling unsupported line-endingsNickolay Kolchin
|     `* Re: Handling unsupported line-endingsAnton Ertl
|      `* Re: Handling unsupported line-endingsdxforth
|       `* Re: Handling unsupported line-endingsAnton Ertl
|        `* Re: Handling unsupported line-endingspahihu
|         +* Re: Handling unsupported line-endingsdxforth
|         |`* Re: Handling unsupported line-endingsAnton Ertl
|         | `- Re: Handling unsupported line-endingsdxforth
|         `- Re: Handling unsupported line-endingsAnton Ertl
+* Re: Handling unsupported line-endingsS Jack
|`- Re: Handling unsupported line-endingsdxforth
+* Re: Handling unsupported line-endingsBranimir Maksimovic
|`- Re: Handling unsupported line-endingsdxforth
`* Re: Handling unsupported line-endingsdxforth
 +- Re: Handling unsupported line-endingsRuvim
 `* Re: Handling unsupported line-endingsAnton Ertl
  +* Re: Handling unsupported line-endingsRuvim
  |`* Re: Handling unsupported line-endingsAnton Ertl
  | `* Re: Handling unsupported line-endingsRuvim
  |  `* Re: Handling unsupported line-endingsAnton Ertl
  |   +* Re: Handling unsupported line-endingsRuvim
  |   |`- Re: Handling unsupported line-endingsAnton Ertl
  |   `* Re: Handling unsupported line-endingsdxforth
  |    `* Re: Handling unsupported line-endingsRuvim
  |     `* Re: Handling unsupported line-endingsdxforth
  |      `* Re: Handling unsupported line-endingsRuvim
  |       `* Re: Handling unsupported line-endingsdxforth
  `* Re: Handling unsupported line-endingsdxforth

Pages:1234567
Re: Handling unsupported line-endings

<slr3k0$ct2$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ruvim.pi...@gmail.com (Ruvim)
Newsgroups: comp.lang.forth
Subject: Re: Handling unsupported line-endings
Date: Tue, 2 Nov 2021 13:23:58 +0300
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <slr3k0$ct2$1@dont-email.me>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 2 Nov 2021 10:24:00 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="17b9b87ba46b17726ea00c112ecb737f";
logging-data="13218"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3CGtdmpG1vBbGyIppcPiM"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Cancel-Lock: sha1:o6GpnjZ80fgCichrpDf1ayqQcJA=
In-Reply-To: <slq260$1l9v$1@gioia.aioe.org>
Content-Language: en-US
 by: Ruvim - Tue, 2 Nov 2021 10:23 UTC

On 2021-11-02 03:53, dxforth wrote:
> On 2/11/2021 01:16, Anton Ertl wrote:
>> Ruvim <ruvim.pinka@gmail.com> writes:
>>> It's obvious that if u2=0 then the line is empty (when flag is true).
>>
>> What makes you think so?
>>
>> The standard says:
>>
>> |When u1 = u2 the line terminator has yet to be reached.
>>
>> That also holds if u1=u2=0.
>>
>>> So u2=u1 (regardless of u1) should always mean that a line terminator
>>> is not reached.
>>
>> It does.  So if the programmer calls READ-LINE with u1=0, READ-LINE
>> should not consume any characters from the file.  Conversely, if the
>> program should make any progress in the file, it should call READ-LINE
>> with u1>0.
>>
>>> Agreed. But some other mistakes are still present in this glossary
>>> entry anyway (e.g. in "before u1").
>>
>> Apart from the misleading "0 <= u2 <= u1" (where "0 <= u2 <u1" would
>> be better), anything else?
>
> So the ANS spec isn't really dead - it has "misleading" statements (you);
> or implementers should rewind the file in the case of u1=u2 and line
> terminator received (Ruvim).

It depends on a number of factors whether an implementer should rewind
the file.

In some combinations of line terminators it's possible to implement
READ-LINE without rewind (reposition back), by reading character by
character.

But if you need to look ahead, or use something like "SEARCH", you have
to rewind the file in some cases (not only u2=u1). And if the underlying
stream cannot be rewound, you have to implement buffering.

OTOH, if you implement buffering, reading character by character becomes
not so expensive.

--
Ruvim

Re: Handling unsupported line-endings

<slt808$2u9$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Wed, 3 Nov 2021 16:51:04 +1100
Organization: Aioe.org NNTP Server
Message-ID: <slt808$2u9$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="3017"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Wed, 3 Nov 2021 05:51 UTC

On 2/11/2021 21:23, Ruvim wrote:
> On 2021-11-02 03:53, dxforth wrote:
>> On 2/11/2021 01:16, Anton Ertl wrote:
>>> Ruvim <ruvim.pinka@gmail.com> writes:
>>>> It's obvious that if u2=0 then the line is empty (when flag is true).
>>>
>>> What makes you think so?
>>>
>>> The standard says:
>>>
>>> |When u1 = u2 the line terminator has yet to be reached.
>>>
>>> That also holds if u1=u2=0.
>>>
>>>> So u2=u1 (regardless of u1) should always mean that a line terminator
>>>> is not reached.
>>>
>>> It does.  So if the programmer calls READ-LINE with u1=0, READ-LINE
>>> should not consume any characters from the file.  Conversely, if the
>>> program should make any progress in the file, it should call READ-LINE
>>> with u1>0.
>>>
>>>> Agreed. But some other mistakes are still present in this glossary
>>>> entry anyway (e.g. in "before u1").
>>>
>>> Apart from the misleading "0 <= u2 <= u1" (where "0 <= u2 <u1" would
>>> be better), anything else?
>>
>> So the ANS spec isn't really dead - it has "misleading" statements (you);
>> or implementers should rewind the file in the case of u1=u2 and line
>> terminator received (Ruvim).
>
> It depends on a number of factors whether an implementer should rewind
> the file.
>
> In some combinations of line terminators it's possible to implement
> READ-LINE without rewind (reposition back), by reading character by
> character.
>
> But if you need to look ahead, or use something like "SEARCH", you have
> to rewind the file in some cases (not only u2=u1). And if the underlying
> stream cannot be rewound, you have to implement buffering.
>
> OTOH, if you implement buffering, reading character by character becomes
> not so expensive.

These are band-aids solutions for a problematic specification. The question
is whether to keep the spec or replace it. ISTM there's little stomach for
the latter, not least because it would undermine ANS.

Re: Handling unsupported line-endings

<slteso$ibs$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ruvim.pi...@gmail.com (Ruvim)
Newsgroups: comp.lang.forth
Subject: Re: Handling unsupported line-endings
Date: Wed, 3 Nov 2021 10:48:39 +0300
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <slteso$ibs$1@dont-email.me>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 3 Nov 2021 07:48:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5fc7733dfad9d33dfd7d7f8e790bef6d";
logging-data="18812"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19wfa1MKu/LAdAMkEvu16Bk"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Cancel-Lock: sha1:gWwILJKtW8KJcG22diZz4ZHFNOk=
In-Reply-To: <slt808$2u9$1@gioia.aioe.org>
Content-Language: en-US
 by: Ruvim - Wed, 3 Nov 2021 07:48 UTC

On 2021-11-03 08:51, dxforth wrote:
> On 2/11/2021 21:23, Ruvim wrote:
>> On 2021-11-02 03:53, dxforth wrote:
>>> On 2/11/2021 01:16, Anton Ertl wrote:
>>>> Ruvim <ruvim.pinka@gmail.com> writes:
[...]
>>>>> But some other mistakes are still present in this glossary
>>>>> entry anyway (e.g. in "before u1").
>>>>
>>>> Apart from the misleading "0 <= u2 <= u1" (where "0 <= u2 <u1" would
>>>> be better), anything else?
>>>
>>> So the ANS spec isn't really dead - it has "misleading" statements
>>> (you);
>>> or implementers should rewind the file in the case of u1=u2 and line
>>> terminator received (Ruvim).
>>
>> It depends on a number of factors whether an implementer should rewind
>> the file.
>>
>> In some combinations of line terminators it's possible to implement
>> READ-LINE without rewind (reposition back), by reading character by
>> character.
>>
>> But if you need to look ahead, or use something like "SEARCH", you have
>> to rewind the file in some cases (not only u2=u1). And if the underlying
>> stream cannot be rewound, you have to implement buffering.
>>
>> OTOH, if you implement buffering, reading character by character becomes
>> not so expensive.
>
> These are band-aids solutions for a problematic specification.

What make you think the specification for READ-LINE is problematic?

BTW, reservation of 2 characters makes nothing problem for implementations.

> The question is whether to keep the spec or replace it.

Do you mean an incompatible replacement?

> ISTM there's little stomach for the latter, not least because
> it would undermine ANS.

There's little ground for discussion without your draft for a new
specification ;-)

--
Ruvim

Re: Handling unsupported line-endings

<slts1o$u8v$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Wed, 3 Nov 2021 22:33:11 +1100
Organization: Aioe.org NNTP Server
Message-ID: <slts1o$u8v$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="31007"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Wed, 3 Nov 2021 11:33 UTC

On 3/11/2021 18:48, Ruvim wrote:
> On 2021-11-03 08:51, dxforth wrote:
>> On 2/11/2021 21:23, Ruvim wrote:
>>> On 2021-11-02 03:53, dxforth wrote:
>>>> On 2/11/2021 01:16, Anton Ertl wrote:
>>>>> Ruvim <ruvim.pinka@gmail.com> writes:
> [...]
>>>>>> But some other mistakes are still present in this glossary
>>>>>> entry anyway (e.g. in "before u1").
>>>>>
>>>>> Apart from the misleading "0 <= u2 <= u1" (where "0 <= u2 <u1" would
>>>>> be better), anything else?
>>>>
>>>> So the ANS spec isn't really dead - it has "misleading" statements
>>>> (you);
>>>> or implementers should rewind the file in the case of u1=u2 and line
>>>> terminator received (Ruvim).
>>>
>>> It depends on a number of factors whether an implementer should rewind
>>> the file.
>>>
>>> In some combinations of line terminators it's possible to implement
>>> READ-LINE without rewind (reposition back), by reading character by
>>> character.
>>>
>>> But if you need to look ahead, or use something like "SEARCH", you have
>>> to rewind the file in some cases (not only u2=u1). And if the underlying
>>> stream cannot be rewound, you have to implement buffering.
>>>
>>> OTOH, if you implement buffering, reading character by character becomes
>>> not so expensive.
>>
>> These are band-aids solutions for a problematic specification.
>
> What make you think the specification for READ-LINE is problematic?

It's open to multiple interpretations e.g.

"When u1 = u2, the line terminator has yet to be reached."

>
> BTW, reservation of 2 characters makes nothing problem for implementations.

Can you imagine an fgets with such a requirement :)

>
>> The question is whether to keep the spec or replace it.
>
> Do you mean an incompatible replacement?

Yes

>
>> ISTM there's little stomach for the latter, not least because
>> it would undermine ANS.
>
>
> There's little ground for discussion without your draft for a new
> specification ;-)

Let me know what needs fixing and I'll consider it :)

Re: Handling unsupported line-endings

<sm36k3$sb2$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Fri, 5 Nov 2021 23:04:19 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm36k3$sb2$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="29026"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Fri, 5 Nov 2021 12:04 UTC

On 3/11/2021 22:33, dxforth wrote:
> On 3/11/2021 18:48, Ruvim wrote:
>> On 2021-11-03 08:51, dxforth wrote:
>> ...
>>> The question is whether to keep the spec or replace it.
>>
>> Do you mean an incompatible replacement?
>
> Yes

That was in reference to the need for an additional flag to indicate
EOL received. Thinking about it, there's no reason this can't be
combined with the existing 'success' flag.

Summary of changes:

- Previously 'flag' was true|false. In the replacement it may take
the values -1|0|1 so we rename 'flag' to 'n3'.

- Previously 'u1' was the maximum chars to receive. Now it refers
to the buffer size.

\ Sample implementation

\ Scan for CR LF CRLF return len & offset to next line
: /EOL ( a u -- u' offs )
over swap begin dup while
over c@ dup $0D - while $0A - while 1 /string
repeat \ got LF
drop swap - dup 1+ exit
then \ got CR
2drop tuck swap - swap 1+ c@ $0A <> over + 2 + exit
then \ neither
drop swap - dup ;

\ DTC 8086 version
\ Scan for CR LF CRLF return len & offset to next line
code /EOL ( a u -- u' offs )
cx pop bx pop bx di mov dx dx sub $0A0D # ax mov
1 $: 4 $ jcxz al 0 [bx] cmp 2 $ jz ah 0 [bx] cmp 3 $ jz
bx inc cx dec 1 $ ju 2 $: dx inc ah 1 [bx] cmp 4 $ jnz
3 $: dx inc 4 $: di bx sub bx push dx bx add bx push
next
end-code

\ buffer size at least u chars and a minimum of one
\ n3: 0 = EOF, -1 = EOL received, 1 = EOL not received
: READ-LINE ( a u1 fid -- u2 n3 ior )
>r 2dup r@ read-file dup if r> drop nip exit then \ ior
over 0= if r> drop 2swap 2drop 0 exit then \ EOF
drop >r tuck 1- r@ min /eol r> - s>d
r@ file-position drop d+ r> reposition-file drop
tuck 1+ = 2* 1+ 0 ;

The above checked ok on SwiftForth, VFX, Gforth, LX|NT/Forth, Win32Forth;
but not on Minforth 3.4.7 (I didn't look into why).
The test used:

https://pastebin.com/5vnsvehx

Re: Handling unsupported line-endings

<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:288:: with SMTP id z8mr23294382qtw.75.1636135513702;
Fri, 05 Nov 2021 11:05:13 -0700 (PDT)
X-Received: by 2002:a0c:edc3:: with SMTP id i3mr696765qvr.57.1636135513207;
Fri, 05 Nov 2021 11:05:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 5 Nov 2021 11:05:13 -0700 (PDT)
In-Reply-To: <sm36k3$sb2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org> <sm36k3$sb2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Fri, 05 Nov 2021 18:05:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 9
 by: Nickolay Kolchin - Fri, 5 Nov 2021 18:05 UTC

On Friday, November 5, 2021 at 3:04:22 PM UTC+3, dxforth wrote:
> On 3/11/2021 22:33, dxforth wrote:

here 2 c, 13 c, 10 c, count 2constant

Is this generally portable? I.e. implementation can use CELL as size for
counted strings.

P.S. Back in "good old days" we distinguish between "counted" (CELL
sized) and "packed" (byte size) strings.

Re: Handling unsupported line-endings

<1281cea8-ae3e-4b2b-9b09-7d185b428567n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7fc3:: with SMTP id b3mr22794538qtk.247.1636143499871;
Fri, 05 Nov 2021 13:18:19 -0700 (PDT)
X-Received: by 2002:a37:9581:: with SMTP id x123mr49709976qkd.477.1636143499711;
Fri, 05 Nov 2021 13:18:19 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 5 Nov 2021 13:18:19 -0700 (PDT)
In-Reply-To: <sm36k3$sb2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:f7:1f1b:dac7:61f6:c7d3:1aff:f7a;
posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 2003:f7:1f1b:dac7:61f6:c7d3:1aff:f7a
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org> <sm36k3$sb2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1281cea8-ae3e-4b2b-9b09-7d185b428567n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Fri, 05 Nov 2021 20:18:19 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 65
 by: minf...@arcor.de - Fri, 5 Nov 2021 20:18 UTC

dxforth schrieb am Freitag, 5. November 2021 um 13:04:22 UTC+1:
> On 3/11/2021 22:33, dxforth wrote:
> > On 3/11/2021 18:48, Ruvim wrote:
> >> On 2021-11-03 08:51, dxforth wrote:
> >> ...
> >>> The question is whether to keep the spec or replace it.
> >>
> >> Do you mean an incompatible replacement?
> >
> > Yes
> That was in reference to the need for an additional flag to indicate
> EOL received. Thinking about it, there's no reason this can't be
> combined with the existing 'success' flag.
>
> Summary of changes:
>
> - Previously 'flag' was true|false. In the replacement it may take
> the values -1|0|1 so we rename 'flag' to 'n3'.
>
> - Previously 'u1' was the maximum chars to receive. Now it refers
> to the buffer size.
>
> \ Sample implementation
>
> \ Scan for CR LF CRLF return len & offset to next line
> : /EOL ( a u -- u' offs )
> over swap begin dup while
> over c@ dup $0D - while $0A - while 1 /string
> repeat \ got LF
> drop swap - dup 1+ exit
> then \ got CR
> 2drop tuck swap - swap 1+ c@ $0A <> over + 2 + exit
> then \ neither
> drop swap - dup ;
>
> \ DTC 8086 version
> \ Scan for CR LF CRLF return len & offset to next line
> code /EOL ( a u -- u' offs )
> cx pop bx pop bx di mov dx dx sub $0A0D # ax mov
> 1 $: 4 $ jcxz al 0 [bx] cmp 2 $ jz ah 0 [bx] cmp 3 $ jz
> bx inc cx dec 1 $ ju 2 $: dx inc ah 1 [bx] cmp 4 $ jnz
> 3 $: dx inc 4 $: di bx sub bx push dx bx add bx push
> next
> end-code
>
> \ buffer size at least u chars and a minimum of one
> \ n3: 0 = EOF, -1 = EOL received, 1 = EOL not received
> : READ-LINE ( a u1 fid -- u2 n3 ior )
> >r 2dup r@ read-file dup if r> drop nip exit then \ ior
> over 0= if r> drop 2swap 2drop 0 exit then \ EOF
> drop >r tuck 1- r@ min /eol r> - s>d
> r@ file-position drop d+ r> reposition-file drop
> tuck 1+ = 2* 1+ 0 ;
>
> The above checked ok on SwiftForth, VFX, Gforth, LX|NT/Forth, Win32Forth;
> but not on Minforth 3.4.7 (I didn't look into why).
> The test used:
>
> https://pastebin.com/5vnsvehx

MF347 had an unnecessary buffer size restriction (apart from not
considering Mac line endings). Thanks for pointing this out.

I just checked with actual version MF348 and it seems to run ok now.

https://sourceforge.net/projects/minforth/files/

Re: Handling unsupported line-endings

<5655d761-9161-4fd2-8e5f-afdf5f1df8c6n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:c6f:: with SMTP id t15mr12344250qvj.49.1636149603292;
Fri, 05 Nov 2021 15:00:03 -0700 (PDT)
X-Received: by 2002:a05:622a:14:: with SMTP id x20mr66970107qtw.372.1636149603160;
Fri, 05 Nov 2021 15:00:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 5 Nov 2021 15:00:03 -0700 (PDT)
In-Reply-To: <sm36k3$sb2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:f7:1f1b:dac7:61f6:c7d3:1aff:f7a;
posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 2003:f7:1f1b:dac7:61f6:c7d3:1aff:f7a
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org> <sm36k3$sb2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5655d761-9161-4fd2-8e5f-afdf5f1df8c6n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Fri, 05 Nov 2021 22:00:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 68
 by: minf...@arcor.de - Fri, 5 Nov 2021 22:00 UTC

dxforth schrieb am Freitag, 5. November 2021 um 13:04:22 UTC+1:
> On 3/11/2021 22:33, dxforth wrote:
> > On 3/11/2021 18:48, Ruvim wrote:
> >> On 2021-11-03 08:51, dxforth wrote:
> >> ...
> >>> The question is whether to keep the spec or replace it.
> >>
> >> Do you mean an incompatible replacement?
> >
> > Yes
> That was in reference to the need for an additional flag to indicate
> EOL received. Thinking about it, there's no reason this can't be
> combined with the existing 'success' flag.
>
> Summary of changes:
>
> - Previously 'flag' was true|false. In the replacement it may take
> the values -1|0|1 so we rename 'flag' to 'n3'.
>
> - Previously 'u1' was the maximum chars to receive. Now it refers
> to the buffer size.
>
> \ Sample implementation
>
> \ Scan for CR LF CRLF return len & offset to next line
> : /EOL ( a u -- u' offs )
> over swap begin dup while
> over c@ dup $0D - while $0A - while 1 /string
> repeat \ got LF
> drop swap - dup 1+ exit
> then \ got CR
> 2drop tuck swap - swap 1+ c@ $0A <> over + 2 + exit
> then \ neither
> drop swap - dup ;
>
> \ DTC 8086 version
> \ Scan for CR LF CRLF return len & offset to next line
> code /EOL ( a u -- u' offs )
> cx pop bx pop bx di mov dx dx sub $0A0D # ax mov
> 1 $: 4 $ jcxz al 0 [bx] cmp 2 $ jz ah 0 [bx] cmp 3 $ jz
> bx inc cx dec 1 $ ju 2 $: dx inc ah 1 [bx] cmp 4 $ jnz
> 3 $: dx inc 4 $: di bx sub bx push dx bx add bx push
> next
> end-code
>
> \ buffer size at least u chars and a minimum of one
> \ n3: 0 = EOF, -1 = EOL received, 1 = EOL not received
> : READ-LINE ( a u1 fid -- u2 n3 ior )
> >r 2dup r@ read-file dup if r> drop nip exit then \ ior
> over 0= if r> drop 2swap 2drop 0 exit then \ EOF
> drop >r tuck 1- r@ min /eol r> - s>d
> r@ file-position drop d+ r> reposition-file drop
> tuck 1+ = 2* 1+ 0 ;
>
> The above checked ok on SwiftForth, VFX, Gforth, LX|NT/Forth, Win32Forth;
> but not on Minforth 3.4.7 (I didn't look into why).
> The test used:
>
> https://pastebin.com/5vnsvehx

MF347 had an unnecessary buffer size restriction (apart from not
considering Mac line endings). Thanks for pointing this out.
The actual version MF348 seems to run ok:

https://sourceforge.net/projects/minforth/files/

BTW IMHO you should open/create the test files in BIN mode.
C-library file functions in Windows auto-convert single LFs to CRLFs
in text mode, so one might be in for little surprises...

Re: Handling unsupported line-endings

<sm4mrs$c1r$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Sat, 6 Nov 2021 12:47:40 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm4mrs$c1r$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<5655d761-9161-4fd2-8e5f-afdf5f1df8c6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="12347"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sat, 6 Nov 2021 01:47 UTC

On 6/11/2021 09:00, minf...@arcor.de wrote:
> dxforth schrieb am Freitag, 5. November 2021 um 13:04:22 UTC+1:
>> On 3/11/2021 22:33, dxforth wrote:
>> ...
>> The above checked ok on SwiftForth, VFX, Gforth, LX|NT/Forth, Win32Forth;
>> but not on Minforth 3.4.7 (I didn't look into why).
>> The test used:
>>
>> https://pastebin.com/5vnsvehx
>
> MF347 had an unnecessary buffer size restriction (apart from not
> considering Mac line endings). Thanks for pointing this out.
> The actual version MF348 seems to run ok:
>
> https://sourceforge.net/projects/minforth/files/
>
> BTW IMHO you should open/create the test files in BIN mode.
> C-library file functions in Windows auto-convert single LFs to CRLFs
> in text mode, so one might be in for little surprises...

Thanks for the Minforth update. Added 'BIN' opening to the test as
suggested (I didn't know about).

*** CORRECTION ***

READ-LINE as implemented above didn't match the description (return
codes were reversed). Revised implementation and test is here:

https://pastebin.com/BT4UQ1Zu

Re: Handling unsupported line-endings

<sm4ouq$vkp$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Sat, 6 Nov 2021 13:23:22 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm4ouq$vkp$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="32409"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sat, 6 Nov 2021 02:23 UTC

On 6/11/2021 05:05, Nickolay Kolchin wrote:
> On Friday, November 5, 2021 at 3:04:22 PM UTC+3, dxforth wrote:
>> On 3/11/2021 22:33, dxforth wrote:
>
> here 2 c, 13 c, 10 c, count 2constant
>
> Is this generally portable? I.e. implementation can use CELL as size for
> counted strings.
>
> P.S. Back in "good old days" we distinguish between "counted" (CELL
> sized) and "packed" (byte size) strings.
>

'cell-counted' byte strings may have existed in some systems however
ANS defines a 'counted string' as:

"A data structure consisting of one character containing a length
followed by zero or more contiguous data characters. Normally,
counted strings contain text."

Re: Handling unsupported line-endings

<0760a385-d32a-4a8a-be80-1677fdbfa197n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:288:: with SMTP id z8mr26994791qtw.75.1636177426336;
Fri, 05 Nov 2021 22:43:46 -0700 (PDT)
X-Received: by 2002:a05:620a:4003:: with SMTP id h3mr13908757qko.127.1636177426076;
Fri, 05 Nov 2021 22:43:46 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 5 Nov 2021 22:43:45 -0700 (PDT)
In-Reply-To: <sm4ouq$vkp$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm4ouq$vkp$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0760a385-d32a-4a8a-be80-1677fdbfa197n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sat, 06 Nov 2021 05:43:46 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 20
 by: Nickolay Kolchin - Sat, 6 Nov 2021 05:43 UTC

On Saturday, November 6, 2021 at 5:23:24 AM UTC+3, dxforth wrote:
> On 6/11/2021 05:05, Nickolay Kolchin wrote:
> > On Friday, November 5, 2021 at 3:04:22 PM UTC+3, dxforth wrote:
> >> On 3/11/2021 22:33, dxforth wrote:
> >
> > here 2 c, 13 c, 10 c, count 2constant
> >
> > Is this generally portable? I.e. implementation can use CELL as size for
> > counted strings.
> >
> > P.S. Back in "good old days" we distinguish between "counted" (CELL
> > sized) and "packed" (byte size) strings.
> >
> 'cell-counted' byte strings may have existed in some systems however
> ANS defines a 'counted string' as:
>
> "A data structure consisting of one character containing a length
> followed by zero or more contiguous data characters. Normally,
> counted strings contain text."

Well, this is another "dumb thing" from ANS. :(

Re: Handling unsupported line-endings

<sm5jar$a3c$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ruvim.pi...@gmail.com (Ruvim)
Newsgroups: comp.lang.forth
Subject: Re: Handling unsupported line-endings
Date: Sat, 6 Nov 2021 12:53:30 +0300
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <sm5jar$a3c$1@dont-email.me>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 6 Nov 2021 09:53:31 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="6e322e12484bf7b45b4789b910d5629d";
logging-data="10348"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YFZ7zqkhN9mpyttAdW31y"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Cancel-Lock: sha1:pDWRhy2XfzFg9w4zDIUIlpyZt3c=
In-Reply-To: <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
Content-Language: en-US
 by: Ruvim - Sat, 6 Nov 2021 09:53 UTC

On 2021-11-05 21:05, Nickolay Kolchin wrote:
> On Friday, November 5, 2021 at 3:04:22 PM UTC+3, dxforth wrote:
>> On 3/11/2021 22:33, dxforth wrote:
>
> here 2 c, 13 c, 10 c, count 2constant

A name is missed after "2constant".

Also, a counted string seems to be redundant in this case.
The same can be defined as:

here 13 c, 10 c, 2 2constant crlf

>
> Is this generally portable? I.e. implementation can use CELL as size for
> counted strings.

Yes, it's portable. A standard Forth system may use only a character for
the length in a counted string.

See 3.1.3.4 Counted strings, 6.1.0980 COUNT
https://forth-standard.org/standard/core/COUNT

> P.S. Back in "good old days" we distinguish between "counted" (CELL
> sized) and "packed" (byte size) strings.

In the Forth-83 and Forth-79 standards the length in a counted string
takes exactly one *byte* (8 bits). And the glossary entry for COUNT
said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"

SP-Forth provided a word "XCOUNT ( addr1 -- addr2 u )" for counted-like
strings having one cell for the length:

: xcount ( addr1 -- addr2 u ) dup cell+ swap @ ;

--
Ruvim

Re: Handling unsupported line-endings

<4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:ebca:: with SMTP id k10mr19029694qvq.51.1636193788637;
Sat, 06 Nov 2021 03:16:28 -0700 (PDT)
X-Received: by 2002:a05:620a:29c4:: with SMTP id s4mr52188074qkp.510.1636193788428;
Sat, 06 Nov 2021 03:16:28 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 03:16:28 -0700 (PDT)
In-Reply-To: <sm5jar$a3c$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sat, 06 Nov 2021 10:16:28 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 31
 by: Nickolay Kolchin - Sat, 6 Nov 2021 10:16 UTC

On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
> On 2021-11-05 21:05, Nickolay Kolchin wrote:
> > On Friday, November 5, 2021 at 3:04:22 PM UTC+3, dxforth wrote:
> >> On 3/11/2021 22:33, dxforth wrote:
> >
> > here 2 c, 13 c, 10 c, count 2constant
> A name is missed after "2constant".
>
> Also, a counted string seems to be redundant in this case.
> The same can be defined as:
>
> here 13 c, 10 c, 2 2constant crlf
> >
> > Is this generally portable? I.e. implementation can use CELL as size for
> > counted strings.
> Yes, it's portable. A standard Forth system may use only a character for
> the length in a counted string.
>
> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
> https://forth-standard.org/standard/core/COUNT
> > P.S. Back in "good old days" we distinguish between "counted" (CELL
> > sized) and "packed" (byte size) strings.
> In the Forth-83 and Forth-79 standards the length in a counted string
> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
>

Actually F79 used correct naming "packed" and F83 started using
misleading term "counted".

IMHO, 255 bytes limitation is "blast from past" and should be lifted
nowadays...

Re: Handling unsupported line-endings

<sm5mk4$u2d$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ruvim.pi...@gmail.com (Ruvim)
Newsgroups: comp.lang.forth
Subject: Re: Handling unsupported line-endings
Date: Sat, 6 Nov 2021 13:49:39 +0300
Organization: A noiseless patient Spider
Lines: 45
Message-ID: <sm5mk4$u2d$1@dont-email.me>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me>
<4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 6 Nov 2021 10:49:40 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="6e322e12484bf7b45b4789b910d5629d";
logging-data="30797"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OVQegr3L2f49qTM25/hrU"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.2.1
Cancel-Lock: sha1:Cl8uJ1/EQCqlFmdfBFf05sIIL3c=
In-Reply-To: <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
Content-Language: en-US
 by: Ruvim - Sat, 6 Nov 2021 10:49 UTC

On 2021-11-06 13:16, Nickolay Kolchin wrote:
> On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
>> On 2021-11-05 21:05, Nickolay Kolchin wrote:

>> A standard Forth system may use only a character for
>> the length in a counted string.
>>
>> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
>> https://forth-standard.org/standard/core/COUNT
>>
>>> P.S. Back in "good old days" we distinguish between "counted" (CELL
>>> sized) and "packed" (byte size) strings.
>>
>> In the Forth-83 and Forth-79 standards the length in a counted string
>> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
>> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
>>
>
> Actually F79 used correct naming "packed" and F83 started using
> misleading term "counted".

As I can see, the term "packed" was used in only one glossary entry,
namely for the "WORD" word. It looks like just an omission.

It's not obvious to me why the "packed string" term is better than
"counted string".

> IMHO, 255 bytes limitation is "blast from past" and should be lifted
> nowadays...

Forth-94 doesn't limit it by 255 bytes, it requires that this limit
shall be *not less* than 255 bytes (i.e., the character size cannot be
less than 8 bits).

The actual limit depends on the character size in the system.

The "counted string" data type is already almost outdated, there only
two standard words use them: "WORD" and "FIND".

The "character string" data type takes two cells on a stack ( c-addr u )
and it limits the string length by the cell size only.

--
Ruvim

Re: Handling unsupported line-endings

<a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2903:: with SMTP id m3mr37851306qkp.452.1636197059144;
Sat, 06 Nov 2021 04:10:59 -0700 (PDT)
X-Received: by 2002:a05:622a:94:: with SMTP id o20mr68683730qtw.169.1636197058927;
Sat, 06 Nov 2021 04:10:58 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 04:10:58 -0700 (PDT)
In-Reply-To: <sm5mk4$u2d$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sat, 06 Nov 2021 11:10:59 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 54
 by: Nickolay Kolchin - Sat, 6 Nov 2021 11:10 UTC

On Saturday, November 6, 2021 at 1:49:42 PM UTC+3, Ruvim wrote:
> On 2021-11-06 13:16, Nickolay Kolchin wrote:
> > On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
> >> On 2021-11-05 21:05, Nickolay Kolchin wrote:
>
> >> A standard Forth system may use only a character for
> >> the length in a counted string.
> >>
> >> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
> >> https://forth-standard.org/standard/core/COUNT
> >>
> >>> P.S. Back in "good old days" we distinguish between "counted" (CELL
> >>> sized) and "packed" (byte size) strings.
> >>
> >> In the Forth-83 and Forth-79 standards the length in a counted string
> >> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
> >> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
> >>
> >
> > Actually F79 used correct naming "packed" and F83 started using
> > misleading term "counted".
> As I can see, the term "packed" was used in only one glossary entry,
> namely for the "WORD" word. It looks like just an omission.
>
> It's not obvious to me why the "packed string" term is better than
> "counted string".
> > IMHO, 255 bytes limitation is "blast from past" and should be lifted
> > nowadays...
> Forth-94 doesn't limit it by 255 bytes, it requires that this limit
> shall be *not less* than 255 bytes (i.e., the character size cannot be
> less than 8 bits).
>
> The actual limit depends on the character size in the system.
>
> The "counted string" data type is already almost outdated, there only
> two standard words use them: "WORD" and "FIND".
>
> The "character string" data type takes two cells on a stack ( c-addr u )
> and it limits the string length by the cell size only.
>

We just need to add `PLACE` and say that actual counted string
presentation is system dependent.

There is even a proposal for that, which clearly states:

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

Re: Handling unsupported line-endings

<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:1a1c:: with SMTP id f28mr23900888qtb.243.1636198197901;
Sat, 06 Nov 2021 04:29:57 -0700 (PDT)
X-Received: by 2002:a05:620a:708:: with SMTP id 8mr13594990qkc.316.1636198197741;
Sat, 06 Nov 2021 04:29:57 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 04:29:57 -0700 (PDT)
In-Reply-To: <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me> <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sat, 06 Nov 2021 11:29:57 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 77
 by: Nickolay Kolchin - Sat, 6 Nov 2021 11:29 UTC

On Saturday, November 6, 2021 at 2:10:59 PM UTC+3, Nickolay Kolchin wrote:
> On Saturday, November 6, 2021 at 1:49:42 PM UTC+3, Ruvim wrote:
> > On 2021-11-06 13:16, Nickolay Kolchin wrote:
> > > On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
> > >> On 2021-11-05 21:05, Nickolay Kolchin wrote:
> >
> > >> A standard Forth system may use only a character for
> > >> the length in a counted string.
> > >>
> > >> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
> > >> https://forth-standard.org/standard/core/COUNT
> > >>
> > >>> P.S. Back in "good old days" we distinguish between "counted" (CELL
> > >>> sized) and "packed" (byte size) strings.
> > >>
> > >> In the Forth-83 and Forth-79 standards the length in a counted string
> > >> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
> > >> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
> > >>
> > >
> > > Actually F79 used correct naming "packed" and F83 started using
> > > misleading term "counted".
> > As I can see, the term "packed" was used in only one glossary entry,
> > namely for the "WORD" word. It looks like just an omission.
> >
> > It's not obvious to me why the "packed string" term is better than
> > "counted string".
> > > IMHO, 255 bytes limitation is "blast from past" and should be lifted
> > > nowadays...
> > Forth-94 doesn't limit it by 255 bytes, it requires that this limit
> > shall be *not less* than 255 bytes (i.e., the character size cannot be
> > less than 8 bits).
> >
> > The actual limit depends on the character size in the system.
> >
> > The "counted string" data type is already almost outdated, there only
> > two standard words use them: "WORD" and "FIND".
> >
> > The "character string" data type takes two cells on a stack ( c-addr u )
> > and it limits the string length by the cell size only.
> >
> We just need to add `PLACE` and say that actual counted string
> presentation is system dependent.
>
> There is even a proposal for that, which clearly states:
>
> "Since then, in 2016 the Forth-200x committee in favour of eliminating ambiguous conditions has decided to require “1 CHARS = 1” thus making systems that have other character sizes than on not compliant to future Forth-200x standards [2][3]. Requesting standard systems to have byte size characters limit counted strings to the known maximal length of 255 characters."

I.e. these two words must give identical results:

: test-s S" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" NIP . ;

: test-c C" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" COUNT NIP . ;

test-s
test-c

Currently they cause hell among Forth implementations.

Re: Handling unsupported line-endings

<sm5tqv$1dco$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Sat, 6 Nov 2021 23:52:46 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm5tqv$1dco$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me>
<4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me>
<a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="46488"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sat, 6 Nov 2021 12:52 UTC

On 6/11/2021 22:29, Nickolay Kolchin wrote:
> On Saturday, November 6, 2021 at 2:10:59 PM UTC+3, Nickolay Kolchin wrote:
>> On Saturday, November 6, 2021 at 1:49:42 PM UTC+3, Ruvim wrote:
>> > On 2021-11-06 13:16, Nickolay Kolchin wrote:
>> > > On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
>> > >> On 2021-11-05 21:05, Nickolay Kolchin wrote:
>> >
>> > >> A standard Forth system may use only a character for
>> > >> the length in a counted string.
>> > >>
>> > >> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
>> > >> https://forth-standard.org/standard/core/COUNT
>> > >>
>> > >>> P.S. Back in "good old days" we distinguish between "counted" (CELL
>> > >>> sized) and "packed" (byte size) strings.
>> > >>
>> > >> In the Forth-83 and Forth-79 standards the length in a counted string
>> > >> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
>> > >> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
>> > >>
>> > >
>> > > Actually F79 used correct naming "packed" and F83 started using
>> > > misleading term "counted".
>> > As I can see, the term "packed" was used in only one glossary entry,
>> > namely for the "WORD" word. It looks like just an omission.
>> >
>> > It's not obvious to me why the "packed string" term is better than
>> > "counted string".
>> > > IMHO, 255 bytes limitation is "blast from past" and should be lifted
>> > > nowadays...
>> > Forth-94 doesn't limit it by 255 bytes, it requires that this limit
>> > shall be *not less* than 255 bytes (i.e., the character size cannot be
>> > less than 8 bits).
>> >
>> > The actual limit depends on the character size in the system.
>> >
>> > The "counted string" data type is already almost outdated, there only
>> > two standard words use them: "WORD" and "FIND".
>> >
>> > The "character string" data type takes two cells on a stack ( c-addr u )
>> > and it limits the string length by the cell size only.
>> >
>> We just need to add `PLACE` and say that actual counted string
>> presentation is system dependent.
>>
>> There is even a proposal for that, which clearly states:
>>
>> "Since then, in 2016 the Forth-200x committee in favour of eliminating ambiguous conditions has decided to require “1 CHARS = 1” thus making systems that have other character sizes than on not compliant to future Forth-200x standards [2][3]. Requesting standard systems to have byte size characters limit counted strings to the known maximal length of 255 characters."
>
> I.e. these two words must give identical results:
>
> : test-s S" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" NIP . ;
>
> : test-c C" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" COUNT NIP . ;
>
> test-s
> test-c
>
> Currently they cause hell among Forth implementations.

For all manner of 'implementation-defined' reasons e.g.

11.3.6 Parsing

Lines of at least 128 characters shall be supported. A program that requires
lines of more than 128 characters has an environmental dependency.

Re: Handling unsupported line-endings

<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:11d6:: with SMTP id n22mr70151586qtk.337.1636204751051; Sat, 06 Nov 2021 06:19:11 -0700 (PDT)
X-Received: by 2002:ad4:4f2e:: with SMTP id fc14mr47072996qvb.66.1636204750844; Sat, 06 Nov 2021 06:19:10 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 06:19:10 -0700 (PDT)
In-Reply-To: <sm5tqv$1dco$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org> <2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me> <2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me> <2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org> <slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org> <slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org> <sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com> <sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com> <sm5mk4$u2d$1@dont-email.me> <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com> <aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com> <sm5tqv$1dco$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sat, 06 Nov 2021 13:19:11 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 113
 by: Nickolay Kolchin - Sat, 6 Nov 2021 13:19 UTC

On Saturday, November 6, 2021 at 3:52:52 PM UTC+3, dxforth wrote:
> On 6/11/2021 22:29, Nickolay Kolchin wrote:
> > On Saturday, November 6, 2021 at 2:10:59 PM UTC+3, Nickolay Kolchin wrote:
> >> On Saturday, November 6, 2021 at 1:49:42 PM UTC+3, Ruvim wrote:
> >> > On 2021-11-06 13:16, Nickolay Kolchin wrote:
> >> > > On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
> >> > >> On 2021-11-05 21:05, Nickolay Kolchin wrote:
> >> >
> >> > >> A standard Forth system may use only a character for
> >> > >> the length in a counted string.
> >> > >>
> >> > >> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
> >> > >> https://forth-standard.org/standard/core/COUNT
> >> > >>
> >> > >>> P.S. Back in "good old days" we distinguish between "counted" (CELL
> >> > >>> sized) and "packed" (byte size) strings.
> >> > >>
> >> > >> In the Forth-83 and Forth-79 standards the length in a counted string
> >> > >> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
> >> > >> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
> >> > >>
> >> > >
> >> > > Actually F79 used correct naming "packed" and F83 started using
> >> > > misleading term "counted".
> >> > As I can see, the term "packed" was used in only one glossary entry,
> >> > namely for the "WORD" word. It looks like just an omission.
> >> >
> >> > It's not obvious to me why the "packed string" term is better than
> >> > "counted string".
> >> > > IMHO, 255 bytes limitation is "blast from past" and should be lifted
> >> > > nowadays...
> >> > Forth-94 doesn't limit it by 255 bytes, it requires that this limit
> >> > shall be *not less* than 255 bytes (i.e., the character size cannot be
> >> > less than 8 bits).
> >> >
> >> > The actual limit depends on the character size in the system.
> >> >
> >> > The "counted string" data type is already almost outdated, there only
> >> > two standard words use them: "WORD" and "FIND".
> >> >
> >> > The "character string" data type takes two cells on a stack ( c-addr u )
> >> > and it limits the string length by the cell size only.
> >> >
> >> We just need to add `PLACE` and say that actual counted string
> >> presentation is system dependent.
> >>
> >> There is even a proposal for that, which clearly states:
> >>
> >> "Since then, in 2016 the Forth-200x committee in favour of eliminating ambiguous conditions has decided to require “1 CHARS = 1” thus making systems that have other character sizes than on not compliant to future Forth-200x standards [2][3]. Requesting standard systems to have byte size characters limit counted strings to the known maximal length of 255 characters."
> >
> > I.e. these two words must give identical results:
> >
> > : test-s S" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" NIP . ;
> >
> > : test-c C" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" COUNT NIP . ;
> >
> > test-s
> > test-c
> >
> > Currently they cause hell among Forth implementations.
> For all manner of 'implementation-defined' reasons e.g.
>
> 11.3.6 Parsing
>
> Lines of at least 128 characters shall be supported. A program that requires
> lines of more than 128 characters has an environmental dependency.

1. You are citing that like holy Bible, which it is not.

2. There is no practical reason for line length limitation when we are reading
source from file on modern computers. This limitation makes perfect sense for
memory constrained environments or interactive input, but not for machine with
gigabytes of memory...

Now about "hell":

- lxf and gforth accept the source but silently truncate length. They should throw
exception if line is too big for `C"`.
- SwiftForth coredump, which probably tells a lot about it general quality.
- VFX also segfaults, but is able to continue running.
- kforth does nothing. No errors, no parsing...
- ikforth coredumps when executing `test-c`, but not `test-s`.
- SPF4 prints some cryptic message (probably cp1251), but probably handles
this case right.

Re: Handling unsupported line-endings

<sm6dob$b1u$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Sun, 7 Nov 2021 04:24:28 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm6dob$b1u$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me>
<4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me>
<a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com>
<sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="11326"; 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.2.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sat, 6 Nov 2021 17:24 UTC

On 7/11/2021 00:19, Nickolay Kolchin wrote:
> On Saturday, November 6, 2021 at 3:52:52 PM UTC+3, dxforth wrote:
>> On 6/11/2021 22:29, Nickolay Kolchin wrote:
>> > On Saturday, November 6, 2021 at 2:10:59 PM UTC+3, Nickolay Kolchin wrote:
>> >> On Saturday, November 6, 2021 at 1:49:42 PM UTC+3, Ruvim wrote:
>> >> > On 2021-11-06 13:16, Nickolay Kolchin wrote:
>> >> > > On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
>> >> > >> On 2021-11-05 21:05, Nickolay Kolchin wrote:
>> >> >
>> >> > >> A standard Forth system may use only a character for
>> >> > >> the length in a counted string.
>> >> > >>
>> >> > >> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
>> >> > >> https://forth-standard.org/standard/core/COUNT
>> >> > >>
>> >> > >>> P.S. Back in "good old days" we distinguish between "counted" (CELL
>> >> > >>> sized) and "packed" (byte size) strings.
>> >> > >>
>> >> > >> In the Forth-83 and Forth-79 standards the length in a counted string
>> >> > >> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
>> >> > >> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
>> >> > >>
>> >> > >
>> >> > > Actually F79 used correct naming "packed" and F83 started using
>> >> > > misleading term "counted".
>> >> > As I can see, the term "packed" was used in only one glossary entry,
>> >> > namely for the "WORD" word. It looks like just an omission.
>> >> >
>> >> > It's not obvious to me why the "packed string" term is better than
>> >> > "counted string".
>> >> > > IMHO, 255 bytes limitation is "blast from past" and should be lifted
>> >> > > nowadays...
>> >> > Forth-94 doesn't limit it by 255 bytes, it requires that this limit
>> >> > shall be *not less* than 255 bytes (i.e., the character size cannot be
>> >> > less than 8 bits).
>> >> >
>> >> > The actual limit depends on the character size in the system.
>> >> >
>> >> > The "counted string" data type is already almost outdated, there only
>> >> > two standard words use them: "WORD" and "FIND".
>> >> >
>> >> > The "character string" data type takes two cells on a stack ( c-addr u )
>> >> > and it limits the string length by the cell size only.
>> >> >
>> >> We just need to add `PLACE` and say that actual counted string
>> >> presentation is system dependent.
>> >>
>> >> There is even a proposal for that, which clearly states:
>> >>
>> >> "Since then, in 2016 the Forth-200x committee in favour of eliminating ambiguous conditions has decided to require “1 CHARS = 1” thus making systems that have other character sizes than on not compliant to future Forth-200x standards [2][3]. Requesting standard systems to have byte size characters limit counted strings to the known maximal length of 255 characters."
>> >
>> > I.e. these two words must give identical results:
>> >
>> > : test-s S" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" NIP . ;
>> >
>> > : test-c C" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" COUNT NIP . ;
>> >
>> > test-s
>> > test-c
>> >
>> > Currently they cause hell among Forth implementations.
>> For all manner of 'implementation-defined' reasons e.g.
>>
>> 11.3.6 Parsing
>>
>> Lines of at least 128 characters shall be supported. A program that requires
>> lines of more than 128 characters has an environmental dependency.
>
> 1. You are citing that like holy Bible, which it is not.
>
> 2. There is no practical reason for line length limitation when we are reading
> source from file on modern computers. This limitation makes perfect sense for
> memory constrained environments or interactive input, but not for machine with
> gigabytes of memory...
>
> Now about "hell":
>
> - lxf and gforth accept the source but silently truncate length. They should throw
> exception if line is too big for `C"`.
> - SwiftForth coredump, which probably tells a lot about it general quality.
> - VFX also segfaults, but is able to continue running.
> - kforth does nothing. No errors, no parsing...
> - ikforth coredumps when executing `test-c`, but not `test-s`.
> - SPF4 prints some cryptic message (probably cp1251), but probably handles
> this case right.
>

ANS/200x represents the limits of what those systems are required to do.
That not all implementers feel the need to fool-proof their systems is
their prerogative. Early Forth Inc systems had little to no compiler
security. It didn't stop programmers doing great work with them.

Re: Handling unsupported line-endings

<9f1acf36-65d4-4f47-8cea-9992c73ac5e9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:ecc7:: with SMTP id o7mr7017323qvq.46.1636221573855;
Sat, 06 Nov 2021 10:59:33 -0700 (PDT)
X-Received: by 2002:a05:6214:d8e:: with SMTP id e14mr6944068qve.37.1636221573656;
Sat, 06 Nov 2021 10:59:33 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 10:59:33 -0700 (PDT)
In-Reply-To: <sm6dob$b1u$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me> <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com> <sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com> <sm6dob$b1u$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9f1acf36-65d4-4f47-8cea-9992c73ac5e9n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sat, 06 Nov 2021 17:59:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Nickolay Kolchin - Sat, 6 Nov 2021 17:59 UTC

On Saturday, November 6, 2021 at 8:24:31 PM UTC+3, dxforth wrote:
> On 7/11/2021 00:19, Nickolay Kolchin wrote:
> > On Saturday, November 6, 2021 at 3:52:52 PM UTC+3, dxforth wrote:
> >> On 6/11/2021 22:29, Nickolay Kolchin wrote:
> >> > On Saturday, November 6, 2021 at 2:10:59 PM UTC+3, Nickolay Kolchin wrote:
> >> >> On Saturday, November 6, 2021 at 1:49:42 PM UTC+3, Ruvim wrote:
> >> >> > On 2021-11-06 13:16, Nickolay Kolchin wrote:
> >> >> > > On Saturday, November 6, 2021 at 12:53:33 PM UTC+3, Ruvim wrote:
> >> >> > >> On 2021-11-05 21:05, Nickolay Kolchin wrote:
> >> >> >
> >> >> > >> A standard Forth system may use only a character for
> >> >> > >> the length in a counted string.
> >> >> > >>
> >> >> > >> See 3.1.3.4 Counted strings, 6.1.0980 COUNT
> >> >> > >> https://forth-standard.org/standard/core/COUNT
> >> >> > >>
> >> >> > >>> P.S. Back in "good old days" we distinguish between "counted" (CELL
> >> >> > >>> sized) and "packed" (byte size) strings.
> >> >> > >>
> >> >> > >> In the Forth-83 and Forth-79 standards the length in a counted string
> >> >> > >> takes exactly one *byte* (8 bits). And the glossary entry for COUNT
> >> >> > >> said: "addr2 is addr1+1", where "COUNT ( addr1 -- addr2 +n )"
> >> >> > >>
> >> >> > >
> >> >> > > Actually F79 used correct naming "packed" and F83 started using
> >> >> > > misleading term "counted".
> >> >> > As I can see, the term "packed" was used in only one glossary entry,
> >> >> > namely for the "WORD" word. It looks like just an omission.
> >> >> >
> >> >> > It's not obvious to me why the "packed string" term is better than
> >> >> > "counted string".
> >> >> > > IMHO, 255 bytes limitation is "blast from past" and should be lifted
> >> >> > > nowadays...
> >> >> > Forth-94 doesn't limit it by 255 bytes, it requires that this limit
> >> >> > shall be *not less* than 255 bytes (i.e., the character size cannot be
> >> >> > less than 8 bits).
> >> >> >
> >> >> > The actual limit depends on the character size in the system.
> >> >> >
> >> >> > The "counted string" data type is already almost outdated, there only
> >> >> > two standard words use them: "WORD" and "FIND".
> >> >> >
> >> >> > The "character string" data type takes two cells on a stack ( c-addr u )
> >> >> > and it limits the string length by the cell size only.
> >> >> >
> >> >> We just need to add `PLACE` and say that actual counted string
> >> >> presentation is system dependent.
> >> >>
> >> >> There is even a proposal for that, which clearly states:
> >> >>
> >> >> "Since then, in 2016 the Forth-200x committee in favour of eliminating ambiguous conditions has decided to require “1 CHARS = 1” thus making systems that have other character sizes than on not compliant to future Forth-200x standards [2][3]. Requesting standard systems to have byte size characters limit counted strings to the known maximal length of 255 characters."
> >> >
> >> > I.e. these two words must give identical results:
> >> >
> >> > : test-s S" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" NIP . ;
> >> >
> >> > : test-c C" 0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" COUNT NIP . ;
> >> >
> >> > test-s
> >> > test-c
> >> >
> >> > Currently they cause hell among Forth implementations.
> >> For all manner of 'implementation-defined' reasons e.g.
> >>
> >> 11.3.6 Parsing
> >>
> >> Lines of at least 128 characters shall be supported. A program that requires
> >> lines of more than 128 characters has an environmental dependency.
> >
> > 1. You are citing that like holy Bible, which it is not.
> >
> > 2. There is no practical reason for line length limitation when we are reading
> > source from file on modern computers. This limitation makes perfect sense for
> > memory constrained environments or interactive input, but not for machine with
> > gigabytes of memory...
> >
> > Now about "hell":
> >
> > - lxf and gforth accept the source but silently truncate length. They should throw
> > exception if line is too big for `C"`.
> > - SwiftForth coredump, which probably tells a lot about it general quality.
> > - VFX also segfaults, but is able to continue running.
> > - kforth does nothing. No errors, no parsing...
> > - ikforth coredumps when executing `test-c`, but not `test-s`.
> > - SPF4 prints some cryptic message (probably cp1251), but probably handles
> > this case right.
> >
> ANS/200x represents the limits of what those systems are required to do.
> That not all implementers feel the need to fool-proof their systems is
> their prerogative. Early Forth Inc systems had little to no compiler
> security. It didn't stop programmers doing great work with them.

Nobody questions this. But we are living in a bit different world now.

Re: Handling unsupported line-endings

<f3c6b58d-60fd-42a4-bdb0-9cca9548ce98n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:54f:: with SMTP id m15mr64138859qtx.365.1636229645045;
Sat, 06 Nov 2021 13:14:05 -0700 (PDT)
X-Received: by 2002:ac8:5acf:: with SMTP id d15mr13724651qtd.328.1636229644904;
Sat, 06 Nov 2021 13:14:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 13:14:04 -0700 (PDT)
In-Reply-To: <f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:793e:3ef6:b36:a8f1;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:793e:3ef6:b36:a8f1
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me> <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com> <sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f3c6b58d-60fd-42a4-bdb0-9cca9548ce98n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Sat, 06 Nov 2021 20:14:05 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Marcel Hendrix - Sat, 6 Nov 2021 20:14 UTC

On Saturday, November 6, 2021 at 2:19:12 PM UTC+1, Nickolay Kolchin wrote:
[..]
> - ikforth coredumps when executing `test-c`, but not `test-s`.

A new kid on the block!

-marcel

Re: Handling unsupported line-endings

<sm7j08$1kp2$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Sun, 7 Nov 2021 15:00:09 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm7j08$1kp2$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me>
<4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me>
<a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com>
<sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>
<sm6dob$b1u$1@gioia.aioe.org>
<9f1acf36-65d4-4f47-8cea-9992c73ac5e9n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="54050"; 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.2.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Sun, 7 Nov 2021 04:00 UTC

On 7/11/2021 04:59, Nickolay Kolchin wrote:
> On Saturday, November 6, 2021 at 8:24:31 PM UTC+3, dxforth wrote:
>> ...
>> ANS/200x represents the limits of what those systems are required to do.
>> That not all implementers feel the need to fool-proof their systems is
>> their prerogative. Early Forth Inc systems had little to no compiler
>> security. It didn't stop programmers doing great work with them.
>
> Nobody questions this. But we are living in a bit different world now.

Humans still only have two eyes and limited visual comprehension.
The less information presented them at once, the better. A computer
needs to read text only to the extent humans need to read it. When
a 255 char quoted string is already beyond human comprehension,
suggesting a computer could handle more becomes rather academic.

Re: Handling unsupported line-endings

<28b44069-fc51-4553-9293-1054c4b84dd2n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:ecc7:: with SMTP id o7mr9707360qvq.46.1636260487715;
Sat, 06 Nov 2021 21:48:07 -0700 (PDT)
X-Received: by 2002:a05:622a:34d:: with SMTP id r13mr18517580qtw.187.1636260487464;
Sat, 06 Nov 2021 21:48:07 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 6 Nov 2021 21:48:07 -0700 (PDT)
In-Reply-To: <sm7j08$1kp2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=213.21.29.203; posting-account=DoM31goAAADuzlbg5XKrMFannjkYS2Lr
NNTP-Posting-Host: 213.21.29.203
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me> <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com> <sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com> <sm6dob$b1u$1@gioia.aioe.org>
<9f1acf36-65d4-4f47-8cea-9992c73ac5e9n@googlegroups.com> <sm7j08$1kp2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <28b44069-fc51-4553-9293-1054c4b84dd2n@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: nbkolc...@gmail.com (Nickolay Kolchin)
Injection-Date: Sun, 07 Nov 2021 04:48:07 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 17
 by: Nickolay Kolchin - Sun, 7 Nov 2021 04:48 UTC

On Sunday, November 7, 2021 at 7:00:11 AM UTC+3, dxforth wrote:
> On 7/11/2021 04:59, Nickolay Kolchin wrote:
> > On Saturday, November 6, 2021 at 8:24:31 PM UTC+3, dxforth wrote:
> >> ...
> >> ANS/200x represents the limits of what those systems are required to do.
> >> That not all implementers feel the need to fool-proof their systems is
> >> their prerogative. Early Forth Inc systems had little to no compiler
> >> security. It didn't stop programmers doing great work with them.
> >
> > Nobody questions this. But we are living in a bit different world now.
> Humans still only have two eyes and limited visual comprehension.
> The less information presented them at once, the better. A computer
> needs to read text only to the extent humans need to read it. When
> a 255 char quoted string is already beyond human comprehension,
> suggesting a computer could handle more becomes rather academic.

Nah! You are just defending bad programming. Application should not
segfault on such input.

Re: Handling unsupported line-endings

<sm818o$1gg6$1@gioia.aioe.org>

  copy mid

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

  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: Handling unsupported line-endings
Date: Sun, 7 Nov 2021 19:03:36 +1100
Organization: Aioe.org NNTP Server
Message-ID: <sm818o$1gg6$1@gioia.aioe.org>
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org>
<dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me>
<4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me>
<a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com>
<sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com>
<sm6dob$b1u$1@gioia.aioe.org>
<9f1acf36-65d4-4f47-8cea-9992c73ac5e9n@googlegroups.com>
<sm7j08$1kp2$1@gioia.aioe.org>
<28b44069-fc51-4553-9293-1054c4b84dd2n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="49670"; 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.2.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sun, 7 Nov 2021 08:03 UTC

On 7/11/2021 15:48, Nickolay Kolchin wrote:
> On Sunday, November 7, 2021 at 7:00:11 AM UTC+3, dxforth wrote:
>> On 7/11/2021 04:59, Nickolay Kolchin wrote:
>> > On Saturday, November 6, 2021 at 8:24:31 PM UTC+3, dxforth wrote:
>> >> ...
>> >> ANS/200x represents the limits of what those systems are required to do.
>> >> That not all implementers feel the need to fool-proof their systems is
>> >> their prerogative. Early Forth Inc systems had little to no compiler
>> >> security. It didn't stop programmers doing great work with them.
>> >
>> > Nobody questions this. But we are living in a bit different world now.
>> Humans still only have two eyes and limited visual comprehension.
>> The less information presented them at once, the better. A computer
>> needs to read text only to the extent humans need to read it. When
>> a 255 char quoted string is already beyond human comprehension,
>> suggesting a computer could handle more becomes rather academic.
>
> Nah! You are just defending bad programming. Application should not
> segfault on such input.

When all else fails read the manual :)

Re: Handling unsupported line-endings

<c3f009ab-85ef-4eab-bf8d-fe8f33f05b7cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5e0a:: with SMTP id h10mr74842090qtx.195.1636290532427;
Sun, 07 Nov 2021 05:08:52 -0800 (PST)
X-Received: by 2002:ac8:7059:: with SMTP id y25mr75251239qtm.404.1636290532124;
Sun, 07 Nov 2021 05:08:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 7 Nov 2021 05:08:51 -0800 (PST)
In-Reply-To: <sm7j08$1kp2$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:793e:3ef6:b36:a8f1;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:793e:3ef6:b36:a8f1
References: <skjhir$jd9$1@gioia.aioe.org> <sljml0$3qg$1@gioia.aioe.org>
<2021Oct30.192843@mips.complang.tuwien.ac.at> <slkg0f$sph$1@dont-email.me>
<2021Oct31.131437@mips.complang.tuwien.ac.at> <slogli$rmb$1@dont-email.me>
<2021Nov1.151607@mips.complang.tuwien.ac.at> <slq260$1l9v$1@gioia.aioe.org>
<slr3k0$ct2$1@dont-email.me> <slt808$2u9$1@gioia.aioe.org>
<slteso$ibs$1@dont-email.me> <slts1o$u8v$1@gioia.aioe.org>
<sm36k3$sb2$1@gioia.aioe.org> <dc79b2c0-767c-4508-99d2-34ab786e7c86n@googlegroups.com>
<sm5jar$a3c$1@dont-email.me> <4980ce08-fd38-4f33-9736-ae7f7c13bdc8n@googlegroups.com>
<sm5mk4$u2d$1@dont-email.me> <a7c87e0b-a623-4e9d-b2b0-ea16371201e5n@googlegroups.com>
<aafdf106-b622-4ffd-8a56-86c3175e1861n@googlegroups.com> <sm5tqv$1dco$1@gioia.aioe.org>
<f2bee905-7496-45b8-bfef-8a15edf90f5fn@googlegroups.com> <sm6dob$b1u$1@gioia.aioe.org>
<9f1acf36-65d4-4f47-8cea-9992c73ac5e9n@googlegroups.com> <sm7j08$1kp2$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c3f009ab-85ef-4eab-bf8d-fe8f33f05b7cn@googlegroups.com>
Subject: Re: Handling unsupported line-endings
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Sun, 07 Nov 2021 13:08:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: Marcel Hendrix - Sun, 7 Nov 2021 13:08 UTC

On Sunday, November 7, 2021 at 5:00:11 AM UTC+1, dxforth wrote:
[..]
> Humans still only have two eyes and limited visual comprehension.
> The less information presented them at once, the better. A computer
> needs to read text only to the extent humans need to read it. When
> a 255 char quoted string is already beyond human comprehension,
> suggesting a computer could handle more becomes rather academic.

More (than 255 chars) is needed when cutting and pasting between
programs.

-marcel

Pages:1234567
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor