Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Have you reconsidered a computer career?


devel / comp.lang.forth / Re: push for memory safe languages -- impact on Forth

SubjectAuthor
* push for memory safe languages -- impact on ForthKrishna Myneni
+* Re: push for memory safe languages -- impact on Forthmhx
|+- Re: push for memory safe languages -- impact on ForthKrishna Myneni
|+* Re: push for memory safe languages -- impact on ForthAnton Ertl
||`* Re: push for memory safe languages -- impact on ForthTristan Wibberley
|| +* Re: push for memory safe languages -- impact on ForthAnton Ertl
|| |`* Re: push for memory safe languages -- impact on ForthTristan Wibberley
|| | `* Re: push for memory safe languages -- impact on Forthminforth
|| |  `* Re: push for memory safe languages -- impact on ForthTristan Wibberley
|| |   `- Re: push for memory safe languages -- impact on Forthminforth
|| +- Re: push for memory safe languages -- impact on ForthHans Bezemer
|| `* Re: push for memory safe languages -- impact on ForthHans Bezemer
||  +- Re: push for memory safe languages -- impact on Forthminforth
||  `- Re: push for memory safe languages -- impact on ForthPaul Rubin
|`- Re: push for memory safe languages -- impact on Forthdxf
+* Re: push for memory safe languages -- impact on Forthminforth
|`* Re: push for memory safe languages -- impact on ForthKrishna Myneni
| `- Re: push for memory safe languages -- impact on Forthminforth
+* Re: push for memory safe languages -- impact on ForthAnton Ertl
|+* Re: push for memory safe languages -- impact on ForthPaul Rubin
||+- Re: push for memory safe languages -- impact on ForthKrishna Myneni
||`* Re: push for memory safe languages -- impact on Forthdxf
|| +* Re: push for memory safe languages -- impact on Forthalbert
|| |`- Re: push for memory safe languages -- impact on Forthdxf
|| +* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| |`* Re: push for memory safe languages -- impact on Forthminforth
|| | +* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |`* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | | `* Re: push for memory safe languages -- impact on ForthAnton Ertl
|| | |  +* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |  |`- Re: push for memory safe languages -- impact on ForthAnton Ertl
|| | |  `* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |   `* Re: push for memory safe languages -- impact on ForthAnton Ertl
|| | |    +* Re: push for memory safe languages -- impact on Forthminforth
|| | |    |+* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |    ||`* Re: push for memory safe languages -- impact on Forthminforth
|| | |    || `* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |    ||  `* Re: push for memory safe languages -- impact on Forthminforth
|| | |    ||   +* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |    ||   |`- Re: push for memory safe languages -- impact on Forthminforth
|| | |    ||   `- Re: push for memory safe languages -- impact on ForthPaul Rubin
|| | |    |+* Re: push for memory safe languages -- impact on ForthAnton Ertl
|| | |    ||`- Re: push for memory safe languages -- impact on Forthminforth
|| | |    |`* Re: push for memory safe languages -- impact on ForthPaul Rubin
|| | |    | `* Re: push for memory safe languages -- impact on Forthminforth
|| | |    |  `- Re: push for memory safe languages -- impact on ForthPaul Rubin
|| | |    `* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|| | |     `- Re: push for memory safe languages -- impact on ForthAnton Ertl
|| | +- Re: push for memory safe languages -- impact on ForthAnton Ertl
|| | `* Re: push for memory safe languages -- impact on Forthdxf
|| |  `- Re: push for memory safe languages -- impact on Forthminforth
|| `* Re: push for memory safe languages -- impact on ForthPaul Rubin
||  +* Re: push for memory safe languages -- impact on Forthminforth
||  |+- Re: push for memory safe languages -- impact on ForthAnton Ertl
||  |`- Re: push for memory safe languages -- impact on ForthKrishna Myneni
||  `- Re: push for memory safe languages -- impact on ForthAnton Ertl
|`- Re: push for memory safe languages -- impact on ForthKrishna Myneni
+* Re: push for memory safe languages -- impact on ForthKrishna Myneni
|+* Re: push for memory safe languages -- impact on ForthAnton Ertl
||+* Re: push for memory safe languages -- impact on ForthAnton Ertl
|||`- Re: push for memory safe languages -- impact on ForthKrishna Myneni
||`- Re: push for memory safe languages -- impact on Forthalbert
|`- Re: push for memory safe languages -- impact on ForthKrishna Myneni
+- Re: push for memory safe languages -- impact on Forthalbert
`* Re: push for memory safe languages -- impact on ForthRon AARON
 `* Re: push for memory safe languages -- impact on Forthdxf
  +* Re: push for memory safe languages -- impact on ForthRon AARON
  |`* Re: push for memory safe languages -- impact on Forthminforth
  | `- Re: push for memory safe languages -- impact on ForthRon AARON
  +* Re: push for memory safe languages -- impact on ForthAnton Ertl
  |`* Re: push for memory safe languages -- impact on Forthdxf
  | `* Re: push for memory safe languages -- impact on ForthPaul Rubin
  |  `* Re: push for memory safe languages -- impact on Forthdxf
  |   `* Re: push for memory safe languages -- impact on ForthPaul Rubin
  |    `* Re: push for memory safe languages -- impact on Forthdxf
  |     `* Re: push for memory safe languages -- impact on ForthPaul Rubin
  |      `* Re: push for memory safe languages -- impact on Forthdxf
  |       `* Re: push for memory safe languages -- impact on Forthminforth
  |        `* Re: push for memory safe languages -- impact on Forthdxf
  |         `* Re: push for memory safe languages -- impact on Forthminforth
  |          `* Re: push for memory safe languages -- impact on Forthdxf
  |           `* Re: push for memory safe languages -- impact on ForthPaul Rubin
  |            +- Re: push for memory safe languages -- impact on ForthRon AARON
  |            +- Re: push for memory safe languages -- impact on Forthdxf
  |            +- Re: push for memory safe languages -- impact on ForthHans Bezemer
  |            `* Re: push for memory safe languages -- impact on ForthAnton Ertl
  |             +* Re: push for memory safe languages -- impact on Forthminforth
  |             |`- Re: push for memory safe languages -- impact on ForthAnton Ertl
  |             +* Re: push for memory safe languages -- impact on ForthSpiros Bousbouras
  |             |`- Re: push for memory safe languages -- impact on ForthAnton Ertl
  |             `* Re: push for memory safe languages -- impact on ForthPaul Rubin
  |              +- Re: push for memory safe languages -- impact on Forthminforth
  |              +* Re: push for memory safe languages -- impact on ForthAnton Ertl
  |              |+* Re: push for memory safe languages -- impact on ForthPaul Rubin
  |              ||+* Re: push for memory safe languages -- impact on ForthHans Bezemer
  |              |||+- Re: push for memory safe languages -- impact on ForthPaul Rubin
  |              |||`* Re: push for memory safe languages -- impact on Forthdxf
  |              ||| +- Re: push for memory safe languages -- impact on Forthdxf
  |              ||| `* Re: push for memory safe languages -- impact on ForthHans Bezemer
  |              |||  +- Re: push for memory safe languages -- impact on Forthdxf
  |              |||  `* Re: push for memory safe languages -- impact on ForthAnton Ertl
  |              ||`* Re: push for memory safe languages -- impact on ForthAnton Ertl
  |              |`* Re: push for memory safe languages -- impact on Forthalbert
  |              `- Re: push for memory safe languages -- impact on Forthdxf
  `- Re: push for memory safe languages -- impact on ForthPaul Rubin

Pages:123456
Re: push for memory safe languages -- impact on Forth

<7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Fri, 15 Mar 2024 09:26:11 +0000
Organization: novaBBS
Message-ID: <7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>
References: <urstns$1ab0f$1@dont-email.me> <2024Mar11.220843@mips.complang.tuwien.ac.at> <nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com> <nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2053459"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
X-Rslight-Site: $2y$10$oP32nnIUBcEAhJp3sIJQwuru220WPc0ILoocQESp1WDgUYiUnrdlS
 by: minforth - Fri, 15 Mar 2024 09:26 UTC

Paul Rubin wrote:

> albert@spenarnc.xs4all.nl writes:
>> Algol68 doesn't crash. It gives a run time error of the type

> Well that's what I mean by crashing. The program is terminated
> "involuntarily", or alternatively there is some way to catch the exception.
> Either way, the computation doesn't proceed.

>> You can't get much help from the compiler for uninitialised references
>> like this. Either it crashes in the first run or it is insidious.

> No idea about Algol68 but in (at least some) other languages, the idea
> of having references instead of pointers is that it is impossible to
> create an uninitialised reference.

In Forth parlance: unless you're doing system programming where you need it,
don't use direct memory operations like @ ! MOVE, etc. This also prohibits
the use of VARIABLE. VARIABLES are uninitialized and are accessed by @ !.

So I regularly use either xVALUEs (x means different data types) or data
objects (for compound or dynamic types) with access methods. This results
in cleaner code and improves memory safety.

Re: push for memory safe languages -- impact on Forth

<87cyrvz6gs.fsf@nightsong.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no.email@nospam.invalid (Paul Rubin)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Fri, 15 Mar 2024 11:37:55 -0700
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <87cyrvz6gs.fsf@nightsong.com>
References: <urstns$1ab0f$1@dont-email.me>
<2024Mar11.220843@mips.complang.tuwien.ac.at>
<nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc>
<87bk7h1v5v.fsf@nightsong.com>
<nnd$35c79494$6dceb2e2@7f11b53ce81fb98a>
<87y1akzdjo.fsf@nightsong.com>
<7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="1c4c328df770804111002d845ef94b32";
logging-data="2545473"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jWKtd3FcmGQPsBtdfZwTr"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:sfxmdC3aCirtmpnDmj4wT7isxB8=
sha1:vGdYJ+7jDn2C9Gy/TLeMsJ71h4o=
 by: Paul Rubin - Fri, 15 Mar 2024 18:37 UTC

minforth@gmx.net (minforth) writes:
> In Forth parlance: unless you're doing system programming where you
> need it, don't use direct memory operations like @ ! MOVE, etc. This
> also prohibits the use of VARIABLE. VARIABLES are uninitialized and
> are accessed by @ !.

That helps but I'm sure there are other hazards. What do you do about
arrays? What about ALLOT or ALLOCATE?

At least in gforth, VARIABLEs are initialized to 0. That seems like a
good thing for implementations to do ingeneral.

> So I regularly use either xVALUEs (x means different data types) or data
> objects (for compound or dynamic types) with access methods. This results
> in cleaner code and improves memory safety.

Yes I should start doing that too. I only mess with Forth for fun
though. I feel like it helps me stay sharp compared with safer
languages, even including C. I'm not old enough to have written
significant amounts of machine code.

Re: push for memory safe languages -- impact on Forth

<59abde4d316a949d20618c278438c548@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Fri, 15 Mar 2024 19:55:07 +0000
Organization: novaBBS
Message-ID: <59abde4d316a949d20618c278438c548@www.novabbs.com>
References: <urstns$1ab0f$1@dont-email.me> <2024Mar11.220843@mips.complang.tuwien.ac.at> <nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com> <nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com> <7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com> <87cyrvz6gs.fsf@nightsong.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2107732"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$363jgqjQCd59.QpVtZAqVOprB7Q5Lz45H7q1XGR.PrkPvdzxLa.f2
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
 by: minforth - Fri, 15 Mar 2024 19:55 UTC

Paul Rubin wrote:

> minforth@gmx.net (minforth) writes:
>> In Forth parlance: unless you're doing system programming where you
>> need it, don't use direct memory operations like @ ! MOVE, etc. This
>> also prohibits the use of VARIABLE. VARIABLES are uninitialized and
>> are accessed by @ !.

> That helps but I'm sure there are other hazards. What do you do about
> arrays?

Arrays are heap-allocated dynamic objects with access methods. Direct memory
access is virtually impossible (but with "carnal knowledge"). There
is an array stack for more complex operations and a chain of array values
for persistent storage. Stack and array values contain only pointers.

F.ex.
XZ14[ designates array (matrix or vector) value XZ14
<index or indices> ] reads a vector/matrix element
<index or indices> ]! writes to a vector/matrix element
M"[ 2 1 ] from 3rd array on array stack read 1st element in 2nd row
(M[ M'[ M"[ designate top, second and third matrix on array stack)
XZ14[ ]' pushes transposed matrix XZ14 onto array stack
=> XZ14 (or TO XZ14) writes top matrix to array value XZ14
et cetera

IOW there is a special word set for array operations. Operators check
that there is no memory violation like index out of bounds, and do some
housekeeping like (re)allocating memory.

> What about ALLOT or ALLOCATE?

Above word set would be overkill for normal Forth applications.
Nevertheless you could SEAL your search order and exclude or make
safer versions of ALLOT et al for your application wordlist.
I never understood why SEAL did not make it into ANS Forth's
Search-Order word set, as it is just a simple SET-ORDER thing.

> At least in gforth, VARIABLEs are initialized to 0. That seems like a
> good thing for implementations to do in general.

Yes and no. It is easy to forget correct initialization when 0 is wrong.
VALUEs explicitly require conscious initialization.

Re: push for memory safe languages -- impact on Forth

<65f4ea68$1@news.ausics.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Date: Sat, 16 Mar 2024 11:40:09 +1100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: push for memory safe languages -- impact on Forth
Newsgroups: comp.lang.forth
References: <urstns$1ab0f$1@dont-email.me>
<2024Mar11.220843@mips.complang.tuwien.ac.at>
<nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com>
<nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com>
<7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>
<87cyrvz6gs.fsf@nightsong.com>
Content-Language: en-GB
From: dxforth@gmail.com (dxf)
In-Reply-To: <87cyrvz6gs.fsf@nightsong.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <65f4ea68$1@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 50
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: dxf - Sat, 16 Mar 2024 00:40 UTC

On 16/03/2024 5:37 am, Paul Rubin wrote:
> minforth@gmx.net (minforth) writes:
>> In Forth parlance: unless you're doing system programming where you
>> need it, don't use direct memory operations like @ ! MOVE, etc. This
>> also prohibits the use of VARIABLE. VARIABLES are uninitialized and
>> are accessed by @ !.
>
> That helps but I'm sure there are other hazards. What do you do about
> arrays? What about ALLOT or ALLOCATE?
>
> At least in gforth, VARIABLEs are initialized to 0. That seems like a
> good thing for implementations to do ingeneral.
>
>> So I regularly use either xVALUEs (x means different data types) or data
>> objects (for compound or dynamic types) with access methods. This results
>> in cleaner code and improves memory safety.
>
> Yes I should start doing that too. I only mess with Forth for fun
> though. I feel like it helps me stay sharp compared with safer
> languages, even including C. I'm not old enough to have written
> significant amounts of machine code.

In early forths (microFORTH, figFORTH) one was required to supply an
initial value:

0 VARIABLE name

Nowadays one can write:

VARIABLE name 0 name !

or as I do:

\ Set application defaults
: DEFAULTS ( -- )
0 to outdev shaping off spacing off
train on koch off
plain-text punct off compress on ignore off
7 send.s ! 15 char.s ! 3 cspace ! 7 wspace !
700 tone ! 7 volume ! sqr1wave
6 groupcols ! 4 grouprows ! 3 groupsize !
lsignal off 0 to hide ;

defaults

With one word I initialize everything in the application that deserves it.
That leaves VALUEs which are needlessly initialized twice. If it was
deemed poor practice to initialize VARIABLEs at creation, the same applies
to VALUEs.

Re: push for memory safe languages -- impact on Forth

<65f52ae5$1@news.ausics.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Date: Sat, 16 Mar 2024 16:15:17 +1100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: push for memory safe languages -- impact on Forth
Newsgroups: comp.lang.forth
References: <urstns$1ab0f$1@dont-email.me>
<2024Mar11.220843@mips.complang.tuwien.ac.at>
<nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com>
<nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com>
<7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>
<87cyrvz6gs.fsf@nightsong.com>
Content-Language: en-GB
From: dxforth@gmail.com (dxf)
In-Reply-To: <87cyrvz6gs.fsf@nightsong.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <65f52ae5$1@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 17
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: dxf - Sat, 16 Mar 2024 05:15 UTC

On 16/03/2024 5:37 am, Paul Rubin wrote:
> minforth@gmx.net (minforth) writes:
>> In Forth parlance: unless you're doing system programming where you
>> need it, don't use direct memory operations like @ ! MOVE, etc. This
>> also prohibits the use of VARIABLE. VARIABLES are uninitialized and
>> are accessed by @ !.
>
> That helps but I'm sure there are other hazards. What do you do about
> arrays? What about ALLOT or ALLOCATE?
>
> At least in gforth, VARIABLEs are initialized to 0. That seems like a
> good thing for implementations to do ingeneral.

That's something I'd do for VALUEs should I move to omit the numeric
prefix at creation. By automatically initializing VALUEs with 0, I can
pretend - if only to myself - that VALUEs are different from VARIABLEs.

Re: push for memory safe languages -- impact on Forth

<a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Sat, 16 Mar 2024 09:35:13 +0000
Organization: novaBBS
Message-ID: <a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com>
References: <urstns$1ab0f$1@dont-email.me> <2024Mar11.220843@mips.complang.tuwien.ac.at> <nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com> <nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com> <7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com> <87cyrvz6gs.fsf@nightsong.com> <65f52ae5$1@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2167869"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$/j1BNOckg7ZjMlZ8bD4EuOTFDgN9E8284Bx8tx4H.KBuFiw9rXrKy
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
 by: minforth - Sat, 16 Mar 2024 09:35 UTC

dxf wrote:
>> At least in gforth, VARIABLEs are initialized to 0. That seems like a
>> good thing for implementations to do ingeneral.

> That's something I'd do for VALUEs should I move to omit the numeric
> prefix at creation. By automatically initializing VALUEs with 0, I can
> pretend - if only to myself - that VALUEs are different from VARIABLEs.

Indeed, if you only work with integers in cell size, VARIABLEs and some
code discipline are sufficient.

VALUEs are like variants in VBA. You can only change them with TO <NAME>,
and TO (alias =>) is the same for all data types. The standard also writes
locals and FVALUEs with TO. Non-standard $VALUEs (for dynamic strings) or
DVALUEs/ZVALUEs can be very practical too. I also use range-limited VALUEs.
None of this works with VARIABLEs.

When you implement your type-specific TO variants with built-in
appropriate checking, you are on the safer side.

Re: push for memory safe languages -- impact on Forth

<2024Mar16.112016@mips.complang.tuwien.ac.at>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Sat, 16 Mar 2024 10:20:16 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 12
Message-ID: <2024Mar16.112016@mips.complang.tuwien.ac.at>
References: <urstns$1ab0f$1@dont-email.me> <2024Mar11.220843@mips.complang.tuwien.ac.at> <nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com> <nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com> <7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com> <87cyrvz6gs.fsf@nightsong.com> <65f52ae5$1@news.ausics.net> <a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com>
Injection-Info: dont-email.me; posting-host="1e4546c9436f3adc0dc2c02d4b8e0763";
logging-data="2998007"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KwXl+vjIyv7AaYRaW87J7"
Cancel-Lock: sha1:yepCWl08mMbKjRj79wt7jY0xEcQ=
X-newsreader: xrn 10.11
 by: Anton Ertl - Sat, 16 Mar 2024 10:20 UTC

minforth@gmx.net (minforth) writes:
>Non-standard $VALUEs (for dynamic strings) or
>DVALUEs/ZVALUEs can be very practical too.

2VALUE is standard.

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

Re: push for memory safe languages -- impact on Forth

<0784f80ced27758510514fc7c404055f@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Sat, 16 Mar 2024 11:13:07 +0000
Organization: novaBBS
Message-ID: <0784f80ced27758510514fc7c404055f@www.novabbs.com>
References: <urstns$1ab0f$1@dont-email.me> <2024Mar11.220843@mips.complang.tuwien.ac.at> <nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com> <nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com> <7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com> <87cyrvz6gs.fsf@nightsong.com> <65f52ae5$1@news.ausics.net> <a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com> <2024Mar16.112016@mips.complang.tuwien.ac.at>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2175994"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$fVc1DmY3eJSig3wdllwF2.bzwQoRTL/vlAKc898wbqHBLZ66o3dmO
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: minforth - Sat, 16 Mar 2024 11:13 UTC

Anton Ertl wrote:

> minforth@gmx.net (minforth) writes:
>>Non-standard $VALUEs (for dynamic strings) or
>>DVALUEs/ZVALUEs can be very practical too.

> 2VALUE is standard.

2VALUEs are for cell pairs. DVALUEs do not exist, because
the standard assumes equivalency of double numbers and cell
pairs (although mathematically they are not).
ZVALUEs are for complex numbers.

Re: push for memory safe languages -- impact on Forth

<65f641b5$1@news.ausics.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Date: Sun, 17 Mar 2024 12:04:54 +1100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: push for memory safe languages -- impact on Forth
Newsgroups: comp.lang.forth
References: <urstns$1ab0f$1@dont-email.me>
<2024Mar11.220843@mips.complang.tuwien.ac.at>
<nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com>
<nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com>
<7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>
<87cyrvz6gs.fsf@nightsong.com> <65f52ae5$1@news.ausics.net>
<a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com>
Content-Language: en-GB
From: dxforth@gmail.com (dxf)
In-Reply-To: <a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <65f641b5$1@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 34
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: dxf - Sun, 17 Mar 2024 01:04 UTC

On 16/03/2024 8:35 pm, minforth wrote:
> dxf wrote:
>>> At least in gforth, VARIABLEs are initialized to 0.  That seems like a
>>> good thing for implementations to do ingeneral.
>
>> That's something I'd do for VALUEs should I move to omit the numeric
>> prefix at creation.  By automatically initializing VALUEs with 0, I can
>> pretend - if only to myself - that VALUEs are different from VARIABLEs.
>
> Indeed, if you only work with integers in cell size, VARIABLEs and some
> code discipline are sufficient.
>
> VALUEs are like variants in VBA. You can only change them with TO <NAME>,
> and TO (alias =>) is the same for all data types. The standard also writes
> locals and FVALUEs with TO. Non-standard $VALUEs (for dynamic strings) or
> DVALUEs/ZVALUEs can be very practical too. I also use range-limited VALUEs.
> None of this works with VARIABLEs.
>
> When you implement your type-specific TO variants with built-in
> appropriate checking, you are on the safer side.

If safety is where one wants to be, there are surely better choices than
Forth. For myself, I'd have to agree with Paul:

"I only mess with Forth for fun though. I feel like it helps me stay
sharp compared with safer languages, even including C."

But VALUEs in Forth had little to do with safety. Its history, form,
issues and attempted solutions is summarized here:

https://pastebin.com/p5P5EVTm

(ref: "svars.arc" Taygeta Forth archive)

Re: push for memory safe languages -- impact on Forth

<5bf071b3170f04b4b79b0298b673c13b@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Sun, 17 Mar 2024 07:30:07 +0000
Organization: novaBBS
Message-ID: <5bf071b3170f04b4b79b0298b673c13b@www.novabbs.com>
References: <urstns$1ab0f$1@dont-email.me> <2024Mar11.220843@mips.complang.tuwien.ac.at> <nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com> <nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com> <7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com> <87cyrvz6gs.fsf@nightsong.com> <65f52ae5$1@news.ausics.net> <a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com> <65f641b5$1@news.ausics.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2271478"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: 59549e76d0c3560fb37b97f0b9407a8c14054f24
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$BAYXgvYYJY/HiVUkBHoN4u5swPKpMoIdehrWB0U7OeUnnjMaPOmnG
 by: mhx - Sun, 17 Mar 2024 07:30 UTC

Interesting. I didn't know that the TO concept was coined by Moore (before Bartholdi).

-marcel

Re: push for memory safe languages -- impact on Forth

<65f7851e$1@news.ausics.net>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Date: Mon, 18 Mar 2024 11:04:46 +1100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: push for memory safe languages -- impact on Forth
Newsgroups: comp.lang.forth
References: <urstns$1ab0f$1@dont-email.me>
<2024Mar11.220843@mips.complang.tuwien.ac.at>
<nnd$5a3ecb22$041cbaf8@5a8b707a958e0dcc> <87bk7h1v5v.fsf@nightsong.com>
<nnd$35c79494$6dceb2e2@7f11b53ce81fb98a> <87y1akzdjo.fsf@nightsong.com>
<7d00b044fa4aff8501f1abb634ba6314@www.novabbs.com>
<87cyrvz6gs.fsf@nightsong.com> <65f52ae5$1@news.ausics.net>
<a91539aaf2383b9944763b2a5c3a2d37@www.novabbs.com>
<65f641b5$1@news.ausics.net>
<5bf071b3170f04b4b79b0298b673c13b@www.novabbs.com>
Content-Language: en-GB
From: dxforth@gmail.com (dxf)
In-Reply-To: <5bf071b3170f04b4b79b0298b673c13b@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: news.ausics.net
Message-ID: <65f7851e$1@news.ausics.net>
Organization: Ausics - https://newsgroups.ausics.net
Lines: 8
X-Complaints: abuse@ausics.net
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.ausics.net!not-for-mail
 by: dxf - Mon, 18 Mar 2024 00:04 UTC

On 17/03/2024 6:30 pm, mhx wrote:
> Interesting. I didn't know that the TO concept was coined by Moore (before Bartholdi).
>
> -marcel

A momentary lapse by Moore? TO was an abstraction. 'Under the hood' it was still
addresses, @ and ! .

Re: push for memory safe languages -- impact on Forth

<utcqnh$10qa3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tristan.wibberley+netnews2@alumni.manchester.ac.uk (Tristan Wibberley)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Tue, 19 Mar 2024 19:57:35 +0000
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <utcqnh$10qa3$1@dont-email.me>
References: <urstns$1ab0f$1@dont-email.me>
<e1cac13ebb948a9996bf46a968874d71@www.novabbs.com>
<2024Mar1.190210@mips.complang.tuwien.ac.at> <us5k0q$3crfd$1@dont-email.me>
<2024Mar5.073540@mips.complang.tuwien.ac.at> <us6jar$3liai$1@dont-email.me>
<a3f9a53562c328af6e18b3f2c4f0b1d0@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 19 Mar 2024 19:57:37 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ccda95c6d556266c288488e25642ed3d";
logging-data="1075523"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OtKVZGl4fYkfMhB3KInNrecrCXhmA/TxwtnCtke/6Bg=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:Ly+EJXQzGiCEgZ4JFuVzZ0pmP/I=
In-Reply-To: <a3f9a53562c328af6e18b3f2c4f0b1d0@www.novabbs.com>
Content-Language: en-US
 by: Tristan Wibberley - Tue, 19 Mar 2024 19:57 UTC

On 05/03/2024 14:03, minforth wrote:
> Tristan Wibberley wrote:
>

>> Or special purpose computers that are not mass marketed, but I wasn't
>> aware they'd fixed all the public market computers. Thanks for the info.
>
> You are still in for some nasty surprises with "public market" ARM CPUs.
> f.ex.
> https://developer.arm.com/documentation/den0013/d/Porting/Alignment

And then we're not even trying to talk about what's in use and for sale
today but rather what will be in use over the next 6 decades. Most of
the historical peculiarities that are eliminated with more complex
hardware instead of longer software can be expected to be present at
some point during that period because more complex hardware is already a
difficult problem for information security and I'd expect those
peculiarities wouldn't have been present if there weren't some
efficiency earned.

Re: push for memory safe languages -- impact on Forth

<184e2d32c9cbaed09191b3cfffcc8839@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: push for memory safe languages -- impact on Forth
Date: Tue, 19 Mar 2024 21:39:41 +0000
Organization: novaBBS
Message-ID: <184e2d32c9cbaed09191b3cfffcc8839@www.novabbs.com>
References: <urstns$1ab0f$1@dont-email.me> <e1cac13ebb948a9996bf46a968874d71@www.novabbs.com> <2024Mar1.190210@mips.complang.tuwien.ac.at> <us5k0q$3crfd$1@dont-email.me> <2024Mar5.073540@mips.complang.tuwien.ac.at> <us6jar$3liai$1@dont-email.me> <a3f9a53562c328af6e18b3f2c4f0b1d0@www.novabbs.com> <utcqnh$10qa3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2555846"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
X-Rslight-Site: $2y$10$ebhaKCq/drk.C.vS9ATS9.TsYvDSxzrZsUSjwTA4ZTSCf1KpI2z5y
 by: minforth - Tue, 19 Mar 2024 21:39 UTC

Tristan Wibberley wrote:

> On 05/03/2024 14:03, minforth wrote:
>> Tristan Wibberley wrote:
>>

>>> Or special purpose computers that are not mass marketed, but I wasn't
>>> aware they'd fixed all the public market computers. Thanks for the info.
>>
>> You are still in for some nasty surprises with "public market" ARM CPUs.
>> f.ex.
>> https://developer.arm.com/documentation/den0013/d/Porting/Alignment

> And then we're not even trying to talk about what's in use and for sale
> today but rather what will be in use over the next 6 decades. Most of
> the historical peculiarities that are eliminated with more complex
> hardware instead of longer software can be expected to be present at
> some point during that period because more complex hardware is already a
> difficult problem for information security and I'd expect those
> peculiarities wouldn't have been present if there weren't some
> efficiency earned.

Although repeatedly proclaimed dead, we can still observe Moore's Law.
With the increasing 3-dimensional design of CPUs and the hunger for massive
computing power through AI applications, the trend is likely to continue.
Another driver is the need for lower energy consumption.

This means that as the complexity of systems grows almost exponentially,
the consequences of software errors will become increasingly dangerous in
the same magnitude. Just as a professional electrician only works with
insulated tools, a professional programmer should also choose his tools,
e.g. programming languages, which do not allow even simple errors to occur
in the first place. They should also use operating systems and software
containers equipped with protective functions.

These means of protection that already exist today are not available in
archaic programming languages such as C or Forth. Stoic language
conservativism (a tenor in standard Forth) won't help.

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor