Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

History tends to exaggerate. -- Col. Green, "The Savage Curtain", stardate 5906.4


devel / comp.lang.forth / Applying "FORTH philosophy" to projects rather than code

SubjectAuthor
* Applying "FORTH philosophy" to projects rather than codeRichard Owlett
+* Re: Applying "FORTH philosophy" to projects rather than codeS Jack
|`- Re: Applying "FORTH philosophy" to projects rather than codedxforth
+* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
|+- Re: Applying "FORTH philosophy" to projects rather than codeBrad Eckert
|+* Re: Applying "FORTH philosophy" to projects rather than codeRick C
||`* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
|| +* Re: Applying "FORTH philosophy" to projects rather than codeminf...@arcor.de
|| |`* Re: Applying "FORTH philosophy" to projects rather than codeRick C
|| | +* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
|| | |`- Re: Applying "FORTH philosophy" to projects rather than codeRick C
|| | `- Re: Applying "FORTH philosophy" to projects rather than codeminf...@arcor.de
|| `* Re: Applying "FORTH philosophy" to projects rather than codeRick C
||  `* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
||   `* Re: Applying "FORTH philosophy" to projects rather than codeRick C
||    `* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
||     `* Re: Applying "FORTH philosophy" to projects rather than codeRick C
||      `* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
||       +* Re: Applying "FORTH philosophy" to projects rather than codeRick C
||       |`* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
||       | `* Re: Applying "FORTH philosophy" to projects rather than codeAnton Ertl
||       |  +- Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
||       |  `- Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
||       `* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
||        `* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
||         `- Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
|`* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| +* Re: Applying "FORTH philosophy" to projects rather than codeDoug Hoffman
| |`* Oforth - calling FranckRon AARON
| | `* Re: Oforth - calling FranckDoug Hoffman
| |  +* Re: Oforth - calling FranckHans Bezemer
| |  |`- Re: Oforth - calling FranckRon AARON
| |  `- Re: Oforth - calling FranckRon AARON
| +* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |`* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| | +* Re: Applying "FORTH philosophy" to projects rather than codeAnton Ertl
| | |`* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| | | `- Re: Applying "FORTH philosophy" to projects rather than codeAnton Ertl
| | `* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |  `* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| |   +- Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |   +* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |   |`* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| |   | +* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| |   | |`* Re: Applying "FORTH philosophy" to projects rather than codeminf...@arcor.de
| |   | | `* Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| |   | |  `* Re: Applying "FORTH philosophy" to projects rather than codeminf...@arcor.de
| |   | |   +- Re: Applying "FORTH philosophy" to projects rather than codedxforth
| |   | |   `* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |   | |    `* Re: Applying "FORTH philosophy" to projects rather than codeminf...@arcor.de
| |   | |     `- Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |   | `* Re: Applying "FORTH philosophy" to projects rather than codeHans Bezemer
| |   |  `* Re: Applying "FORTH philosophy" to projects rather than codeMarcel Hendrix
| |   |   `- Re: Applying "FORTH philosophy" to projects rather than codedxforth
| |   +* Re: Applying "FORTH philosophy" to projects rather than codeAnton Ertl
| |   |`- Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| |   `* Re: Applying "FORTH philosophy" to projects rather than codeStephen Pelc
| |    +* Re: Applying "FORTH philosophy" to projects rather than codeMarcel Hendrix
| |    |+* Re: Applying "FORTH philosophy" to projects rather than codeStephen Pelc
| |    ||`- Re: Applying "FORTH philosophy" to projects rather than codeJon Nicoll
| |    |`* Re: Applying "FORTH philosophy" to projects rather than codeStephen Pelc
| |    | `- Re: Applying "FORTH philosophy" to projects rather than codeJon Nicoll
| |    `- Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin
| +* Building strings (was: Applying "FORTH philosophy" to projects rather than code)Anton Ertl
| |+* Re: Building strings (was: Applying "FORTH philosophy" to projectsMarcel Hendrix
| ||`- Re: Building strings (was: Applying "FORTH philosophy" to projects rather than cAnton Ertl
| |+* Re: Building stringsPaul Rubin
| ||`* Re: Building stringsAnton Ertl
| || `* Re: Building stringsPaul Rubin
| ||  `- Re: Building stringsAnton Ertl
| |`* Re: Building stringsPaul Rubin
| | `* Re: Building stringsAnton Ertl
| |  `* Re: Building stringsPaul Rubin
| |   `* Re: Building stringsminf...@arcor.de
| |    +* Re: Building stringsPaul Rubin
| |    |`* Re: Building stringsminf...@arcor.de
| |    | `- Re: Building stringsPaul Rubin
| |    `- Re: Building stringsdxforth
| +* Abysmal 4thRobert L.
| |+- Re: Abysmal 4thS Jack
| |+- Re: Abysmal 4thHans Bezemer
| |`- Re: Abysmal 4thdxforth
| `- Abysmal 4thAndy Valencia
`* Re: Applying "FORTH philosophy" to projects rather than codeAla'a
 `* Re: Applying "FORTH philosophy" to projects rather than codeRichard Owlett
  `- Re: Applying "FORTH philosophy" to projects rather than codePaul Rubin

Pages:1234
Applying "FORTH philosophy" to projects rather than code

<Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!nntp.club.cc.cmu.edu!45.76.7.193.MISMATCH!3.us.feeder.erje.net!feeder.erje.net!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Thu, 03 Mar 2022 08:07:15 -0600
Newsgroups: comp.lang.forth
X-Mozilla-News-Host: news://news.supernews.com:119
From: rowl...@cloud85.net (Richard Owlett)
Subject: Applying "FORTH philosophy" to projects rather than code
Date: Thu, 3 Mar 2022 08:07:14 -0600
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Firefox/52.0
SeaMonkey/2.49.4
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
Lines: 30
X-Trace: sv3-JDPFPHWkvmp2OlYAhr4XTmjUPZN/jkHNyf+SMEN6nbpm9DbSGJTf3yoktPBjQWmSKddvgxaf+JbTOmL!58FWo0ZpIGy9+p8iKv6DsyK7dp8oaDtazlBNXhx152newlUfH+IQSI1vARlCQ4vSFrkLcnubOwIC!y7eHkvm43Ec=
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 2215
 by: Richard Owlett - Thu, 3 Mar 2022 14:07 UTC

I've made casual use of Forth for decades.
I like what I see as the forth philosophy - simple & direct.
I wish to suggest changes to the installer of my preferred OS.

I went looking for statements of the "FORTH philosophy", but what I
found was too "code" rather than "project" oriented.

Examples I found include:

> Basically, a Forth programmer wants to throw out absolutely everything he
> possibly can in his program and in his programming environment except that
> which is absolutely essential for solving the problem at hand.
https://mvanier.livejournal.com/2133.html

> This keeps me true to the Forth philosophy (or at least Chuck Moore's philosophy)
> of only doing what you need to do to meet the task at hand.
http://toddbot.blogspot.com/2012/04/why-forth-still-matters-in-this.html

> ... because Forth does not start with code. It starts with simplifying things
> by questioning assumptions.
https://26thcenturyprogramming.wordpress.com/2015/03/26/the-forth-philosophy-maybe-p/

Can anyone suggest appropriate online reading?
TIA

Re: Applying "FORTH philosophy" to projects rather than code

<295c4bc0-3855-489d-85b4-001dc4414224n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2983:b0:62c:e692:f12a with SMTP id r3-20020a05620a298300b0062ce692f12amr18874952qkp.494.1646319238817;
Thu, 03 Mar 2022 06:53:58 -0800 (PST)
X-Received: by 2002:ac8:5dc8:0:b0:2de:61eb:331f with SMTP id
e8-20020ac85dc8000000b002de61eb331fmr28095924qtx.2.1646319238648; Thu, 03 Mar
2022 06:53:58 -0800 (PST)
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: Thu, 3 Mar 2022 06:53:58 -0800 (PST)
In-Reply-To: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:3f7a:20d0:38ac:e253:c580:3310;
posting-account=V5nGoQoAAAC_P2U0qnxm2kC0s1jNJXJa
NNTP-Posting-Host: 2600:1700:3f7a:20d0:38ac:e253:c580:3310
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <295c4bc0-3855-489d-85b4-001dc4414224n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Thu, 03 Mar 2022 14:53:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: S Jack - Thu, 3 Mar 2022 14:53 UTC

On Thursday, March 3, 2022 at 8:07:22 AM UTC-6, Richard Owlett wrote:

> I like what I see as the forth philosophy - simple & direct.

That should do. All the rest could float a fleet of Zeplins.

--
me

Re: Applying "FORTH philosophy" to projects rather than code

<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4eae:0:b0:435:32f9:c034 with SMTP id ed14-20020ad44eae000000b0043532f9c034mr3286197qvb.71.1646331513437;
Thu, 03 Mar 2022 10:18:33 -0800 (PST)
X-Received: by 2002:ac8:5c8a:0:b0:2dd:fe54:3d0c with SMTP id
r10-20020ac85c8a000000b002ddfe543d0cmr28433407qta.307.1646331513263; Thu, 03
Mar 2022 10:18:33 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!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: Thu, 3 Mar 2022 10:18:32 -0800 (PST)
In-Reply-To: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Thu, 03 Mar 2022 18:18:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 41
 by: Hans Bezemer - Thu, 3 Mar 2022 18:18 UTC

On Thursday, March 3, 2022 at 3:07:22 PM UTC+1, Richard Owlett wrote:
> I've made casual use of Forth for decades.
> I like what I see as the forth philosophy - simple & direct.
> I wish to suggest changes to the installer of my preferred OS.
>
> I went looking for statements of the "FORTH philosophy", but what I
> found was too "code" rather than "project" oriented.
I'm quite amazed you chose these items. They're first impression - not the ramblings of seasoned Forth programmers. E.g.

"One other thing: even though I think Forth is way cool, it would not be my first choice for most of my programming projects. There are too many features I consider essential for most of my programming work that are missing from Forth (and are very hard to add to it). These include garbage collection, first-class functions and a type discipline".

- Type discipline?! That's almost cursing in Forths church!
- Garbage collection. There's some massive library, but I've been happy to introduce arena allocation, dynamic strings and TWO types of dynamic arrays to my own 4tH.
- First class functions. According to Wikipedia: "This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions". Ok, which of these things can you NOT do with execution tokens..?

My answer to all this humbug has always been: https://sourceforge.net/p/forth-4th/wiki/4tH%20philosophy/

If you don't know this - you DO NOT know Forth!

BTW, I got plenty of these:
https://sourceforge.net/p/forth-4th/wiki/The%20Way%20of%20Forth/
https://sourceforge.net/p/forth-4th/wiki/This%20is%20Forth/

Some think Chucks Firechats and Jeff Fox (e.g. http://www.ultratechnology.com/forth.htm) were the best writings on Forth. To me, they contain some great ideas - but a bit too "mystical" for my taste. To me the best article written is this one by Bernd Paysan: https://bernd-paysan.de/why-forth.html

Hans Bezemer

Re: Applying "FORTH philosophy" to projects rather than code

<307d20ed-67b5-4541-bc9a-68f8f6b99deen@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:5188:b0:433:3463:709f with SMTP id kl8-20020a056214518800b004333463709fmr12129743qvb.59.1646332844827;
Thu, 03 Mar 2022 10:40:44 -0800 (PST)
X-Received: by 2002:ac8:5781:0:b0:2de:9529:44fd with SMTP id
v1-20020ac85781000000b002de952944fdmr29346025qta.63.1646332844664; Thu, 03
Mar 2022 10:40:44 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!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: Thu, 3 Mar 2022 10:40:44 -0800 (PST)
In-Reply-To: <3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=72.217.63.66; posting-account=6GCGIQoAAAAyO8IjR_VTwqiqLwx0Q_G8
NNTP-Posting-Host: 72.217.63.66
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com> <3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <307d20ed-67b5-4541-bc9a-68f8f6b99deen@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: hwfw...@gmail.com (Brad Eckert)
Injection-Date: Thu, 03 Mar 2022 18:40:44 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 46
 by: Brad Eckert - Thu, 3 Mar 2022 18:40 UTC

On Thursday, March 3, 2022 at 11:18:34 AM UTC-7, the.bee...@gmail.com wrote:
> On Thursday, March 3, 2022 at 3:07:22 PM UTC+1, Richard Owlett wrote:
> > I've made casual use of Forth for decades.
> > I like what I see as the forth philosophy - simple & direct.
> > I wish to suggest changes to the installer of my preferred OS.
> >
> > I went looking for statements of the "FORTH philosophy", but what I
> > found was too "code" rather than "project" oriented.
> I'm quite amazed you chose these items. They're first impression - not the ramblings of seasoned Forth programmers. E.g.
>
> "One other thing: even though I think Forth is way cool, it would not be my first choice for most of my programming projects. There are too many features I consider essential for most of my programming work that are missing from Forth (and are very hard to add to it). These include garbage collection, first-class functions and a type discipline".
>
> - Type discipline?! That's almost cursing in Forths church!
> - Garbage collection. There's some massive library, but I've been happy to introduce arena allocation, dynamic strings and TWO types of dynamic arrays to my own 4tH.
> - First class functions. According to Wikipedia: "This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions". Ok, which of these things can you NOT do with execution tokens..?
>
> My answer to all this humbug has always been: https://sourceforge.net/p/forth-4th/wiki/4tH%20philosophy/
>
> If you don't know this - you DO NOT know Forth!
>
> BTW, I got plenty of these:
> https://sourceforge.net/p/forth-4th/wiki/The%20Way%20of%20Forth/
> https://sourceforge.net/p/forth-4th/wiki/This%20is%20Forth/
>
> Some think Chucks Firechats and Jeff Fox (e.g. http://www.ultratechnology..com/forth.htm) were the best writings on Forth. To me, they contain some great ideas - but a bit too "mystical" for my taste. To me the best article written is this one by Bernd Paysan: https://bernd-paysan.de/why-forth.html
>
> Hans Bezemer
Why do programs generate so much garbage in the first place? Can't we be environmentally friendly?

Re: Applying "FORTH philosophy" to projects rather than code

<d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:a9c9:0:b0:49b:56e4:1286 with SMTP id s192-20020a37a9c9000000b0049b56e41286mr490707qke.111.1646336594307;
Thu, 03 Mar 2022 11:43:14 -0800 (PST)
X-Received: by 2002:a05:6214:5285:b0:432:e468:a212 with SMTP id
kj5-20020a056214528500b00432e468a212mr19443090qvb.51.1646336594129; Thu, 03
Mar 2022 11:43:14 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 3 Mar 2022 11:43:13 -0800 (PST)
In-Reply-To: <3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com> <3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Thu, 03 Mar 2022 19:43:14 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Rick C - Thu, 3 Mar 2022 19:43 UTC

On Thursday, March 3, 2022 at 1:18:34 PM UTC-5, the.bee...@gmail.com wrote:
> On Thursday, March 3, 2022 at 3:07:22 PM UTC+1, Richard Owlett wrote:
> > I've made casual use of Forth for decades.
> > I like what I see as the forth philosophy - simple & direct.
> > I wish to suggest changes to the installer of my preferred OS.
> >
> > I went looking for statements of the "FORTH philosophy", but what I
> > found was too "code" rather than "project" oriented.
> I'm quite amazed you chose these items. They're first impression - not the ramblings of seasoned Forth programmers. E.g.
>
> "One other thing: even though I think Forth is way cool, it would not be my first choice for most of my programming projects. There are too many features I consider essential for most of my programming work that are missing from Forth (and are very hard to add to it). These include garbage collection, first-class functions and a type discipline".
>
> - Type discipline?! That's almost cursing in Forths church!
> - Garbage collection. There's some massive library, but I've been happy to introduce arena allocation, dynamic strings and TWO types of dynamic arrays to my own 4tH.
> - First class functions. According to Wikipedia: "This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions". Ok, which of these things can you NOT do with execution tokens..?

Returning pointers to functions or passing functions as arguments would seem to essentially be self modifying code, no?

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Re: Applying "FORTH philosophy" to projects rather than code

<svrb8h$lbr$1@gioia.aioe.org>

  copy mid

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

  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: Applying "FORTH philosophy" to projects rather than code
Date: Fri, 4 Mar 2022 08:17:05 +1100
Organization: Aioe.org NNTP Server
Message-ID: <svrb8h$lbr$1@gioia.aioe.org>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<295c4bc0-3855-489d-85b4-001dc4414224n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="21883"; posting-host="7AktqsUqy5CCvnKa3S0Dkw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-GB
 by: dxforth - Thu, 3 Mar 2022 21:17 UTC

On 4/03/2022 01:53, S Jack wrote:
> On Thursday, March 3, 2022 at 8:07:22 AM UTC-6, Richard Owlett wrote:
>
>> I like what I see as the forth philosophy - simple & direct.
>
> That should do. All the rest could float a fleet of Zeplins.

Except 'simple & direct' is propaganda. The word is not the experience
- no matter how many times one repeats it. The idea one can achieve the
same insights as another by copying what they do.

Re: Applying "FORTH philosophy" to projects rather than code

<87sfrykt36.fsf@nightsong.com>

  copy mid

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

  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: Applying "FORTH philosophy" to projects rather than code
Date: Fri, 04 Mar 2022 00:41:33 -0800
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <87sfrykt36.fsf@nightsong.com>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="69fb7b04d9cab1a7620b50984026acdf";
logging-data="5377"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KoyGjrlEMSUU5CGCa539A"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:opv1nNvbteYQPqXf1SMLxeMMRqM=
sha1:PfwN2XDc9aPoGwFPyYaL+UEnmBc=
 by: Paul Rubin - Fri, 4 Mar 2022 08:41 UTC

Rick C <gnuarm.deletethisbit@gmail.com> writes:
> Returning pointers to functions or passing functions as arguments
> would seem to essentially be self modifying code, no?

No it just means functions are values, whose implementation involves
pointers to code.

For example, sin (sine) is a function, whose input is a real and whose
output is another real. And "derivative" (d/dx) is a function whose
input is a function, and whose output is another function. So you get
that d/dx (sin) = cos, or some numerical approximation of same. In
Python or Haskell, this is easy, e.g.:

h = 0.0001
d_over_dx f = g where { g x = (f(x+h) - f(x)) / h }
dsin = d_over_dx sin
print (dsin 0.5) -- prints 0.8775585891507287
print (cos 0.5) -- prints 0.8775825618903728

Pretty close approximation. In Forth it is a bit messier because you
want a signature like

: d/dx ( xt -- xt ) .... ;

and you may have to do some advanced or non-portable things to create
new xt's on the fly like that. But there are various ways you can get
equivalent functionality using OOP or whatever.

Re: Applying "FORTH philosophy" to projects rather than code

<87o82mkq1w.fsf@nightsong.com>

  copy mid

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

  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: Applying "FORTH philosophy" to projects rather than code
Date: Fri, 04 Mar 2022 01:47:07 -0800
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <87o82mkq1w.fsf@nightsong.com>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="69fb7b04d9cab1a7620b50984026acdf";
logging-data="12207"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XTiPh7VkpwkRuZOtBbCeY"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:maZaGzC8fbR6GcVx5ePT4GRtl1c=
sha1:TZmIEoYaIsFu8nPX1SYbZuLMnBY=
 by: Paul Rubin - Fri, 4 Mar 2022 09:47 UTC

Hans Bezemer <the.beez.speaks@gmail.com> writes:
> - Garbage collection. There's some massive library, but I've been
> happy to introduce arena allocation, dynamic strings and TWO types of
> dynamic arrays to my own 4tH.

It's not that massive: a few hundred lines of Forth.

https://www.complang.tuwien.ac.at/forth/garbage-collection.zip

It's worth reading the doc file (gc.html) inside that zip, that explains
how it works and why you might want it. Unfortunately, traditional
Forth misses a few features that prevents the gc from being completely
portable, such as a way to scan the return stack. But these are fairly
simple implementation gaps. If I ever write a Forth, I'll want it to
fully support this gc.

> My answer to all this humbug has always been:
> https://sourceforge.net/p/forth-4th/wiki/4tH%20philosophy/
>
> If you don't know this - you DO NOT know Forth!

I like some parts of that doc, but other parts are unconvincing. E.g.
string concatention:

strcat(strcat(strcat(strcpy(hello,"Hello"), " "), "world"), "!");

In Python you'd write "Hello" + " " + "world" + "!" which is simple.

Your Forth equivalent is:

include lib/concat.4th
s" Hello" s" " s" world" s" !" 4 Hello concat

That is nice, but where does the storage for the new string come from,
and do you have to remember to free it when you are done with it?
That's one more thing to occupy your mind and create bugs in your
program, that Python takes care of for you automatically.

Similarly with locals: 1) you can stack-allocate them, so not much
overhead; 2) without them, you are programming a simple stack VM in
machine language, which means you must mentally perform the register
allocation part of a traditional compiler if you don't want to spew
VARIABLEs all over.

> https://sourceforge.net/p/forth-4th/wiki/The%20Way%20of%20Forth/

I would think of possible "knight move" paths that visit all 8 cells.
It's clear that if you have 1 such path, the cyclic permutations on its
moves are also paths, so you only have to look at one starting point.
Also, the path's inverse (reverse the letters) is also a path, and after
the 6th move, there is only one possible move choice to reach the last
letter. So you only have to make 6 actual choices. So you search the
64 possible paths and find there is really only one, modulo the
symmetries mentioned above. That is sort of what you did, but the long
way around, ISTM.

> https://sourceforge.net/p/forth-4th/wiki/This%20is%20Forth/

This one just makes Forth look painful ;).

> Some think Chucks Firechats and Jeff Fox
> (e.g. http://www.ultratechnology.com/forth.htm) were the best writings

I enjoyed those a lot.

> on Forth. To me, they contain some great ideas - but a bit too
> "mystical" for my taste. To me the best article written is this one by
> Bernd Paysan: https://bernd-paysan.de/why-forth.html

I liked this for the most part, though some parts were less convincing
than others.

Re: Applying "FORTH philosophy" to projects rather than code

<c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:ac16:0:b0:60a:dac5:1656 with SMTP id e22-20020a37ac16000000b0060adac51656mr2004124qkm.680.1646389018405;
Fri, 04 Mar 2022 02:16:58 -0800 (PST)
X-Received: by 2002:ac8:7fc5:0:b0:2de:8f5f:c2bd with SMTP id
b5-20020ac87fc5000000b002de8f5fc2bdmr30606385qtk.38.1646389018224; Fri, 04
Mar 2022 02:16:58 -0800 (PST)
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: Fri, 4 Mar 2022 02:16:58 -0800 (PST)
In-Reply-To: <87sfrykt36.fsf@nightsong.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: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Fri, 04 Mar 2022 10:16:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 44
 by: minf...@arcor.de - Fri, 4 Mar 2022 10:16 UTC

Paul Rubin schrieb am Freitag, 4. März 2022 um 09:41:36 UTC+1:
> Rick C <gnuarm.del...@gmail.com> writes:
> > Returning pointers to functions or passing functions as arguments
> > would seem to essentially be self modifying code, no?
> No it just means functions are values, whose implementation involves
> pointers to code.
>
> For example, sin (sine) is a function, whose input is a real and whose
> output is another real. And "derivative" (d/dx) is a function whose
> input is a function, and whose output is another function. So you get
> that d/dx (sin) = cos, or some numerical approximation of same. In
> Python or Haskell, this is easy, e.g.:
>
> h = 0.0001
> d_over_dx f = g where { g x = (f(x+h) - f(x)) / h }
> dsin = d_over_dx sin
> print (dsin 0.5) -- prints 0.8775585891507287
> print (cos 0.5) -- prints 0.8775825618903728
>
> Pretty close approximation. In Forth it is a bit messier because you
> want a signature like
>
> : d/dx ( xt -- xt ) .... ;
>
> and you may have to do some advanced or non-portable things to create
> new xt's on the fly like that. But there are various ways you can get
> equivalent functionality using OOP or whatever.

Clumsy but portable:

0.0001e FVALUE h

DEFER ofunc ' FSIN IS ofunc
DEFER dfunc

: D/DX {: xt f: x -- y :}
x h f+ xt execute x xt execute f- h f/ ;

:NONAME ( x -- y ) ['] ofunc D/DX ; IS dfunc

0.5e dfunc f.
0.5e fcos f.

Re: Applying "FORTH philosophy" to projects rather than code

<62220489$0$704$14726298@news.sunsite.dk>

  copy mid

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

  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
Date: Fri, 4 Mar 2022 07:22:29 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.6.0
Subject: Re: Applying "FORTH philosophy" to projects rather than code
Content-Language: en-US
Newsgroups: comp.lang.forth
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<87o82mkq1w.fsf@nightsong.com>
From: glide...@gmail.com (Doug Hoffman)
In-Reply-To: <87o82mkq1w.fsf@nightsong.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 21
Message-ID: <62220489$0$704$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: e24ae67c.news.sunsite.dk
X-Trace: 1646396553 news.sunsite.dk 704 glidedog@gmail.com/68.55.82.126:60352
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Fri, 4 Mar 2022 12:22 UTC

On 3/4/22 4:47 AM, Paul Rubin wrote:

> In Python you'd write "Hello" + " " + "world" + "!" which is simple.

Some people, like me, believe the future of Forth may be something like
Oforth (which also has gc):

"Hello" " " + "world" + "!" +

-Doug

> Your Forth equivalent is:
>
> include lib/concat.4th
> s" Hello" s" " s" world" s" !" 4 Hello concat
>
> That is nice, but where does the storage for the new string come from,
> and do you have to remember to free it when you are done with it?
> That's one more thing to occupy your mind and create bugs in your
> program, that Python takes care of for you automatically.

Oforth - calling Franck

<svt3pe$rgu$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: clf...@8th-dev.com (Ron AARON)
Newsgroups: comp.lang.forth
Subject: Oforth - calling Franck
Date: Fri, 4 Mar 2022 15:21:50 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <svt3pe$rgu$1@dont-email.me>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<87o82mkq1w.fsf@nightsong.com> <62220489$0$704$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 4 Mar 2022 13:21:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="881b5550829c2b8b7d9a506e45d723b1";
logging-data="28190"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18u10cTdiLgM3advSNZVdix"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.1
Cancel-Lock: sha1:qrRzPlzrM1Mg49zg7tr9GfWXsGQ=
In-Reply-To: <62220489$0$704$14726298@news.sunsite.dk>
Content-Language: en-US
 by: Ron AARON - Fri, 4 Mar 2022 13:21 UTC

The future of Forth may be something like Oforth, but I noticed there
hasn't been a release in 3.5 years, nor any signs from Franck Bensusan.

I sent him an email to see if he's ok, and the mail was rejected because
the mailbox is full.

So I hope Franck's OK...

On 2022-03-04 14:22, Doug Hoffman wrote:
> On 3/4/22 4:47 AM, Paul Rubin wrote:
>
>> In Python you'd write "Hello" + " " + "world" + "!" which is simple.
>
> Some people, like me, believe the future of Forth may be something like
> Oforth (which also has gc):
>
> "Hello" " " + "world" + "!" +
>
> -Doug
>
>
>> Your Forth equivalent is:
>>
>>      include lib/concat.4th
>>      s" Hello" s"  " s" world" s" !" 4 Hello concat
>>
>> That is nice, but where does the storage for the new string come from,
>> and do you have to remember to free it when you are done with it?
>> That's one more thing to occupy your mind and create bugs in your
>> program, that Python takes care of for you automatically.

Re: Applying "FORTH philosophy" to projects rather than code

<84d827a2-aebf-4003-8425-079d7ae6c559n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7f0b:0:b0:2e0:e49:e785 with SMTP id f11-20020ac87f0b000000b002e00e49e785mr18934819qtk.424.1646401258628;
Fri, 04 Mar 2022 05:40:58 -0800 (PST)
X-Received: by 2002:ac8:7e90:0:b0:2de:2b69:aa3c with SMTP id
w16-20020ac87e90000000b002de2b69aa3cmr32078830qtj.279.1646401258469; Fri, 04
Mar 2022 05:40:58 -0800 (PST)
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!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: Fri, 4 Mar 2022 05:40:58 -0800 (PST)
In-Reply-To: <87o82mkq1w.fsf@nightsong.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <87o82mkq1w.fsf@nightsong.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <84d827a2-aebf-4003-8425-079d7ae6c559n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Fri, 04 Mar 2022 13:40:58 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 105
 by: Hans Bezemer - Fri, 4 Mar 2022 13:40 UTC

On Friday, March 4, 2022 at 10:47:13 AM UTC+1, Paul Rubin wrote:
> Hans Bezemer <the.bee...@gmail.com> writes:
> It's not that massive: a few hundred lines of Forth.
Hmm, I thought it was an interesting thing to examine where this impression came from. So I took all of 4tH's 500+ libraries and analyzed them both "raw lines" and "source lines of code". In both cases, the vast majority (85% - 90%) popped up between "more than 4, but less than 128 LOC".

So yes, from my point of view 400 lines is MASSIVE! That's about the size of the 4tH preprocessor (which without libs is a little less than 500 lines)..

> It's worth reading the doc file (gc.html) inside that zip, that explains
> how it works and why you might want it. Unfortunately, traditional
> Forth misses a few features that prevents the gc from being completely
> portable, such as a way to scan the return stack. But these are fairly
> simple implementation gaps.
It functions IMHO about the same way uBasic/4tH's GC does. But hat one is about 50 (raw) lines. On the other hand (all raw lines of code):
- Dynamic array (sequential) is 65 lines;
- Dynamic array (random) is 45 lines;
- Dynamic strings is 30 lines;
- Arena allocation is 85 lines.

Even having ALL of these at the same time in a 4tH program doesn't amount to 400 lines. I'm not saying that GC.F is bad code - on the contrary - I'm saying it's just a LOT of code.

> > My answer to all this humbug has always been:
> > https://sourceforge.net/p/forth-4th/wiki/4tH%20philosophy/
> In Python you'd write "Hello" + " " + "world" + "!" which is simple.
My answer is always the same - what looks simple and elegant on the outside may amount to very messy and overly bloated code on the inside. IMHO - that counts. You're free to feel otherwise, of course. As long as I don't have to maintain it..
> Your Forth equivalent is:
> include lib/concat.4th
> s" Hello" s" " s" world" s" !" 4 Hello concat

No - even IF you read the article, you didn't understand it. Since I gave at least three or four variations on this theme, saying it pretends on the program and programmer to select the correct one. I'm just saying that equivalents are available - IT'S NOT FORTH THAT'S LACKING - IT'S THE SKILLS OF THE WANNABEES WHO TRY TO USE IT.
> That is nice, but where does the storage for the new string come from,
> and do you have to remember to free it when you are done with it?
> That's one more thing to occupy your mind and create bugs in your
> program, that Python takes care of for you automatically.
If you have to contemplate that - use Python. Don't pretend you're a Forth programmer. Delve into the writings of Dijkstra if you still believe this "the language will save all n00bs" myth.

> Similarly with locals: 1) you can stack-allocate them, so not much
> overhead; 2) without them, you are programming a simple stack VM in
> machine language, which means you must mentally perform the register
> allocation part of a traditional compiler if you don't want to spew
> VARIABLEs all over.
It's overhead nonetheless. IMHO locals are a horrible C-ism. I never had to resort to locals to write a lib. I MAY use them in an application, but <sigh> I got so many alternatives to that:
(1) I just may be more clever - and use the stack as it's supposed to be: https://sourceforge.net/p/forth-4th/wiki/This%20is%20Forth/
(2) I may create an additional stack (tiny bit of code): https://sourceforge.net/p/forth-4th/code/HEAD/tree/trunk/4th.src/lib/stack.4th
(3) I may use the Return Stack more cleverly: https://sourceforge.net/p/forth-4th/wiki/Using%20R%40/

And that IMHO is Forth - there is no single right way to do it. You choose your guns - you're not obliged to take a knife to a gunfight.

> I would think of possible "knight move" paths that visit all 8 cells.
> It's clear that if you have 1 such path, the cyclic permutations on its
> moves are also paths, so you only have to look at one starting point.
> Also, the path's inverse (reverse the letters) is also a path, and after
> the 6th move, there is only one possible move choice to reach the last
> letter. So you only have to make 6 actual choices. So you search the
> 64 possible paths and find there is really only one, modulo the
> symmetries mentioned above. That is sort of what you did, but the long
> way around, ISTM.
Again, you either didn't read or didn't understand the article. I used Forth as a tool to discover the algorithm. And I boiled it down to 17326045. That someone else with a different academic path would tackle the matter differently isn't the point of the article. The point is, that even if you have a difficult way to calculate the fee for a long distance calls, Forthers don't stop to investigate it until they've reached the bare essentials of the algorithm.

> This one just makes Forth look painful ;).
It SHOULD be "painful" if you want to have the best Forth implementation. See also: https://sourceforge.net/p/forth-4th/wiki/Understand%20your%20algorithm/
That IMHO is Forth. And that's why so many other code from so many other "easy to use languages" is subpar on each and every level.

> > Bernd Paysan: https://bernd-paysan.de/why-forth.html
> I liked this for the most part, though some parts were less convincing
> than others.
I leave it to Bernd to defend that one.
The truth can be hard, I know. But my father didn't raise a sissy ;-)

Hans Bezemer

Re: Oforth - calling Franck

<62221810$0$695$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.szaf.org!news.uzoreto.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Fri, 4 Mar 2022 08:45:48 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.6.0
Subject: Re: Oforth - calling Franck
Content-Language: en-US
Newsgroups: comp.lang.forth
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<87o82mkq1w.fsf@nightsong.com> <62220489$0$704$14726298@news.sunsite.dk>
<svt3pe$rgu$1@dont-email.me>
From: glide...@gmail.com (Doug Hoffman)
In-Reply-To: <svt3pe$rgu$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 20
Message-ID: <62221810$0$695$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 806678f3.news.sunsite.dk
X-Trace: 1646401552 news.sunsite.dk 695 glidedog@gmail.com/68.55.82.126:62460
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Fri, 4 Mar 2022 13:45 UTC

On 3/4/22 8:21 AM, Ron AARON wrote:
> The future of Forth may be something like Oforth, but I noticed there
> hasn't been a release in 3.5 years, nor any signs from Franck Bensusan.

Yeah. I noticed the same.

> I sent him an email to see if he's ok, and the mail was rejected because
> the mailbox is full.
>
> So I hope Franck's OK...

He is. I heard from someone else that Franck is just too busy on his
real work and hasn't had time lately for Oforth which he considers a
hobby. Fortunately he has published the entire source for Oforth. So if
someone were knowledgeable and ambitious (not me), Oforth could still
evolve.

Maybe the future of Forth is something like 8th?

-Doug

Re: Oforth - calling Franck

<8bc5492a-c5ad-46c0-b762-b129d6a0e67cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7d81:0:b0:2de:3c97:11c3 with SMTP id c1-20020ac87d81000000b002de3c9711c3mr31212318qtd.564.1646401732940;
Fri, 04 Mar 2022 05:48:52 -0800 (PST)
X-Received: by 2002:a05:6214:2482:b0:432:4bf6:47b7 with SMTP id
gi2-20020a056214248200b004324bf647b7mr28344588qvb.38.1646401732703; Fri, 04
Mar 2022 05:48:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!aioe.org!news.uzoreto.com!feeder1.cambriumusenet.nl!feed.tweak.nl!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: Fri, 4 Mar 2022 05:48:52 -0800 (PST)
In-Reply-To: <62221810$0$695$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <87o82mkq1w.fsf@nightsong.com>
<62220489$0$704$14726298@news.sunsite.dk> <svt3pe$rgu$1@dont-email.me> <62221810$0$695$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8bc5492a-c5ad-46c0-b762-b129d6a0e67cn@googlegroups.com>
Subject: Re: Oforth - calling Franck
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Fri, 04 Mar 2022 13:48:52 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Hans Bezemer - Fri, 4 Mar 2022 13:48 UTC

On Friday, March 4, 2022 at 2:45:54 PM UTC+1, Doug Hoffman wrote:
> Maybe the future of Forth is something like 8th?
I second that motion!

And those who think this statement is only half true, can always use 4tH ;-)

Hans Bezemer

Re: Oforth - calling Franck

<svt76e$rmo$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: clf...@8th-dev.com (Ron AARON)
Newsgroups: comp.lang.forth
Subject: Re: Oforth - calling Franck
Date: Fri, 4 Mar 2022 16:19:52 +0200
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <svt76e$rmo$1@dont-email.me>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<87o82mkq1w.fsf@nightsong.com> <62220489$0$704$14726298@news.sunsite.dk>
<svt3pe$rgu$1@dont-email.me> <62221810$0$695$14726298@news.sunsite.dk>
<8bc5492a-c5ad-46c0-b762-b129d6a0e67cn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 4 Mar 2022 14:19:59 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="881b5550829c2b8b7d9a506e45d723b1";
logging-data="28376"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19j3GTC6AStBLMLXarAHbMx"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.1
Cancel-Lock: sha1:CjgUCT496vSeBxjm270MBJ9Qce4=
In-Reply-To: <8bc5492a-c5ad-46c0-b762-b129d6a0e67cn@googlegroups.com>
Content-Language: en-US
 by: Ron AARON - Fri, 4 Mar 2022 14:19 UTC

On 2022-03-04 15:48, Hans Bezemer wrote:
> On Friday, March 4, 2022 at 2:45:54 PM UTC+1, Doug Hoffman wrote:
>> Maybe the future of Forth is something like 8th?
> I second that motion!
>
> And those who think this statement is only half true, can always use 4tH ;-)

:)

Re: Oforth - calling Franck

<svt78j$rmo$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: clf...@8th-dev.com (Ron AARON)
Newsgroups: comp.lang.forth
Subject: Re: Oforth - calling Franck
Date: Fri, 4 Mar 2022 16:21:03 +0200
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <svt78j$rmo$2@dont-email.me>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<87o82mkq1w.fsf@nightsong.com> <62220489$0$704$14726298@news.sunsite.dk>
<svt3pe$rgu$1@dont-email.me> <62221810$0$695$14726298@news.sunsite.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 4 Mar 2022 14:21:07 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="881b5550829c2b8b7d9a506e45d723b1";
logging-data="28376"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+TmV9dWzJ2nj6ZtRPET36V"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.1
Cancel-Lock: sha1:vv/Hc5ajkLUEwqenJKi+O1M/J+M=
In-Reply-To: <62221810$0$695$14726298@news.sunsite.dk>
Content-Language: en-US
 by: Ron AARON - Fri, 4 Mar 2022 14:21 UTC

On 2022-03-04 15:45, Doug Hoffman wrote:
> On 3/4/22 8:21 AM, Ron AARON wrote:
>> The future of Forth may be something like Oforth, but I noticed there
>> hasn't been a release in 3.5 years, nor any signs from Franck Bensusan.
>
> Yeah. I noticed the same.
>
>> I sent him an email to see if he's ok, and the mail was rejected
>> because the mailbox is full.
>>
>> So I hope Franck's OK...
>
> He is. I heard from someone else that Franck is just too busy on his
> real work and hasn't had time lately for Oforth which he considers a
> hobby. Fortunately he has published the entire source for Oforth. So if
> someone were knowledgeable and ambitious (not me), Oforth could still
> evolve.

Good he's OK, thanks for the update.

>
> Maybe the future of Forth is something like 8th?

Maybe... I'm happy either way.

Re: Applying "FORTH philosophy" to projects rather than code

<ad668799-0c74-4f5c-88b1-be0342f662bdn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:492:b0:2df:f328:ab2c with SMTP id p18-20020a05622a049200b002dff328ab2cmr27204051qtx.669.1646416847338;
Fri, 04 Mar 2022 10:00:47 -0800 (PST)
X-Received: by 2002:a05:622a:18b:b0:2de:8f67:b3e2 with SMTP id
s11-20020a05622a018b00b002de8f67b3e2mr32698411qtw.104.1646416847131; Fri, 04
Mar 2022 10:00:47 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!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: Fri, 4 Mar 2022 10:00:46 -0800 (PST)
In-Reply-To: <87sfrykt36.fsf@nightsong.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ad668799-0c74-4f5c-88b1-be0342f662bdn@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Fri, 04 Mar 2022 18:00:47 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 38
 by: Rick C - Fri, 4 Mar 2022 18:00 UTC

On Friday, March 4, 2022 at 3:41:36 AM UTC-5, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > Returning pointers to functions or passing functions as arguments
> > would seem to essentially be self modifying code, no?
> No it just means functions are values, whose implementation involves
> pointers to code.

Of course, but by using pointers to code to control execution is no different from modifying code. There is no way to analyze the code to verify it is written correctly.

> For example, sin (sine) is a function, whose input is a real and whose
> output is another real. And "derivative" (d/dx) is a function whose
> input is a function, and whose output is another function. So you get
> that d/dx (sin) = cos, or some numerical approximation of same. In
> Python or Haskell, this is easy, e.g.:
>
> h = 0.0001
> d_over_dx f = g where { g x = (f(x+h) - f(x)) / h }
> dsin = d_over_dx sin
> print (dsin 0.5) -- prints 0.8775585891507287
> print (cos 0.5) -- prints 0.8775825618903728
>
> Pretty close approximation. In Forth it is a bit messier because you
> want a signature like
>
> : d/dx ( xt -- xt ) .... ;
>
> and you may have to do some advanced or non-portable things to create
> new xt's on the fly like that. But there are various ways you can get
> equivalent functionality using OOP or whatever.

Sorry, I don't know Python or Haskell. But I do know that while you can construct very simple examples, it doesn't prove a point.

--

Rick C.

+ Get 1,000 miles of free Supercharging
+ Tesla referral code - https://ts.la/richard11209

Re: Applying "FORTH philosophy" to projects rather than code

<1776a1ef-1a0c-4024-8c16-fed24b20fef9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:5fc5:0:b0:435:4420:d056 with SMTP id jq5-20020ad45fc5000000b004354420d056mr5168096qvb.130.1646417076720;
Fri, 04 Mar 2022 10:04:36 -0800 (PST)
X-Received: by 2002:ac8:5dc8:0:b0:2de:61eb:331f with SMTP id
e8-20020ac85dc8000000b002de61eb331fmr33172914qtx.2.1646417076544; Fri, 04 Mar
2022 10:04:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!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: Fri, 4 Mar 2022 10:04:36 -0800 (PST)
In-Reply-To: <c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com> <c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1776a1ef-1a0c-4024-8c16-fed24b20fef9n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Fri, 04 Mar 2022 18:04:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 58
 by: Rick C - Fri, 4 Mar 2022 18:04 UTC

On Friday, March 4, 2022 at 5:16:59 AM UTC-5, minf...@arcor.de wrote:
> Paul Rubin schrieb am Freitag, 4. März 2022 um 09:41:36 UTC+1:
> > Rick C <gnuarm.del...@gmail.com> writes:
> > > Returning pointers to functions or passing functions as arguments
> > > would seem to essentially be self modifying code, no?
> > No it just means functions are values, whose implementation involves
> > pointers to code.
> >
> > For example, sin (sine) is a function, whose input is a real and whose
> > output is another real. And "derivative" (d/dx) is a function whose
> > input is a function, and whose output is another function. So you get
> > that d/dx (sin) = cos, or some numerical approximation of same. In
> > Python or Haskell, this is easy, e.g.:
> >
> > h = 0.0001
> > d_over_dx f = g where { g x = (f(x+h) - f(x)) / h }
> > dsin = d_over_dx sin
> > print (dsin 0.5) -- prints 0.8775585891507287
> > print (cos 0.5) -- prints 0.8775825618903728
> >
> > Pretty close approximation. In Forth it is a bit messier because you
> > want a signature like
> >
> > : d/dx ( xt -- xt ) .... ;
> >
> > and you may have to do some advanced or non-portable things to create
> > new xt's on the fly like that. But there are various ways you can get
> > equivalent functionality using OOP or whatever.
> Clumsy but portable:
>
> 0.0001e FVALUE h
>
> DEFER ofunc ' FSIN IS ofunc
> DEFER dfunc
>
> : D/DX {: xt f: x -- y :}
> x h f+ xt execute x xt execute f- h f/ ;
>
> :NONAME ( x -- y ) ['] ofunc D/DX ; IS dfunc
>
> 0.5e dfunc f.
> 0.5e fcos f.

It would seem that the use of DEFER is a perfect example of self modifying code. You literally have no idea of what function is connected to a name at run time. In fact, that is the point of DEFER, to allow the definition connected to a deferred word to be changed at will. But it makes the code unverifiable by formal methods, no?

--

Rick C.

-- Get 1,000 miles of free Supercharging
-- Tesla referral code - https://ts.la/richard11209

Re: Applying "FORTH philosophy" to projects rather than code

<60c83541-a27c-49bb-bd57-3fd37ac6ff88n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:902:0:b0:60d:fc23:3e03 with SMTP id 2-20020a370902000000b0060dfc233e03mr3472598qkj.464.1646418475176;
Fri, 04 Mar 2022 10:27:55 -0800 (PST)
X-Received: by 2002:a05:620a:1721:b0:649:341:399b with SMTP id
az33-20020a05620a172100b006490341399bmr3461614qkb.327.1646418475017; Fri, 04
Mar 2022 10:27:55 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!1.us.feeder.erje.net!feeder.erje.net!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: Fri, 4 Mar 2022 10:27:54 -0800 (PST)
In-Reply-To: <1776a1ef-1a0c-4024-8c16-fed24b20fef9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com> <c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>
<1776a1ef-1a0c-4024-8c16-fed24b20fef9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <60c83541-a27c-49bb-bd57-3fd37ac6ff88n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Fri, 04 Mar 2022 18:27:55 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 20
 by: Hans Bezemer - Fri, 4 Mar 2022 18:27 UTC

On Friday, March 4, 2022 at 7:04:38 PM UTC+1, gnuarm.del...@gmail.com wrote:
> It would seem that the use of DEFER is a perfect example of self modifying code.
> You literally have no idea of what function is connected to a name at run time. In fact, that is the point of DEFER, to allow the definition connected to a deferred word to be changed at will.
> But it makes the code unverifiable by formal methods, no?
IMHO - not if you limit the number of paths that can be taken. E.g. in uBasic/4tH the DEFER .NUMBER is *only* moved from its default (NUMBER) when a USING() clause is used - and immediately reset afterwards.

Of course, if you create a situation where you have no idea what you're doing, you're doing it wrong. Therefore, I advise 4tH users to use the PROTO: / :PROTO construct when they're simply want to delay implementation - because that one allows only one single assignment - or you'll get an error thrown at you.

I must say - that one allowed me to scrap a lot of DEFERs.

Hans Bezemer

Re: Applying "FORTH philosophy" to projects rather than code

<6d3ba772-9908-48ae-8228-a441ded0b801n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:4649:0:b0:47e:cf47:48af with SMTP id t70-20020a374649000000b0047ecf4748afmr157005qka.605.1646423606679;
Fri, 04 Mar 2022 11:53:26 -0800 (PST)
X-Received: by 2002:a05:6214:5018:b0:432:946e:7c20 with SMTP id
jo24-20020a056214501800b00432946e7c20mr315394qvb.2.1646423606559; Fri, 04 Mar
2022 11:53:26 -0800 (PST)
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: Fri, 4 Mar 2022 11:53:26 -0800 (PST)
In-Reply-To: <1776a1ef-1a0c-4024-8c16-fed24b20fef9n@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: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com> <c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>
<1776a1ef-1a0c-4024-8c16-fed24b20fef9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6d3ba772-9908-48ae-8228-a441ded0b801n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: minfo...@arcor.de (minf...@arcor.de)
Injection-Date: Fri, 04 Mar 2022 19:53:26 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 22
 by: minf...@arcor.de - Fri, 4 Mar 2022 19:53 UTC

gnuarm.del...@gmail.com schrieb am Freitag, 4. März 2022 um 19:04:38 UTC+1:
> On Friday, March 4, 2022 at 5:16:59 AM UTC-5, minf...@arcor.de wrote:
> > Clumsy but portable:
> >
> > 0.0001e FVALUE h
> >
> > DEFER ofunc ' FSIN IS ofunc
> > DEFER dfunc
> >
> > : D/DX {: xt f: x -- y :}
> > x h f+ xt execute x xt execute f- h f/ ;
> >
> > :NONAME ( x -- y ) ['] ofunc D/DX ; IS dfunc
> >
> > 0.5e dfunc f.
> > 0.5e fcos f.
>
> It would seem that the use of DEFER is a perfect example of self modifying code. You literally have no idea of what function is connected to a name at run time.

There are DEFER@ and ACTION-OF ....

Re: Applying "FORTH philosophy" to projects rather than code

<60a434a8-f4ec-4e38-9bfb-0bd4f829c0d5n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:62d5:0:b0:47e:1755:2ad8 with SMTP id w204-20020a3762d5000000b0047e17552ad8mr361846qkb.561.1646428228373;
Fri, 04 Mar 2022 13:10:28 -0800 (PST)
X-Received: by 2002:ac8:7e90:0:b0:2de:2b69:aa3c with SMTP id
w16-20020ac87e90000000b002de2b69aa3cmr610289qtj.279.1646428228177; Fri, 04
Mar 2022 13:10:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.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: Fri, 4 Mar 2022 13:10:27 -0800 (PST)
In-Reply-To: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
Injection-Info: google-groups.googlegroups.com; posting-host=94.59.254.67; posting-account=mkOgdwoAAAAGDUBcY0S_1Gob1TR-ZY2T
NNTP-Posting-Host: 94.59.254.67
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <60a434a8-f4ec-4e38-9bfb-0bd4f829c0d5n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: amal...@gmail.com (Ala'a)
Injection-Date: Fri, 04 Mar 2022 21:10:28 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Ala'a - Fri, 4 Mar 2022 21:10 UTC

Hi Richard,

YMMV, but checkout http://www.ultratechnology.com/, if you didn't already.

Also from the same site, check this one specifically http://www.ultratechnology.com/method.htm

Hope it help.

regards,

Re: Applying "FORTH philosophy" to projects rather than code

<87bkyll77b.fsf@nightsong.com>

  copy mid

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

  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: Applying "FORTH philosophy" to projects rather than code
Date: Fri, 04 Mar 2022 13:48:56 -0800
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <87bkyll77b.fsf@nightsong.com>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com>
<ad668799-0c74-4f5c-88b1-be0342f662bdn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="69fb7b04d9cab1a7620b50984026acdf";
logging-data="19736"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+emg/OhQwO3r78/mw4BIoA"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:sx6849H6guPhkNyeMeGW4xomTcw=
sha1:M9VaJwmHasA7174uqlbczd40Dkc=
 by: Paul Rubin - Fri, 4 Mar 2022 21:48 UTC

Rick C <gnuarm.deletethisbit@gmail.com> writes:
> Of course, but by using pointers to code to control execution is no
> different from modifying code.

It's completely different, as in the notion of a cpu that executes code
from ROM and puts data in RAM. Modifying the code (including
self-modification) in such a cpu is impossible, but pointers to code are
just a data words.

> There is no way to analyze the code to verify it is written correctly.

It is true, programs involving pointers, including data pointers, are
harder to analyze in general. OOP including in languages like Java is
almost always implemented using code pointers and it does obscure the
control flow.

Analysis is possible but it requires careful control over how pointers
are created and used, and it's easier if there is language support for
that.

> Sorry, I don't know Python or Haskell. But I do know that while you
> can construct very simple examples, it doesn't prove a point.

In electrical engineering I'm sure you studied derivatives, integrals,
Fourier transforms, Laplace transforms, and all that. Those are all
"operators", which take a function and give you back another function.
Digital or analog filters are another example: you put in a waveform
(which is like a function) and get back another waveform.

There is a style of programming that uses functions and operators as
data in the program, and there are languages that make this easy to do.
It is well supported in Haskell and to a lesser extent in Python.

I would say that this style is not well-supported in Forth, but it is
doable with some effort. It is reasonable to say that this style is
usually not of much benefit to the types of programs that get written in
Forth. So it's ok for Forth that the support is missing.

OOP (including in languages like Java) also is usually implemented using
function pointers. You are right that it can make things confusing,
since the program's control flow is obscured.

Re: Applying "FORTH philosophy" to projects rather than code

<9bfee30e-765a-4f13-abe1-6e86f3a02b1dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:4e56:0:b0:2de:7120:61c9 with SMTP id e22-20020ac84e56000000b002de712061c9mr819628qtw.684.1646432218105;
Fri, 04 Mar 2022 14:16:58 -0800 (PST)
X-Received: by 2002:a05:620a:24cd:b0:649:776d:4deb with SMTP id
m13-20020a05620a24cd00b00649776d4debmr534548qkn.644.1646432217963; Fri, 04
Mar 2022 14:16:57 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!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: Fri, 4 Mar 2022 14:16:57 -0800 (PST)
In-Reply-To: <87bkyll77b.fsf@nightsong.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com> <ad668799-0c74-4f5c-88b1-be0342f662bdn@googlegroups.com>
<87bkyll77b.fsf@nightsong.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9bfee30e-765a-4f13-abe1-6e86f3a02b1dn@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Fri, 04 Mar 2022 22:16:58 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 50
 by: Rick C - Fri, 4 Mar 2022 22:16 UTC

On Friday, March 4, 2022 at 4:48:59 PM UTC-5, Paul Rubin wrote:
> Rick C <gnuarm.del...@gmail.com> writes:
> > Of course, but by using pointers to code to control execution is no
> > different from modifying code.
> It's completely different, as in the notion of a cpu that executes code
> from ROM and puts data in RAM. Modifying the code (including
> self-modification) in such a cpu is impossible, but pointers to code are
> just a data words.

You fail to even understand the concept. If a pointer to code is executed, the code executed depends on the data in a way that is equivalent to self modifying code.

> > There is no way to analyze the code to verify it is written correctly.
> It is true, programs involving pointers, including data pointers, are
> harder to analyze in general. OOP including in languages like Java is
> almost always implemented using code pointers and it does obscure the
> control flow.

Pointers to data is very different from pointers to code. Data pointers will not modify the structure of the code.

> Analysis is possible but it requires careful control over how pointers
> are created and used, and it's easier if there is language support for
> that.
> > Sorry, I don't know Python or Haskell. But I do know that while you
> > can construct very simple examples, it doesn't prove a point.
> In electrical engineering I'm sure you studied derivatives, integrals,
> Fourier transforms, Laplace transforms, and all that. Those are all
> "operators", which take a function and give you back another function.
> Digital or analog filters are another example: you put in a waveform
> (which is like a function) and get back another waveform.
>
> There is a style of programming that uses functions and operators as
> data in the program, and there are languages that make this easy to do.
> It is well supported in Haskell and to a lesser extent in Python.
>
> I would say that this style is not well-supported in Forth, but it is
> doable with some effort. It is reasonable to say that this style is
> usually not of much benefit to the types of programs that get written in
> Forth. So it's ok for Forth that the support is missing.
>
> OOP (including in languages like Java) also is usually implemented using
> function pointers. You are right that it can make things confusing,
> since the program's control flow is obscured.

--

Rick C.

-+ Get 1,000 miles of free Supercharging
-+ Tesla referral code - https://ts.la/richard11209

Re: Applying "FORTH philosophy" to projects rather than code

<396a0802-784d-4e58-b472-e11c9e296139n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:1211:b0:2e0:5648:a053 with SMTP id y17-20020a05622a121100b002e05648a053mr821148qtx.267.1646432402297;
Fri, 04 Mar 2022 14:20:02 -0800 (PST)
X-Received: by 2002:a05:620a:243:b0:60d:df5e:16d8 with SMTP id
q3-20020a05620a024300b0060ddf5e16d8mr526540qkn.571.1646432402114; Fri, 04 Mar
2022 14:20:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!3.eu.feeder.erje.net!feeder.erje.net!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: Fri, 4 Mar 2022 14:20:01 -0800 (PST)
In-Reply-To: <60c83541-a27c-49bb-bd57-3fd37ac6ff88n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com> <d3ad464d-6711-4bd8-ac6e-4064908ff629n@googlegroups.com>
<87sfrykt36.fsf@nightsong.com> <c1f0c36c-f97f-45fc-9d07-56704b3e3093n@googlegroups.com>
<1776a1ef-1a0c-4024-8c16-fed24b20fef9n@googlegroups.com> <60c83541-a27c-49bb-bd57-3fd37ac6ff88n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <396a0802-784d-4e58-b472-e11c9e296139n@googlegroups.com>
Subject: Re: Applying "FORTH philosophy" to projects rather than code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Fri, 04 Mar 2022 22:20:02 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: Rick C - Fri, 4 Mar 2022 22:20 UTC

On Friday, March 4, 2022 at 1:27:56 PM UTC-5, the.bee...@gmail.com wrote:
> On Friday, March 4, 2022 at 7:04:38 PM UTC+1, gnuarm.del...@gmail.com wrote:
> > It would seem that the use of DEFER is a perfect example of self modifying code.
> > You literally have no idea of what function is connected to a name at run time. In fact, that is the point of DEFER, to allow the definition connected to a deferred word to be changed at will.
> > But it makes the code unverifiable by formal methods, no?
> IMHO - not if you limit the number of paths that can be taken. E.g. in uBasic/4tH the DEFER .NUMBER is *only* moved from its default (NUMBER) when a USING() clause is used - and immediately reset afterwards.
>
> Of course, if you create a situation where you have no idea what you're doing, you're doing it wrong. Therefore, I advise 4tH users to use the PROTO: / :PROTO construct when they're simply want to delay implementation - because that one allows only one single assignment - or you'll get an error thrown at you.
>
> I must say - that one allowed me to scrap a lot of DEFERs.

Of course if you write perfect code, it will always work. A pointer to a function that can be changed from anywhere in the code is the same sort of problem as using GOTOs. I've never seen anything about DEFER that requires the value to be restored the way you seem to be describing.

--

Rick C.

+- Get 1,000 miles of free Supercharging
+- Tesla referral code - https://ts.la/richard11209

Re: Applying "FORTH philosophy" to projects rather than code

<877d99l3v7.fsf@nightsong.com>

  copy mid

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

  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: Applying "FORTH philosophy" to projects rather than code
Date: Fri, 04 Mar 2022 15:01:00 -0800
Organization: A noiseless patient Spider
Lines: 142
Message-ID: <877d99l3v7.fsf@nightsong.com>
References: <Lr-dnYhNvMQOVr3_nZ2dnUU7-XHNnZ2d@supernews.com>
<3634fcf1-df4c-49c5-ba4b-e59387d67c0fn@googlegroups.com>
<87o82mkq1w.fsf@nightsong.com>
<84d827a2-aebf-4003-8425-079d7ae6c559n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="fad170843154d9cb1f08f2efe990179c";
logging-data="5244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18OSll0Vhkrx9+KFHLu4KAP"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:uSjLgTg7TMWGNTZVYnKomaQlpyY=
sha1:KlsRCT+zlwa0wfBAhZNJ4YTkAS8=
 by: Paul Rubin - Fri, 4 Mar 2022 23:01 UTC

Hans Bezemer <the.beez.speaks@gmail.com> writes:
> So yes, from my point of view 400 lines is MASSIVE! That's about the
> size of the 4tH preprocessor (which without libs is a little less than
> 500 lines).

How big is it compared to the total size of 4th? I looked at 4th a
while back and it was pretty big, though of course it did a lot.

I just skimmed Anton's GC and the main file (gc4image.fs) is 751 lines,
around 500 of which are not blank or comments. A lot of it is small
helper functions like "find the first nonzero bit of an array". Overall
it looks pretty understandable.

4th according to https://thebeez.home.xs4all.nl/4tH/sloc.html is 5ksloc
of C and 9ksloc of Forth, around 14k total, so 500sloc (Anton's gc) is
about 3% of that. If having a "massive" GC library as 3% of a program
simplifies or eliminates the storage management headaches of the other
97%, is that really a bad trade?

> It functions IMHO about the same way uBasic/4tH's GC does. But hat one
> is about 50 (raw) lines. On the other hand (all raw lines of code):

It sounds like you reclaim strings and arrays, but not structures
containing pointers, which requires pointer tracing. That's where the
complexity of gc comes from.

How do you know when a string is ready to be reclaimed, anyway?
Reference counting requires some kind of access convention imposed on
the whole program, another way to make mistakes unless the language
handles it.

> My answer is always the same - what looks simple and elegant on the
> outside may amount to very messy and overly bloated code on the
> inside. IMHO - that counts. You're free to feel otherwise, of
> course. As long as I don't have to maintain it..

I've written and maintained (simple) garbage collectors and it's not
that bad. Very fancy ones can be complicated, just like anything else.
I've implemented Lisp (including gc) and it's imho not harder or more
complicated than implementing Forth. The execution efficiency of a
simple implementation will be a lot worse, which might matter in some
applications, but is fine in others. It is not messy or bloated, but I
could accept that it is slow.

I've been wanting to look at this Python subset: https://sneklang.org/

> No - even IF you read the article, you didn't understand it. Since I
> gave at least three or four variations on this theme,

Yes, your complaint was that the nested strcpy in C was too hard to
read, so I picked the most readable Forth version.

> IT'S NOT FORTH THAT'S LACKING - IT'S THE SKILLS OF THE WANNABEES WHO
> TRY TO USE IT.

I think I see what you are getting at: a sufficiently skilled programmer
is able to see how to simplify string concatenation and implement the
simple-to-use version in Forth. They still have to spend effort on
that. Now imagine that string concatenation is already handled by the
language, so the skilled programmer can do something useful instead.
You get the best of both worlds ;).

> If you have to contemplate that - use Python. Don't pretend you're a
> Forth programmer. Delve into the writings of Dijkstra if you still
> believe this "the language will save all n00bs" myth.

I do use Python and have written it for a living. I use Forth for fun
sometimes, but yeah, I wouldn't call myself a Forth programmer the way
some of the regulars here are.

> [Locals] It's overhead nonetheless.

Do you mean runtime overhead? Do you really care? Is it something your
compiler can't optimize away? If the overhead matters and your compiler
can't optimize it, maybe it's better to spend the effort on the
compiler, to simplify the applications.

> IMHO locals are a horrible C-ism.

They were used in Fortran, Lisp, and Algol long before there was such a
thing as C, and (to the extent that Lisp is lambda calculus) they were
used in lambda calculus (i.e. in math) long before there was such a
thing as computers.

Have you ever used Lisp? You might give it a try sometime if you
haven't. SICP ( https://mitpress.mit.edu/sicp ) is a great book. It
uses Scheme, a very clean dialect of Lisp. The full text is online at
that site.

> And that IMHO is Forth - there is no single right way to do it. You
> choose your guns - you're not obliged to take a knife to a gunfight.

I find garbage collection to be among the most powerful of programming
"guns". Locals are not a gun, they're more like a knife, and
programming without them is like going to a knife fight with just your
fists ;).

> [Knight moves] Again, you either didn't read or didn't understand the
> article. I used Forth as a tool to discover the algorithm.

I did read the article, though maybe its point didn't reach me. Yes,
you used Forth to discover the algorithm, but it seemed to me that you
could have skipped some steps.

> The point is, that even if you have a difficult way to calculate the
> fee for a long distance calls, Forthers don't stop to investigate it
> until they've reached the bare essentials of the algorithm.

This (about not stopping to investigate), I don't understand. I would
also say someone better at algebra than I am would probably boil
explaining the knight move algorithm down to the group action of the
knight moves. I particularly don't see a way other than the brute force
search that you did, to find that there is only one solution modulo
symmetry. By analogy, the 8 queens problem on an 8x8 board has 12
solutions modulo symmetry, but I don't see how to find that out except
by enumeration.

>> This one just makes Forth look painful ;).
> It SHOULD be "painful" if you want to have the best Forth
> implementation. See also:
> https://sourceforge.net/p/forth-4th/wiki/Understand%20your%20algorithm/

I don't see what that juggling of variables onto the Forth stack has to
do with the underlying algorithm on that page. It's the same algorithm,
except that the Forth version adds pain. Think of writing assembly code
on a machine with plenty of registers, vs writing it on a machine with
just an accumulator, or on one with an AC plus an index register, etc.

They each put you through different contortions but it's the same
algorithms underneath. The idea of a HLL, I thought, was to take care
of those contortions so you don't have to. Saying "don't forget Forth's
return stack" is like saying don't forget your machine has two index
registers rather than one. Yes, that makes things easier, but sometimes
you want more than two. That's what a compiler is supposed to give you.
You code as if you had unlimited registers, and the compiler figures out
how to funnel your data through the actual machine registers. Forth
makes you do that yourself.

> The truth can be hard, I know. But my father didn't raise a sissy ;-)

Yep! Writing compilers and gc's can be hard, but tough programmers
don't back away!

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor