Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Computers are useless. They can only give you answers. -- Pablo Picasso


devel / comp.lang.forth / Re: Naming for parsing words

SubjectAuthor
* Naming for parsing wordsRuvim
+* Re: Naming for parsing wordsS Jack
|`* Re: Naming for parsing wordsRuvim
| +* Re: Naming for parsing wordsAnton Ertl
| |+* Re: Naming for parsing wordsHans Bezemer
| ||`* Simplicity and the text interpreter (was: Naming for parsing words)Anton Ertl
| || `* Re: Simplicity and the text interpreter (was: Naming for parsing words)Hans Bezemer
| ||  `* Re: Simplicity and the text interpreter (was: Naming for parsing words)Anton Ertl
| ||   `* Re: Simplicity and the text interpreter (was: Naming for parsing words)Hans Bezemer
| ||    `* Re: Simplicity and the text interpreter (was: Naming for parsing words)Anton Ertl
| ||     +- Re: Simplicity and the text interpreter (was: Naming for parsing words)Hans Bezemer
| ||     `* Re: Simplicity and the text interpreterPaul Rubin
| ||      `- Re: Simplicity and the text interpreterHans Bezemer
| |+* Format to quoting a word (was: Naming for parsing words)Ruvim
| ||+* Re: Format to quoting a word (was: Naming for parsing words)Anton Ertl
| |||+* Re: Format to quoting a word (was: Naming for parsing words)Marcel Hendrix
| ||||+- Re: Format to quoting a word (was: Naming for parsing words)Anton Ertl
| ||||`* Re: Format to quoting a word (was: Naming for parsing words)none
| |||| `- Re: Format to quoting a word (was: Naming for parsing words)Anton Ertl
| |||`* Recognizers precedence (was: Format to quoting a word)Ruvim
| ||| +* Re: Recognizers precedence (was: Format to quoting a word)none
| ||| |`- Re: Recognizers precedence (was: Format to quoting a word)dxforth
| ||| `- Re: Recognizers precedence (was: Format to quoting a word)Ruvim
| ||`- Re: Format to quoting a word (was: Naming for parsing words)none
| |+- Re: Naming for parsing wordsRuvim
| |`* Re: Naming for parsing wordsRuvim
| | `* Re: Naming for parsing wordsnone
| |  `* Re: Naming for parsing wordsdxforth
| |   +* Re: Naming for parsing wordsHans Bezemer
| |   |`* Re: Naming for parsing wordsRuvim
| |   | `* Re: Naming for parsing wordsHans Bezemer
| |   |  `* Re: Naming for parsing wordsRuvim
| |   |   +* Re: Naming for parsing wordsdxforth
| |   |   |`* Re: Naming for parsing wordsRuvim
| |   |   | +- Re: Naming for parsing wordsdxforth
| |   |   | `* Re: Naming for parsing wordsS Jack
| |   |   |  `* Re: Naming for parsing wordsminf...@arcor.de
| |   |   |   `* Re: Naming for parsing wordsS Jack
| |   |   |    `* Re: Naming for parsing wordsS Jack
| |   |   |     `- Re: Naming for parsing wordsS Jack
| |   |   +- Re: Naming for parsing wordsnone
| |   |   `- Re: Naming for parsing wordsHans Bezemer
| |   `* Re: Naming for parsing wordsRuvim
| |    `* Re: Naming for parsing wordsRuvim
| |     `- Re: Naming for parsing wordsnone
| +* Re: Naming for parsing wordsS Jack
| |`* Re: Naming for parsing wordsRuvim
| | +- Re: Naming for parsing wordsS Jack
| | `- Re: Naming for parsing wordsnone
| +* Re: Naming for parsing wordsdxforth
| |`* Re: Naming for parsing wordsRuvim
| | `* Re: Naming for parsing wordsP Falth
| |  `* Re: Naming for parsing wordsRuvim
| |   +* Re: Naming for parsing wordsHans Bezemer
| |   |`* Re: Naming for parsing wordsStephen Pelc
| |   | `- Re: Naming for parsing wordsMarcel Hendrix
| |   `* Re: Naming for parsing wordsP Falth
| |    `* Re: Naming for parsing wordsRuvim
| |     `* Re: Naming for parsing wordsP Falth
| |      +* Re: Naming for parsing wordsRuvim
| |      |+* Re: Naming for parsing wordsAnton Ertl
| |      ||+- Re: Naming for parsing wordsminf...@arcor.de
| |      ||`- Re: Naming for parsing wordsRuvim
| |      |`* Re: Naming for parsing wordsStephen Pelc
| |      | `* Re: Naming for parsing wordsS Jack
| |      |  +* Re: Naming for parsing wordsS Jack
| |      |  |`* Re: Naming for parsing wordsStephen Pelc
| |      |  | `- Re: Naming for parsing wordsAnton Ertl
| |      |  +* Re: Naming for parsing wordsRuvim
| |      |  |+* Re: Naming for parsing wordsHans Bezemer
| |      |  ||+* Re: Naming for parsing wordsdxforth
| |      |  |||`* Re: Naming for parsing wordsHans Bezemer
| |      |  ||| `- Re: Naming for parsing wordsdxforth
| |      |  ||`- Re: Naming for parsing wordsnone
| |      |  |`- Re: Naming for parsing wordsS Jack
| |      |  `- Re: Naming for parsing wordsStephen Pelc
| |      `- Re: Naming for parsing wordsS Jack
| +* Re: Naming for parsing wordsnone
| |`- Re: Naming for parsing wordsRuvim
| `* Re: Naming for parsing wordsHans Bezemer
|  `* Re: Naming for parsing wordsnone
|   +- Re: Naming for parsing wordsAnton Ertl
|   `* Re: Naming for parsing wordsHans Bezemer
|    `* IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|     `* Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|      `* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|       `* Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|        `* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|         `* Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|          `* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|           `* Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|            `* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|             +* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|             |`* Re: IS vs. DEFER! (was: Naming for parsing words)Marcel Hendrix
|             | `* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|             |  `- memory dependencies (was: IS vs. DEFER! (was: Naming for parsing words))Anton Ertl
|             +* Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|             |+* Re: IS vs. DEFER! (was: Naming for parsing words)Anton Ertl
|             ||`- Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|             |`* Re: IS vs. DEFER! (was: Naming for parsing words)Hans Bezemer
|             | `* Re: IS vs. DEFER! (was: Naming for parsing words)dxforth
|             `* Re: IS vs. DEFER! (was: Naming for parsing words)P Falth
+* Re: Naming for parsing wordsnone
+* Re: Naming for parsing wordsdxforth
+- Re: Naming for parsing wordsS Jack
`- Re: Naming for parsing wordsRuvim

Pages:12345
Re: Naming for parsing words

<8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2683:b0:69c:8c9c:5f80 with SMTP id c3-20020a05620a268300b0069c8c9c5f80mr39154555qkp.367.1653945866656;
Mon, 30 May 2022 14:24:26 -0700 (PDT)
X-Received: by 2002:a05:622a:590:b0:2f9:4396:aed3 with SMTP id
c16-20020a05622a059000b002f94396aed3mr27376976qtb.353.1653945866467; Mon, 30
May 2022 14:24:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 30 May 2022 14:24:26 -0700 (PDT)
In-Reply-To: <t734n8$cev$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <t60i6r$7m0$1@dont-email.me> <t70h7u$5jc$1@dont-email.me>
<db5fe8a6-6806-472b-9518-08cc28beabe6n@googlegroups.com> <t70nh4$6ia$1@dont-email.me>
<t72qgm$qdl$1@dont-email.me> <10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com>
<t734n8$cev$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>
Subject: Re: Naming for parsing words
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Mon, 30 May 2022 21:24:26 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2278
 by: Hans Bezemer - Mon, 30 May 2022 21:24 UTC

On Monday, May 30, 2022 at 9:08:27 PM UTC+2, Ruvim wrote:

> NB: "Green words like if are compiled, but because they are in the macro
> wordlist and act like immediate words, they are executed at compile time
> like words written explicitly in yellow." [1]
Yeah - and at least two accessibility modes for the colorblind. I think that
making "color" part of the syntax is one of the least well-considered ideas that
Moore has ever had.

The more since syntax coloring has been around for a long time and
particularly successful, I must say. I've created several such schemes myself.

However - I doubt very much that such exotic format would EVER be supported
by any major editor. Not to mention how to encode it in a plain-text format.

You know, something you can copy, paste, compile and it simply works.
Like the stuff I took from a ZX Spectrum to DOS, Windows and finally Linux.

Great invention - I recommend you try it once.

Hans Bezemer

Re: Naming for parsing words

<c9d4aebe-0491-4f52-8bf3-e90649238a3cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:2cf:b0:2f9:399e:cee0 with SMTP id a15-20020a05622a02cf00b002f9399ecee0mr31892265qtx.412.1653963370415;
Mon, 30 May 2022 19:16:10 -0700 (PDT)
X-Received: by 2002:a05:6214:411c:b0:45a:d240:afb9 with SMTP id
kc28-20020a056214411c00b0045ad240afb9mr48012521qvb.122.1653963370236; Mon, 30
May 2022 19:16:10 -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: Mon, 30 May 2022 19:16:10 -0700 (PDT)
In-Reply-To: <t734n8$cev$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:3400:4473:a593:8d3f;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:3400:4473:a593:8d3f
References: <t60i6r$7m0$1@dont-email.me> <t70h7u$5jc$1@dont-email.me>
<db5fe8a6-6806-472b-9518-08cc28beabe6n@googlegroups.com> <t70nh4$6ia$1@dont-email.me>
<t72qgm$qdl$1@dont-email.me> <10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com>
<t734n8$cev$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c9d4aebe-0491-4f52-8bf3-e90649238a3cn@googlegroups.com>
Subject: Re: Naming for parsing words
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 31 May 2022 02:16:10 +0000
Content-Type: text/plain; charset="UTF-8"
 by: S Jack - Tue, 31 May 2022 02:16 UTC

On Monday, May 30, 2022 at 2:08:27 PM UTC-5, Ruvim wrote:
>
> A definition
>
> : foo ( flag -- ) if 123 . then ;
>
> is written as
>
> red:foo
>
> white:(
> white:flag
> white:--
> white:)
>
> green:if
> green:123
> green:.
> green:then
>
> green:;
>

Ah, that was another suggestion I was going to make; just tag all the words.
But I was thinking a character symbol for the tag:
a:foo
b:(
b:flag
b:--
b:)
c:if
c:123
c:.
c:then
c:;

Lesson learned way back: 40 and 37 were not white on black but normal text
which default color was white on black. Therefore, text attributes did not
have to be changed when the color scheme changed.
--
me

Re: Naming for parsing words

<t743qj$vth$1@gioia.aioe.org>

  copy mid

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

  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: Naming for parsing words
Date: Tue, 31 May 2022 13:59:16 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t743qj$vth$1@gioia.aioe.org>
References: <t60i6r$7m0$1@dont-email.me> <t70h7u$5jc$1@dont-email.me>
<db5fe8a6-6806-472b-9518-08cc28beabe6n@googlegroups.com>
<t70nh4$6ia$1@dont-email.me> <t72qgm$qdl$1@dont-email.me>
<10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com>
<t734n8$cev$1@dont-email.me>
<8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="32689"; 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.9.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 31 May 2022 03:59 UTC

On 31/05/2022 07:24, Hans Bezemer wrote:
> On Monday, May 30, 2022 at 9:08:27 PM UTC+2, Ruvim wrote:
>
>> NB: "Green words like if are compiled, but because they are in the macro
>> wordlist and act like immediate words, they are executed at compile time
>> like words written explicitly in yellow." [1]
> Yeah - and at least two accessibility modes for the colorblind. I think that
> making "color" part of the syntax is one of the least well-considered ideas that
> Moore has ever had.

From my early school days:

https://www.teaching.com.au/product/EY302

those nuns knew how to punish

Re: Naming for parsing words

<nnd$77d464f9$3d1cd013@7c6c4f1aca80db3c>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <t60i6r$7m0$1@dont-email.me> <10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com> <t734n8$cev$1@dont-email.me> <8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>
Subject: Re: Naming for parsing words
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$77d464f9$3d1cd013@7c6c4f1aca80db3c>
Organization: KPN B.V.
Date: Tue, 31 May 2022 08:24:48 +0200
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr1.eu1.usenetexpress.com!94.232.112.245.MISMATCH!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 38
Injection-Date: Tue, 31 May 2022 08:24:48 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: none - Tue, 31 May 2022 06:24 UTC

In article <8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>,
Hans Bezemer <the.beez.speaks@gmail.com> wrote:
>On Monday, May 30, 2022 at 9:08:27 PM UTC+2, Ruvim wrote:
>
>> NB: "Green words like if are compiled, but because they are in the macro
>> wordlist and act like immediate words, they are executed at compile time
>> like words written explicitly in yellow." [1]
>Yeah - and at least two accessibility modes for the colorblind. I think that
>making "color" part of the syntax is one of the least well-considered ideas that
>Moore has ever had.
>
>The more since syntax coloring has been around for a long time and
>particularly successful, I must say. I've created several such schemes myself.
>
>However - I doubt very much that such exotic format would EVER be supported
>by any major editor. Not to mention how to encode it in a plain-text format.
>
>You know, something you can copy, paste, compile and it simply works.
>Like the stuff I took from a ZX Spectrum to DOS, Windows and finally Linux.
>
>Great invention - I recommend you try it once.

You can add a syntax coloring for vim. With Leon Konings we had
a conversion between coloring in a prefix. It was a snap to add
these colouring to vim. The screens in vim looked almost exact
as native colorforth screens, except for the prefix.
A word drop (red) now looks :drop (red).

>
>Hans Bezemer

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: Naming for parsing words

<t74k1q$jsu$1@dont-email.me>

  copy mid

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

  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: Naming for parsing words
Date: Tue, 31 May 2022 12:36:09 +0400
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <t74k1q$jsu$1@dont-email.me>
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com>
<t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 31 May 2022 08:36:10 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="38ef35e64d9c9fd2f906f556732da39e";
logging-data="20382"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX190gRMuBLuPiZNCT3GHK+JH"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:9yf7a7ZsxHI+Ae5EjbifzPaKYdE=
In-Reply-To: <e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com>
Content-Language: en-US
 by: Ruvim - Tue, 31 May 2022 08:36 UTC

On 2022-05-30 23:14, Hans Bezemer wrote:
> On Sunday, May 29, 2022 at 8:30:33 PM UTC+2, Ruvim wrote:
>> But having shorter string literals it looks better:
>> "x" var
>> or
>> `x var
>> 10 `x const
>
> That is a very personal metric. I see strings - not declarations. And I think prefixed
> words are b--t ugly.
>

When you write:

10 constant foo

"constant " is a prefix for "foo".

When you write:

[char] A

"[char] " is a prefix for "A"

Such prefixes are ugly, since you don't have a general rule that tells
you whether some lexeme is a prefix or not.

Just for example, a convention about parentheses could be a rule that
shows such prefixes explicitly.

In Forth, when a word is used, you don't see (from the surrounding
context) how many arguments from the data stack it consumes. But if you
also don't see how many immediate arguments it consumes — it's far worse
for readability.

Concerning string literals, it just less or more concise forms:

string" x"
s" x"
"x"
`x

In every of these variants the boundaries are obvious and good readable
due to special characters and well known conventions.

>> Anyway, what can you suggest if I need to create a definition (e.g. a
>> constant) programmatically, and its name is passed as an argument?
>
>> Having "const" from the above it could look as:
>>
>> : foo ( sd.name -- ) ... 10 -rot const ... ;
>
> Try "CREATE". It has been there for a long time.

How does it help to pass a name string via the data stack?

--
Ruvim

Re: Naming for parsing words

<t74n1a$630$1@gioia.aioe.org>

  copy mid

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

  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: Naming for parsing words
Date: Tue, 31 May 2022 19:27:07 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t74n1a$630$1@gioia.aioe.org>
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com>
<t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com>
<t74k1q$jsu$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="6240"; 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.9.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 31 May 2022 09:27 UTC

On 31/05/2022 18:36, Ruvim wrote:
> On 2022-05-30 23:14, Hans Bezemer wrote:
>> On Sunday, May 29, 2022 at 8:30:33 PM UTC+2, Ruvim wrote:
>>> But having shorter string literals it looks better:
>>> "x" var
>>> or
>>> `x var
>>> 10 `x const
>>
>> That is a very personal metric. I see strings - not declarations. And I think prefixed
>> words are b--t ugly.
>>
>
>
> When you write:
>
> 10 constant foo
>
> "constant " is a prefix for "foo".
>
>
> When you write:
>
> [char] A
>
> "[char] " is a prefix for "A"
>
>
> Such prefixes are ugly, since you don't have a general rule that tells
> you whether some lexeme is a prefix or not.
>
> Just for example, a convention about parentheses could be a rule that
> shows such prefixes explicitly.
>
>
> In Forth, when a word is used, you don't see (from the surrounding
> context) how many arguments from the data stack it consumes. But if you
> also don't see how many immediate arguments it consumes — it's far worse
> for readability.
>
>
>
> Concerning string literals, it just less or more concise forms:
>
> string" x"
> s" x"
> "x"
> `x
>
> In every of these variants the boundaries are obvious and good readable
> due to special characters and well known conventions.

Thanks to 200x, folks today think $#%' et al is forth convention when it's
actually imported convention.

Re: Naming for parsing words

<t74qdj$i1u$1@dont-email.me>

  copy mid

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

  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: Naming for parsing words
Date: Tue, 31 May 2022 14:24:50 +0400
Organization: A noiseless patient Spider
Lines: 65
Message-ID: <t74qdj$i1u$1@dont-email.me>
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com>
<t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com>
<t74k1q$jsu$1@dont-email.me> <t74n1a$630$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 31 May 2022 10:24:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="38ef35e64d9c9fd2f906f556732da39e";
logging-data="18494"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OkG0/SQYCGAn5mynOWmdR"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.9.1
Cancel-Lock: sha1:BT+OMP7iDVg2FckR0xNeY95TrvI=
In-Reply-To: <t74n1a$630$1@gioia.aioe.org>
Content-Language: en-US
 by: Ruvim - Tue, 31 May 2022 10:24 UTC

On 2022-05-31 13:27, dxforth wrote:
> On 31/05/2022 18:36, Ruvim wrote:
>> On 2022-05-30 23:14, Hans Bezemer wrote:
>>> On Sunday, May 29, 2022 at 8:30:33 PM UTC+2, Ruvim wrote:
>>>> But having shorter string literals it looks better:
>>>> "x" var
>>>> or
>>>> `x var
>>>> 10 `x const
>>>
>>> That is a very personal metric. I see strings - not declarations. And I think prefixed
>>> words are b--t ugly.
>>>
>>
>>
>> When you write:
>>
>> 10 constant foo
>>
>> "constant " is a prefix for "foo".
>>
>>
>> When you write:
>>
>> [char] A
>>
>> "[char] " is a prefix for "A"
>>
>>
>> Such prefixes are ugly, since you don't have a general rule that tells
>> you whether some lexeme is a prefix or not.
>>
>> Just for example, a convention about parentheses could be a rule that
>> shows such prefixes explicitly.
>>
>>
>> In Forth, when a word is used, you don't see (from the surrounding
>> context) how many arguments from the data stack it consumes. But if you
>> also don't see how many immediate arguments it consumes — it's far worse
>> for readability.
(1)

>>
>>
>> Concerning string literals, it just less or more concise forms:
>>
>> string" x"
>> s" x"
>> "x"
>> `x
>>
>> In every of these variants the boundaries are obvious and good readable
>> due to special characters and well known conventions.
>
> Thanks to 200x, folks today think $#%' et al is forth convention when it's
> actually imported convention.

It doesn't matter whether they are imported or not.
Anyway, what would you suggest instead that to solve the problem (1)?

--
Ruvim

Re: Naming for parsing words

<t74vn6$984$1@gioia.aioe.org>

  copy mid

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

  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: Naming for parsing words
Date: Tue, 31 May 2022 21:55:19 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t74vn6$984$1@gioia.aioe.org>
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com>
<t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com>
<t74k1q$jsu$1@dont-email.me> <t74n1a$630$1@gioia.aioe.org>
<t74qdj$i1u$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="9476"; 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.9.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 31 May 2022 11:55 UTC

On 31/05/2022 20:24, Ruvim wrote:
> On 2022-05-31 13:27, dxforth wrote:
>> On 31/05/2022 18:36, Ruvim wrote:
>>> ...
>>> In Forth, when a word is used, you don't see (from the surrounding
>>> context) how many arguments from the data stack it consumes. But if you
>>> also don't see how many immediate arguments it consumes — it's far worse
>>> for readability.
> (1)
>
>
>>> Concerning string literals, it just less or more concise forms:
>>>
>>> string" x"
>>> s" x"
>>> "x"
>>> `x
>>>
>>> In every of these variants the boundaries are obvious and good readable
>>> due to special characters and well known conventions.
>>
>> Thanks to 200x, folks today think $#%' et al is forth convention when it's
>> actually imported convention.
>
>
> It doesn't matter whether they are imported or not.

It matters when foreign notions of readability are imported with them.

> Anyway, what would you suggest instead that to solve the problem (1)?

For whom is it a problem - not for you since you understand forth better
than most; nor for countless who have used forth for the past four decades.
To deny new users learning and enjoying forth it for what it is as we did -
that would be the tragedy.

Re: Naming for parsing words

<25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5fd0:0:b0:304:bd3d:d129 with SMTP id k16-20020ac85fd0000000b00304bd3dd129mr1699642qta.685.1654006296407;
Tue, 31 May 2022 07:11:36 -0700 (PDT)
X-Received: by 2002:a05:620a:3184:b0:6a5:8e2e:766d with SMTP id
bi4-20020a05620a318400b006a58e2e766dmr22270980qkb.482.1654006296184; Tue, 31
May 2022 07:11:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 31 May 2022 07:11:36 -0700 (PDT)
In-Reply-To: <t74qdj$i1u$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:84a2:671f:3e1c:bc3a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:84a2:671f:3e1c:bc3a
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com> <t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
<t74n1a$630$1@gioia.aioe.org> <t74qdj$i1u$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com>
Subject: Re: Naming for parsing words
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 31 May 2022 14:11:36 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1782
 by: S Jack - Tue, 31 May 2022 14:11 UTC

On Tuesday, May 31, 2022 at 5:24:54 AM UTC-5, Ruvim wrote:
> Anyway, what would you suggest instead that to solve the problem (1)?

10 constant \ un-named constant
$"bar" \ assign name to latest

42 constant $"bar"

--
me

Re: Naming for parsing words

<5fcf6d6d-7f23-4961-a080-9eda6297f5d0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:3711:b0:6a3:83ff:11dc with SMTP id de17-20020a05620a371100b006a383ff11dcmr31534734qkb.685.1654018156418;
Tue, 31 May 2022 10:29:16 -0700 (PDT)
X-Received: by 2002:ad4:514a:0:b0:464:49a9:dec6 with SMTP id
g10-20020ad4514a000000b0046449a9dec6mr11096405qvq.72.1654018156281; Tue, 31
May 2022 10:29:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 31 May 2022 10:29:16 -0700 (PDT)
In-Reply-To: <25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2003:f7:1f29:3ad6:7d5c:5e17:175:a0c1;
posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 2003:f7:1f29:3ad6:7d5c:5e17:175:a0c1
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com> <t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
<t74n1a$630$1@gioia.aioe.org> <t74qdj$i1u$1@dont-email.me> <25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5fcf6d6d-7f23-4961-a080-9eda6297f5d0n@googlegroups.com>
Subject: Re: Naming for parsing words
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Tue, 31 May 2022 17:29:16 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2021
 by: minf...@arcor.de - Tue, 31 May 2022 17:29 UTC

S Jack schrieb am Dienstag, 31. Mai 2022 um 16:11:37 UTC+2:
> On Tuesday, May 31, 2022 at 5:24:54 AM UTC-5, Ruvim wrote:
> > Anyway, what would you suggest instead that to solve the problem (1)?
> 10 constant \ un-named constant
> $"bar" \ assign name to latest
>
> 42 constant $"bar"

Cool!
:NONAME 10 ; \ unnamed def
$"bar" \ assign name to latest
: $"bar" 42 ;
You made my day!

Re: Naming for parsing words

<d640fa04-fdc8-4628-940b-8e3660152cd3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:98a:b0:6a3:840f:96d1 with SMTP id x10-20020a05620a098a00b006a3840f96d1mr31591758qkx.286.1654023053187;
Tue, 31 May 2022 11:50:53 -0700 (PDT)
X-Received: by 2002:a05:622a:d4:b0:302:43:4b46 with SMTP id
p20-20020a05622a00d400b0030200434b46mr12043585qtw.581.1654023053030; Tue, 31
May 2022 11:50:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 31 May 2022 11:50:52 -0700 (PDT)
In-Reply-To: <5fcf6d6d-7f23-4961-a080-9eda6297f5d0n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:84a2:671f:3e1c:bc3a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:84a2:671f:3e1c:bc3a
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com> <t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
<t74n1a$630$1@gioia.aioe.org> <t74qdj$i1u$1@dont-email.me>
<25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com> <5fcf6d6d-7f23-4961-a080-9eda6297f5d0n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d640fa04-fdc8-4628-940b-8e3660152cd3n@googlegroups.com>
Subject: Re: Naming for parsing words
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 31 May 2022 18:50:53 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1979
 by: S Jack - Tue, 31 May 2022 18:50 UTC

On Tuesday, May 31, 2022 at 12:29:17 PM UTC-5, minf...@arcor.de wrote:

Tweeked it a little:
:) frogd
ELF32X86_64 Frog Version 1.0d

"job" /go
: constant ( n -- ) docon , here swap , ;
: s: ( name xt -- ) defer cfa latest pfa dfa ! ;

42 constant s: bar
bar space . 42

-fin-
ok
--
me

Re: Naming for parsing words

<126de624-4447-4e34-a6ba-6fd9e9729fccn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:8d46:0:b0:6a6:48c7:8632 with SMTP id p67-20020a378d46000000b006a648c78632mr5637914qkd.633.1654023737707;
Tue, 31 May 2022 12:02:17 -0700 (PDT)
X-Received: by 2002:a05:620a:1a94:b0:6a3:76d1:dc9b with SMTP id
bl20-20020a05620a1a9400b006a376d1dc9bmr19028894qkb.272.1654023737409; Tue, 31
May 2022 12:02:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 31 May 2022 12:02:17 -0700 (PDT)
In-Reply-To: <d640fa04-fdc8-4628-940b-8e3660152cd3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:84a2:671f:3e1c:bc3a;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:84a2:671f:3e1c:bc3a
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com> <t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
<t74n1a$630$1@gioia.aioe.org> <t74qdj$i1u$1@dont-email.me>
<25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com> <5fcf6d6d-7f23-4961-a080-9eda6297f5d0n@googlegroups.com>
<d640fa04-fdc8-4628-940b-8e3660152cd3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <126de624-4447-4e34-a6ba-6fd9e9729fccn@googlegroups.com>
Subject: Re: Naming for parsing words
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 31 May 2022 19:02:17 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2202
 by: S Jack - Tue, 31 May 2022 19:02 UTC

On Tuesday, May 31, 2022 at 1:50:54 PM UTC-5, S Jack wrote:
> On Tuesday, May 31, 2022 at 12:29:17 PM UTC-5, minf...@arcor.de wrote:
>
> Tweeked it a little:
> :) frogd
> ELF32X86_64 Frog Version 1.0d
>
> "job" /go
> : constant ( n -- ) docon , here swap , ;
> : s: ( name xt -- ) defer cfa latest pfa dfa ! ;
>
> 42 constant s: bar
> bar space . 42
>
> -fin-
> ok
> --
> me
Oops, stack effects should be: constant ( n -- xt )
--

Re: Naming for parsing words

<bdba520f-0ff0-4ae5-9330-8d1671819bacn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:c99:b0:6a3:3c41:2d6 with SMTP id q25-20020a05620a0c9900b006a33c4102d6mr40852689qki.744.1654040966866;
Tue, 31 May 2022 16:49:26 -0700 (PDT)
X-Received: by 2002:a05:622a:387:b0:2fc:20a3:475 with SMTP id
j7-20020a05622a038700b002fc20a30475mr24120089qtx.265.1654040966708; Tue, 31
May 2022 16:49:26 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Tue, 31 May 2022 16:49:26 -0700 (PDT)
In-Reply-To: <126de624-4447-4e34-a6ba-6fd9e9729fccn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:ac06:918a:4677:8e4b;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:ac06:918a:4677:8e4b
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com> <t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
<t74n1a$630$1@gioia.aioe.org> <t74qdj$i1u$1@dont-email.me>
<25542531-53ea-485f-a6e9-0f10c49fd37dn@googlegroups.com> <5fcf6d6d-7f23-4961-a080-9eda6297f5d0n@googlegroups.com>
<d640fa04-fdc8-4628-940b-8e3660152cd3n@googlegroups.com> <126de624-4447-4e34-a6ba-6fd9e9729fccn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bdba520f-0ff0-4ae5-9330-8d1671819bacn@googlegroups.com>
Subject: Re: Naming for parsing words
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Tue, 31 May 2022 23:49:26 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2042
 by: S Jack - Tue, 31 May 2022 23:49 UTC

On Tuesday, May 31, 2022 at 2:02:18 PM UTC-5, S Jack wrote:
More tweek:

: constant ( n -- xt ) docon , here swap , ;
: :: ( xt -- ) aka ;

42 constant :: bar
i. bar . ==> 42

:noname ." FOOBAR" ; :: foo
i. foo ==> FOOBAR

-fin-
ok

Re: Naming for parsing words

<nnd$123a8ec4$2778b5a0@a95f3501d87453a8>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: Naming for parsing words
References: <t60i6r$7m0$1@dont-email.me> <t70e47$905$1@dont-email.me> <e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: alb...@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$123a8ec4$2778b5a0@a95f3501d87453a8>
Organization: KPN B.V.
Date: Wed, 01 Jun 2022 09:46:29 +0200
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!feeder8.news.weretis.net!sewer!alphared!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!abe006.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 29
Injection-Date: Wed, 01 Jun 2022 09:46:29 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1621
 by: none - Wed, 1 Jun 2022 07:46 UTC

In article <t74k1q$jsu$1@dont-email.me>, Ruvim <ruvim.pinka@gmail.com> wrote:
<SNIP>
>In Forth, when a word is used, you don't see (from the surrounding
>context) how many arguments from the data stack it consumes. But if you
>also don't see how many immediate arguments it consumes — it's far worse
>for readability.

I have a syntax coloring that does exactly that (shows fan in/fan out)
by coloring.
https://home.hccnet.nl/a.w.m.van.der.horst/forthlectureE.html
Never catches on.

> "x"
The only thing you need to remember is that " introduces a string.

I like it.

<SNIP>
>
>--
>Ruvim

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: Naming for parsing words

<2022Jun1.095216@mips.complang.tuwien.ac.at>

  copy mid

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

  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: Naming for parsing words
Date: Wed, 01 Jun 2022 07:52:16 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 34
Message-ID: <2022Jun1.095216@mips.complang.tuwien.ac.at>
References: <t60i6r$7m0$1@dont-email.me> <t72qgm$qdl$1@dont-email.me> <10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com> <2b28a887-e557-4b0a-9ba6-d6b0bb0a8895n@googlegroups.com> <t73b3q$sv0$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="f9bf1a9d7e4d339bd3af31318f6bafbc";
logging-data="14445"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+pqMHJhuIUGFLPFBkhSV3N"
Cancel-Lock: sha1:rRB/wWmpHvrsJMm+goAekJaXeUA=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Wed, 1 Jun 2022 07:52 UTC

Stephen Pelc <stephen@vfxforth.com> writes:
>On 30 May 2022 at 21:01:10 CEST, "S Jack" <sdwjack69@gmail.com> wrote:
>>
>> The word type is determined by its codeword and for defining word
>> offspring an additional address. As a Forth word's type can be
>> determined by codeword and an address, any Forth has information
>> that it can use for coloring.
>
>Does that apply to Native Code Compilers?

If you design for it, it does.

If you don't design for that, it does not matter whether you have a
native-code compiler or some other kind of compiler. E.g., consider a
Forth system that defines

: constant ( n "name" -- )
>r : r> postpone literal postpone ; ;

and then the user defines

5 constant x
: y 5 ;

The resulting code will be the same, so you have no way to know
whether y or x has been defined with constant or : by looking at the
resulting code.

- 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: Naming for parsing words

<b3cd0ee1-24e5-4e54-9ee6-3d03fc499951n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:4712:b0:6a5:a071:8292 with SMTP id bs18-20020a05620a471200b006a5a0718292mr23974886qkb.179.1654084042506;
Wed, 01 Jun 2022 04:47:22 -0700 (PDT)
X-Received: by 2002:ac8:5f12:0:b0:2f9:3af4:c6b4 with SMTP id
x18-20020ac85f12000000b002f93af4c6b4mr36648103qta.150.1654084042313; Wed, 01
Jun 2022 04:47:22 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 1 Jun 2022 04:47:22 -0700 (PDT)
In-Reply-To: <t743qj$vth$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: <t60i6r$7m0$1@dont-email.me> <t70h7u$5jc$1@dont-email.me>
<db5fe8a6-6806-472b-9518-08cc28beabe6n@googlegroups.com> <t70nh4$6ia$1@dont-email.me>
<t72qgm$qdl$1@dont-email.me> <10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com>
<t734n8$cev$1@dont-email.me> <8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>
<t743qj$vth$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b3cd0ee1-24e5-4e54-9ee6-3d03fc499951n@googlegroups.com>
Subject: Re: Naming for parsing words
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Wed, 01 Jun 2022 11:47:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1717
 by: Hans Bezemer - Wed, 1 Jun 2022 11:47 UTC

On Tuesday, May 31, 2022 at 5:59:22 AM UTC+2, dxforth wrote:
> From my early school days:
> https://www.teaching.com.au/product/EY302
> those nuns knew how to punish

You weren't inventive enough - they gave you 72 rods to throw to their heads.
That'll teach them about their didactic values.

Hans Bezemer

Re: Naming for parsing words

<6a588e92-2bde-464e-9a7f-29b6c800dccen@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:242d:b0:462:65b9:9392 with SMTP id gy13-20020a056214242d00b0046265b99392mr30096333qvb.63.1654086815859;
Wed, 01 Jun 2022 05:33:35 -0700 (PDT)
X-Received: by 2002:a05:620a:c51:b0:6a6:6ef1:aeb6 with SMTP id
u17-20020a05620a0c5100b006a66ef1aeb6mr64301qki.503.1654086815656; Wed, 01 Jun
2022 05:33:35 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Wed, 1 Jun 2022 05:33:35 -0700 (PDT)
In-Reply-To: <t74k1q$jsu$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=77.174.47.232; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 77.174.47.232
References: <t60i6r$7m0$1@dont-email.me> <t62vui$1mi$1@dont-email.me>
<2022May19.164709@mips.complang.tuwien.ac.at> <t6t9mi$buj$2@dont-email.me>
<nnd$1d4b97d3$073395e9@8abaa6da72b6b30c> <t706bv$rog$1@gioia.aioe.org>
<796382cb-51a2-49d4-8c12-913faede4cb3n@googlegroups.com> <t70e47$905$1@dont-email.me>
<e6d36b37-f5b0-4450-9790-4ed4e8a0143bn@googlegroups.com> <t74k1q$jsu$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6a588e92-2bde-464e-9a7f-29b6c800dccen@googlegroups.com>
Subject: Re: Naming for parsing words
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Wed, 01 Jun 2022 12:33:35 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4315
 by: Hans Bezemer - Wed, 1 Jun 2022 12:33 UTC

On Tuesday, May 31, 2022 at 10:36:13 AM UTC+2, Ruvim wrote:
> When you write:
> 10 constant foo
> "constant " is a prefix for "foo".
> When you write:
> [char] A
> "[char] " is a prefix for "A"
Well, your ontology sucks. And that's why your whole argument following
it falls apart:

"A prefix is a PART of a word attached to a beginning of a word which
modifies the meaning of that stem".

[CHAR] is NOT a prefix, because it ISN'T part of that word (even in the
sense of "word" in a Forth context). 'A' HAS a prefix, though, because
the quote signifies it is a character. [CHAR] however, is a word in itself
that executes. It is far more flexible, because it doesn't require any
changes to the interpreter. In that sense - it's more Forth-like.

Moore never liked "hooks" - and that's EXACTLY what "recognizers" are:
lots of needless hooks, which could be handled more elegantly and
Forth-like - by a word.
> Such prefixes are ugly, since you don't have a general rule that tells
> you whether some lexeme is a prefix or not.
Naming is everything. In my libs, I tend to use the rule that privates
are (WORD), so I only have to look for parenthesis words to HIDE.

[WORD] are used at compile time. So, when introducing a new word I
tend to ask myself "is this done at compile time". >WORD put something
somewhere. WORD> gets something from somewhere.

/WORD signify a quantity on a "per" basis, while #WORD defines an
absolute quantity. If you do that consistently, it will help you to properly
and easily read your program.

Given that Forth was designed as a language that puts the burden
fully unto the programmer, simply take that responsibility, instead of
trying to fix things that in the context of this philosophy aren't broken.

As a matter of fact, in "Thinking Forth", Moore elaborates on the
importance of "naming". I devoted an entire Wiki page on it:
https://sourceforge.net/p/forth-4th/wiki/What%27s%20in%20a%20name%3F/

> > Try "CREATE". It has been there for a long time.
> How does it help to pass a name string via the data stack?
For what? For the odd occasion you do things like "function composition"?
I've got such a lib since 2013. We're writing 2022 now and I still gotta find
an real life application for it that goes beyond a demo program.

And I play around a LOT with execution tokens. Forth is not Lisp. If you
want to write C, write C. If you want to write Lisp, write Lisp. If you can't
write Forth - don't write Forth.

But don't bother me with proposals that are clearly intended to turn this
language into another, because some people can't handle it - and hence
argue "that it's made to make programmers lives easier".

Gee man, I got my own compiler. If I wanted to make my life "easier" I'd
already done it in a way that doesn't make me barf on my own listings.

Hans Bezemer

Re: Naming for parsing words

<t7egh5$1emg$2@gioia.aioe.org>

  copy mid

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

  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: Naming for parsing words
Date: Sat, 4 Jun 2022 12:37:26 +1000
Organization: Aioe.org NNTP Server
Message-ID: <t7egh5$1emg$2@gioia.aioe.org>
References: <t60i6r$7m0$1@dont-email.me> <t70h7u$5jc$1@dont-email.me>
<db5fe8a6-6806-472b-9518-08cc28beabe6n@googlegroups.com>
<t70nh4$6ia$1@dont-email.me> <t72qgm$qdl$1@dont-email.me>
<10541a74-2103-46a6-9221-c2eeba08df4bn@googlegroups.com>
<t734n8$cev$1@dont-email.me>
<8e9b4e64-6320-4962-9b2c-ec44ac9affebn@googlegroups.com>
<t743qj$vth$1@gioia.aioe.org>
<b3cd0ee1-24e5-4e54-9ee6-3d03fc499951n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="47824"; 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.9.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Sat, 4 Jun 2022 02:37 UTC

On 1/06/2022 21:47, Hans Bezemer wrote:
> On Tuesday, May 31, 2022 at 5:59:22 AM UTC+2, dxforth wrote:
>> From my early school days:
>> https://www.teaching.com.au/product/EY302
>> those nuns knew how to punish
>
> You weren't inventive enough - they gave you 72 rods to throw to their heads.
> That'll teach them about their didactic values.

They were undoubtedly cruel. But fair.

Pages:12345
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor