Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"It's when they say 2 + 2 = 5 that I begin to argue." -- Eric Pepke


devel / comp.lang.forth / MinForth behavior

SubjectAuthor
* MinForth behaviorAntoni Gual Via
+- Re: MinForth behaviorminforth
+* Re: MinForth behaviordxf
|+- Re: MinForth behaviorAntoni Gual Via
|`- Re: MinForth behaviornone
`* Re: MinForth behaviorAnton Ertl
 +- Re: MinForth behaviorminforth
 +* Re: MinForth behaviorminforth
 |+- Re: MinForth behaviorAnton Ertl
 |`* Re: MinForth behaviorAnton Ertl
 | `* Re: MinForth behaviorminforth
 |  `* Re: MinForth behaviorAnton Ertl
 |   `* Re: MinForth behaviornone
 |    `* Re: MinForth behaviorminforth
 |     +- Re: MinForth behaviordxf
 |     `- Re: MinForth behaviordxf
 `* Re: MinForth behaviornone
  +- Re: MinForth behaviorAnton Ertl
  `* Re: MinForth behaviordxf
   `* Re: MinForth behaviorAnton Ertl
    +* Re: MinForth behaviormhx
    |`- Re: MinForth behaviorAnton Ertl
    +* Re: MinForth behaviordxf
    |+* Re: MinForth behaviorminforth
    ||`* Re: MinForth behaviordxf
    || `* Re: MinForth behaviornone
    ||  `- Re: MinForth behaviordxf
    |`* Re: MinForth behaviorAnton Ertl
    | `- Re: MinForth behaviordxf
    `- Re: MinForth behaviornone

Pages:12
MinForth behavior

<d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25433&group=comp.lang.forth#25433

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:ef05:0:b0:77d:85a6:3729 with SMTP id j5-20020a37ef05000000b0077d85a63729mr225922qkk.8.1701075074675;
Mon, 27 Nov 2023 00:51:14 -0800 (PST)
X-Received: by 2002:a37:e110:0:b0:77d:9674:4f2 with SMTP id
c16-20020a37e110000000b0077d967404f2mr159540qkm.2.1701075074443; Mon, 27 Nov
2023 00:51:14 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 27 Nov 2023 00:51:14 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=213.96.45.226; posting-account=bd1LGwoAAAArJUc1f4XW695QNxDQwWXL
NNTP-Posting-Host: 213.96.45.226
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
Subject: MinForth behavior
From: antonigualvia@gmail.com (Antoni Gual Via)
Injection-Date: Mon, 27 Nov 2023 08:51:14 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1243
 by: Antoni Gual Via - Mon, 27 Nov 2023 08:51 UTC

code:
: uno ." hello" ;
bl word uno find \ returns -1 flagm so word found
drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
code end:
All good old ANS94 words. Can't find an explanation in the MinForth manual. Can you explain it?

Re: MinForth behavior

<ba3afd99e3fee2fa98ba454289a9280e@news.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25435&group=comp.lang.forth#25435

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 09:09:06 +0000
Organization: novaBBS
Message-ID: <ba3afd99e3fee2fa98ba454289a9280e@news.novabbs.com>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2259624"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$XstxQQfbp6oLdL1tL210nevu1MskL3.sTasVUr8cOpgKhq37znBaO
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
X-Rslight-Posting-User: 0d6d33dbe0e2e1ff58b82acfc1a8a32ac3b1cb72
 by: minforth - Mon, 27 Nov 2023 09:09 UTC

Thanks for the error report, but sorry
I cannot reproduce your bug:

┌────────────────────────┐
│ MinForth V3.6 - 32 bit │
└────────────────────────┘
Stacks: d:1024 r:512 f:128
Unused: 199M
# : uno ." hello" ; ok
# uno hello ok
# bl word uno find ok
9380180 -1 # drop ok
9380180 # execute hello ok
#

Re: MinForth behavior

<uk1ns3$3n542$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25436&group=comp.lang.forth#25436

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 20:35:00 +1100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uk1ns3$3n542$1@dont-email.me>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 09:34:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4789cab4d183fe90712c47244ee3be65";
logging-data="3904642"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sARKgfVxqfFtQppn2L2Wm"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:eBz2HzxG5jKe5uDad4GJOpCNORI=
In-Reply-To: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
Content-Language: en-GB
 by: dxf - Mon, 27 Nov 2023 09:35 UTC

On 27/11/2023 7:51 pm, Antoni Gual Via wrote:
> code:
> : uno ." hello" ;
> bl word uno find \ returns -1 flagm so word found
> drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
> code end:
> All good old ANS94 words. Can't find an explanation in the MinForth manual. Can you explain it?

Try instead:

: f bl word find ;

f uno drop execute

Re: MinForth behavior

<148eccdc-a70e-40d7-8f50-f522619dce1fn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25437&group=comp.lang.forth#25437

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:8c0e:b0:770:f2f4:4103 with SMTP id qz14-20020a05620a8c0e00b00770f2f44103mr302565qkn.14.1701080369295;
Mon, 27 Nov 2023 02:19:29 -0800 (PST)
X-Received: by 2002:ac8:4e2b:0:b0:421:c2c5:4f12 with SMTP id
d11-20020ac84e2b000000b00421c2c54f12mr261988qtw.6.1701080369053; Mon, 27 Nov
2023 02:19:29 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 27 Nov 2023 02:19:28 -0800 (PST)
In-Reply-To: <uk1ns3$3n542$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=213.96.45.226; posting-account=bd1LGwoAAAArJUc1f4XW695QNxDQwWXL
NNTP-Posting-Host: 213.96.45.226
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <uk1ns3$3n542$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <148eccdc-a70e-40d7-8f50-f522619dce1fn@googlegroups.com>
Subject: Re: MinForth behavior
From: antonigualvia@gmail.com (Antoni Gual Via)
Injection-Date: Mon, 27 Nov 2023 10:19:29 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1662
 by: Antoni Gual Via - Mon, 27 Nov 2023 10:19 UTC

El dia dilluns, 27 de novembre de 2023 a les 10:35:03 UTC+1, dxf va escriure:
> On 27/11/2023 7:51 pm, Antoni Gual Via wrote:
> > code:
> > : uno ." hello" ;
> > bl word uno find \ returns -1 flagm so word found
> > drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
> > code end:
> > All good old ANS94 words. Can't find an explanation in the MinForth manual. Can you explain it?
> Try instead:
>
> : f bl word find ;
>
> f uno drop execute

Thanks dxf, this way it works

Re: MinForth behavior

<2023Nov27.132848@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25438&group=comp.lang.forth#25438

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 12:28:48 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 22
Message-ID: <2023Nov27.132848@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
Injection-Info: dont-email.me; posting-host="9f161ffc6bf8f4ad3914c9d4166bd6be";
logging-data="3963510"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19viIZZRh8It6H5W5oBBq6I"
Cancel-Lock: sha1:BoRhag9d592H6CP23+osv5TEJWE=
X-newsreader: xrn 10.11
 by: Anton Ertl - Mon, 27 Nov 2023 12:28 UTC

Antoni Gual Via <antonigualvia@gmail.com> writes:
>: uno ." hello" ;
>bl word uno find \ returns -1 flagm so word found
>drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth

In some Forth systems the text interpreter uses WORD (and the buffer
where it stores the result), so it could be that FIND sees the string
"FIND" in that buffer, not "UNO".

Interestingly, looking at
<https://forth-standard.org/standard/usage#usage:transient>, I don't
find permission that the system's text interpreter may clobber the
buffer used by WORD; if so, that surely is an oversight in the standard.

>code end:
>All good old ANS94 words. Can't find an explanation in the MinForth manual. Can you explain it?

--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<f1a4c38db15c7b2087cd825e983345c5@news.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25439&group=comp.lang.forth#25439

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 13:35:34 +0000
Organization: novaBBS
Message-ID: <f1a4c38db15c7b2087cd825e983345c5@news.novabbs.com>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2279617"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$ab7CgNQw7TP3YEhaj51VxuEnSWMMZLkmar2nI5JwcZTLTMQzOe8we
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
X-Rslight-Posting-User: 0d6d33dbe0e2e1ff58b82acfc1a8a32ac3b1cb72
 by: minforth - Mon, 27 Nov 2023 13:35 UTC

You are right. I hadn't realized that this had changed somewhere along the way.
In an older MinForth version:

┌──────────────────────────┐
│ MinForth V3.4.9 - 32 bit │
└──────────────────────────┘
Stacks: d:128 r:128 f:64
Unused: 4,193,620 bytes
# : uno ." hello" ; ok
# uno hello ok
# bl word uno find ok
4353220 -1 # drop ok
4353220 # execute
? execute
^ ?? stack underflow
Stacks: -4
Backtrace: FIND
#

Obviously this isn't correct behaviour either because standard 6.1.1550
stipulates that if the definition is not found FIND should return
( c-addr 0 ) and not panick from some internal error when c-addr
points to nirvana, or the string has been overwritten like in this case.

Perhaps this could make a new test candidate for the ANS test suite.

Re: MinForth behavior

<nnd$14c7dff4$52a64222@190f24160370e92a>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25440&group=comp.lang.forth#25440

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <uk1ns3$3n542$1@dont-email.me>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$14c7dff4$52a64222@190f24160370e92a>
Organization: KPN B.V.
Date: Mon, 27 Nov 2023 15:47:33 +0100
Path: i2pn2.org!rocksolid2!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 29
Injection-Date: Mon, 27 Nov 2023 15:47:33 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1687
 by: none - Mon, 27 Nov 2023 14:47 UTC

In article <uk1ns3$3n542$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>On 27/11/2023 7:51 pm, Antoni Gual Via wrote:
>> code:
>> : uno ." hello" ;
>> bl word uno find \ returns -1 flagm so word found
>> drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
>> code end:
>> All good old ANS94 words. Can't find an explanation in the MinForth manual. Can you explain it?
>
>Try instead:
>
>: f bl word find ;
>
>f uno drop execute

There is no point in forcing this code to work in this way,
as its only purpose could be to test the Forth implementation.

This triggers the question whether the original code is standard.
I think it is. Then the implementation should be fixed.

Groetjes Albert
>
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: MinForth behavior

<c442aeb821200102fc7e4096801cf9fb@news.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25441&group=comp.lang.forth#25441

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 14:54:05 +0000
Organization: novaBBS
Message-ID: <c442aeb821200102fc7e4096801cf9fb@news.novabbs.com>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2286463"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
X-Rslight-Site: $2y$10$2IjZDGyz1vZO4NzoMA5Gq.gXvCurM2EAKHx2LUfDdZaVNWv1na65q
X-Rslight-Posting-User: 0d6d33dbe0e2e1ff58b82acfc1a8a32ac3b1cb72
 by: minforth - Mon, 27 Nov 2023 14:54 UTC

Anton Ertl wrote:
> In some Forth systems the text interpreter uses WORD (and the buffer
> where it stores the result), so it could be that FIND sees the string
> "FIND" in that buffer, not "UNO".

IIRC some Forth systems copy parsed word names to somewhere after HERE
to prepare new headers, at least F83 did. With the advent of recognizers
this is no longer practical because re-parsing the input stream is rather
common with recognizers.

BTW regarding EuroForth-2023, do we have a public link to view the
scripts or slides?

Re: MinForth behavior

<nnd$75a589b3$6298d993@e93505945740bbe4>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25442&group=comp.lang.forth#25442

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at>
Subject: Re: MinForth behavior
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$75a589b3$6298d993@e93505945740bbe4>
Organization: KPN B.V.
Date: Mon, 27 Nov 2023 16:06:03 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer02.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 45
Injection-Date: Mon, 27 Nov 2023 16:06:03 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2646
 by: none - Mon, 27 Nov 2023 15:06 UTC

In article <2023Nov27.132848@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>Antoni Gual Via <antonigualvia@gmail.com> writes:
>>: uno ." hello" ;
>>bl word uno find \ returns -1 flagm so word found
>>drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
>
>In some Forth systems the text interpreter uses WORD (and the buffer
>where it stores the result), so it could be that FIND sees the string
>"FIND" in that buffer, not "UNO".
>
>Interestingly, looking at
><https://forth-standard.org/standard/usage#usage:transient>, I don't
>find permission that the system's text interpreter may clobber the
>buffer used by WORD; if so, that surely is an oversight in the standard.

You mean, the standard suggests that `BL WORD' could be used in the interpreter,
passing the result to FIND . Obviously that doesn't work in this context,
because now the interpreter uses the phrase `BL WORD' to isolate the word FIND .
So you propose to add:
"the system's text interpreter may clobber the buffer used by WORD;"
Fine by me. It makes so much sense that it is only natural to forget
to state it.

Modern systems have abandoned WORD a long time ago, with its forced
copying. The character passed is at the same time data and
a control variable.

[You can always accommodate legacy stuff as a "loadable extension"]

>
>>code end:
>>All good old ANS94 words. Can't find an explanation in the MinForth manual. Can you explain it?

>
>--
>M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: MinForth behavior

<2023Nov27.163556@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25444&group=comp.lang.forth#25444

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 15:35:56 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 52
Message-ID: <2023Nov27.163556@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <nnd$75a589b3$6298d993@e93505945740bbe4>
Injection-Info: dont-email.me; posting-host="9f161ffc6bf8f4ad3914c9d4166bd6be";
logging-data="4022805"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19siVcGPgDkAEtsntyemTm8"
Cancel-Lock: sha1:mE959Cu33GsAaJS2kcE7MsBnt/w=
X-newsreader: xrn 10.11
 by: Anton Ertl - Mon, 27 Nov 2023 15:35 UTC

albert@cherry.(none) (albert) writes:
>In article <2023Nov27.132848@mips.complang.tuwien.ac.at>,
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>Antoni Gual Via <antonigualvia@gmail.com> writes:
>>>: uno ." hello" ;
>>>bl word uno find \ returns -1 flagm so word found
>>>drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
>>
>>In some Forth systems the text interpreter uses WORD (and the buffer
>>where it stores the result), so it could be that FIND sees the string
>>"FIND" in that buffer, not "UNO".
>>
>>Interestingly, looking at
>><https://forth-standard.org/standard/usage#usage:transient>, I don't
>>find permission that the system's text interpreter may clobber the
>>buffer used by WORD; if so, that surely is an oversight in the standard.
>
>You mean, the standard suggests that `BL WORD' could be used in the interpreter,
>passing the result to FIND .

I don't find any such suggestion, or any restriction (on programs)
that would allow the system to work that way, but it certainly was
common practice in 1994, so if they forgot to put such a restriction
in, it's an oversight. But maybe I just looked in the wrong part of
the standard.

If they really forgot to put such a restriction in, the question is if
it should be fixed. Maybe these days no Forth-2012 system uses WORD
in the text interpreter; in that case there is no need to add such a
restriction.

>So you propose to add:
>"the system's text interpreter may clobber the buffer used by WORD;"

Probably written differently, but in essence that's the restriction I
mentioned above.

>Fine by me. It makes so much sense that it is only natural to forget
>to state it.

I remember several people tripping over this footangle over the years,
and the thread was started by another instance. It may have been an
ok idea when memory was tight (but not really: PARSE-NAME does not
consume extra memory). These days it's just a trap waiting to be
sprung.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<uk2dn0$3q9aj$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25445&group=comp.lang.forth#25445

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 02:47:45 +1100
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <uk2dn0$3q9aj$1@dont-email.me>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
<2023Nov27.132848@mips.complang.tuwien.ac.at>
<nnd$75a589b3$6298d993@e93505945740bbe4>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 15:47:44 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="4789cab4d183fe90712c47244ee3be65";
logging-data="4007251"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18YwJR5O8AezzK40BBsMMPN"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:P4Pw21T+SZjavszKphMzYV/UyXw=
Content-Language: en-GB
In-Reply-To: <nnd$75a589b3$6298d993@e93505945740bbe4>
 by: dxf - Mon, 27 Nov 2023 15:47 UTC

On 28/11/2023 2:06 am, albert wrote:
> In article <2023Nov27.132848@mips.complang.tuwien.ac.at>,
> Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>> Antoni Gual Via <antonigualvia@gmail.com> writes:
>>> : uno ." hello" ;
>>> bl word uno find \ returns -1 flagm so word found
>>> drop execute \ prints "hello" in Gforth and SPforth, but gives a stack overflow in MinForth
>>
>> In some Forth systems the text interpreter uses WORD (and the buffer
>> where it stores the result), so it could be that FIND sees the string
>> "FIND" in that buffer, not "UNO".
>>
>> Interestingly, looking at
>> <https://forth-standard.org/standard/usage#usage:transient>, I don't
>> find permission that the system's text interpreter may clobber the
>> buffer used by WORD; if so, that surely is an oversight in the standard.
>
> You mean, the standard suggests that `BL WORD' could be used in the interpreter,
> passing the result to FIND . Obviously that doesn't work in this context,
> because now the interpreter uses the phrase `BL WORD' to isolate the word FIND .
> So you propose to add:
> "the system's text interpreter may clobber the buffer used by WORD;"
> Fine by me. It makes so much sense that it is only natural to forget
> to state it.
>
> Modern systems have abandoned WORD a long time ago, with its forced
> copying.

SwiftForth i386-Win32 3.11.9-RC1 01-Sep-2022

: uno ." hello" ; ok
bl word uno find drop execute ok
..s
0 <-Top ok

Re: MinForth behavior

<2023Nov27.181604@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25447&group=comp.lang.forth#25447

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 17:16:04 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 33
Message-ID: <2023Nov27.181604@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="9f161ffc6bf8f4ad3914c9d4166bd6be";
logging-data="4057823"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX182tKv99chbGeH20cVCJmXX"
Cancel-Lock: sha1:lJEngDpoOfjPU42dCpHF6uMqGRk=
X-newsreader: xrn 10.11
 by: Anton Ertl - Mon, 27 Nov 2023 17:16 UTC

dxf <dxforth@gmail.com> writes:
>On 28/11/2023 2:06 am, albert wrote:
>> Modern systems have abandoned WORD a long time ago, with its forced
>> copying.
>
>SwiftForth i386-Win32 3.11.9-RC1 01-Sep-2022
>
>: uno ." hello" ; ok
>bl word uno find drop execute ok
>.s
>0 <-Top ok

Let's start with a more obvious test case:

: ctype count type ; cr bl word uno ctype

Here's the output for different systems:

output system
uno Gforth 0.7.3, Copyright (C) 1995-2008 ...
ctype iForth-5.1-mini
uno lxf
ctype SwiftForth x64-Linux 4.0.0-RC52 20-Sep-2022
uno VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64

So iForth and SwiftForth still use WORD in the text interpreter.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<2023Nov27.183023@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25448&group=comp.lang.forth#25448

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 17:30:23 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 14
Message-ID: <2023Nov27.183023@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <c442aeb821200102fc7e4096801cf9fb@news.novabbs.com>
Injection-Info: dont-email.me; posting-host="9f161ffc6bf8f4ad3914c9d4166bd6be";
logging-data="4057823"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZPLcalQiTPIhXd7IAQgow"
Cancel-Lock: sha1:9GwkwC9cjxnppy7z7qxihhdAVW0=
X-newsreader: xrn 10.11
 by: Anton Ertl - Mon, 27 Nov 2023 17:30 UTC

minforth@gmx.net (minforth) writes:
>BTW regarding EuroForth-2023, do we have a public link to view the
>scripts or slides?

There are currently only the preliminary proceedings
<http://www.euroforth.org/ef23/papers/>. I'll announce here when the
finished proceedings are ready.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<2023Nov27.184544@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25449&group=comp.lang.forth#25449

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 17:45:44 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 28
Message-ID: <2023Nov27.184544@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <c442aeb821200102fc7e4096801cf9fb@news.novabbs.com>
Injection-Info: dont-email.me; posting-host="9f161ffc6bf8f4ad3914c9d4166bd6be";
logging-data="4073362"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oIvGN3djBlOpm55A5sWie"
Cancel-Lock: sha1:Klsu7dm82AtDHmjoV9CZOWfVWO4=
X-newsreader: xrn 10.11
 by: Anton Ertl - Mon, 27 Nov 2023 17:45 UTC

minforth@gmx.net (minforth) writes:
>With the advent of recognizers
>this is no longer practical because re-parsing the input stream is rather
>common with recognizers.

The various proposals on recognizers all call the recognizers after
the parsing step of the text interpreter and have a stack effect
( c-addr u -- ... ). Whether that string is produced by PARSE-NAME,
BL WORD COUNT, or in some other way does not make a difference.

The only recognizer in Gforth that parses is the string recognizer,
but that works as follows: If there is a string

"bla bla bla"

the text interpreter parses the '"bla', the string recognizer sees
that this starts with '"', but does not end with '"', and therefore
parses from the input buffer until it finds a '"'. So the string
recognizer combines the passed start of the string with the parsed
rest of the string; it also processes escapes (e.g., '\n'). But there
is no reparsing.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<ff779040b5100536d5e5b12ce3f90313@news.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25459&group=comp.lang.forth#25459

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Mon, 27 Nov 2023 23:24:22 +0000
Organization: novaBBS
Message-ID: <ff779040b5100536d5e5b12ce3f90313@news.novabbs.com>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me> <2023Nov27.181604@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2326682"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$2OanUhg6uYJt0z8L7ZmPSODg4pEt0qs1zPcetjTcguBf2f5gy763a
X-Rslight-Posting-User: 463cbf1a76c808942982a163321348c75477c065
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
 by: mhx - Mon, 27 Nov 2023 23:24 UTC

Anton Ertl wrote:
[..]
> ctype iForth-5.1-mini
[..]
> So iForth and SwiftForth still use WORD in the text interpreter.

Intentionally, because "properly written" legacy code uses WORD
assuming there is no copying, abd there is more old than new
code :--) Not much chance doing this right.

-marcel

Re: MinForth behavior

<uk3dee$3vnr1$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25461&group=comp.lang.forth#25461

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 11:49:18 +1100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <uk3dee$3vnr1$1@dont-email.me>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
<2023Nov27.132848@mips.complang.tuwien.ac.at>
<nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me>
<2023Nov27.181604@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 00:49:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5920abf28cae3ce685a0eca4806b3f32";
logging-data="4185953"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mlEfQn0P3sH1m/+Ypmw4w"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:kMAhE+TzjulMuB2wyRQuvMad2xA=
In-Reply-To: <2023Nov27.181604@mips.complang.tuwien.ac.at>
Content-Language: en-GB
 by: dxf - Tue, 28 Nov 2023 00:49 UTC

On 28/11/2023 4:16 am, Anton Ertl wrote:
> dxf <dxforth@gmail.com> writes:
>> On 28/11/2023 2:06 am, albert wrote:
>>> Modern systems have abandoned WORD a long time ago, with its forced
>>> copying.
>>
>> SwiftForth i386-Win32 3.11.9-RC1 01-Sep-2022
>>
>> : uno ." hello" ; ok
>> bl word uno find drop execute ok
>> .s
>> 0 <-Top ok
>
> Let's start with a more obvious test case:
>
> : ctype count type ; cr bl word uno ctype
>
> Here's the output for different systems:
>
> output system
> uno Gforth 0.7.3, Copyright (C) 1995-2008 ...
> ctype iForth-5.1-mini
> uno lxf
> ctype SwiftForth x64-Linux 4.0.0-RC52 20-Sep-2022
> uno VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64
>
> So iForth and SwiftForth still use WORD in the text interpreter.

And arguably closer to ANS in which WORD and FIND are Core.

Re: MinForth behavior

<21438c46f52c7960cd78625eaccdfb02@news.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25462&group=comp.lang.forth#25462

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 07:24:12 +0000
Organization: novaBBS
Message-ID: <21438c46f52c7960cd78625eaccdfb02@news.novabbs.com>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me> <2023Nov27.181604@mips.complang.tuwien.ac.at> <uk3dee$3vnr1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2358462"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
X-Rslight-Site: $2y$10$6XRHnnlQmPoJ.6qxRQoFHe5pWkExm32qHH0b4ujOXYorYl8ycVQ3W
X-Rslight-Posting-User: 0d6d33dbe0e2e1ff58b82acfc1a8a32ac3b1cb72
 by: minforth - Tue, 28 Nov 2023 07:24 UTC

The one and only core word required for parsing is >IN.

Re: MinForth behavior

<5cf09b56724e5690aabba5025a2dd5a3@news.novabbs.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25463&group=comp.lang.forth#25463

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 07:34:48 +0000
Organization: novaBBS
Message-ID: <5cf09b56724e5690aabba5025a2dd5a3@news.novabbs.com>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <c442aeb821200102fc7e4096801cf9fb@news.novabbs.com> <2023Nov27.184544@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2359127"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$hR2zVqPqu6dbTsQ85erUwut8btw9dWXOro0qCWJ52TjdnmTDG3b0W
X-Rslight-Posting-User: 0d6d33dbe0e2e1ff58b82acfc1a8a32ac3b1cb72
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
 by: minforth - Tue, 28 Nov 2023 07:34 UTC

Anton Ertl wrote:
> So the string
> recognizer combines the passed start of the string with the parsed
> rest of the string; it also processes escapes (e.g., 'n'). But there
> is no reparsing.

I found it easier to reposition >IN for cases where other string delimiters
are required. There are also strings as string delimiters eg embedded HTML.

Re: MinForth behavior

<uk47mh$6lai$1@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25464&group=comp.lang.forth#25464

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 19:17:20 +1100
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <uk47mh$6lai$1@dont-email.me>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com>
<2023Nov27.132848@mips.complang.tuwien.ac.at>
<nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me>
<2023Nov27.181604@mips.complang.tuwien.ac.at> <uk3dee$3vnr1$1@dont-email.me>
<21438c46f52c7960cd78625eaccdfb02@news.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 08:17:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5920abf28cae3ce685a0eca4806b3f32";
logging-data="218450"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/KYy7VtSByZLnc7yalg76N"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:0p4wqrK3K+FVwTR7oeSCqMzG0fs=
In-Reply-To: <21438c46f52c7960cd78625eaccdfb02@news.novabbs.com>
Content-Language: en-GB
 by: dxf - Tue, 28 Nov 2023 08:17 UTC

On 28/11/2023 6:24 pm, minforth wrote:
> The one and only core word required for parsing is >IN.

20 years of 200x and still WORD is in Core. Must be important.

Re: MinForth behavior

<2023Nov28.091218@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25465&group=comp.lang.forth#25465

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!usenet.network!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 08:12:18 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 40
Message-ID: <2023Nov28.091218@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me> <2023Nov27.181604@mips.complang.tuwien.ac.at> <ff779040b5100536d5e5b12ce3f90313@news.novabbs.com>
Injection-Info: dont-email.me; posting-host="97289b610d9704ba7ee09f5ae9daaff4";
logging-data="236349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+sHBDHCu9q8tgCAtJDluQE"
Cancel-Lock: sha1:NJIl3i5LVge7jMICChUEXwK6cGg=
X-newsreader: xrn 10.11
 by: Anton Ertl - Tue, 28 Nov 2023 08:12 UTC

mhx@iae.nl (mhx) writes:
>Anton Ertl wrote:
>[..]
>> ctype iForth-5.1-mini
>[..]
>> So iForth and SwiftForth still use WORD in the text interpreter.
>
>Intentionally, because "properly written" legacy code uses WORD

Code using WORD in a system that does not clobber the WORD buffer has
no problem, on the contrary: A system that clobbers the WORD buffer
limits how WORD can be used. There even might be existing code that
uses WORD that works on systems where the text interpreter does not
clobber the WORD buffer, but not on systems where it does; see the
start of this thread for an example.

I have a hard time coming up with an example where a legacy program
would fail on a system where the text interpreter does not clobber the
WORD buffer: Assume the text interpreter uses BL WORD for parsing a
word. It then COMPILE,s a word (and the WORD buffer is not used by
that), or it EXECUTEs a word. In the latter case the word can read
its name from the WORD buffer, but why would the programmer want to do
that?

And the practical experience supports this theory: I don't remember
anybody reporting that a legacy program does not work on Gforth
because it does not use WORD in the text interpreter. And it's not
just Gforth that does not use WORD in its text interpreter, VFX and
lxf do not use it, either.

>assuming there is no copying

There is no way to implement a WORD that does not copy.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<2023Nov28.095109@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25466&group=comp.lang.forth#25466

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 08:51:09 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 17
Message-ID: <2023Nov28.095109@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me> <2023Nov27.181604@mips.complang.tuwien.ac.at> <uk3dee$3vnr1$1@dont-email.me>
Injection-Info: dont-email.me; posting-host="97289b610d9704ba7ee09f5ae9daaff4";
logging-data="236349"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dxqZjD6b6EFKcUlMX81PH"
Cancel-Lock: sha1:jkfcOxdUxKUR2CuPwKyws6H0Hcs=
X-newsreader: xrn 10.11
 by: Anton Ertl - Tue, 28 Nov 2023 08:51 UTC

dxf <dxforth@gmail.com> writes:
>On 28/11/2023 4:16 am, Anton Ertl wrote:
>> So iForth and SwiftForth still use WORD in the text interpreter.
>
>And arguably closer to ANS in which WORD and FIND are Core.

What argument is that supposed to be? Forth-94 (ANS Forth) does not
allow text interpreters to clobber the WORD buffer. And it does not
prescribe that the text interpreter must use WORD and FIND, or that
the Forth system calls any other Core word.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<2023Nov28.095531@mips.complang.tuwien.ac.at>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25467&group=comp.lang.forth#25467

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
Date: Tue, 28 Nov 2023 08:55:31 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 38
Message-ID: <2023Nov28.095531@mips.complang.tuwien.ac.at>
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.132848@mips.complang.tuwien.ac.at> <c442aeb821200102fc7e4096801cf9fb@news.novabbs.com> <2023Nov27.184544@mips.complang.tuwien.ac.at> <5cf09b56724e5690aabba5025a2dd5a3@news.novabbs.com>
Injection-Info: dont-email.me; posting-host="97289b610d9704ba7ee09f5ae9daaff4";
logging-data="241703"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Q0d9cLPx+uEeYmBRA7xok"
Cancel-Lock: sha1:R/951KR3Y9Gxwf+EkAj5q+HkVAc=
X-newsreader: xrn 10.11
 by: Anton Ertl - Tue, 28 Nov 2023 08:55 UTC

minforth@gmx.net (minforth) writes:
>Anton Ertl wrote:
>> So the string
>> recognizer combines the passed start of the string with the parsed
>> rest of the string; it also processes escapes (e.g., 'n'). But there
>> is no reparsing.
>
>I found it easier to reposition >IN for cases where other string delimiters
>are required.

Actually, looking at REC-STRINGin Gforth, it's as follows:

: rec-string ( addr u -- addr u' r:string | rectype-null ) \ gforth-experimental
\G Convert strings enclosed in double quotes into string literals,
\G escapes are treated as in @code{S\"}.
2dup s\" \"" string-prefix?
IF drop source drop - 1+ >in ! \"-parse
save-mem over to try-free ['] translate-string
ELSE 2drop ['] notfound THEN ;

The line starting with 2DUP checks if addr u starts with '"'. The
next line indeed assumes that addr points into the input buffer and
then sets >IN to point right after. But it's also possible (although
a little bit more complicated) implement this without this assumption.

So yes, a text interpreter using PARSE-NAME makes it easier to
implement REC-STRING, and using PARSE-NAME in the text interpreter is
a better idea anyway (because it avoids problems like those that
started this thread), but if you are a die-hard WORD fan, even to the
extent of using it in the text interpreter, you can still implement
recognizers, including REC-STRING.

- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: https://forth-standard.org/
EuroForth 2023: https://euro.theforth.net/2023

Re: MinForth behavior

<nnd$5e8034e5$76764bb7@4ef99544d33409c1>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25469&group=comp.lang.forth#25469

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <2023Nov27.184544@mips.complang.tuwien.ac.at> <5cf09b56724e5690aabba5025a2dd5a3@news.novabbs.com> <2023Nov28.095531@mips.complang.tuwien.ac.at>
Subject: Re: MinForth behavior
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$5e8034e5$76764bb7@4ef99544d33409c1>
Organization: KPN B.V.
Date: Tue, 28 Nov 2023 12:00:59 +0100
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 56
Injection-Date: Tue, 28 Nov 2023 12:00:59 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 3228
 by: none - Tue, 28 Nov 2023 11:00 UTC

In article <2023Nov28.095531@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>minforth@gmx.net (minforth) writes:
>>Anton Ertl wrote:
>>> So the string
>>> recognizer combines the passed start of the string with the parsed
>>> rest of the string; it also processes escapes (e.g., 'n'). But there
>>> is no reparsing.
>>
>>I found it easier to reposition >IN for cases where other string delimiters
>>are required.
>
>Actually, looking at REC-STRINGin Gforth, it's as follows:
>
>: rec-string ( addr u -- addr u' r:string | rectype-null ) \ gforth-experimental
> \G Convert strings enclosed in double quotes into string literals,
> \G escapes are treated as in @code{S\"}.
> 2dup s\" \"" string-prefix?
> IF drop source drop - 1+ >in ! \"-parse
> save-mem over to try-free ['] translate-string
> ELSE 2drop ['] notfound THEN ;
>
>The line starting with 2DUP checks if addr u starts with '"'. The
>next line indeed assumes that addr points into the input buffer and
>then sets >IN to point right after. But it's also possible (although
>a little bit more complicated) implement this without this assumption.
>
>So yes, a text interpreter using PARSE-NAME makes it easier to
>implement REC-STRING, and using PARSE-NAME in the text interpreter is
>a better idea anyway (because it avoids problems like those that
>started this thread), but if you are a die-hard WORD fan, even to the
>extent of using it in the text interpreter, you can still implement
>recognizers, including REC-STRING.

These insights came to me d.d. dec 21 2000 (!) thinking how figForth
should evolve.

I named it (WORD) at the time. Then later NAME. In the loadable extensions
there is
'NAME ALIAS PARSE-NAME
In ciforth all number, string and other denotations parse, without
affecting ISO compatibility.
Reparsing of the input stream is only
needed in rare cases, e.g. for a word that prints its own name. I
think it is best to be avoided if possible, for it makes for tricky code.

>
>- anton

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: MinForth behavior

<nnd$6504e10e$30df2663@82e131a049349fcc>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25470&group=comp.lang.forth#25470

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <nnd$75a589b3$6298d993@e93505945740bbe4> <uk2dn0$3q9aj$1@dont-email.me> <2023Nov27.181604@mips.complang.tuwien.ac.at>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$6504e10e$30df2663@82e131a049349fcc>
Organization: KPN B.V.
Date: Tue, 28 Nov 2023 12:18:53 +0100
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe005.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 79
Injection-Date: Tue, 28 Nov 2023 12:18:53 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: none - Tue, 28 Nov 2023 11:18 UTC

In article <2023Nov27.181604@mips.complang.tuwien.ac.at>,
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>dxf <dxforth@gmail.com> writes:
>>On 28/11/2023 2:06 am, albert wrote:
>>> Modern systems have abandoned WORD a long time ago, with its forced
>>> copying.
>>
>>SwiftForth i386-Win32 3.11.9-RC1 01-Sep-2022
>>
>>: uno ." hello" ; ok
>>bl word uno find drop execute ok
>>.s
>>0 <-Top ok
>
>Let's start with a more obvious test case:
>
>: ctype count type ; cr bl word uno ctype
>
>Here's the output for different systems:
>
>output system
>uno Gforth 0.7.3, Copyright (C) 1995-2008 ...
>ctype iForth-5.1-mini
>uno lxf
>ctype SwiftForth x64-Linux 4.0.0-RC52 20-Sep-2022
>uno VFX Forth 64 5.11 RC2 [build 0112] 2021-05-02 for Linux x64
>
>So iForth and SwiftForth still use WORD in the text interpreter.

I don't think that it follows.

I have a newbee option in lina that automatically loads unknown
words, it can run the test.

lina -n
COPYRIGHT (c) 2000-2022 Albert van der Horst, THE NETHERLANDS
....
autoload on, case insensitive
stack printing on, index lines printing on
OK
: ctype count type ; cr bl word uno ctype
....
WANT WORD \ Automatically generated command
uno
S[] OK

In the kernel WORD is nowhere to be seen and it can't possibly
be used in INTERPRET.

lina
AMDX86 ciforth beta 2023Nov06
WORD
WORD ? ciforth ERROR # 12 : NOT RECOGNIZED

SEE INTERPRET

: INTERPRET
BEGIN NAME DUP WHILE
OVER >R FOUND DUP 0= 0000,0000,0000,000C ?ERROR DUP >FFA @ DUP
0000,0000,0000,0008 AND IF
OVER >NFA @ @ R@ + PP ! THEN
RDROP 0000,0000,0000,0004 AND STATE @ 0= OR IF
EXECUTE ELSE , THEN
?STACK REPEAT
DROP DROP
;

You can see NAME figure prominently in the interpreter loop.

>
>- anton

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Re: MinForth behavior

<nnd$5cfcc9ca$79c33d51@82e131a049349fcc>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=25471&group=comp.lang.forth#25471

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: MinForth behavior
References: <d7b79ded-62fc-40ba-a639-b985c1824bc0n@googlegroups.com> <uk3dee$3vnr1$1@dont-email.me> <21438c46f52c7960cd78625eaccdfb02@news.novabbs.com> <uk47mh$6lai$1@dont-email.me>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$5cfcc9ca$79c33d51@82e131a049349fcc>
Organization: KPN B.V.
Date: Tue, 28 Nov 2023 12:24:36 +0100
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 19
Injection-Date: Tue, 28 Nov 2023 12:24:36 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: none - Tue, 28 Nov 2023 11:24 UTC

In article <uk47mh$6lai$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>On 28/11/2023 6:24 pm, minforth wrote:
>> The one and only core word required for parsing is >IN.
>
>20 years of 200x and still WORD is in Core. Must be important.

In Ireland there is a law that requires you to warn the public,
if you you throw poo off the second floor.
Must be important.

Groetjes Albert
>
>
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor