Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Natural laws have no pity.


devel / comp.lang.forth / Re: A generalisation of CREATE DOES>

SubjectAuthor
* A generalisation of CREATE DOES>albert
`* Re: A generalisation of CREATE DOES>minforth
 `- Re: A generalisation of CREATE DOES>albert

1
A generalisation of CREATE DOES>

<nnd$737d25a4$3f62542e@27ee63aa648b56a5>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: A generalisation of CREATE DOES>
From: albert@spenarnc.xs4all.nl
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$737d25a4$3f62542e@27ee63aa648b56a5>
Organization: KPN B.V.
Date: Mon, 01 Apr 2024 14:42:10 +0200
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe004.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 62
Injection-Date: Mon, 01 Apr 2024 14:42:10 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: albert@spenarnc.xs4all.nl - Mon, 1 Apr 2024 12:42 UTC

Consider:

: object1 CREATE , DOES> @ ;
(object1 is CONSTANT)
12 object1 twelve
twelve .

I transform this to
( _ is a don't care value )
_ class mystruct1 \ mystruct1 is the class name
M: field1 @ M; , \ field1 is a method/field
endclass

12 mystruct1 twelve \ Make `twelve the current `mystruct1 object.

twelve \ Make twelve current
field1 .
12 OK

Now class can be generalized with more fields, where
CREATE DOES> is notamenable to this.
The does> action works on the offset currently commanded by
`` , ALLOT 2, '' and similar actions.

_ _ class mystruct2 \ mystruct2 is the class name
M: field1 @ M; ,
M: field2 @ M; ,
endclass

12 11 mystruct2 eleven+ \ eleven+ is the object.

eleven+ \ Make eleven+ current
field1 .
11 OK
field2 .
12 OK

More action are possible with the same offset:
_ class mystruct2 \ mystruct2 is the class name
M: field1 @ M;
( par ) ,
M: field! ! M;
M: field@ @ M;
0 ,
endclass

This is a one screen oo.
[That is a bit dishonest. It pulls in the one screen formatting. ]

The whole tmanx (musical instrument control) is written using this
simple oo.
The reverse engineering assembler uses this too, but there the case
can be made for inheritance. However it works, manages to deconstruct
a 64 bit Forth and assembles to the exact same code.

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

Re: A generalisation of CREATE DOES>

<3bae9cb4768fcdda16789595e307dcdf@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: A generalisation of CREATE DOES>
Date: Mon, 1 Apr 2024 14:08:52 +0000
Organization: novaBBS
Message-ID: <3bae9cb4768fcdda16789595e307dcdf@www.novabbs.com>
References: <nnd$737d25a4$3f62542e@27ee63aa648b56a5>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3933375"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$SWPyLTuSA/frFn2Sjkwa3ez0u1wp1zFYJ0./iQ5k4tKFNF7Sfc1SW
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
X-Spam-Checker-Version: SpamAssassin 4.0.0
 by: minforth - Mon, 1 Apr 2024 14:08 UTC

This reminds me of Dick Pountains book Object-Oriented Forth.
What makes your own CREATE DOES> extension special?

BTW for those who are interested or out of pure nostalgia,
Pountain's book is freely available:
https://dn790008.ca.archive.org/0/items/object-oriented-forth-implementation-of-data-structures-by-pountain-dick-z-lib.org/Object-oriented%20forth%20%20Implementation%20of%20data%20structures%20by%20Pountain%2C%20Dick%20%28z-lib.org%29.pdf

Re: A generalisation of CREATE DOES>

<nnd$79a36d15$5f99047a@07ef11db306f4a24>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: A generalisation of CREATE DOES>
References: <nnd$737d25a4$3f62542e@27ee63aa648b56a5> <3bae9cb4768fcdda16789595e307dcdf@www.novabbs.com>
From: albert@spenarnc.xs4all.nl
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$79a36d15$5f99047a@07ef11db306f4a24>
Organization: KPN B.V.
Date: Wed, 03 Apr 2024 10:04:29 +0200
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 24
Injection-Date: Wed, 03 Apr 2024 10:04:29 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
 by: albert@spenarnc.xs4all.nl - Wed, 3 Apr 2024 08:04 UTC

In article <3bae9cb4768fcdda16789595e307dcdf@www.novabbs.com>,
minforth <minforth@gmx.net> wrote:
>This reminds me of Dick Pountains book Object-Oriented Forth.
>What makes your own CREATE DOES> extension special?

The simplicity and the relation to CREATE DOES>.

>
>BTW for those who are interested or out of pure nostalgia,
>Pountain's book is freely available:
>https://dn790008.ca.archive.org/0/items/object-oriented-forth-implementation-of-data-structures-by-pountain-dick-z-lib.org/Object-oriented%20forth%20%20Implementation%20of%20data%20structures%20by%20Pountain%2C%20Dick%20%28z-lib.org%29.pdf

I have a fotocopie, and read it once. This is an academic, "me too"
exercise and I'm not aware that any one has used it to good results.
Compare this to mine. Or Bernd Paysan mini-oof that are actually
used for his gui.

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

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor