Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

The universe does not have laws -- it has habits, and habits can be broken.


devel / comp.lang.forth / CONSTANT's are not CREATEd

SubjectAuthor
* CONSTANT's are not CREATEdnone
`* Re: CONSTANT's are not CREATEdRod Pemberton
 +* Re: CONSTANT's are not CREATEddxforth
 |+* Re: CONSTANT's are not CREATEdHans Bezemer
 ||`* Re: CONSTANT's are not CREATEddxforth
 || `- Re: CONSTANT's are not CREATEdHans Bezemer
 |`- Re: CONSTANT's are not CREATEdHans Bezemer
 `- Re: CONSTANT's are not CREATEdAnton Ertl

1
CONSTANT's are not CREATEd

<nnd$55aa620d$4ca67995@318b967c047e2979>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: CONSTANT's are not CREATEd
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$55aa620d$4ca67995@318b967c047e2979>
Organization: KPN B.V.
Date: Fri, 11 Mar 2022 13:37:45 +0100
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder.usenetexpress.com!tr2.eu1.usenetexpress.com!94.232.112.244.MISMATCH!feed.abavia.com!abe004.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 31
Injection-Date: Fri, 11 Mar 2022 13:37:45 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: none - Fri, 11 Mar 2022 12:37 UTC

There is no guarantee that CONSTANT's are CREATEd.
Hence >BODY doesn't work.

E.g.
"

~$ lina

AMDX86 ciforth beta 2020Jun05
4 CONSTANT 4
4 : ISN'T UNIQUE
OK
BYE
~$ lina

AMDX86 ciforth beta 2020Jun05
4 CONSTANT four
OK
5 four >BODY !
Segmentation fault (core dumped)
"

Hope this helps.

Groetjes Albert
--
"in our communism country Viet Nam, people are forced to be
alive and in the western country like US, people are free to
die from Covid 19 lol" duc ha
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Re: CONSTANT's are not CREATEd

<t2cnrs$1gn6$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!JKehOyGOGgs2f2NKLRXdGg.user.46.165.242.75.POSTED!not-for-mail
From: noem...@basdxcqvbe.com (Rod Pemberton)
Newsgroups: comp.lang.forth
Subject: Re: CONSTANT's are not CREATEd
Date: Sun, 3 Apr 2022 14:08:53 -0500
Organization: Aioe.org NNTP Server
Message-ID: <t2cnrs$1gn6$1@gioia.aioe.org>
References: <nnd$55aa620d$4ca67995@318b967c047e2979>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="49894"; posting-host="JKehOyGOGgs2f2NKLRXdGg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Notice: Filtered by postfilter v. 0.9.2
 by: Rod Pemberton - Sun, 3 Apr 2022 19:08 UTC

On Fri, 11 Mar 2022 13:37:45 +0100
albert@cherry.(none) (albert) wrote:

> There is no guarantee that CONSTANT's are CREATEd.
> Hence >BODY doesn't work.
>

True. But, why wouldn't you ensure >BODY works?
This is for a Forth you coded (ciforth), correct?

--

Re: CONSTANT's are not CREATEd

<t2e20n$1g1n$1@gioia.aioe.org>

  copy mid

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

  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: CONSTANT's are not CREATEd
Date: Mon, 4 Apr 2022 16:08:22 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t2e20n$1g1n$1@gioia.aioe.org>
References: <nnd$55aa620d$4ca67995@318b967c047e2979>
<t2cnrs$1gn6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="49207"; 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.7.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Mon, 4 Apr 2022 06:08 UTC

On 4/04/2022 05:08, Rod Pemberton wrote:
> On Fri, 11 Mar 2022 13:37:45 +0100
> albert@cherry.(none) (albert) wrote:
>
>> There is no guarantee that CONSTANT's are CREATEd.
>> Hence >BODY doesn't work.
>>
>
> True. But, why wouldn't you ensure >BODY works?
> This is for a Forth you coded (ciforth), correct?

Perhaps it worked for ciforth in the past and he's informing it no longer does?
I won't ask why anyone needs such access as I'm too afraid of the answers :)

Re: CONSTANT's are not CREATEd

<2022Apr4.090017@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ant...@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: CONSTANT's are not CREATEd
Date: Mon, 04 Apr 2022 07:00:17 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 19
Message-ID: <2022Apr4.090017@mips.complang.tuwien.ac.at>
References: <nnd$55aa620d$4ca67995@318b967c047e2979> <t2cnrs$1gn6$1@gioia.aioe.org>
Injection-Info: reader02.eternal-september.org; posting-host="66e9f889d36ee8910c5f29d58d8f76a0";
logging-data="1011"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19eJpELX5fDMiNOARUdsq5+"
Cancel-Lock: sha1:5djyNxCinP8L4YnGaOuwbWYqNbI=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Mon, 4 Apr 2022 07:00 UTC

Rod Pemberton <noemail@basdxcqvbe.com> writes:
>On Fri, 11 Mar 2022 13:37:45 +0100
>albert@cherry.(none) (albert) wrote:
>
>> There is no guarantee that CONSTANT's are CREATEd.
>> Hence >BODY doesn't work.
>>
>
>True. But, why wouldn't you ensure >BODY works?

I can only speculate: More programming work? More run-time overhead?
Does not fit his aesthetic sensibilities?

- 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: http://www.forth200x.org/forth200x.html
EuroForth 2021: https://euro.theforth.net/2021

Re: CONSTANT's are not CREATEd

<e9dd1620-fb0d-489c-ad08-96c7a39d4379n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2552:b0:67b:32e2:2400 with SMTP id s18-20020a05620a255200b0067b32e22400mr5223218qko.768.1649246353651;
Wed, 06 Apr 2022 04:59:13 -0700 (PDT)
X-Received: by 2002:ac8:7f0e:0:b0:2e1:e86f:c73 with SMTP id
f14-20020ac87f0e000000b002e1e86f0c73mr7208142qtk.535.1649246353516; Wed, 06
Apr 2022 04:59:13 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.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: Wed, 6 Apr 2022 04:59:11 -0700 (PDT)
In-Reply-To: <t2e20n$1g1n$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <nnd$55aa620d$4ca67995@318b967c047e2979> <t2cnrs$1gn6$1@gioia.aioe.org>
<t2e20n$1g1n$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e9dd1620-fb0d-489c-ad08-96c7a39d4379n@googlegroups.com>
Subject: Re: CONSTANT's are not CREATEd
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Wed, 06 Apr 2022 11:59:13 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: Hans Bezemer - Wed, 6 Apr 2022 11:59 UTC

On Monday, April 4, 2022 at 8:08:30 AM UTC+2, dxforth wrote:
> Perhaps it worked for ciforth in the past and he's informing it no longer does?
> I won't ask why anyone needs such access as I'm too afraid of the answers :)
It doesn't work in 4tH either:

Addr| Opcode Operand Argument

0| literal 5
1| literal 4
2| environ 1
3| + 0
4| ! 0

Executing; Word 4: Bad variable

ALL constants are inlined in 4tH - and may be lina itself as well. It seems like a reasonable optimization.

So, what does the '94 standard have to say about this?
"6.1.0950: CONSTANT - Create a definition for name with the execution semantics defined below". I suppose lina does so.. Seems like a reasonable assumption.
"6.1.0550: >BODY - An ambiguous condition exists if xt is not for a word defined via CREATE". Which MIGHT explain why ">BODY" doesn't work in lina.

So, let's evaluate the facts:
- Nowhere in the standard is stated that CONSTANTS should be CREATEd;
- The standard states that >BODY only works on words that are CREATEd.

Therefore, it is a false assumption that ">BODY" doesn't work OR that lina shows "non-standard" behavior.

Hans Bezemer

Re: CONSTANT's are not CREATEd

<6fe3750a-476a-43ae-ad85-c12df0599327n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:f50b:0:b0:680:d577:baf6 with SMTP id l11-20020a37f50b000000b00680d577baf6mr5398879qkk.328.1649247025450;
Wed, 06 Apr 2022 05:10:25 -0700 (PDT)
X-Received: by 2002:ac8:5dcb:0:b0:2e1:ce48:c186 with SMTP id
e11-20020ac85dcb000000b002e1ce48c186mr7110374qtx.2.1649247025251; Wed, 06 Apr
2022 05:10:25 -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: Wed, 6 Apr 2022 05:10:24 -0700 (PDT)
In-Reply-To: <t2e20n$1g1n$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <nnd$55aa620d$4ca67995@318b967c047e2979> <t2cnrs$1gn6$1@gioia.aioe.org>
<t2e20n$1g1n$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6fe3750a-476a-43ae-ad85-c12df0599327n@googlegroups.com>
Subject: Re: CONSTANT's are not CREATEd
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Wed, 06 Apr 2022 12:10:25 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Hans Bezemer - Wed, 6 Apr 2022 12:10 UTC

On Monday, April 4, 2022 at 8:08:30 AM UTC+2, dxforth wrote:
Even MORE damning (I keep digging):

E.4.1 Definitions
Traditionally, Forth definitions have consisted of the name of the Forth word, a dictionary search link, data describing how to execute the definition, and parameters describing the definition itself. These components are called the name, link, code, and parameter fields. No method for accessing these fields has been found that works across all of the Forth implementations currently in use. Therefore, ANS Forth severely restricts how the fields may be used. Specifically, a portable ANS Forth program may not use the name, link, or code field in any way. Use of the parameter field (renamed to data field for clarity) is limited to the operations described below.

Only words defined with CREATE or with other defining words that call CREATE have data fields.

}}}
The other defining words in the Standard (VARIABLE, CONSTANT, :, etc.) might **NOT** be implemented with CREATE. Consequently, a Standard Program must assume that words defined by VARIABLE, CONSTANT, : , etc., may have no data fields. There is no way for a Standard Program to modify the value of a constant or to change the meaning of a colon definition. The DOES> part of a defining word operates on a data field. Since only CREATEd words have data fields, DOES> can only be paired with CREATE or words that call CREATE.
{{{

Hans Bezemer

Re: CONSTANT's are not CREATEd

<t2m26l$1t2p$1@gioia.aioe.org>

  copy mid

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

  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: CONSTANT's are not CREATEd
Date: Thu, 7 Apr 2022 17:00:37 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t2m26l$1t2p$1@gioia.aioe.org>
References: <nnd$55aa620d$4ca67995@318b967c047e2979>
<t2cnrs$1gn6$1@gioia.aioe.org> <t2e20n$1g1n$1@gioia.aioe.org>
<e9dd1620-fb0d-489c-ad08-96c7a39d4379n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="62553"; 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.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Thu, 7 Apr 2022 07:00 UTC

On 6/04/2022 21:59, Hans Bezemer wrote:
>
> So, let's evaluate the facts:
> - Nowhere in the standard is stated that CONSTANTS should be CREATEd;
> - The standard states that >BODY only works on words that are CREATEd.
>
> Therefore, it is a false assumption that ">BODY" doesn't work OR that lina shows "non-standard" behavior.

Correct. Even when CONSTANTs are CREATEd and >BODY works on them, there's
no guarantee the data field is 1 CELL wide (especially in DX-Forth :)

AFAIK the >BODY restriction also applies to VALUEs. I'm not sure how an
assembler routine is supposed to access a VALUE if >BODY doesn't work
but that would be the implementer's problem - not ANS' :)

Re: CONSTANT's are not CREATEd

<1563e137-1fe9-4f9b-868d-e6ff6d7afc50n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:f68d:0:b0:444:fbd:8c0a with SMTP id p13-20020a0cf68d000000b004440fbd8c0amr2235748qvn.125.1649340437657;
Thu, 07 Apr 2022 07:07:17 -0700 (PDT)
X-Received: by 2002:a05:622a:4c:b0:2eb:8c6d:59dc with SMTP id
y12-20020a05622a004c00b002eb8c6d59dcmr11469505qtw.210.1649340437471; Thu, 07
Apr 2022 07:07:17 -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: Thu, 7 Apr 2022 07:07:17 -0700 (PDT)
In-Reply-To: <t2m26l$1t2p$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <nnd$55aa620d$4ca67995@318b967c047e2979> <t2cnrs$1gn6$1@gioia.aioe.org>
<t2e20n$1g1n$1@gioia.aioe.org> <e9dd1620-fb0d-489c-ad08-96c7a39d4379n@googlegroups.com>
<t2m26l$1t2p$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1563e137-1fe9-4f9b-868d-e6ff6d7afc50n@googlegroups.com>
Subject: Re: CONSTANT's are not CREATEd
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Thu, 07 Apr 2022 14:07:17 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 51
 by: Hans Bezemer - Thu, 7 Apr 2022 14:07 UTC

On Thursday, April 7, 2022 at 9:00:40 AM UTC+2, dxforth wrote:
> AFAIK the >BODY restriction also applies to VALUEs. I'm not sure how an
> assembler routine is supposed to access a VALUE if >BODY doesn't work
> but that would be the implementer's problem - not ANS' :)

Funny - in 4tH that works! Variables are 'floating', their true address dependent
on what the host program injects into the VM. When using VARIABLEs or VALUEs,
4tH "corrects" these address (offsets) before they are presented to ! or @.

However, if you tick those - you get the offset - not the address of the VARIABLE or
VALUE. That is what >BODY in 4tH does. So this works:

Scr # 0
0 10 value x
1 15 ' x >body !
2 x .
..

Compiled to:

4tH message: No errors at word 9
Object size: 9 words
String size: 0 chars
Variables : 1 cells
Strings : 0 chars
Symbols : 0 names
Reliable : Yes

Addr| Opcode Operand

0| literal 10
1| to 0
2| literal 15
3| literal 0
4| environ 1
5| + 0
6| ! 0
7| value 0
8| . 0

Execution:
15

It doesn't work on CONSTANT, CREATE or STRING - since those are NOT
located in the Integer Segment. It does work - of course - on ARRAY.

Yeah, I know - not quite ANS. But those here long enough know that - due to its
architecture, 4tH could never be an ANS compliant compiler:

"Yeah, I faked all my compilations - sue me!"

Hans Bezemer

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor