Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

If A = B and B = C, then A = C, except where void or prohibited by law. -- Roy Santoro


devel / comp.lang.forth / Uppercase source code

SubjectAuthor
* Uppercase source codeBrad Eckert
+- Re: Uppercase source codeS Jack
+- Re: Uppercase source codeRick C
+* Re: Uppercase source codePaul Rubin
|`* Re: Uppercase source codedxforth
| `* Re: Uppercase source codeStephen Pelc
|  +- Re: Uppercase source codedxforth
|  `* Re: Uppercase source codeRobert L.
|   `- Re: Uppercase source codeHans Bezemer
+- Re: Uppercase source codeHans Bezemer
+* Re: Uppercase source codeAndy Valencia
|`- Re: Uppercase source codeRick C
`* Re: Uppercase source codeDoug Hoffman
 +* Re: Uppercase source codeMarcel Hendrix
 |`- Re: Uppercase source codeDoug Hoffman
 `* Re: Uppercase source codeRick C
  `- Re: Uppercase source codeDoug Hoffman

1
Uppercase source code

<55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:4e56:0:b0:2de:7120:61c9 with SMTP id e22-20020ac84e56000000b002de712061c9mr28267284qtw.684.1646332660212;
Thu, 03 Mar 2022 10:37:40 -0800 (PST)
X-Received: by 2002:ac8:5f0c:0:b0:2de:2dc9:24e5 with SMTP id
x12-20020ac85f0c000000b002de2dc924e5mr29278937qta.535.1646332660048; Thu, 03
Mar 2022 10:37:40 -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 10:37:39 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=72.217.63.66; posting-account=6GCGIQoAAAAyO8IjR_VTwqiqLwx0Q_G8
NNTP-Posting-Host: 72.217.63.66
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
Subject: Uppercase source code
From: hwfw...@gmail.com (Brad Eckert)
Injection-Date: Thu, 03 Mar 2022 18:37:40 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Brad Eckert - Thu, 3 Mar 2022 18:37 UTC

What's your preference?

I understand that we don't want to yell, but yelling makes you want to use fewer words.

It seems the relative absence of braces and parenthesis compared to other languages may factor in. Lower case makes them stand out more. Not an advantage in Forth.

Lower case for comments and upper case for code makes the two easy to visually differentiate.

Chuck used lower case for colorForth. Maybe he was tired of yelling.

Re: Uppercase source code

<d28ebe00-2b7d-4d6d-b70d-2bd7f321a547n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:15d3:b0:54e:3386:1a09 with SMTP id o19-20020a05620a15d300b0054e33861a09mr385871qkm.768.1646333860135;
Thu, 03 Mar 2022 10:57:40 -0800 (PST)
X-Received: by 2002:a37:a4d1:0:b0:4e1:2e40:1be9 with SMTP id
n200-20020a37a4d1000000b004e12e401be9mr403219qke.272.1646333859960; Thu, 03
Mar 2022 10:57:39 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!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:57:39 -0800 (PST)
In-Reply-To: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.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: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d28ebe00-2b7d-4d6d-b70d-2bd7f321a547n@googlegroups.com>
Subject: Re: Uppercase source code
From: sdwjac...@gmail.com (S Jack)
Injection-Date: Thu, 03 Mar 2022 18:57:40 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: S Jack - Thu, 3 Mar 2022 18:57 UTC

On Thursday, March 3, 2022 at 12:37:41 PM UTC-6, Brad Eckert wrote:
> What's your preference?

Insensitive (cost no problem). My Hungarian syntax in code use both cases:
svFOO \ string variable FOO
But when in command mode I just type "svfoo"; don't bother with shift key.
--
taz

Re: Uppercase source code

<3a6abf99-49a0-4be1-a556-67f1e1e0cc7dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:7f51:0:b0:2dd:dbca:1f40 with SMTP id g17-20020ac87f51000000b002dddbca1f40mr28106676qtk.463.1646336331710;
Thu, 03 Mar 2022 11:38:51 -0800 (PST)
X-Received: by 2002:a05:6214:1d24:b0:435:1d39:99a6 with SMTP id
f4-20020a0562141d2400b004351d3999a6mr6642632qvd.25.1646336331412; Thu, 03 Mar
2022 11:38:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!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 11:38:51 -0800 (PST)
In-Reply-To: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@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: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3a6abf99-49a0-4be1-a556-67f1e1e0cc7dn@googlegroups.com>
Subject: Re: Uppercase source code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Thu, 03 Mar 2022 19:38:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 34
 by: Rick C - Thu, 3 Mar 2022 19:38 UTC

On Thursday, March 3, 2022 at 1:37:41 PM UTC-5, Brad Eckert wrote:
> What's your preference?
>
> I understand that we don't want to yell, but yelling makes you want to use fewer words.
>
> It seems the relative absence of braces and parenthesis compared to other languages may factor in. Lower case makes them stand out more. Not an advantage in Forth.
>
> Lower case for comments and upper case for code makes the two easy to visually differentiate.
>
> Chuck used lower case for colorForth. Maybe he was tired of yelling.

My problem is that I'm an intermittent coder. The result is I end up with different conventions at different times. I've never found that any one style of capitalization was inherently better than others. I've never coded in all caps however. That gives me flashbacks to editing code on teletype devices and punched cards, something I never want to do again. I remember some of the massive equipment they had to do things like, sort cards and other operations that are a push of a button today.

I'm not sure you are even talking about mixed case. Don't most coders use upper/lower case to indicate something in Forth? No?

Would it make any sense to divide words into nouns and verbs with one capitalized?

--

Rick C.

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

Re: Uppercase source code

<87k0dakpyh.fsf@nightsong.com>

  copy mid

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

  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: Uppercase source code
Date: Fri, 04 Mar 2022 01:49:10 -0800
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <87k0dakpyh.fsf@nightsong.com>
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@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="U2FsdGVkX1/SkYWIm6C8fefpk8A6R5gy"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:GXH9JKUS8cE3H2cChxJ7vtsvG/4=
sha1:yRHYGnUdMptrMC7duqeT09YTEVU=
 by: Paul Rubin - Fri, 4 Mar 2022 09:49 UTC

Brad Eckert <hwfwguy@gmail.com> writes:
> What's your preference?

I tend to use upper case for keywords, to make the control flow stand out:

: foo ( n -- n ) baz 3 > IF thingy ELSE whatsit THEN ;

Re: Uppercase source code

<50aac109-0055-44ae-b06e-a9f5b910faaan@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ac8:5c81:0:b0:2dd:97b6:bcc7 with SMTP id r1-20020ac85c81000000b002dd97b6bcc7mr30586268qta.412.1646396233588;
Fri, 04 Mar 2022 04:17:13 -0800 (PST)
X-Received: by 2002:ac8:5b51:0:b0:2dd:c4e0:788e with SMTP id
n17-20020ac85b51000000b002ddc4e0788emr31844653qtw.119.1646396233441; Fri, 04
Mar 2022 04:17:13 -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 04:17:13 -0800 (PST)
In-Reply-To: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@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: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <50aac109-0055-44ae-b06e-a9f5b910faaan@googlegroups.com>
Subject: Re: Uppercase source code
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Fri, 04 Mar 2022 12:17:13 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 31
 by: Hans Bezemer - Fri, 4 Mar 2022 12:17 UTC

On Thursday, March 3, 2022 at 7:37:41 PM UTC+1, Brad Eckert wrote:
> What's your preference?
Well, "lower case letters are easier to read" is a myth (https://www.sciencedirect.com/science/article/pii/S0042698907002830) - or (at least) more nuanced than is usually thought. So, given that, I think it comes down to my own impressions. My own (Forth) programs are "lower case" where libraries are concerned and Camel Case with applications.

I tend to follow the wording guidelines of "Thinking Forth" - so: in a library you tend to find several (words) that are hidden later on. Other favorites of mine are #quantity, /size, >tosomething, fromsomething>, ?conditionalexecution and leavingaboolean?. Ticks - not that much, because I find it plain ugly.

My preference for lower case can be found in C (which I used intensively before Forth). My preference for Camel Case in applications as well.

I do not prefer a particular style when accepting submissions - for the simple reason that those people have as much right to using a particular style as I have. When maintaining those sources, I tend to mimic these styles. Nothing is a horrible as "Frankenstein sources". Of course, certain (technical) guidelines have to be fulfilled, but that's got little to do with style (e.g. HIDE your internal words - when libs are concerned).

I tend to like "single line words". If conditional or iterative constructs can be closed on a single line, do so. If they can't - use the "long format".

I know I'm overdoing things, but I don't think you can discuss "style" without taking these into consideration.

Hans Bezemer

Re: Uppercase source code

<164640780004.10246.13229495756816827858@media.vsta.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: van...@vsta.org (Andy Valencia)
Newsgroups: comp.lang.forth
Subject: Re: Uppercase source code
Date: Fri, 04 Mar 2022 07:30:00 -0800
Lines: 12
Message-ID: <164640780004.10246.13229495756816827858@media.vsta.org>
References: <87k0dakpyh.fsf@nightsong.com> <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
X-Trace: individual.net adhbipuqJLdJORE1DxlQhgqDA/yp86bchreje64/d8Favh+Sua
X-Orig-Path: media
Cancel-Lock: sha1:KRMyOzBq/ChDMYpTjG1BjB2tNKM=
User-Agent: rn.py v0.0.1
 by: Andy Valencia - Fri, 4 Mar 2022 15:30 UTC

Paul Rubin <no.email@nospam.invalid> writes:
> I tend to use upper case for keywords, to make the control flow stand out:
> : foo ( n -- n ) baz 3 > IF thingy ELSE whatsit THEN ;

Which, to most modern eyes, is indistinguishable from an old man sitting
on his porch yelling "YOU KIDS GET OFF MY LAWN".

(ALL CAPS == "shouting")

Andy Valencia
Home page: https://www.vsta.org/andy/
To contact me: https://www.vsta.org/contact/andy.html

Re: Uppercase source code

<2213784b-0861-48d5-a273-1b581b7b595fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:c84:b0:433:3463:7078 with SMTP id r4-20020a0562140c8400b0043334637078mr16368947qvr.68.1646417421603;
Fri, 04 Mar 2022 10:10:21 -0800 (PST)
X-Received: by 2002:ac8:7e90:0:b0:2de:2b69:aa3c with SMTP id
w16-20020ac87e90000000b002de2b69aa3cmr33268622qtj.279.1646417421420; Fri, 04
Mar 2022 10:10:21 -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 10:10:21 -0800 (PST)
In-Reply-To: <164640780004.10246.13229495756816827858@media.vsta.org>
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: <87k0dakpyh.fsf@nightsong.com> <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
<164640780004.10246.13229495756816827858@media.vsta.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2213784b-0861-48d5-a273-1b581b7b595fn@googlegroups.com>
Subject: Re: Uppercase source code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Fri, 04 Mar 2022 18:10:21 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Rick C - Fri, 4 Mar 2022 18:10 UTC

On Friday, March 4, 2022 at 10:31:17 AM UTC-5, Andy Valencia wrote:
> Paul Rubin <no.e...@nospam.invalid> writes:
> > I tend to use upper case for keywords, to make the control flow stand out:
> > : foo ( n -- n ) baz 3 > IF thingy ELSE whatsit THEN ;
> Which, to most modern eyes, is indistinguishable from an old man sitting
> on his porch yelling "YOU KIDS GET OFF MY LAWN".
>
> (ALL CAPS == "shouting")

I think that is the point, shout the flow control to allow it to be recognized easily and mentally disposed of. The details are spoken more quietly because they take a bit of thought.

--

Rick C.

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

Re: Uppercase source code

<6223369e$0$702$14726298@news.sunsite.dk>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail
Date: Sat, 5 Mar 2022 05:08:27 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.0
Subject: Re: Uppercase source code
Content-Language: en-US
Newsgroups: comp.lang.forth
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
From: dhoffman...@gmail.com (Doug Hoffman)
In-Reply-To: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 24
Message-ID: <6223369e$0$702$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: 54cacc91.news.sunsite.dk
X-Trace: 1646474910 news.sunsite.dk 702 glidedog@gmail.com/68.55.82.126:57138
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Sat, 5 Mar 2022 10:08 UTC

On 3/3/22 1:37 PM, Brad Eckert wrote:
> What's your preference?

I generally use lower case. I like syntax coloring editors for hiliting
things like comments, control flow words, string literals, etc. Upper
case requires the shift key and I'm a lazy typer.

I may use some camelCase but have no rules for it.

In addition to making source easier to read (for me), a syntax coloring
editor will catch some common typo errors instead of waiting for the
Forth compiler to flag the error. For example if I forget the space
after a '(' or '\' comment then the text won't turn green as I type. If
I for get to delimit some 'S" xxx' text with a '"' then subsequent
source will stay brown. I use color sparingly. Like candy, a little is
good, too much makes me sick.

The disadvantage is not many editors provide user-customizable syntax
coloring. My favorite editor is the Vfx MacForth editor written by Ward
McFarland. As that only works on older 32-bit Macs, I have found Jedit
to be pretty good as a syntax coloring Forth editor and it is
multi-platform.

-Doug

Re: Uppercase source code

<1c5ab157-3f13-44c9-8aa7-2f4474856768n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:492:b0:2df:f328:ab2c with SMTP id p18-20020a05622a049200b002dff328ab2cmr5329459qtx.669.1646551986573;
Sat, 05 Mar 2022 23:33:06 -0800 (PST)
X-Received: by 2002:a05:6214:1d24:b0:435:1d39:99a6 with SMTP id
f4-20020a0562141d2400b004351d3999a6mr4474020qvd.25.1646551986458; Sat, 05 Mar
2022 23:33:06 -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: Sat, 5 Mar 2022 23:33:06 -0800 (PST)
In-Reply-To: <6223369e$0$702$14726298@news.sunsite.dk>
Injection-Info: google-groups.googlegroups.com; posting-host=2001:1c05:2f14:600:c9ec:ad8e:10f1:142d;
posting-account=-JQ2RQoAAAB6B5tcBTSdvOqrD1HpT_Rk
NNTP-Posting-Host: 2001:1c05:2f14:600:c9ec:ad8e:10f1:142d
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com> <6223369e$0$702$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1c5ab157-3f13-44c9-8aa7-2f4474856768n@googlegroups.com>
Subject: Re: Uppercase source code
From: mhx...@iae.nl (Marcel Hendrix)
Injection-Date: Sun, 06 Mar 2022 07:33:06 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Marcel Hendrix - Sun, 6 Mar 2022 07:33 UTC

On Saturday, March 5, 2022 at 11:08:33 AM UTC+1, Doug Hoffman wrote:
[..]
> In addition to making source easier to read (for me), a syntax coloring
> editor will catch some common typo errors instead of waiting for the
> Forth compiler to flag the error. For example if I forget the space
> after a '(' or '\' comment then the text won't turn green as I type. If
> I for get to delimit some 'S" xxx' text with a '"' then subsequent
> source will stay brown. I use color sparingly. Like candy, a little is
> good, too much makes me sick.

That matches my experience. My favorite editor attempts to flag
strings and comments. It gets them wrong in many cases (this
is Forth), but I have never felt that I should turn the feature off.
The time saved for a forgotten quote or space is a sufficient
reward.

Illogical coloring should esthetically displease, but apparently
the text not being all the same color is in some way rewarding
the basic instincts (like a low-res color picture superficially
looks better than a hires b&w one.) Mixing upper and lower
case modulates the average black/white ratio and maybe
has a similar effect.

-marcel

Re: Uppercase source code

<6224828b$0$697$14726298@news.sunsite.dk>

  copy mid

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

  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: Sun, 6 Mar 2022 04:44:40 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.0
Subject: Re: Uppercase source code
Content-Language: en-US
Newsgroups: comp.lang.forth
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
<6223369e$0$702$14726298@news.sunsite.dk>
<1c5ab157-3f13-44c9-8aa7-2f4474856768n@googlegroups.com>
From: dhoffman...@gmail.com (Doug Hoffman)
In-Reply-To: <1c5ab157-3f13-44c9-8aa7-2f4474856768n@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 23
Message-ID: <6224828b$0$697$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: c7674c55.news.sunsite.dk
X-Trace: 1646559883 news.sunsite.dk 697 glidedog@gmail.com/68.55.82.126:57932
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Sun, 6 Mar 2022 09:44 UTC

On 3/6/22 2:33 AM, Marcel Hendrix wrote:
> On Saturday, March 5, 2022 at 11:08:33 AM UTC+1, Doug Hoffman wrote:
> [..]
>> In addition to making source easier to read (for me), a syntax coloring
>> editor will catch some common typo errors instead of waiting for the
>> Forth compiler to flag the error. For example if I forget the space
>> after a '(' or '\' comment then the text won't turn green as I type. If
>> I for get to delimit some 'S" xxx' text with a '"' then subsequent
>> source will stay brown.

> That matches my experience. My favorite editor attempts to flag
> strings and comments. It gets them wrong in many cases (this
> is Forth), but I have never felt that I should turn the feature off.
> The time saved for a forgotten quote or space is a sufficient
> reward.

Yes. Flagging typos with the editor through the use of color is
practical and time saving. When I first started using color I did not
even think about this advantage. For example, if 'forget' were a control
flow keyword then my typo in the first paragraph above would have been
flagged. :-)

-Doug

Re: Uppercase source code

<t03pqp$1dvj$1@gioia.aioe.org>

  copy mid

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

  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: Uppercase source code
Date: Mon, 7 Mar 2022 13:14:49 +1100
Organization: Aioe.org NNTP Server
Message-ID: <t03pqp$1dvj$1@gioia.aioe.org>
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
<87k0dakpyh.fsf@nightsong.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="47091"; 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
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Mon, 7 Mar 2022 02:14 UTC

On 4/03/2022 20:49, Paul Rubin wrote:
> Brad Eckert <hwfwguy@gmail.com> writes:
>> What's your preference?
>
> I tend to use upper case for keywords, to make the control flow stand out:
>
> : foo ( n -- n ) baz 3 > IF thingy ELSE whatsit THEN ;

What is a 'keyword' in Forth? Is the following one?

: END POSTPONE EXIT POSTPONE THEN ; IMMEDIATE

Whatever convention one chooses it should be applied consistently. With
FORTH Inc there's never a doubt what that convention is (including to the
developers). Looking through the VFX manual however, it's hard to know
whether there is a convention, and if so, what it might be e.g.

: min \ n1 n2 -- n1|n2 6.1.1880
Given two data stack items preserve only the smallest.

: MAX \ n1 n2 -- n1|n2 6.1.1870
Given two data stack items preserve only the largest.

: umin \ n1 n2 -- n1|n2
Given two data stack items preserve only the smallest.

: umax \ n1 n2 -- n1|n2
Given two data stack items preserve only the largest.

The word index, OTOH, lists everything in lowercase.

Re: Uppercase source code

<46d0e2f4-292a-4f47-bb66-185d7f90ffean@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:5c83:0:b0:435:8969:57f8 with SMTP id o3-20020ad45c83000000b00435896957f8mr2896048qvh.50.1646621988358;
Sun, 06 Mar 2022 18:59:48 -0800 (PST)
X-Received: by 2002:a05:620a:1721:b0:649:341:399b with SMTP id
az33-20020a05620a172100b006490341399bmr5798287qkb.327.1646621988201; Sun, 06
Mar 2022 18:59:48 -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: Sun, 6 Mar 2022 18:59:48 -0800 (PST)
In-Reply-To: <6223369e$0$702$14726298@news.sunsite.dk>
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: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com> <6223369e$0$702$14726298@news.sunsite.dk>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <46d0e2f4-292a-4f47-bb66-185d7f90ffean@googlegroups.com>
Subject: Re: Uppercase source code
From: gnuarm.d...@gmail.com (Rick C)
Injection-Date: Mon, 07 Mar 2022 02:59:48 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 42
 by: Rick C - Mon, 7 Mar 2022 02:59 UTC

On Saturday, March 5, 2022 at 5:08:33 AM UTC-5, Doug Hoffman wrote:
> On 3/3/22 1:37 PM, Brad Eckert wrote:
> > What's your preference?
> I generally use lower case. I like syntax coloring editors for hiliting
> things like comments, control flow words, string literals, etc. Upper
> case requires the shift key and I'm a lazy typer.
>
> I may use some camelCase but have no rules for it.
>
> In addition to making source easier to read (for me), a syntax coloring
> editor will catch some common typo errors instead of waiting for the
> Forth compiler to flag the error. For example if I forget the space
> after a '(' or '\' comment then the text won't turn green as I type. If
> I for get to delimit some 'S" xxx' text with a '"' then subsequent
> source will stay brown. I use color sparingly. Like candy, a little is
> good, too much makes me sick.
>
> The disadvantage is not many editors provide user-customizable syntax
> coloring. My favorite editor is the Vfx MacForth editor written by Ward
> McFarland. As that only works on older 32-bit Macs, I have found Jedit
> to be pretty good as a syntax coloring Forth editor and it is
> multi-platform.

Codewright lets you set up your own syntax coloring. Unfortunately it is only available by back door channels. It's hard to even find it mentioned. Seems someone bought the rights, will sell you a license for $400 or so, but doesn't actually give you any code or materials, just a license!

Codewright was a really good editor. If it had been maintained over the years it would have been a great tool today. I still use it, but it has some issues with the file open dialog and other, similar bits. So it gets used, but it isn't a great tool for code work these days. :-(

--

Rick C.

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

Re: Uppercase source code

<6225cb8b$0$696$14726298@news.sunsite.dk>

  copy mid

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

  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: Mon, 7 Mar 2022 04:08:25 -0500
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0)
Gecko/20100101 Thunderbird/91.6.0
Subject: Re: Uppercase source code
Content-Language: en-US
Newsgroups: comp.lang.forth
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
<6223369e$0$702$14726298@news.sunsite.dk>
<46d0e2f4-292a-4f47-bb66-185d7f90ffean@googlegroups.com>
From: dhoffman...@gmail.com (Doug Hoffman)
In-Reply-To: <46d0e2f4-292a-4f47-bb66-185d7f90ffean@googlegroups.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 16
Message-ID: <6225cb8b$0$696$14726298@news.sunsite.dk>
Organization: SunSITE.dk - Supporting Open source
NNTP-Posting-Host: e928b307.news.sunsite.dk
X-Trace: 1646644108 news.sunsite.dk 696 glidedog@gmail.com/68.55.82.126:58373
X-Complaints-To: staff@sunsite.dk
 by: Doug Hoffman - Mon, 7 Mar 2022 09:08 UTC

On 3/6/22 9:59 PM, Rick C wrote:
[...]
> Codewright lets you set up your own syntax coloring. Unfortunately it is only available by back door channels. It's hard to even find it mentioned. Seems someone bought the rights, will sell you a license for $400 or so, but doesn't actually give you any code or materials, just a license!
>
> Codewright was a really good editor. If it had been maintained over the years it would have been a great tool today. I still use it, but it has some issues with the file open dialog and other, similar bits. So it gets used, but it isn't a great tool for code work these days. :-(

Yes. It's a pain to get very used to one source code editor and then
have its support dropped. I have been using the MacForth integrated
editor for years. It is written entirely in Forth so one can customize
it pretty easily. Unfortunately it does not run on the most recent Mac
OS. I notice that Anton has been providing, at EuroForth, some
information about IDEs if a Forth has the hooks. I need to take a closer
look at that.

-Doug

Re: Uppercase source code

<t04v3d$n3u$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: step...@vfxforth.com (Stephen Pelc)
Newsgroups: comp.lang.forth
Subject: Re: Uppercase source code
Date: Mon, 7 Mar 2022 12:50:53 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <t04v3d$n3u$1@dont-email.me>
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com> <87k0dakpyh.fsf@nightsong.com> <t03pqp$1dvj$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=fixed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 7 Mar 2022 12:50:53 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="73473cae03a8aa4adaa10c3e8c3bd1dc";
logging-data="23678"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Isjuiq05KU+8Lnf6aLyhr"
User-Agent: Usenapp/1.18/l for MacOS - Full License
Cancel-Lock: sha1:Q/TCNLU9PiYnW+xn3VIs7H34YyQ=
 by: Stephen Pelc - Mon, 7 Mar 2022 12:50 UTC

On 7 Mar 2022 at 03:14:49 CET, "dxforth" <dxforth@gmail.com> wrote:

> What is a 'keyword' in Forth? Is the following one?

Define keyword.
>
> : END POSTPONE EXIT POSTPONE THEN ; IMMEDIATE

Since (in theory) you cannot distinguish user-defined words from supplied
words,
all words are either keywords or not keywords. Hence, the discussion is
ridiculous.

> Whatever convention one chooses it should be applied consistently. With
> FORTH Inc there's never a doubt what that convention is (including to the
> developers). Looking through the VFX manual however, it's hard to know
> whether there is a convention, and if so, what it might be e.g.

VFX has been around since 1998, and it's predecessor since about 1990.
If our coding practices have not changed in 30+ years you are in far more
trouble than moaning about case consistency.

Actually, we could solve some of these problems by not having a proper manual.
Then we would be like most other Forths.

Stephen
--
Stephen Pelc, stephen@vfxforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, +44 (0)78 0390 3612, +34 649 662 974
http://www.mpeforth.com - free VFX Forth downloads

Re: Uppercase source code

<t054sm$omc$1@gioia.aioe.org>

  copy mid

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

  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: Uppercase source code
Date: Tue, 8 Mar 2022 01:29:41 +1100
Organization: Aioe.org NNTP Server
Message-ID: <t054sm$omc$1@gioia.aioe.org>
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
<87k0dakpyh.fsf@nightsong.com> <t03pqp$1dvj$1@gioia.aioe.org>
<t04v3d$n3u$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="25292"; 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
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: dxforth - Mon, 7 Mar 2022 14:29 UTC

On 7/03/2022 23:50, Stephen Pelc wrote:
> On 7 Mar 2022 at 03:14:49 CET, "dxforth" <dxforth@gmail.com> wrote:
>
>> What is a 'keyword' in Forth? Is the following one?
>
> Define keyword.
>>
>> : END POSTPONE EXIT POSTPONE THEN ; IMMEDIATE
>
> Since (in theory) you cannot distinguish user-defined words from supplied
> words,
> all words are either keywords or not keywords. Hence, the discussion is
> ridiculous.
>
>> Whatever convention one chooses it should be applied consistently. With
>> FORTH Inc there's never a doubt what that convention is (including to the
>> developers). Looking through the VFX manual however, it's hard to know
>> whether there is a convention, and if so, what it might be e.g.
>
> VFX has been around since 1998, and it's predecessor since about 1990.
> If our coding practices have not changed in 30+ years you are in far more
> trouble than moaning about case consistency.
>
> Actually, we could solve some of these problems by not having a proper manual.
> Then we would be like most other Forths.
>
> Stephen

The less confusion over min/max and umin/umax the better :)

Re: Uppercase source code

<t0639j$156$1@gioia.aioe.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
Path: i2pn2.org!i2pn.org!aioe.org!Hm8Gy1NCoX5UJtXqlgcssw.user.46.165.242.75.POSTED!not-for-mail
From: No_spamm...@noWhere_7073.org (Robert L.)
Newsgroups: comp.lang.forth
Subject: Re: Uppercase source code
Date: Mon, 7 Mar 2022 23:08:39 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <t0639j$156$1@gioia.aioe.org>
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com> <87k0dakpyh.fsf@nightsong.com> <t03pqp$1dvj$1@gioia.aioe.org> <t04v3d$n3u$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Injection-Info: gioia.aioe.org; logging-data="1190"; posting-host="Hm8Gy1NCoX5UJtXqlgcssw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: XanaNews/1.18.1.6
X-Notice: Filtered by postfilter v. 0.9.2
 by: Robert L. - Mon, 7 Mar 2022 23:08 UTC

On 3/7/2022, Stephen Pelc wrote:

> and it's predecessor

Correction:

and its predecessor

--
The policy of setting up concentration camps ... was invented by the
British in the war they fought against the Boers for the profit of
Jewish predators in South Africa.
(archive.org/details/nolies)

Re: Uppercase source code

<dc684387-c740-495c-a57f-85162313dc6fn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a37:bf45:0:b0:5f1:924c:23d0 with SMTP id p66-20020a37bf45000000b005f1924c23d0mr10194059qkf.374.1646743408973;
Tue, 08 Mar 2022 04:43:28 -0800 (PST)
X-Received: by 2002:ad4:5d44:0:b0:435:b4f0:5c3c with SMTP id
jk4-20020ad45d44000000b00435b4f05c3cmr646688qvb.25.1646743408189; Tue, 08 Mar
2022 04:43:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!paganini.bofh.team!pasdenom.info!usenet-fr.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: Tue, 8 Mar 2022 04:43:27 -0800 (PST)
In-Reply-To: <t0639j$156$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=82.95.228.79; posting-account=Ebqe4AoAAABfjCRL4ZqOHWv4jv5ZU4Cs
NNTP-Posting-Host: 82.95.228.79
References: <55ec3f6c-d267-43ff-beb4-248ebb2fdb4bn@googlegroups.com>
<87k0dakpyh.fsf@nightsong.com> <t03pqp$1dvj$1@gioia.aioe.org>
<t04v3d$n3u$1@dont-email.me> <t0639j$156$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dc684387-c740-495c-a57f-85162313dc6fn@googlegroups.com>
Subject: Re: Uppercase source code
From: the.beez...@gmail.com (Hans Bezemer)
Injection-Date: Tue, 08 Mar 2022 12:43:28 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Hans Bezemer - Tue, 8 Mar 2022 12:43 UTC

On Tuesday, March 8, 2022 at 12:08:41 AM UTC+1, Robert L. wrote:
> > and it's predecessor
>
> Correction:
>
> and its predecessor
... and a grammar nazi as well..

That's a VERY LOW score on "Grahams Triangle of Disagreement", my friend.

Hans Bezemer

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor