Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"In short, _N is Richardian if, and only if, _N is not Richardian."


devel / comp.lang.forth / Re: NEW : Document your FORTH code

SubjectAuthor
* NEW : Document your FORTH codeMarc Petremann
+* Re: NEW : Document your FORTH codeminforth
|`* Re: NEW : Document your FORTH codedxf
| +* Re: NEW : Document your FORTH codedxf
| |`* Re: NEW : Document your FORTH codesjack
| | `* Re: NEW : Document your FORTH codemhx
| |  +* Re: NEW : Document your FORTH codedxf
| |  |`- Re: NEW : Document your FORTH codenone
| |  +* Re: NEW : Document your FORTH codesjack
| |  |`* Re: NEW : Document your FORTH codeminforth
| |  | `- Re: NEW : Document your FORTH codenone
| |  `- Re: NEW : Document your FORTH codenone
| `* Re: NEW : Document your FORTH codenone
|  `- Re: NEW : Document your FORTH codedxf
`- Re: NEW : Document your FORTH codeJurgen Pitaske

1
NEW : Document your FORTH code

<65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:952:b0:77d:869c:3468 with SMTP id w18-20020a05620a095200b0077d869c3468mr223181qkw.15.1701033982904;
Sun, 26 Nov 2023 13:26:22 -0800 (PST)
X-Received: by 2002:a17:902:9883:b0:1cf:9f36:d983 with SMTP id
s3-20020a170902988300b001cf9f36d983mr1849103plp.8.1701033982558; Sun, 26 Nov
2023 13:26:22 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sun, 26 Nov 2023 13:26:21 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=83.201.133.196; posting-account=xbxuywoAAAASFWsQBmiz40gnxDBWDrxx
NNTP-Posting-Host: 83.201.133.196
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
Subject: NEW : Document your FORTH code
From: mpetremann93m@gmail.com (Marc Petremann)
Injection-Date: Sun, 26 Nov 2023 21:26:22 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1351
 by: Marc Petremann - Sun, 26 Nov 2023 21:26 UTC

Hi,

Are you recovering an unknown FORTH code?

Looking to understand the meaning of the FORTH words in this code?

Well, I have developed a mill, in PHP, which will read this code and document it in a fraction of seconds!

https://eforth.arduino-forth.com/index/doc/

Re: NEW : Document your FORTH code

<8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Mon, 27 Nov 2023 08:16:21 +0000
Organization: novaBBS
Message-ID: <8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="2255264"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Rslight-Posting-User: 0d6d33dbe0e2e1ff58b82acfc1a8a32ac3b1cb72
X-Rslight-Site: $2y$10$992HbiXsRT8VDJQqNAkIpOlG/TMnt8dT68xfqANwPQ/bmrBKXyemm
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on novalink.us
 by: minforth - Mon, 27 Nov 2023 08:16 UTC

I tested it with code snippets from F83 and an old but short 8QUEEN solver.
Your tool did not _document_ anything, but added hyperlinks to words,
pointing deeper into your own Forth systems. Good for you.

But thanks anyway for releasing your tool to the public.
You might be interested in HolonForth for comparison.

Re: NEW : Document your FORTH code

<39f5986c-7d33-4ac8-9639-55f7de23c52cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:88f:b0:77d:8fe6:8b50 with SMTP id b15-20020a05620a088f00b0077d8fe68b50mr140064qka.2.1701075285268;
Mon, 27 Nov 2023 00:54:45 -0800 (PST)
X-Received: by 2002:a17:90b:4b07:b0:285:bb02:2141 with SMTP id
lx7-20020a17090b4b0700b00285bb022141mr817052pjb.7.1701075284860; Mon, 27 Nov
2023 00:54:44 -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: Mon, 27 Nov 2023 00:54:44 -0800 (PST)
In-Reply-To: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2.103.184.70; posting-account=eAOrwQkAAABheFES5y-02sBOFdTlBRio
NNTP-Posting-Host: 2.103.184.70
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <39f5986c-7d33-4ac8-9639-55f7de23c52cn@googlegroups.com>
Subject: Re: NEW : Document your FORTH code
From: jpitaske@gmail.com (Jurgen Pitaske)
Injection-Date: Mon, 27 Nov 2023 08:54:45 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Jurgen Pitaske - Mon, 27 Nov 2023 08:54 UTC

On Sunday, 26 November 2023 at 21:26:24 UTC, Marc Petremann wrote:
> Hi,
>
> Are you recovering an unknown FORTH code?
>
> Looking to understand the meaning of the FORTH words in this code?
>
> Well, I have developed a mill, in PHP, which will read this code and document it in a fraction of seconds!
>
> https://eforth.arduino-forth.com/index/doc/

Great idea.
If I understand it correctly,
the program adds links to the words used to the software and known.

Should be a great tool for people who start with Forth.

And if this could be open source,
people could adapt it to other Forths,
e.g. Swiftforth and VFX and more.

Re: NEW : Document your FORTH code

<unnet8$2ml74$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Thu, 11 Jan 2024 12:05:46 +1100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <unnet8$2ml74$2@dont-email.me>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
<8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com>
<1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 Jan 2024 01:05:45 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8ec3d806fd8f2a376f5a01bd644eb852";
logging-data="2839780"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19r1x/+k/xjx5PCZOeCuk2v"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:K98sXlKzXC4rcyn7JHkh66kMfe0=
Content-Language: en-GB
In-Reply-To: <1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com>
 by: dxf - Thu, 11 Jan 2024 01:05 UTC

On 11/01/2024 10:51 am, Hans Bezemer wrote:
> On Monday, November 27, 2023 at 9:16:47 AM UTC+1, minforth wrote:
>> I tested it with code snippets from F83 and an old but short 8QUEEN solver.
>> Your tool did not _document_ anything, but added hyperlinks to words,
>> pointing deeper into your own Forth systems. Good for you.
>>
>> But thanks anyway for releasing your tool to the public.
>> You might be interested in HolonForth for comparison.
> Yeah, it's useless. I'd write something like that in zero flat.
> However, I had good results with feeding code to ChatGPT
> and let it figure out what it does. I stripped all comments
> from it - but I guess well named words might give it enough
> hints.
>
> I won't call it documentation either, but for figuring out what
> zero commented code actually does functionality wise, I think
> it's quite handy.

App code I write are near zero commented. This is less problematic
in forth where functions tend to be short. Unless a function is very
obscurely named (Will Baden?), forth is largely self-documenting.
Nor is 'tricky' code really a problem. By the time one realizes it
was tricky, one will add the comment. If OTOH one never comes back to
it, who is there to care? I appreciate there may be external reasons
to add comments e.g. to impress the audience or the customer demanded
it. But that's more about pleasing others. IIRC Moore's source for
ColorForth had no comments.

Re: NEW : Document your FORTH code

<unng2n$2ml74$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Thu, 11 Jan 2024 12:25:45 +1100
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <unng2n$2ml74$3@dont-email.me>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
<8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com>
<1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com>
<unnet8$2ml74$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 11 Jan 2024 01:25:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8ec3d806fd8f2a376f5a01bd644eb852";
logging-data="2839780"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hRoZtUdLRnBoc2K3RzyW5"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:xU1lx5Z4NsLGiDEz1Z4Wzpn1vlA=
In-Reply-To: <unnet8$2ml74$2@dont-email.me>
Content-Language: en-GB
 by: dxf - Thu, 11 Jan 2024 01:25 UTC

On 11/01/2024 12:05 pm, dxf wrote:
> On 11/01/2024 10:51 am, Hans Bezemer wrote:
>> On Monday, November 27, 2023 at 9:16:47 AM UTC+1, minforth wrote:
>>> I tested it with code snippets from F83 and an old but short 8QUEEN solver.
>>> Your tool did not _document_ anything, but added hyperlinks to words,
>>> pointing deeper into your own Forth systems. Good for you.
>>>
>>> But thanks anyway for releasing your tool to the public.
>>> You might be interested in HolonForth for comparison.
>> Yeah, it's useless. I'd write something like that in zero flat.
>> However, I had good results with feeding code to ChatGPT
>> and let it figure out what it does. I stripped all comments
>> from it - but I guess well named words might give it enough
>> hints.
>>
>> I won't call it documentation either, but for figuring out what
>> zero commented code actually does functionality wise, I think
>> it's quite handy.
>
> App code I write are near zero commented. This is less problematic
> in forth where functions tend to be short. Unless a function is very
> obscurely named (Will Baden?), forth is largely self-documenting.
> Nor is 'tricky' code really a problem. By the time one realizes it
> was tricky, one will add the comment. If OTOH one never comes back to
> it, who is there to care? I appreciate there may be external reasons
> to add comments e.g. to impress the audience or the customer demanded
> it. But that's more about pleasing others. IIRC Moore's source for
> ColorForth had no comments.

p.s. I find there's a beauty in code uncluttered by useless comments.
(Don't get me started on 'auto-doc' forth source :)

Re: NEW : Document your FORTH code

<nnd$531215e1$3e472ede@d6f77743241fa4e7>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com> <1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com> <unnet8$2ml74$2@dont-email.me>
Subject: Re: NEW : Document your FORTH code
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$531215e1$3e472ede@d6f77743241fa4e7>
Organization: KPN B.V.
Date: Thu, 11 Jan 2024 10:58:42 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr2.eu1.usenetexpress.com!2001:67c:174:101:1:67:202:5.MISMATCH!feed.abavia.com!abe005.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 58
Injection-Date: Thu, 11 Jan 2024 10:58:42 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 3887
 by: none - Thu, 11 Jan 2024 09:58 UTC

In article <unnet8$2ml74$2@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>On 11/01/2024 10:51 am, Hans Bezemer wrote:
>> On Monday, November 27, 2023 at 9:16:47 AM UTC+1, minforth wrote:
>>> I tested it with code snippets from F83 and an old but short 8QUEEN solver.
>>> Your tool did not _document_ anything, but added hyperlinks to words,
>>> pointing deeper into your own Forth systems. Good for you.
>>>
>>> But thanks anyway for releasing your tool to the public.
>>> You might be interested in HolonForth for comparison.
>> Yeah, it's useless. I'd write something like that in zero flat.
>> However, I had good results with feeding code to ChatGPT
>> and let it figure out what it does. I stripped all comments
>> from it - but I guess well named words might give it enough
>> hints.
>>
>> I won't call it documentation either, but for figuring out what
>> zero commented code actually does functionality wise, I think
>> it's quite handy.
>
>App code I write are near zero commented. This is less problematic
>in forth where functions tend to be short. Unless a function is very
>obscurely named (Will Baden?), forth is largely self-documenting.
>Nor is 'tricky' code really a problem. By the time one realizes it
>was tricky, one will add the comment. If OTOH one never comes back to
>it, who is there to care? I appreciate there may be external reasons
>to add comments e.g. to impress the audience or the customer demanded
>it. But that's more about pleasing others. IIRC Moore's source for
>ColorForth had no comments.

Moore is no shining example.
Moore doesn't intend to write portable programs, and he maintains
them himself, or rather he rewrites.
Also Moore's political ideas are abhorrent and his associating
with a patent troll was a financial miss.
You can learn things from Moore, but you have to decide what is
good and what less good.

One of the reason libraries in Forth are problematic, that the skill
to properly document API's is underdeveloped. Probably because
many people think that ( d n -- ud) is sufficient documentation.
Forth is only in part self-documenting if the functions are
brilliantly named, requiring a skill not wide spread.

There are two reasons to document, usage and maintenance.
I want ciforth to be used, so every word is meticulously documented.
I have much (40 year) professional experience in maintenance.
Maintenance documentation especially regards the overlooked border
cases makes out the value of a program. Consequently my Forth programs
are worth more to a c-programmer, than most Forth programs are to a
Forth programmer.

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

Re: NEW : Document your FORTH code

<2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: sdwjack69@gmail.com (sjack)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Thu, 11 Jan 2024 12:25:41 +0000
Organization: novaBBS
Message-ID: <2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com> <1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com> <unnet8$2ml74$2@dont-email.me> <unng2n$2ml74$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3072692"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: 6c6a58d4ffc70ded2199765154958f9cb52e5722
X-Rslight-Site: $2y$10$6Z6BNoQ.Isf5YkcFiVg8A.LHXYBTYGG3rF/R1ZruqxtbtdMHQ3/pa
 by: sjack - Thu, 11 Jan 2024 12:25 UTC

dxf wrote:

> p.s. I find there's a beauty in code uncluttered by useless comments.
> (Don't get me started on 'auto-doc' forth source :)

I by habit usually add useless comments. It's something I
can do unthinkingly while I contemplate some aspect or usage
of the code just written; fingers like to stay busy.

Re: NEW : Document your FORTH code

<aa3f535e4950f466418da096be170835@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: mhx@iae.nl (mhx)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Thu, 11 Jan 2024 18:34:19 +0000
Organization: novaBBS
Message-ID: <aa3f535e4950f466418da096be170835@www.novabbs.com>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com> <1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com> <unnet8$2ml74$2@dont-email.me> <unng2n$2ml74$3@dont-email.me> <2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3104626"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: 59549e76d0c3560fb37b97f0b9407a8c14054f24
X-Rslight-Site: $2y$10$C8WLGvcopUrMXJr46cohUuNswWTwFL1bFPcIKCzFjB1Du2MCJP3xm
 by: mhx - Thu, 11 Jan 2024 18:34 UTC

sjack wrote:

[..]
> I by habit usually add useless comments. It's something I
> can do unthinkingly while I contemplate some aspect or usage
> of the code just written; fingers like to stay busy.

Do you change these comments when you afterwards change the code?

My four rules are:
1. At the top of the file there is an explanation WHAT
the program is going to do, which METHOD it uses (references!)
and, not in depth, HOW it is doing it.
2. Every word has a stack comment.
3. At the end of the file there is word which runs a small example,
exercising the code. The output is self-explaining, or it
refers to [1].
4. (optional) Internal words, if any, are marked as such and
preferably hidden. This allows the user to skip such words
in the first reading.

-marcel

Re: NEW : Document your FORTH code

<unpqub$35agg$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Fri, 12 Jan 2024 09:43:24 +1100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <unpqub$35agg$1@dont-email.me>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
<8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com>
<1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com>
<unnet8$2ml74$2@dont-email.me> <unng2n$2ml74$3@dont-email.me>
<2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com>
<aa3f535e4950f466418da096be170835@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 11 Jan 2024 22:43:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="8ec3d806fd8f2a376f5a01bd644eb852";
logging-data="3320336"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19GyuvOOmZIXe2b+bgXn3vC"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:XyQSHk5CU51uV67oIxRwwtpcVf8=
Content-Language: en-GB
In-Reply-To: <aa3f535e4950f466418da096be170835@www.novabbs.com>
 by: dxf - Thu, 11 Jan 2024 22:43 UTC

On 12/01/2024 5:34 am, mhx wrote:
> sjack wrote:
>
> [..]
>> I by habit usually add useless comments. It's something I
>> can do unthinkingly while I contemplate some aspect or usage
>> of the code just written; fingers like to stay busy.
>
> Do you change these comments when you afterwards change the code?
> ...

Good point. I find comments get included on subsequent revisions,
particularly as overall program complexity increases. These tend
to be one-liners at the beginning of a definition. More a reminder
than an explanation. I did 'technical writing' in my career aimed
at new readers. Nothing like that. I'd find it tedious.

Re: NEW : Document your FORTH code

<cf4e53334cd411004077fd93bc3a36c2@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: sdwjack69@gmail.com (sjack)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Fri, 12 Jan 2024 01:58:21 +0000
Organization: novaBBS
Message-ID: <cf4e53334cd411004077fd93bc3a36c2@www.novabbs.com>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com> <1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com> <unnet8$2ml74$2@dont-email.me> <unng2n$2ml74$3@dont-email.me> <2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com> <aa3f535e4950f466418da096be170835@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3139644"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: 6c6a58d4ffc70ded2199765154958f9cb52e5722
X-Rslight-Site: $2y$10$RNV0q954LT/eRs06YPDj1ei4K4d4zdgzGIi9rdlNBARF1XbBSMK6W
 by: sjack - Fri, 12 Jan 2024 01:58 UTC

mhx wrote:
> Do you change these comments when you afterwards change the code?

For sure,don't like misleading comments. I don't find it a bother to
change comments when code change. Did much typing before programming;
keyboard is like an extension; think and its printed.

Re: NEW : Document your FORTH code

<d47a5e761be02ef418375255f392aba5@www.novabbs.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!.POSTED!not-for-mail
From: minforth@gmx.net (minforth)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Fri, 12 Jan 2024 08:10:12 +0000
Organization: novaBBS
Message-ID: <d47a5e761be02ef418375255f392aba5@www.novabbs.com>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com> <1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com> <unnet8$2ml74$2@dont-email.me> <unng2n$2ml74$3@dont-email.me> <2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com> <aa3f535e4950f466418da096be170835@www.novabbs.com> <cf4e53334cd411004077fd93bc3a36c2@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="3165472"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$9zGan8de5My2tnV9qW6qre9VS0Pd68jh0YjjPqnCzv39sqUSKF6nG
X-Rslight-Posting-User: d2a19558f194e2f1f8393b8d9be9ef51734a4da3
 by: minforth - Fri, 12 Jan 2024 08:10 UTC

In the past, we had code reviews as part of the product release.
Experienced engineers from the service department went through
the source code of the system to check that the code was
understandable and serviceable, e.g. remotely. The result was
often very sobering, but very positively instructive for everyone.

As an individual programmer in your one-man-show, you need more
discipline. But probably every old hand in the business has sat
in front of their own old code and puzzled over it.

Re: NEW : Document your FORTH code

<nnd$41fc46b6$5e9934a3@337e2fb2e58bb235>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <unng2n$2ml74$3@dont-email.me> <2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com> <aa3f535e4950f466418da096be170835@www.novabbs.com>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$41fc46b6$5e9934a3@337e2fb2e58bb235>
Organization: KPN B.V.
Date: Fri, 12 Jan 2024 12:25:27 +0100
Path: i2pn2.org!i2pn.org!news.samoylyk.net!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 38
Injection-Date: Fri, 12 Jan 2024 12:25:27 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2237
 by: none - Fri, 12 Jan 2024 11:25 UTC

In article <aa3f535e4950f466418da096be170835@www.novabbs.com>,
mhx <mhx@iae.nl> wrote:
>sjack wrote:
>
>[..]
>> I by habit usually add useless comments. It's something I
>> can do unthinkingly while I contemplate some aspect or usage
>> of the code just written; fingers like to stay busy.
>
>Do you change these comments when you afterwards change the code?
>
>My four rules are:
>1. At the top of the file there is an explanation WHAT
> the program is going to do, which METHOD it uses (references!)
> and, not in depth, HOW it is doing it.
>2. Every word has a stack comment.
>3. At the end of the file there is word which runs a small example,
> exercising the code. The output is self-explaining, or it
> refers to [1].
>4. (optional) Internal words, if any, are marked as such and
> preferably hidden. This allows the user to skip such words
> in the first reading.

Sensible rules.
I expand point 3 a bit with REGRESS.
The REGRESS exercise a words, (call it a test), with expected
outcome, and not restricted to external words.

>
>-marcel

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

Re: NEW : Document your FORTH code

<nnd$2084fcab$70319666@337e2fb2e58bb235>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <2cdb8dbd05595b6496ad32752cb1a3b5@www.novabbs.com> <aa3f535e4950f466418da096be170835@www.novabbs.com> <unpqub$35agg$1@dont-email.me>
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$2084fcab$70319666@337e2fb2e58bb235>
Organization: KPN B.V.
Date: Fri, 12 Jan 2024 12:26:40 +0100
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe005.abavia.com!abp001.abavia.com!news.kpn.nl!not-for-mail
Lines: 29
Injection-Date: Fri, 12 Jan 2024 12:26:40 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 1975
 by: none - Fri, 12 Jan 2024 11:26 UTC

In article <unpqub$35agg$1@dont-email.me>, dxf <dxforth@gmail.com> wrote:
>On 12/01/2024 5:34 am, mhx wrote:
>> sjack wrote:
>>
>> [..]
>>> I by habit usually add useless comments. It's something I
>>> can do unthinkingly while I contemplate some aspect or usage
>>> of the code just written; fingers like to stay busy.
>>
>> Do you change these comments when you afterwards change the code?
>> ...
>
>Good point. I find comments get included on subsequent revisions,
>particularly as overall program complexity increases. These tend
>to be one-liners at the beginning of a definition. More a reminder
>than an explanation. I did 'technical writing' in my career aimed
>at new readers. Nothing like that. I'd find it tedious.

Right. The more effort is expended, the more valueable the result
is.

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

Re: NEW : Document your FORTH code

<nnd$1c4c0387$118d55e9@e20deecc4910f93e>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com> <aa3f535e4950f466418da096be170835@www.novabbs.com> <cf4e53334cd411004077fd93bc3a36c2@www.novabbs.com> <d47a5e761be02ef418375255f392aba5@www.novabbs.com>
Subject: Re: NEW : Document your FORTH code
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$1c4c0387$118d55e9@e20deecc4910f93e>
Organization: KPN B.V.
Date: Fri, 12 Jan 2024 12:33:30 +0100
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe004.abavia.com!abp003.abavia.com!news.kpn.nl!not-for-mail
Lines: 25
Injection-Date: Fri, 12 Jan 2024 12:33:30 +0100
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2071
 by: none - Fri, 12 Jan 2024 11:33 UTC

In article <d47a5e761be02ef418375255f392aba5@www.novabbs.com>,
minforth <minforth@gmx.net> wrote:
>In the past, we had code reviews as part of the product release.
>Experienced engineers from the service department went through
>the source code of the system to check that the code was
>understandable and serviceable, e.g. remotely. The result was
>often very sobering, but very positively instructive for everyone.
>
>As an individual programmer in your one-man-show, you need more
>discipline. But probably every old hand in the business has sat
>in front of their own old code and puzzled over it.

A familiar situation. I spread out this puzzlement.
As soon as I cannot understand a comment at first glance, I
improve it. Don't be surprised if texts are reformulated a dozen
times. As chairman Mao has taught us, an article has to be
rewritten about seven times before it is good.

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

Re: NEW : Document your FORTH code

<unsg3v$3kfde$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dxforth@gmail.com (dxf)
Newsgroups: comp.lang.forth
Subject: Re: NEW : Document your FORTH code
Date: Sat, 13 Jan 2024 09:57:04 +1100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <unsg3v$3kfde$1@dont-email.me>
References: <65b84e61-9883-4851-8e2e-934de0582319n@googlegroups.com>
<8d24e7d12cb4775d7341b4688b94e0b2@news.novabbs.com>
<1ee37461-3ff0-4fad-b133-a9db69f75d82n@googlegroups.com>
<unnet8$2ml74$2@dont-email.me> <nnd$531215e1$3e472ede@d6f77743241fa4e7>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 12 Jan 2024 22:57:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="276913d465df5b22266f8b5b24793308";
logging-data="3816878"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/UhCLALo/LpFHEBn2tXOnJ"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9AXwTRqIURayN+os5tKWFM4bgHY=
In-Reply-To: <nnd$531215e1$3e472ede@d6f77743241fa4e7>
Content-Language: en-GB
 by: dxf - Fri, 12 Jan 2024 22:57 UTC

On 11/01/2024 8:58 pm, albert wrote:
> ...
> There are two reasons to document, usage and maintenance.
> I want ciforth to be used, so every word is meticulously documented.
> I have much (40 year) professional experience in maintenance.
> Maintenance documentation especially regards the overlooked border
> cases makes out the value of a program. Consequently my Forth programs
> are worth more to a c-programmer, than most Forth programs are to a
> Forth programmer.

Program documentation and source commenting are different things and
should be kept separate. Before venturing to employ either there ought
to be a real prospect it will be used - not just hope. Shadow screens
provided in some old forths? I never read them.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor