Deutsch   English   Français   Italiano  
<1042uds$3egv8$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Stephen Pelc <stephen@vfxforth.com>
Newsgroups: comp.lang.forth
Subject: Re: Parsing timestamps?
Date: Wed, 2 Jul 2025 09:33:48 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <1042uds$3egv8$1@dont-email.me>
References: <1f433fabcb4d053d16cbc098dedc6c370608ac01@i2pn2.org> <cdc7dfbc45ed94246aba7cb36c7272af7c6ba017@i2pn2.org> <nnd$6da712e9$10ba1712@c765d30268b2e913> <c2a146d801d29f65eef54d75061217add92c9177@i2pn2.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 02 Jul 2025 11:33:48 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="2f1d740f37f4b61a1a2cbe17fe20586b";
	logging-data="3621864"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+dN3X8b1fg/GK0wEroQJRl"
User-Agent: Usenapp for MacOS
Cancel-Lock: sha1:r/gL84PpDdk8Fimj/zLtxCj7myY=
X-Usenapp: v1.27.4/l - Full License

On 2 Jul 2025 at 05:39:52 CEST, "dxf" <dxforth@gmail.com> wrote:

> On 1/07/2025 10:22 pm, Hans Bezemer wrote:
>> On 27-06-2025 03:39, dxf wrote:
>>> Yet forthers have no problem with this.  Take the SwiftForth source code.
>>> At best you'll get a general comment as to what a function does.  How do
>>> they maintain it - the same way anyone proficient in C maintains C code.
>>> Albert is correct.  Familiarity is key to readability.  That's not to say
>>> code deserving documentation shouldn't have it.  OTOH one shouldn't be
>>> expecting documentation (including stack commentary) for what's an everyday
>>> affair in Forth.
>> 
>> I think you and Albert are on the right track here. Familiarity is a large
>> part of this "readability" thingy. There are a few notes I want to add,
>> though:
>> 
>> 1. "Infix notation" is part of this familiarity. I know I've commented every
>> single expression in TEONW, since I understand those "infix" expressions much
>> better than all those RPN thingies - and you got something to check your code
>> against;
>> 
>> 2. Intentionality. I do this a LOT. E.g. if you find OVER OVER in my code,
>> you may be certain those two items have nothing to do with each other. If you
>> find 2DUP it's a string, a double number or another "addr/count" array. CHOP
>> replaces 1 /STRING. Also: stack patterns can be codified like SPIN or STOW;
>> 
>> 3. Brevity. Short definitions are easier to understand. If you can abstract
>> it, put a name of it can spare the performance - split it up.
>> 
>> 4. Naming. I give this a LOT of thought. I prefer reading a name and having a
>> pretty good idea of what that code does (especially in the context of a
>> library or a program). See:
>> https://sourceforge.net/p/forth-4th/wiki/What%27s%20in%20a%20name%3F/
>> 
>> Feel free to disagree. It may not work for you, but at least it works for me.
> 
> Recently someone told me about Christianity - how it wasn't meant to be easy -
> supposed to be, among other things, a denial of the senses.  I'm hearing much
> the same in Forth.  That it's a celibate practice in which one denies everyday
> sensory pleasures including readability and maintainability in order to achieve
> programming nirvana.  Heck, if that's how folks see Forth then perhaps they
> should stop before the cognitive dissonance sends them crazy or they pop a
> cork.

IMHO religious belief is not a denial of the senses but a retraining. That
does not mean that the retraining leads to anything valuable, but it can
do depending very much on the trainer and trainee.

Stephen

-- 
Stephen Pelc, stephen@vfxforth.com
Wodni & Pelc GmbH
Vienna, Austria
Tel: +44 (0)7803 903612, +34 649 662 974
http://www.vfxforth.com/downloads/VfxCommunity/
  free VFX Forth downloads