Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Lack of skill dictates economy of style. -- Joey Ramone


devel / comp.lang.forth / Re: Value Flavored Structs( was Re: Library Code)

SubjectAuthor
* String processing, for exampleAndy Valencia
+- Re: String processing, for examplePaul Rubin
+* Re: String processing, for examplemeff
|`* Re: String processing, for examplePaul Rubin
| `* Re: String processing, for exampleJali Heinonen
|  `- Re: String processing, for exampleRon AARON
+- Re: String processing, for exampleAndy Valencia
+* Re: String processing, for exampleNickolay Kolchin
|`* Re: String processing, for exampleminf...@arcor.de
| `* Re: String processing, for exampleNickolay Kolchin
|  `* Re: String processing, for exampleminf...@arcor.de
|   +* Re: String processing, for exampleNickolay Kolchin
|   |+- Re: String processing, for exampleminf...@arcor.de
|   |`* Re: String processing, for exampleAnton Ertl
|   | `* Re: String processing, for exampleNickolay Kolchin
|   |  +* Re: String processing, for exampleMarcel Hendrix
|   |  |+* Re: String processing, for exampleNickolay Kolchin
|   |  ||`* Re: String processing, for exampleNickolay Kolchin
|   |  || `- Re: String processing, for exampleS Jack
|   |  |`- Re: String processing, for exampledxforth
|   |  `* Re: String processing, for exampleAnton Ertl
|   |   `* Re: String processing, for exampleNickolay Kolchin
|   |    `* Re: String processing, for exampleMarcel Hendrix
|   |     +* Re: String processing, for examplePaul Rubin
|   |     |`- Re: String processing, for exampleMarcel Hendrix
|   |     `- Re: String processing, for exampleminf...@arcor.de
|   `* Re: String processing, for exampleHugh Aguilar
|    `* Re: String processing, for exampleNickolay Kolchin
|     `* Re: String processing, for exampleHugh Aguilar
|      `* Re: String processing, for exampleNickolay Kolchin
|       +* Re: String processing, for examplePaul Rubin
|       |+* Re: String processing, for exampleNickolay Kolchin
|       ||`* Re: String processing, for exampleminf...@arcor.de
|       || +- Re: String processing, for exampleNickolay Kolchin
|       || `* Re: String processing, for exampleHowerd Oakford
|       ||  `- Re: String processing, for exampleminf...@arcor.de
|       |`- Re: String processing, for exampleAnton Ertl
|       `- Re: String processing, for exampleHugh Aguilar
+* Re: String processing, for exampleAnton Ertl
|+* Re: String processing, for exampleNickolay Kolchin
||+* Re: String processing, for exampleMarcel Hendrix
|||`- Re: String processing, for exampleNickolay Kolchin
||`* Re: String processing, for exampleAnton Ertl
|| +* Re: String processing, for exampleMarcel Hendrix
|| |+- Re: String processing, for exampledxforth
|| |+* Re: String processing, for exampleNickolay Kolchin
|| ||`- Re: String processing, for exampleMarcel Hendrix
|| |`* Re: String processing, for exampleAnton Ertl
|| | `- Re: String processing, for exampleRuvim
|| +- Re: String processing, for exampleNickolay Kolchin
|| +* Re: String processing, for exampleStephen Pelc
|| |+- Re: String processing, for exampleHugh Aguilar
|| |`* Re: String processing, for exampleAnton Ertl
|| | `* Re: String processing, for exampleAnton Ertl
|| |  `- Re: String processing, for examplelehs
|| `- Re: String processing, for exampleNickolay Kolchin
|+- Re: String processing, for exampleJan Coombs
|+- Re: String processing, for exampleUlrich Hoffmann
|`* Re: String processing, for exampleAndy Valencia
| +* Re: String processing, for exampleminf...@arcor.de
| |+* Re: String processing, for examplePaul Rubin
| ||`- Re: String processing, for exampleDoug Hoffman
| |`* Re: String processing, for exampleNickolay Kolchin
| | `* Re: String processing, for exampledxforth
| |  `* Re: String processing, for exampleNickolay Kolchin
| |   `- Re: String processing, for exampleS Jack
| +- Re: String processing, for exampleRon AARON
| +- Re: String processing, for exampleAndy Valencia
| +* Re: String processing, for exampledxforth
| |+* Re: String processing, for exampleNickolay Kolchin
| ||`* Re: String processing, for exampledxforth
| || +* Re: String processing, for exampleNickolay Kolchin
| || |`* Re: String processing, for exampleRobert L.
| || | `- Re: String processing, for exampledxforth
| || +* Re: String processing, for exampleMarcel Hendrix
| || |`- Re: String processing, for exampledxforth
| || `- Re: String processing, for exampleS Jack
| |+* Re: String processing, for examplePaul Rubin
| ||+- Re: String processing, for exampledxforth
| ||+- Re: String processing, for exampleAnton Ertl
| ||`* Re: String processing, for exampleMarcel Hendrix
| || `- Re: String processing, for exampleNickolay Kolchin
| |+* Re: String processing, for exampleHugh Aguilar
| ||`- Re: String processing, for exampledxforth
| |`* Re: String processing, for exampleRobert L.
| | `- Re: String processing, for exampledxforth
| +- Re: String processing, for exampleAnton Ertl
| `* Re: String processing, for exampleAndy Valencia
|  +- Re: String processing, for exampleAnton Ertl
|  `* Re: String processing, for exampleAndy Valencia
|   `- Re: String processing, for exampleAnton Ertl
+* Re: String processing, for exampleluser droog
|`* Re: String processing, for exampleAnton Ertl
| `* Re: String processing, for exampleluser droog
|  `- Re: String processing, for exampleAnton Ertl
+* Re: String processing, for exampleHans Bezemer
|`- Re: String processing, for exampleHans Bezemer
+- Re: String processing, for exampleDoug Hoffman
+* Re: String processing, for examplelehs
|`- Re: String processing, for exampledxforth
+* Re: String processing, for exampleRobert L.
+* Re: String processing, for exampleRobert L.
+- Re: String processing, for exampleMark Wills
`* Re: String processing, for examplePaul Rubin

Pages:1234567891011
Re: Value Flavored Structs( was Re: Library Code)

<2022Mar20.194728@mips.complang.tuwien.ac.at>

  copy mid

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

  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: Value Flavored Structs( was Re: Library Code)
Date: Sun, 20 Mar 2022 18:47:28 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 52
Message-ID: <2022Mar20.194728@mips.complang.tuwien.ac.at>
References: <164037894202.1384.9410906461200956517@media.vsta.org> <62345cf4$0$705$14726298@news.sunsite.dk> <00ba3a52-5c1a-429a-b711-f5e2c8afc3cdn@googlegroups.com> <62347417$0$702$14726298@news.sunsite.dk> <c3cd903a-f2d5-4d1a-8893-9b30b9fbb766n@googlegroups.com> <2022Mar19.082459@mips.complang.tuwien.ac.at> <94b50dfa-a287-4420-aac7-a0a779c558e3n@googlegroups.com> <2022Mar20.171524@mips.complang.tuwien.ac.at> <56636b6f-d19a-4fe7-8eb9-b915fc71f840n@googlegroups.com>
Injection-Info: reader02.eternal-september.org; posting-host="53f8d1dc4f582a946a31715650919540";
logging-data="1512"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qCM5eG7vCv3JCZuqwR/dG"
Cancel-Lock: sha1:2hvCDaop6Jg8+jlblueF9cXFnu4=
X-newsreader: xrn 10.00-beta-3
 by: Anton Ertl - Sun, 20 Mar 2022 18:47 UTC

Marcel Hendrix <mhx@iae.nl> writes:
>On Sunday, March 20, 2022 at 5:33:53 PM UTC+1, Anton Ertl wrote:
>> But what I meant is, e.g., defer-flavoured locals:
>>
>> : foo {: xt: x :}
>> x \ this EXECUTE's the xt stored in x
>> ;
>>
>> 1 2 ' + foo . \ 3
>>
>> You can also use ACTION-OF and IS on defer-flavoured words, but if you
>> do a lot of that, it's probably better to use a value-flavoured or
>> variable-flavoured word in combination with EXECUTE.
>
>Sorry, but what is the difference with a standard
>: foo ( ? xt -- arity1 ) ( F: ? -- arity2 )
> >R ( something ) R> EXECUTE ( something else ) ;
>?

For this small example, there is no significant difference from that or

: foo execute ;

> So what is the purpose of ACTION-OF
>or IS then?

ACTION-OF is if you want to get the xt from x rather than EXECUTEing
it. IS is if you want to change what xt x EXECUTEs. Just like with
any other DEFERred word. A usage example:

: A {: w^ k x1 x2 x3 xt: x4 xt: x5 | w^ B :} recursive
k @ 0<= IF x4 x5 + ELSE
B k x1 x2 x3 action-of x4 [{: B k x1 x2 x3 x4 :}L
-1 k +!
k @ B @ x1 x2 x3 x4 A ;] dup B !
execute THEN ;
: man-or-boy? ( n -- n' ) [: 1 ;] [: -1 ;] 2dup swap [: 0 ;] A ;

This is Gforth's variant of Knuth's man-or-boy test. As is usual for
Knuth's examples, there is no intrinsic point, so don't try to
understand it; but you can see how defer-flavoured locals are used
here directly and with ACTION-OF.

The unexpected thing is that I have found more uses for
defer-flavoured locals than for variable-flavoured locals.

- 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: Value Flavored Structs( was Re: Library Code)

<64a9f319-d262-4fb1-a019-48ce08afb07en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:21d4:b0:67d:6a35:5dff with SMTP id h20-20020a05620a21d400b0067d6a355dffmr10898431qka.747.1647808269510;
Sun, 20 Mar 2022 13:31:09 -0700 (PDT)
X-Received: by 2002:ac8:6684:0:b0:2e1:b8e6:9a79 with SMTP id
d4-20020ac86684000000b002e1b8e69a79mr14134043qtp.279.1647808269352; Sun, 20
Mar 2022 13:31:09 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 20 Mar 2022 13:31:09 -0700 (PDT)
In-Reply-To: <2022Mar20.194728@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=79.224.111.239; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 79.224.111.239
References: <164037894202.1384.9410906461200956517@media.vsta.org>
<62345cf4$0$705$14726298@news.sunsite.dk> <00ba3a52-5c1a-429a-b711-f5e2c8afc3cdn@googlegroups.com>
<62347417$0$702$14726298@news.sunsite.dk> <c3cd903a-f2d5-4d1a-8893-9b30b9fbb766n@googlegroups.com>
<2022Mar19.082459@mips.complang.tuwien.ac.at> <94b50dfa-a287-4420-aac7-a0a779c558e3n@googlegroups.com>
<2022Mar20.171524@mips.complang.tuwien.ac.at> <56636b6f-d19a-4fe7-8eb9-b915fc71f840n@googlegroups.com>
<2022Mar20.194728@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64a9f319-d262-4fb1-a019-48ce08afb07en@googlegroups.com>
Subject: Re: Value Flavored Structs( was Re: Library Code)
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Sun, 20 Mar 2022 20:31:09 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 15
 by: minf...@arcor.de - Sun, 20 Mar 2022 20:31 UTC

Anton Ertl schrieb am Sonntag, 20. März 2022 um 19:55:38 UTC+1:
> : A {: w^ k x1 x2 x3 xt: x4 xt: x5 | w^ B :} recursive
> k @ 0<= IF x4 x5 + ELSE
> B k x1 x2 x3 action-of x4 [{: B k x1 x2 x3 x4 :}L
> -1 k +!
> k @ B @ x1 x2 x3 x4 A ;] dup B !
> execute THEN ;
> : man-or-boy? ( n -- n' ) [: 1 ;] [: -1 ;] 2dup swap [: 0 ;] A ;
>
> This is Gforth's variant of Knuth's man-or-boy test. As is usual for
> Knuth's examples, there is no intrinsic point, so don't try to
> understand it; but you can see how defer-flavoured locals are used
> here directly and with ACTION-OF.

Only morons tell you that Forth is a write-only language. ;-)
Brain guys call it a Turing tarpit.

Re: Value Flavored Structs( was Re: Library Code)

<9ecde292-50d0-4e20-80cb-d6ed8dd31b6cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:4691:b0:67d:9bab:33d7 with SMTP id bq17-20020a05620a469100b0067d9bab33d7mr11826632qkb.500.1647839550702;
Sun, 20 Mar 2022 22:12:30 -0700 (PDT)
X-Received: by 2002:a05:622a:56:b0:2e1:aaa1:739a with SMTP id
y22-20020a05622a005600b002e1aaa1739amr14877873qtw.210.1647839550442; Sun, 20
Mar 2022 22:12:30 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 20 Mar 2022 22:12:30 -0700 (PDT)
In-Reply-To: <2022Mar17.104618@mips.complang.tuwien.ac.at>
Injection-Info: google-groups.googlegroups.com; posting-host=97.87.183.68; posting-account=G1KGwgkAAAAyw4z0LxHH0fja6wAbo7Cz
NNTP-Posting-Host: 97.87.183.68
References: <164037894202.1384.9410906461200956517@media.vsta.org>
<62275b04$0$700$14726298@news.sunsite.dk> <2022Mar8.230500@mips.complang.tuwien.ac.at>
<2022Mar9.174855@mips.complang.tuwien.ac.at> <t0bd9e$o2b$1@dont-email.me>
<2022Mar10.081613@mips.complang.tuwien.ac.at> <87sfrqgltz.fsf@nightsong.com>
<2022Mar10.151816@mips.complang.tuwien.ac.at> <87k0d1hbae.fsf@nightsong.com>
<2022Mar16.102111@mips.complang.tuwien.ac.at> <87k0cta2v8.fsf@nightsong.com>
<20220317091418.261268dd@t530> <2022Mar17.104618@mips.complang.tuwien.ac.at>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9ecde292-50d0-4e20-80cb-d6ed8dd31b6cn@googlegroups.com>
Subject: Re: Value Flavored Structs( was Re: Library Code)
From: luser.dr...@gmail.com (luser droog)
Injection-Date: Mon, 21 Mar 2022 05:12:30 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 24
 by: luser droog - Mon, 21 Mar 2022 05:12 UTC

On Thursday, March 17, 2022 at 4:55:25 AM UTC-5, Anton Ertl wrote:
> Jan Coombs <jan4comp....@murray-microft.co.uk> writes:
> >An advantage of not having the address is that the system could
> >de-fragment and perform other memory storage operations transparently
> >in the background.
> Certainly for value-flavoured fields we are out of luck, because we
> would need to have complete compile-time knowledge about where struct
> addresses reside.
>
> But of course one might pursue this idea further, and design a "Forth"
> system which does not give out general addresses, only typed addresses
> which allow the system to determin exactly which cells are addresses
> and which are other things; and this can then be used for precise
> garbage collection. The resulting language would probably have a much
> more Java-like feeling, but maybe it would be closer to traditional
> Forth than I expect. Certainly oForth has some features that I
> associated with "not Forth", but it turned out to be much Forthier
> than I had expected.
> - anton

AFAIUI that's almost exactly how Java was borne. Gosling's previous projects
had been a popular implementation of emacs, and Sun NeWS , a windowing
system built using object-oriented PostScript.

https://www.academia.edu/27027623/A_User_Interface_Toolkit_in_Object_Oriented_PostScript_Owen_M_Densmore

Re: Value Flavored Structs( was Re: Library Code)

<580683df-8851-4d80-bfac-c478f8fb9232n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5a88:0:b0:2e1:bbda:3b21 with SMTP id c8-20020ac85a88000000b002e1bbda3b21mr15097425qtc.307.1647846377590;
Mon, 21 Mar 2022 00:06:17 -0700 (PDT)
X-Received: by 2002:a37:bd3:0:b0:67e:704d:ab9c with SMTP id
202-20020a370bd3000000b0067e704dab9cmr5484608qkl.306.1647846377415; Mon, 21
Mar 2022 00:06:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Mon, 21 Mar 2022 00:06:17 -0700 (PDT)
In-Reply-To: <9ecde292-50d0-4e20-80cb-d6ed8dd31b6cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=79.224.111.239; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 79.224.111.239
References: <164037894202.1384.9410906461200956517@media.vsta.org>
<62275b04$0$700$14726298@news.sunsite.dk> <2022Mar8.230500@mips.complang.tuwien.ac.at>
<2022Mar9.174855@mips.complang.tuwien.ac.at> <t0bd9e$o2b$1@dont-email.me>
<2022Mar10.081613@mips.complang.tuwien.ac.at> <87sfrqgltz.fsf@nightsong.com>
<2022Mar10.151816@mips.complang.tuwien.ac.at> <87k0d1hbae.fsf@nightsong.com>
<2022Mar16.102111@mips.complang.tuwien.ac.at> <87k0cta2v8.fsf@nightsong.com>
<20220317091418.261268dd@t530> <2022Mar17.104618@mips.complang.tuwien.ac.at> <9ecde292-50d0-4e20-80cb-d6ed8dd31b6cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <580683df-8851-4d80-bfac-c478f8fb9232n@googlegroups.com>
Subject: Re: Value Flavored Structs( was Re: Library Code)
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Mon, 21 Mar 2022 07:06:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 43
 by: minf...@arcor.de - Mon, 21 Mar 2022 07:06 UTC

luser droog schrieb am Montag, 21. März 2022 um 06:12:32 UTC+1:
> On Thursday, March 17, 2022 at 4:55:25 AM UTC-5, Anton Ertl wrote:
> > Jan Coombs <jan4comp....@murray-microft.co.uk> writes:
> > >An advantage of not having the address is that the system could
> > >de-fragment and perform other memory storage operations transparently
> > >in the background.
> > Certainly for value-flavoured fields we are out of luck, because we
> > would need to have complete compile-time knowledge about where struct
> > addresses reside.
> >
> > But of course one might pursue this idea further, and design a "Forth"
> > system which does not give out general addresses, only typed addresses
> > which allow the system to determin exactly which cells are addresses
> > and which are other things; and this can then be used for precise
> > garbage collection. The resulting language would probably have a much
> > more Java-like feeling, but maybe it would be closer to traditional
> > Forth than I expect. Certainly oForth has some features that I
> > associated with "not Forth", but it turned out to be much Forthier
> > than I had expected.
> > - anton
> AFAIUI that's almost exactly how Java was borne. Gosling's previous projects
> had been a popular implementation of emacs, and Sun NeWS , a windowing
> system built using object-oriented PostScript.
>
> https://www.academia.edu/27027623/A_User_Interface_Toolkit_in_Object_Oriented_PostScript_Owen_M_Densmore

Reflection is one of Java's prominent features and thus it needed fat pointers
(typed addresses) from the beginning.

Forth's header structure can be thought of as fat pointer to code segments.
TO is overloaded and thus either the compiler or the runtime system needs
type information. So you have some reflection also within Forth.

Unfortunately type information varies from one Forth system to the next
(even often between releases of a Forth system) which makes code sharing
practically impossible.


devel / comp.lang.forth / Re: Value Flavored Structs( was Re: Library Code)

Pages:1234567891011
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor