Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Sic transit discus mundi -- From the System Administrator's Guide, by Lars Wirzenius


devel / comp.lang.forth / ALLOT?

SubjectAuthor
* ALLOT?dxforth
+* Re: ALLOT?Krishna Myneni
|`* Naming conventions and question mark (was: ALLOT?)Ruvim
| +- Re: Naming conventions and question markBrian Fox
| +- Re: Naming conventions and question mark (was: ALLOT?)Anton Ertl
| +* Name for: : xxx ( u -- a ) here swap allot ;Doug Hoffman
| |`* Re: Name for: : xxx ( u -- a ) here swap allot ;Ruvim
| | +- Re: Name for: : xxx ( u -- a ) here swap allot ;Doug Hoffman
| | `* Re: Name for: : xxx ( u -- a ) here swap allot ;Paul Rubin
| |  `* Naming conventions and greater-than sign (was: Name for: : xxx ( u --Ruvim
| |   +- Re: Naming conventions and greater-than sign (was: Name for: : xxx (dxforth
| |   +* Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) heAnton Ertl
| |   |+* Re: Naming conventions and greater-than signRuvim
| |   ||+* Re: Naming conventions and greater-than signAnton Ertl
| |   |||`* Etymology and behavior of "CMOVE>" (was: Naming conventions andRuvim
| |   ||| +* Re: Etymology and behavior of "CMOVE>" (was: Naming conventions and greater-thanAnton Ertl
| |   ||| |+* Efficient CMOVEAnton Ertl
| |   ||| ||+- Re: Efficient CMOVEdxforth
| |   ||| ||+* Re: Efficient CMOVEMarcel Hendrix
| |   ||| |||`* Re: Efficient CMOVEAnton Ertl
| |   ||| ||| `* Re: Efficient CMOVEdxforth
| |   ||| |||  `- Re: Efficient CMOVEAnton Ertl
| |   ||| ||+* Re: Efficient CMOVEdxforth
| |   ||| |||`* Re: Efficient CMOVEdxforth
| |   ||| ||| `* Re: Efficient CMOVEAnton Ertl
| |   ||| |||  `* Re: Efficient CMOVEdxforth
| |   ||| |||   `* Re: Efficient CMOVEAnton Ertl
| |   ||| |||    +* Re: Efficient CMOVEAnton Ertl
| |   ||| |||    |`- Re: Efficient CMOVEMarcel Hendrix
| |   ||| |||    `* Re: Efficient CMOVEdxforth
| |   ||| |||     `* Re: Efficient CMOVEAnton Ertl
| |   ||| |||      `* Re: Efficient CMOVEdxforth
| |   ||| |||       `* Re: Efficient CMOVEAnton Ertl
| |   ||| |||        +* Re: Efficient CMOVEP Falth
| |   ||| |||        |`- Re: Efficient CMOVEAnton Ertl
| |   ||| |||        `- Re: Efficient CMOVEdxforth
| |   ||| ||`- Re: Efficient CMOVEStephen Pelc
| |   ||| |`* Re: Etymology and behavior of "CMOVE>"Ruvim
| |   ||| | `- Re: Etymology and behavior of "CMOVE>"Anton Ertl
| |   ||| `- Re: Etymology and behavior of "CMOVE>" (was: Naming conventions anddxforth
| |   ||`* Re: Naming conventions and greater-than signS Jack
| |   || `- Re: Naming conventions and greater-than signRuvim
| |   |+* Re: Naming conventions and greater-than sign (was: Name for: : xxx (Bernd Linsel
| |   ||`* Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) heAnton Ertl
| |   || +- Re: Naming conventions and greater-than sign (was: Name for: : xxx (Bernd Linsel
| |   || +* Re: Naming conventions and greater-than sign (was: Name for: : xxx (dxforth
| |   || |`* Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) heAnton Ertl
| |   || | +- Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) heAnton Ertl
| |   || | `- Re: Naming conventions and greater-than sign (was: Name for: : xxx (dxforth
| |   || +- Re: Naming conventions and greater-than sign (was: Name for: : xxx (P Falth
| |   || `* Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) heStephen Pelc
| |   ||  `- Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) heAnton Ertl
| |   |+* Iterators, control flow, and structures (was: Naming conventions andRuvim
| |   ||`* Re: Iterators, control flow, and structures (was: Naming conventions and greaterAnton Ertl
| |   || `- Re: Iterators, control flow, and structuresRuvim
| |   |`- Re: Naming conventions and greater-than sign (was: Name for: : xxx (Hugh Aguilar
| |   `* Re: Naming conventions and greater-than sign (was: Name for: : xxx (dxforth
| |    +- Re: Naming conventions and greater-than sign (was: Name for: : xxx (Bernd Linsel
| |    `* Re: Naming conventions and greater-than sign (was: Name for: : xxx (Ruvim
| |     `- Re: Naming conventions and greater-than sign (was: Name for: : xxx (dxforth
| +* Re: Naming conventions and question mark (was: ALLOT?)Krishna Myneni
| |+* Re: Naming conventions and question mark (was: ALLOT?)NN
| ||+- Re: Naming conventions and question mark (was: ALLOT?)P Falth
| ||`* Re: Naming conventions and question markPaul Rubin
| || +- Re: Naming conventions and question markdxforth
| || `- Re: Naming conventions and question markAnton Ertl
| |`- Re: Naming conventions and question mark (was: ALLOT?)dxforth
| `- Re: Naming conventions and question mark (was: ALLOT?)dxforth
`- Re: ALLOT?Hans Bezemer

Pages:123
ALLOT?

<sghpg8$1sh6$1@gioia.aioe.org>

  copy mid

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

  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: ALLOT?
Date: Mon, 30 Aug 2021 15:14:49 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sghpg8$1sh6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="61990"; 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:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
X-Mozilla-News-Host: news://nntp.aioe.org:119
Content-Language: en-GB
 by: dxforth - Mon, 30 Aug 2021 05:14 UTC

On 30/08/2021 12:22, Krishna Myneni wrote:

> : allot? ( u -- a ) here swap allot ;

IIRC you've had this forever. I never thought much about it at
the time. Now a convert, I find uses for it all the time e.g.

$95 constant TLEN \ length of each term definition
$100 constant CHUNK \ in-file chunk to get
20 constant ISIZ \ size input buffer / terminal name
200 constant TMAX \ max #terminals

\ Storage areas allocated at run-time
here value TBUF ( -- a ) \ temp terminal buffer
here value SBUF ( -- a ) \ swap/work buffer
here value IBUF ( -- a ) \ console input
here value XBUF ( -- a ) \ terminal index

: INIT ( -- )
altered off \ clear
isiz reserve to ibuf \ console input
tlen reserve to tbuf \ temp terminal buffer
chunk reserve to sbuf \ swap/work buffer
tmax cells reserve to xbuf \ terminal index
;

Re: ALLOT?

<sgiipl$bbc$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: krishna....@ccreweb.org (Krishna Myneni)
Newsgroups: comp.lang.forth
Subject: Re: ALLOT?
Date: Mon, 30 Aug 2021 07:26:27 -0500
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <sgiipl$bbc$1@dont-email.me>
References: <sghpg8$1sh6$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 30 Aug 2021 12:26:29 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7a407f5b12b18e350439345639aef94f";
logging-data="11628"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+iqQpssE6x4G5DGs5c7xTy"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:8DnLDhPuE+qx25fykquol6E/TDU=
In-Reply-To: <sghpg8$1sh6$1@gioia.aioe.org>
Content-Language: en-US
 by: Krishna Myneni - Mon, 30 Aug 2021 12:26 UTC

On 8/30/21 12:14 AM, dxforth wrote:
> On 30/08/2021 12:22, Krishna Myneni wrote:
>
>> : allot?  ( u -- a ) here swap allot ;
>
> IIRC you've had this forever.  I never thought much about it at
> the time.  Now a convert, I find uses for it all the time e.g.
>

ALLOT? was originally called ?ALLOT in kForth, but that word is
deprecated now in kForth, in favor of ALLOT?, following a suggestion on
word naming by Ruvim. ALLOT? is essential for making use of the dynamic
dictionary model implemented in kForth, which has no HERE.

> $95  constant TLEN      \ length of each term definition
> $100 constant CHUNK     \ in-file chunk to get
> 20   constant ISIZ      \ size input buffer / terminal name
> 200  constant TMAX      \ max #terminals
>
> \ Storage areas allocated at run-time
> here value TBUF     ( -- a )  \ temp terminal buffer
> here value SBUF     ( -- a )  \ swap/work buffer
> here value IBUF     ( -- a )  \ console input
> here value XBUF     ( -- a )  \ terminal index
>
> : INIT ( -- )
>   altered off                 \ clear
>   isiz       reserve to ibuf  \ console input
>   tlen       reserve to tbuf  \ temp terminal buffer
>   chunk      reserve to sbuf  \ swap/work buffer
>   tmax cells reserve to xbuf  \ terminal index
> ;

RESERVE is a synonym of ALLOT? .

--
Krishna

Naming conventions and question mark (was: ALLOT?)

<sgiouu$k89$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ruvim.pi...@gmail.com (Ruvim)
Newsgroups: comp.lang.forth
Subject: Naming conventions and question mark (was: ALLOT?)
Date: Mon, 30 Aug 2021 17:11:41 +0300
Organization: A noiseless patient Spider
Lines: 99
Message-ID: <sgiouu$k89$1@dont-email.me>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 30 Aug 2021 14:11:42 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="84c7c3a73d430f7f16616d59293d4560";
logging-data="20745"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/d6NDsCvW+52koqfSTxDLw"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Cancel-Lock: sha1:haIpN5Gx7NvRORQ8yHXVwHUsFMA=
In-Reply-To: <sgiipl$bbc$1@dont-email.me>
Content-Language: en-US
 by: Ruvim - Mon, 30 Aug 2021 14:11 UTC

On 2021-08-30 15:26, Krishna Myneni wrote:
> On 8/30/21 12:14 AM, dxforth wrote:
>> On 30/08/2021 12:22, Krishna Myneni wrote:
>>
>>> : allot?  ( u -- a ) here swap allot ;
>>
>> IIRC you've had this forever.  I never thought much about it at
>> the time.  Now a convert, I find uses for it all the time e.g.
>>
>
> ALLOT? was originally called ?ALLOT in kForth, but that word is
> deprecated now in kForth, in favor of ALLOT?, following a suggestion on
> word naming by Ruvim. ALLOT? is essential for making use of the dynamic
> dictionary model implemented in kForth, which has no HERE.

AFAIR, I only criticized the "?ALLOT" name for this word, and I didn't
suggest "ALLOT?" as a better variant.

Usually the question mark at the end (like "X?") means that this word
return a *flag* at the top; usually there is also a variant of the word
without the question mark (like "X") that doesn't return a flag.

For example, "KEY ( -- char )" returns a character,
and "KEY? ( -- flag )" returns only a flag about available of a
character. Ditto for "EKEY" and "EKEY?", "XKEY" and "XKEY?".

The word "XC!+?" returns a flag, while "XC!+" doesn't

The word "ENVIRONMENT?" doesn't have a pair, but it also returns a flag
at the top.

The idea is that if a name ends with the question mark, then the word
returns a flag at the top (NB: the converse does not hold).

Obviously, the name "ALLOT?" for ( u -- addr ) breaks this convention.

A possible variant for your word is "ALLOTED ( u -- addr )"

But I would prefer "ALLOTED ( u -- addr u )".
And I used "ALLOCATED ( u -- addr u )" for allocating in the heap,
since usually my APIs allow to set a buffer with arbitrary size.

For example:

256 1024 * ALLOCATED DATASPACE!

buf-size-default ALLOCATED buf1!
buf-size-default ALLOCATED buf2!

where
DATASPACE! ( addr u -- )

buf1 ( -- addr u )
buf1! ( addr u -- )

buf2 ( -- addr u )
buf2! ( addr u -- )

Among the standards words we have: "ALIGN ( -- )"
and "ALIGNED ( addr1 -- addr2 )"

>
>> $95  constant TLEN      \ length of each term definition
>> $100 constant CHUNK     \ in-file chunk to get
>> 20   constant ISIZ      \ size input buffer / terminal name
>> 200  constant TMAX      \ max #terminals
>>
>> \ Storage areas allocated at run-time
>> here value TBUF     ( -- a )  \ temp terminal buffer
>> here value SBUF     ( -- a )  \ swap/work buffer
>> here value IBUF     ( -- a )  \ console input
>> here value XBUF     ( -- a )  \ terminal index
>>
>> : INIT ( -- )
>>    altered off                 \ clear
>>    isiz       reserve to ibuf  \ console input
>>    tlen       reserve to tbuf  \ temp terminal buffer
>>    chunk      reserve to sbuf  \ swap/work buffer
>>    tmax cells reserve to xbuf  \ terminal index
>> ;
>
> RESERVE is a synonym of ALLOT? .

Obviously, yes.

"RESERVE" is better, but I don't sure that this name is good enough to
recommend it for FORTH word list.

--
Ruvim

Re: Naming conventions and question mark

<612CEEED.5030101@rogers.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: brian....@rogers.com (Brian Fox)
Newsgroups: comp.lang.forth
Subject: Re: Naming conventions and question mark
Date: Mon, 30 Aug 2021 10:45:01 -0400
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <612CEEED.5030101@rogers.com>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me> <sgiouu$k89$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="96a0b752a7d758fd48fe4dd0608a6dad";
logging-data="3088"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+EEQkcpDqQowX3E8bAEnwIacXH9BiwPcc="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
Cancel-Lock: sha1:oBQSTsF6hKgvmc2ao0un8+tijhU=
In-Reply-To: <sgiouu$k89$1@dont-email.me>
 by: Brian Fox - Mon, 30 Aug 2021 14:45 UTC

On 2021-08-30 10:11 AM, Ruvim wrote:
>
> Obviously, yes.
>
> "RESERVE" is better, but I don't sure that this name is good enough to
> recommend it for FORTH word list.
>
>
> --
> Ruvim

Although not a proper English word, ALLOC might be a name for this
thing.

Re: Naming conventions and question mark (was: ALLOT?)

<2021Aug30.165828@mips.complang.tuwien.ac.at>

  copy mid

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

  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 conventions and question mark (was: ALLOT?)
Date: Mon, 30 Aug 2021 14:58:28 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 55
Message-ID: <2021Aug30.165828@mips.complang.tuwien.ac.at>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me> <sgiouu$k89$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="a299dbf7380ba492227c2860e9027c9a";
logging-data="21688"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+IAIcQtLjOxvKcwatNJwJZ"
Cancel-Lock: sha1:Q5QkS0S8sUEJ7Zpe9J7Y8Xg5mNQ=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Mon, 30 Aug 2021 14:58 UTC

Ruvim <ruvim.pinka@gmail.com> writes:
>On 2021-08-30 15:26, Krishna Myneni wrote:
>> On 8/30/21 12:14 AM, dxforth wrote:
>>> On 30/08/2021 12:22, Krishna Myneni wrote:
>>>
>>>> : allot?  ( u -- a ) here swap allot ;
>>>
>>> IIRC you've had this forever.  I never thought much about it at
>>> the time.  Now a convert, I find uses for it all the time e.g.
>>>
>>
>> ALLOT? was originally called ?ALLOT in kForth, but that word is
>> deprecated now in kForth, in favor of ALLOT?, following a suggestion on
>> word naming by Ruvim. ALLOT? is essential for making use of the dynamic
>> dictionary model implemented in kForth, which has no HERE.
>
>AFAIR, I only criticized the "?ALLOT" name for this word, and I didn't
>suggest "ALLOT?" as a better variant.
>
>Usually the question mark at the end (like "X?") means that this word
>return a *flag* at the top; usually there is also a variant of the word
>without the question mark (like "X") that doesn't return a flag.
>
>For example, "KEY ( -- char )" returns a character,
>and "KEY? ( -- flag )" returns only a flag about available of a
>character. Ditto for "EKEY" and "EKEY?", "XKEY" and "XKEY?".
>
>The word "XC!+?" returns a flag, while "XC!+" doesn't
>
>The word "ENVIRONMENT?" doesn't have a pair, but it also returns a flag
>at the top.
>
>The idea is that if a name ends with the question mark, then the word
>returns a flag at the top (NB: the converse does not hold).
>
>Obviously, the name "ALLOT?" for ( u -- addr ) breaks this convention.

Yes, it's not a good name.

Similarly, a "?" at the start means that the word takes a flag and/or
that the word may or may not perform an action: e.g., ?DUP ?EXIT
?BRANCH.

Incidentially, I just needed such a word a few days ago; there is
already a word (originally for a special purpose) in Gforth that does
that: SMALL-ALLOT, so I used that. But the word and its name is not
appropriate for general-purpose usage (it is limited to allocations
smaller than a page).

- 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

Name for: : xxx ( u -- a ) here swap allot ;

<612d0520$0$705$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Name for: : xxx ( u -- a ) here swap allot ;
Newsgroups: comp.lang.forth
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Mon, 30 Aug 2021 12:19:41 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <sgiouu$k89$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 11
Message-ID: <612d0520$0$705$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: e202f65b.news.sunsite.dk
X-Trace: 1630340384 news.sunsite.dk 705 glidedog@gmail.com/68.55.82.126:53333
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Mon, 30 Aug 2021 16:19 UTC

issue
assign
supply
provide
give
grant
furnish
impart
bestow
extend
reserve

Re: Name for: : xxx ( u -- a ) here swap allot ;

<sgj7q8$t36$1@dont-email.me>

  copy mid

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

  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: Name for: : xxx ( u -- a ) here swap allot ;
Date: Mon, 30 Aug 2021 21:25:11 +0300
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <sgj7q8$t36$1@dont-email.me>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 30 Aug 2021 18:25:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="84c7c3a73d430f7f16616d59293d4560";
logging-data="29798"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+MeZuj2uasPnb1TvuEB4de"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Cancel-Lock: sha1:EMeTsNTIMD0VWRmnMJ4mz6nzxB0=
In-Reply-To: <612d0520$0$705$14726298@news.sunsite.dk>
Content-Language: en-US
 by: Ruvim - Mon, 30 Aug 2021 18:25 UTC

On 2021-08-30 19:19, Doug Hoffman wrote:
> issue
> assign
> supply
> provide
> give
> grant
> furnish
> impart
> bestow
> extend
> reserve

From this list I like "provide" and "impart".

OTOH, it's desirable to have an association with "allot", I think.

A possible variant:

allotted-head ( u -- addr )

--
Ruvim

Re: Naming conventions and question mark (was: ALLOT?)

<sgj9qc$9p2$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: krishna....@ccreweb.org (Krishna Myneni)
Newsgroups: comp.lang.forth
Subject: Re: Naming conventions and question mark (was: ALLOT?)
Date: Mon, 30 Aug 2021 13:59:24 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <sgj9qc$9p2$1@dont-email.me>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 30 Aug 2021 18:59:24 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7a407f5b12b18e350439345639aef94f";
logging-data="10018"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18kB54nIB++AOMwsFeLbnT2"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:9Xv598tVaYBOSSRl3Sv/eB4GoIU=
In-Reply-To: <sgiouu$k89$1@dont-email.me>
Content-Language: en-US
 by: Krishna Myneni - Mon, 30 Aug 2021 18:59 UTC

On 8/30/21 9:11 AM, Ruvim wrote:
> On 2021-08-30 15:26, Krishna Myneni wrote:
>> On 8/30/21 12:14 AM, dxforth wrote:
>>> On 30/08/2021 12:22, Krishna Myneni wrote:
>>>
>>>> : allot?  ( u -- a ) here swap allot ;
>>>
>>> IIRC you've had this forever.  I never thought much about it at
>>> the time.  Now a convert, I find uses for it all the time e.g.
>>>
>>
>> ALLOT? was originally called ?ALLOT in kForth, but that word is
>> deprecated now in kForth, in favor of ALLOT?, following a suggestion
>> on word naming by Ruvim. ALLOT? is essential for making use of the
>> dynamic dictionary model implemented in kForth, which has no HERE.
>
> AFAIR, I only criticized the "?ALLOT" name for this word, and I didn't
> suggest "ALLOT?" as a better variant.
>

Ok. I may be misremembering. I may have just changed the name to ALLOT?
after considering your criticism of ?ALLOT to be justified. In any case,
I'm not willing to tinker with it further. ALLOT? does return something,
though it is not a flag.

Krishna

Re: Naming conventions and question mark (was: ALLOT?)

<f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:4b4c:: with SMTP id e12mr22696661qts.193.1630354743961; Mon, 30 Aug 2021 13:19:03 -0700 (PDT)
X-Received: by 2002:a05:620a:28c6:: with SMTP id l6mr24770545qkp.325.1630354743687; Mon, 30 Aug 2021 13:19:03 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!tr2.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 30 Aug 2021 13:19:03 -0700 (PDT)
In-Reply-To: <sgj9qc$9p2$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=86.187.171.20; posting-account=9A5f7goAAAD_QfJPZnlK3Xq_UhzYjdP-
NNTP-Posting-Host: 86.187.171.20
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me> <sgiouu$k89$1@dont-email.me> <sgj9qc$9p2$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com>
Subject: Re: Naming conventions and question mark (was: ALLOT?)
From: november...@gmail.com (NN)
Injection-Date: Mon, 30 Aug 2021 20:19:03 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 30
 by: NN - Mon, 30 Aug 2021 20:19 UTC

On Monday, 30 August 2021 at 19:59:26 UTC+1, Krishna Myneni wrote:
> On 8/30/21 9:11 AM, Ruvim wrote:
> > On 2021-08-30 15:26, Krishna Myneni wrote:
> >> On 8/30/21 12:14 AM, dxforth wrote:
> >>> On 30/08/2021 12:22, Krishna Myneni wrote:
> >>>
> >>>> : allot? ( u -- a ) here swap allot ;
> >>>
> >>> IIRC you've had this forever. I never thought much about it at
> >>> the time. Now a convert, I find uses for it all the time e.g.
> >>>
> >>
> >> ALLOT? was originally called ?ALLOT in kForth, but that word is
> >> deprecated now in kForth, in favor of ALLOT?, following a suggestion
> >> on word naming by Ruvim. ALLOT? is essential for making use of the
> >> dynamic dictionary model implemented in kForth, which has no HERE.
> >
> > AFAIR, I only criticized the "?ALLOT" name for this word, and I didn't
> > suggest "ALLOT?" as a better variant.
> >
> Ok. I may be misremembering. I may have just changed the name to ALLOT?
> after considering your criticism of ?ALLOT to be justified. In any case,
> I'm not willing to tinker with it further. ALLOT? does return something,
> though it is not a flag.
>
>
> Krishna

Why do we need a new word when BUFFER: exists

https://forth-standard.org/standard/core/BUFFERColon

Re: Name for: : xxx ( u -- a ) here swap allot ;

<612d40a6$0$700$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!rocksolid2!i2pn.org!news.swapon.de!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Subject: Re: Name for: : xxx ( u -- a ) here swap allot ;
Newsgroups: comp.lang.forth
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me>
From: dhoffman...@gmail.com (Doug Hoffman)
Date: Mon, 30 Aug 2021 16:33:37 -0400
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0)
Gecko/20100101 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <sgj7q8$t36$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Lines: 13
Message-ID: <612d40a6$0$700$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 9e78fcaa.news.sunsite.dk
X-Trace: 1630355622 news.sunsite.dk 700 glidedog@gmail.com/68.55.82.126:54422
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Mon, 30 Aug 2021 20:33 UTC

On 8/30/21 2:25 PM, Ruvim wrote:

> ... it's desirable to have an association with "allot", I think.

I agree.

> A possible variant:
>
> allotted-head ( u -- addr )

That would work.

-Doug

Re: Naming conventions and question mark (was: ALLOT?)

<950eaf00-507d-4447-a929-c031a83a23can@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a0c:cb8f:: with SMTP id p15mr25055711qvk.2.1630357958903;
Mon, 30 Aug 2021 14:12:38 -0700 (PDT)
X-Received: by 2002:a37:a2c6:: with SMTP id l189mr24157275qke.109.1630357958641;
Mon, 30 Aug 2021 14:12:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!news-out.netnews.com!news.alt.net!fdc2.netnews.com!peer02.ams1!peer.ams1.xlned.com!news.xlned.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, 30 Aug 2021 14:12:38 -0700 (PDT)
In-Reply-To: <f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:2000:2001:46bc:9d95:a28f:ea64:a1db;
posting-account=ryzhhAoAAAAIqf1uqmG9E4uP1Bagd-k2
NNTP-Posting-Host: 2a01:2000:2001:46bc:9d95:a28f:ea64:a1db
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <sgj9qc$9p2$1@dont-email.me> <f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <950eaf00-507d-4447-a929-c031a83a23can@googlegroups.com>
Subject: Re: Naming conventions and question mark (was: ALLOT?)
From: peter.m....@gmail.com (P Falth)
Injection-Date: Mon, 30 Aug 2021 21:12:38 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2796
 by: P Falth - Mon, 30 Aug 2021 21:12 UTC

On Monday, 30 August 2021 at 22:19:04 UTC+2, NN wrote:
> On Monday, 30 August 2021 at 19:59:26 UTC+1, Krishna Myneni wrote:
> > On 8/30/21 9:11 AM, Ruvim wrote:
> > > On 2021-08-30 15:26, Krishna Myneni wrote:
> > >> On 8/30/21 12:14 AM, dxforth wrote:
> > >>> On 30/08/2021 12:22, Krishna Myneni wrote:
> > >>>
> > >>>> : allot? ( u -- a ) here swap allot ;
> > >>>
> > >>> IIRC you've had this forever. I never thought much about it at
> > >>> the time. Now a convert, I find uses for it all the time e.g.
> > >>>
> > >>
> > >> ALLOT? was originally called ?ALLOT in kForth, but that word is
> > >> deprecated now in kForth, in favor of ALLOT?, following a suggestion
> > >> on word naming by Ruvim. ALLOT? is essential for making use of the
> > >> dynamic dictionary model implemented in kForth, which has no HERE.
> > >
> > > AFAIR, I only criticized the "?ALLOT" name for this word, and I didn't
> > > suggest "ALLOT?" as a better variant.
> > >
> > Ok. I may be misremembering. I may have just changed the name to ALLOT?
> > after considering your criticism of ?ALLOT to be justified. In any case,
> > I'm not willing to tinker with it further. ALLOT? does return something,
> > though it is not a flag.
> >
> >
> > Krishna
> Why do we need a new word when BUFFER: exists

Exactly my thought also!

$95 constant TLEN
TLEN BUFFER: TBUF

works very well

BR
Peter

> https://forth-standard.org/standard/core/BUFFERColon

Re: ALLOT?

<422d05de-b3e5-4051-810d-fc34bb6d61fcn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:a20f:: with SMTP id l15mr23821519qke.24.1630360670194;
Mon, 30 Aug 2021 14:57:50 -0700 (PDT)
X-Received: by 2002:a05:620a:248f:: with SMTP id i15mr25219671qkn.128.1630360670039;
Mon, 30 Aug 2021 14:57:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!usenet.pasdenom.info!usenet-fr.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 Aug 2021 14:57:49 -0700 (PDT)
In-Reply-To: <sghpg8$1sh6$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: <sghpg8$1sh6$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <422d05de-b3e5-4051-810d-fc34bb6d61fcn@googlegroups.com>
Subject: Re: ALLOT?
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Mon, 30 Aug 2021 21:57:50 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Hans Bezemer - Mon, 30 Aug 2021 21:57 UTC

On Monday, August 30, 2021 at 7:14:51 AM UTC+2, dxforth wrote:
I agree, these are bad names. I think I'd do something like this:

200 constant #terms
256 constant /chunk
aka chars units

#terms cells assign to xbuf
/chunk chars assign to sbuf

Hans Bezemer

> On 30/08/2021 12:22, Krishna Myneni wrote:
>
> > : allot? ( u -- a ) here swap allot ;
>
> IIRC you've had this forever. I never thought much about it at
> the time. Now a convert, I find uses for it all the time e.g.
>
> $95 constant TLEN \ length of each term definition
> $100 constant CHUNK \ in-file chunk to get
> 20 constant ISIZ \ size input buffer / terminal name
> 200 constant TMAX \ max #terminals
>
> \ Storage areas allocated at run-time
> here value TBUF ( -- a ) \ temp terminal buffer
> here value SBUF ( -- a ) \ swap/work buffer
> here value IBUF ( -- a ) \ console input
> here value XBUF ( -- a ) \ terminal index
>
> : INIT ( -- )
> altered off \ clear
> isiz reserve to ibuf \ console input
> tlen reserve to tbuf \ temp terminal buffer
> chunk reserve to sbuf \ swap/work buffer
> tmax cells reserve to xbuf \ terminal index
> ;

Re: Naming conventions and question mark

<87r1eatuo5.fsf@nightsong.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: Naming conventions and question mark
Date: Mon, 30 Aug 2021 15:49:30 -0700
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <87r1eatuo5.fsf@nightsong.com>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <sgj9qc$9p2$1@dont-email.me>
<f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="8379d577535ca12e1dcab0a14d6fc756";
logging-data="3663"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h88IookPKaGKe+NcZpIqG"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Cancel-Lock: sha1:0BBLB8eK5kEr5rcUTvgUNzpQwAo=
sha1:uN8olFBmYcxOtbY3YFEGKarzuao=
 by: Paul Rubin - Mon, 30 Aug 2021 22:49 UTC

NN <november.nihal@gmail.com> writes:
> Why do we need a new word when BUFFER: exists
> https://forth-standard.org/standard/core/BUFFERColon

Why is that in CORE? CREATE foo 20 ALLOT is what I always used.
ALLOT? is for when you don't want to create a name.

Re: Name for: : xxx ( u -- a ) here swap allot ;

<87mtoytul6.fsf@nightsong.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: Name for: : xxx ( u -- a ) here swap allot ;
Date: Mon, 30 Aug 2021 15:51:17 -0700
Organization: A noiseless patient Spider
Lines: 4
Message-ID: <87mtoytul6.fsf@nightsong.com>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="8379d577535ca12e1dcab0a14d6fc756";
logging-data="3663"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oBcNKL4LHVSHN6MfWrH11"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Cancel-Lock: sha1:AxD60mZfZPN7EP1Lqr8CNCBCrWw=
sha1:2E8aFqCbK7/jEVbZTPlLkCtiBWM=
 by: Paul Rubin - Mon, 30 Aug 2021 22:51 UTC

Ruvim <ruvim.pinka@gmail.com> writes:
> allotted-head ( u -- addr )

How about ALLOT> based on things like R> plopping an address onto the stack.

Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)

<sgjuci$7hb$1@dont-email.me>

  copy mid

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

  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: Naming conventions and greater-than sign (was: Name for: : xxx ( u --
a ) here swap allot ;)
Date: Tue, 31 Aug 2021 03:50:23 +0300
Organization: A noiseless patient Spider
Lines: 70
Message-ID: <sgjuci$7hb$1@dont-email.me>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 31 Aug 2021 00:50:26 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d814967e400bfbe3e812080ea21791b2";
logging-data="7723"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/I/16KmbNO69USK+Z4a6IM"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Cancel-Lock: sha1:7J/A26QyAAqG7FubuT5ct5+VUsY=
In-Reply-To: <87mtoytul6.fsf@nightsong.com>
Content-Language: en-US
 by: Ruvim - Tue, 31 Aug 2021 00:50 UTC

On 2021-08-31 01:51, Paul Rubin wrote:
> Ruvim <ruvim.pinka@gmail.com> writes:
>> allotted-head ( u -- addr )
>
> How about ALLOT> based on things like R> plopping an address onto the stack.
>

In ">r", "r>" (and similar), ">" means moving an item from/to another place.

This case is another one.

Actually, the symbol ">" is used for many meanings.

Among the standard words there are (with some examples):
- the operation "greater-than": ">", "u>", "0>"
- as a part of the pictogram "not-equals": "<>", "0<>"
- an angle parenthesis: "<#" "#>"
- as a graphical alternative to "to":
- moving an item to/from another place (usually a stack):
">r", "n>r", "nr>"
- conversion of a type: "d>s", "d>f"
- extracting details (with flag): "ekey>char", "ekey>fkey"
- extracting details (without flag): "name>string"
- switching to another field: "name>", ">body"
- conversion of a form (representation): ">number", ">float"
- some very strange (if not ugly) variants: "cmove>", "does>", ">in"

It's not a good idea to increase the last group group of very strange
cases, I think. Moreover, this group words can be made deprecated and
replaced.

Some additional comments.

In the case of the words:

name> ( nt -- xt )
>body ( xt -- addr )

they actually imply "xt", i.e. "name>(xt)" and "(xt)>body".

The words ">number", ">float" imply "text", i.e. "text to number
(integer)" and "text to float number". Despite of similar names, their
signatures are not isomorphic.

In "cmove>", the symbol ">" is just a hint for "from higher addresses to
lower addresses", but it's very *confused*. Since ">" can also mean the
normal direction from left to right (and then, from lower to higher
addresses).

In "does>", the symbol ">" looks like a temporary thoughtless solution
(perhaps "in front"), that became permanent.
Taking into account the words ";code" and ":noname", "does>" should be
named as ";:does", e.g.:

: foo create ... ;:does ... ;

">in" is generally a museum exhibit.
I can guess, ">" means "a pointer in", and "in" means "input buffer"
See also: https://forth-standard.org/standard/core/toIN#contribution-110
I would like to find an alternative to this word.

--
Ruvim

Re: Naming conventions and question mark (was: ALLOT?)

<sgk54n$gv4$1@gioia.aioe.org>

  copy mid

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

  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 conventions and question mark (was: ALLOT?)
Date: Tue, 31 Aug 2021 12:45:42 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sgk54n$gv4$1@gioia.aioe.org>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="17380"; 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:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 31 Aug 2021 02:45 UTC

On 31/08/2021 00:11, Ruvim wrote:
>
> "RESERVE" is better, but I don't sure that this name is good enough to
> recommend it for FORTH word list.

What Forth word list - the standard? No. I'm simply drawing
attention to a function I appear to have unwittingly reinvented.

The name RESERVE comes from language XPL0 in which I had some
involvement. Simulating it in forth required HERE SWAP ALLOT
which got tedious.

Regarding naming, how many variations of ALLOT ALLOCATE can a
language stomach? Forth isn't C :) IMO using a different name
breaks the monotony, is actually easier to remember and reads
better.

Re: Naming conventions and question mark (was: ALLOT?)

<sgk6t9$10uo$1@gioia.aioe.org>

  copy mid

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

  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 conventions and question mark (was: ALLOT?)
Date: Tue, 31 Aug 2021 13:15:52 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sgk6t9$10uo$1@gioia.aioe.org>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <sgj9qc$9p2$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="33752"; 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:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 31 Aug 2021 03:15 UTC

On 31/08/2021 04:59, Krishna Myneni wrote:
> On 8/30/21 9:11 AM, Ruvim wrote:
>> On 2021-08-30 15:26, Krishna Myneni wrote:
>>> On 8/30/21 12:14 AM, dxforth wrote:
>>>> On 30/08/2021 12:22, Krishna Myneni wrote:
>>>>
>>>>> : allot?  ( u -- a ) here swap allot ;
>>>>
>>>> IIRC you've had this forever.  I never thought much about it at
>>>> the time.  Now a convert, I find uses for it all the time e.g.
>>>>
>>>
>>> ALLOT? was originally called ?ALLOT in kForth, but that word is
>>> deprecated now in kForth, in favor of ALLOT?, following a suggestion
>>> on word naming by Ruvim. ALLOT? is essential for making use of the
>>> dynamic dictionary model implemented in kForth, which has no HERE.
>>
>> AFAIR, I only criticized the "?ALLOT" name for this word, and I didn't
>> suggest "ALLOT?" as a better variant.
>>
>
> Ok. I may be misremembering. I may have just changed the name to ALLOT?
> after considering your criticism of ?ALLOT to be justified. In any case,
> I'm not willing to tinker with it further. ALLOT? does return something,
> though it is not a flag.
>

?xxx typically meant conditionally do something. So if ?ALLOT first
checked available memory one could argue it was appropriate relative to
ALLOT where it hasn't been a requirement. OTOH the similarity in names
can work against one.

Re: Naming conventions and question mark

<sgk8qg$1j7b$1@gioia.aioe.org>

  copy mid

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

  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 conventions and question mark
Date: Tue, 31 Aug 2021 13:48:31 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sgk8qg$1j7b$1@gioia.aioe.org>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <sgj9qc$9p2$1@dont-email.me>
<f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com>
<87r1eatuo5.fsf@nightsong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="52459"; 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:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 31 Aug 2021 03:48 UTC

On 31/08/2021 08:49, Paul Rubin wrote:
> NN <november.nihal@gmail.com> writes:
>> Why do we need a new word when BUFFER: exists
>> https://forth-standard.org/standard/core/BUFFERColon
>
> Why is that in CORE? CREATE foo 20 ALLOT is what I always used.
> ALLOT? is for when you don't want to create a name.
>

Likely the name of the buffer has been defined but there's reason
to postpone allocation e.g. keep executables small. Simpler than
ALLOCATE.

Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)

<sgke0s$142e$1@gioia.aioe.org>

  copy mid

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

  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 conventions and greater-than sign (was: Name for: : xxx (
u -- a ) here swap allot ;)
Date: Tue, 31 Aug 2021 15:17:17 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sgke0s$142e$1@gioia.aioe.org>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com>
<sgjuci$7hb$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="36942"; 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:78.0) Gecko/20100101
Thunderbird/78.13.0
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Tue, 31 Aug 2021 05:17 UTC

On 31/08/2021 10:50, Ruvim wrote:
>
> In "does>", the symbol ">" looks like a temporary thoughtless solution
> (perhaps "in front"), that became permanent.
> Taking into account the words ";code" and ":noname", "does>" should be
> named as ";:does", e.g.:
>
> : foo create ... ;:does ... ;

Originally it was <BUILDS DOES>

Before that there was ;: though I'm uncertain of the usage. It doesn't
appear to have used CREATE etc which may have been its Achilles' heel and
why abandoned.

Re: Naming conventions and question mark

<2021Aug31.081338@mips.complang.tuwien.ac.at>

  copy mid

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

  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 conventions and question mark
Date: Tue, 31 Aug 2021 06:13:38 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 15
Message-ID: <2021Aug31.081338@mips.complang.tuwien.ac.at>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me> <sgiouu$k89$1@dont-email.me> <sgj9qc$9p2$1@dont-email.me> <f32773f9-10d1-4a4d-a8e4-4767125ed814n@googlegroups.com> <87r1eatuo5.fsf@nightsong.com>
Injection-Info: reader02.eternal-september.org; posting-host="056757c5a972bdddd82a7ebd2afed8f6";
logging-data="25235"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jgqufo+r0BL+lxrjRthLz"
Cancel-Lock: sha1:qsAAX+SCWgkcOtm972f6NbIZkhw=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 31 Aug 2021 06:13 UTC

Paul Rubin <no.email@nospam.invalid> writes:
>NN <november.nihal@gmail.com> writes:
>> https://forth-standard.org/standard/core/BUFFERColon
>
>Why is that in CORE?

It's in CORE EXT (the EXT part is not obvious in general on
Forth-standard.org). Why not?

- 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 conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)

<2021Aug31.091034@mips.complang.tuwien.ac.at>

  copy mid

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

  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 conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)
Date: Tue, 31 Aug 2021 07:10:34 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 57
Message-ID: <2021Aug31.091034@mips.complang.tuwien.ac.at>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me> <sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk> <sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com> <sgjuci$7hb$1@dont-email.me>
Injection-Info: reader02.eternal-september.org; posting-host="056757c5a972bdddd82a7ebd2afed8f6";
logging-data="26528"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Mlwo5lpl7gr1NyYgx1eoD"
Cancel-Lock: sha1:131hXP95oWpO+nnX0Z2lwepBvU0=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Tue, 31 Aug 2021 07:10 UTC

Ruvim <ruvim.pinka@gmail.com> writes:
>In "cmove>", the symbol ">" is just a hint for "from higher addresses to
>lower addresses", but it's very *confused*. Since ">" can also mean the
>normal direction from left to right (and then, from lower to higher
>addresses).

Note the pronounciation: "c-move-up". It means: cmove the memory
block from lower to higher addresses; i.e., the name describes the
usage (what), not the how. The how is overspecified for the
application, though. Fortunately, we have MOVE now, making both CMOVE
and CMOVE> unnecessary.

>In "does>", the symbol ">" looks like a temporary thoughtless solution
>(perhaps "in front"), that became permanent.

The idea that I have read was that you would write the defining word
like:

: const <builds , does> @ ;

So <BUILDS points to the name of the new defining word, while DOES>
points to the code executed when the defined word runs.

One can also see the < and > as angle brackets including the code
performed at defining time.

Of course, later <BUILDS was replaced by CREATE, leaving DOES> without
counterpart.

Still, people have used > to end other return-address-using words;
e.g., Stepen Pelc found the following code in the wild
<4ffffe5e.117344919@192.168.0.50> (AFAIK Bernd Paysan used to use such
words):

\ VFX-specific
: list> ( thread -- element )
BEGIN @ dup WHILE dup r@ execute
REPEAT drop r> drop ;

which is used like

: foo bar list> bla blub ;

A list is passed to LIST>, which then executes the "bla blub" part
repeatedly, once for every list element. A more modern (and more
flexible and soon-standard) approach is to put "bla blub" inside a
quotation and call that with EXECUTE for each list element.

So > at the end of the word has become a general indication that the
rest of the word is treated as separate definition.

- 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 conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)

<sgl70d$l9l$1@gioia.aioe.org>

  copy mid

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

  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 conventions and greater-than sign (was: Name for: : xxx (
u -- a ) here swap allot ;)
Date: Tue, 31 Aug 2021 22:23:39 +1000
Organization: Aioe.org NNTP Server
Message-ID: <sgl70d$l9l$1@gioia.aioe.org>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com>
<sgjuci$7hb$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="21813"; 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:78.0) Gecko/20100101
Thunderbird/78.13.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Tue, 31 Aug 2021 12:23 UTC

Here's a listing of the naming conventions published in 'Thinking
Forth' and 'Forth Programmers Handbook':

https://pastebin.com/qpZLFc6h

As to the difference between:

!name Store into name !DATA

name! Store into name B!

I was informed it likely stemmed from when forth names were stored
as count-plus-three characters.

Re: Naming conventions and greater-than sign

<sgl7dk$6q5$1@dont-email.me>

  copy mid

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

  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 conventions and greater-than sign
Date: Tue, 31 Aug 2021 15:30:42 +0300
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <sgl7dk$6q5$1@dont-email.me>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com>
<sgjuci$7hb$1@dont-email.me> <2021Aug31.091034@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 31 Aug 2021 12:30:44 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="d814967e400bfbe3e812080ea21791b2";
logging-data="6981"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18paN8Jt4X4KPBC8pS2tEHy"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
Cancel-Lock: sha1:X3FLqX7AkcFU1P4EvMDwMJ6H8aM=
In-Reply-To: <2021Aug31.091034@mips.complang.tuwien.ac.at>
Content-Language: en-US
X-Mozilla-News-Host: news://nntp.aioe.org
 by: Ruvim - Tue, 31 Aug 2021 12:30 UTC

On 2021-08-31 10:10, Anton Ertl wrote:
> Ruvim <ruvim.pinka@gmail.com> writes:
>> In "cmove>", the symbol ">" is just a hint for "from higher addresses to
>> lower addresses", but it's very *confused*. Since ">" can also mean the
>> normal direction from left to right (and then, from lower to higher
>> addresses).
>
> Note the pronounciation: "c-move-up". It means: cmove the memory
> block from lower to higher addresses; i.e., the name describes the
> usage (what), not the how.
[...]

It's unconvincing. It seems to me that "from lower to higher addresses"
is about "how".

Also, there is a word "cmove" with pronunciation "c-move", without "up",
that actually moves "from lower to higher addresses".

In anyway, the intention was that ">" is pronounced as "up" in this
case. Perhaps, it means "move to upper addresses"?

Well, it just a lesson that for new names their etymology should be
written in their rationale.

An interesting thing that in Forth-79 this word had the name "<CMOVE"
with the pronunciation "reverse-c-move".

https://www.complang.tuwien.ac.at/forth/fth79std/FORTH-79.TXT

>> In "does>", the symbol ">" looks like a temporary thoughtless solution
>> (perhaps "in front"), that became permanent.
>
> The idea that I have read was that you would write the defining word
> like:
>
> : const <builds , does> @ ;

In Forth-79 the both ways already were available — via "<builds" (like
above), and via "create":

: const create , does> @ ;

What was a different is unclear.

"<builds" was a compile-only word (attribute "C"), but not an immediate
word (no attribute "I").

> So <BUILDS points to the name of the new defining word, while DOES>
> points to the code executed when the defined word runs.

I don't see how "<" in "<BUILDS" says that this word points to the name
of the new definition.

The meaning of "<" and ">" in these names is *not obvious*, we should admit.

> One can also see the < and > as angle brackets including the code
> performed at defining time.

It's far from obvious too. E.g. compare to "<# #>" where they are
really just angle brackets.

> Of course, later <BUILDS was replaced by CREATE, leaving DOES> without
> counterpart.
>
> Still, people have used > to end other return-address-using words;
> e.g., Stepen Pelc found the following code in the wild
> <4ffffe5e.117344919@192.168.0.50> (AFAIK Bernd Paysan used to use such
> words):
>
> \ VFX-specific
> : list> ( thread -- element )
> BEGIN @ dup WHILE dup r@ execute
> REPEAT drop r> drop ;
>
> which is used like
>
> : foo bar list> bla blub ;
>
> A list is passed to LIST>, which then executes the "bla blub" part
> repeatedly, once for every list element.

In the context of BacFORTH, some people (including me) used for that an
arrow-like pictogram "=>", so the code looked as:

: foo bar list=> bluh blub ;

In BacForth it can be also nested, e.g:

: foo bar list=> bluh buz list=> blub ;

I.e., for each element of the "bar" list it also iterates the "buz" list.

[...]

> So > at the end of the word has become a general indication that the
> rest of the word is treated as separate definition.

I would not encourage such usage of ">", and would suggest something
more contrast like "==>" instead (if any).

--
Ruvim

Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)

<sglakl$29g$1@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a544-865-0-8187-9a09-9c5d-a0ca.ipv6dyn.netcologne.de!not-for-mail
From: bl1-remo...@gmx.com (Bernd Linsel)
Newsgroups: comp.lang.forth
Subject: Re: Naming conventions and greater-than sign (was: Name for: : xxx (
u -- a ) here swap allot ;)
Date: Tue, 31 Aug 2021 15:25:41 +0200
Organization: news.netcologne.de
Distribution: world
Message-ID: <sglakl$29g$1@newsreader4.netcologne.de>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com>
<sgjuci$7hb$1@dont-email.me> <2021Aug31.091034@mips.complang.tuwien.ac.at>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 31 Aug 2021 13:25:41 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a544-865-0-8187-9a09-9c5d-a0ca.ipv6dyn.netcologne.de:2a0a:a544:865:0:8187:9a09:9c5d:a0ca";
logging-data="2352"; mail-complaints-to="abuse@netcologne.de"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <2021Aug31.091034@mips.complang.tuwien.ac.at>
 by: Bernd Linsel - Tue, 31 Aug 2021 13:25 UTC

On 31.08.2021 09:10, Anton Ertl wrote:
> Ruvim <ruvim.pinka@gmail.com> writes:
>
> Note the pronounciation: "c-move-up". It means: cmove the memory
> block from lower to higher addresses; i.e., the name describes the
> usage (what), not the how. The how is overspecified for the
> application, though. Fortunately, we have MOVE now, making both CMOVE
> and CMOVE> unnecessary.
>

And, unfortunately, introducing a run-time decision for the rare case
that source and destination memory areas overlap.

One strength of Forth (and one "10x" of C. Moore's "1000x") is the
ability to do at editing time what can be done at editing time, i.e. if
you know that source and destination do not overlap (or if dest overlaps
the lower source), you use the simpler CMOVE, if dest overlaps upper
part of source, use the equally simple (but cache-unfriendly) CMOVE>.

Still better, alignment would have to be taken into account, in order to
move word-sized (or SIMD-packet-sized) quantities if appropriate.
Admittedly, this would lead to an explosion of similar words, each for
itself with very limited use.

C and Fortran compilers invest a considerable amount into analysis of
moving/copying objects at compile time, and are often, but not always,
able to produce decently performing code. Still, in C the programmer is
bound to provide information, whether he/she intends to avoid trashing
of the source area (by either calling memcpy or memmove). In C,
assignments of potentially aliased pointer targets not specified as
'restrict' have to be compiled analogous to memmove, whereas in Fortran
aliasing is explicitly forbidden.

[snip]

B.

Re: Naming conventions and greater-than sign (was: Name for: : xxx ( u -- a ) here swap allot ;)

<sglbc7$29g$2@newsreader4.netcologne.de>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!.POSTED.2a0a-a544-865-0-8187-9a09-9c5d-a0ca.ipv6dyn.netcologne.de!not-for-mail
From: bl1-remo...@gmx.com (Bernd Linsel)
Newsgroups: comp.lang.forth
Subject: Re: Naming conventions and greater-than sign (was: Name for: : xxx (
u -- a ) here swap allot ;)
Date: Tue, 31 Aug 2021 15:38:15 +0200
Organization: news.netcologne.de
Distribution: world
Message-ID: <sglbc7$29g$2@newsreader4.netcologne.de>
References: <sghpg8$1sh6$1@gioia.aioe.org> <sgiipl$bbc$1@dont-email.me>
<sgiouu$k89$1@dont-email.me> <612d0520$0$705$14726298@news.sunsite.dk>
<sgj7q8$t36$1@dont-email.me> <87mtoytul6.fsf@nightsong.com>
<sgjuci$7hb$1@dont-email.me> <sgl70d$l9l$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
Injection-Date: Tue, 31 Aug 2021 13:38:15 -0000 (UTC)
Injection-Info: newsreader4.netcologne.de; posting-host="2a0a-a544-865-0-8187-9a09-9c5d-a0ca.ipv6dyn.netcologne.de:2a0a:a544:865:0:8187:9a09:9c5d:a0ca";
logging-data="2352"; mail-complaints-to="abuse@netcologne.de"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <sgl70d$l9l$1@gioia.aioe.org>
 by: Bernd Linsel - Tue, 31 Aug 2021 13:38 UTC

On 31.08.2021 14:23, dxforth wrote:
> Here's a listing of the naming conventions published in 'Thinking
> Forth' and 'Forth Programmers Handbook':
>
> https://pastebin.com/qpZLFc6h
>
> As to the difference between:
>
>   !name     Store into name                           !DATA
>
>   name!     Store into name                           B!
>
> I was informed it likely stemmed from when forth names were stored
> as count-plus-three characters.

There are some examples for the difference between those two:

C! ( c-addr c -- ) store a character into address
!R ( x -- ) store x into address on return stack

Or, in Machine Forth (~1997):
!A/@A store to/load from address in A register
A copy A to TOS
A! pop TOS into A register

--
B.

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor