Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Row, row, row your bits, gently down the stream...


computers / comp.os.vms / Re: different defaults in batch

SubjectAuthor
* different defaults in batchArne Vajhøj
+* Re: different defaults in batchSteven Schweda
|`- Re: different defaults in batchArne Vajhøj
`* Re: different defaults in batchSimon Clubley
 `* Re: different defaults in batchSimon Clubley
  `* Re: different defaults in batchArne Vajhøj
   `* Re: different defaults in batchDave Froble
    `* Re: different defaults in batchArne Vajhøj
     `* Re: different defaults in batchgah4
      +* Re: different defaults in batchbill
      |`* Re: different defaults in batchArne Vajhøj
      | +* Re: different defaults in batchbill
      | |+- Re: different defaults in batchMartin Rushton
      | |+* Re: different defaults in batchArne Vajhøj
      | ||`* Re: different defaults in batchArne Vajhøj
      | || `* Re: different defaults in batchbill
      | ||  `* Re: different defaults in batchDave Froble
      | ||   `* Re: different defaults in batchbill
      | ||    +- Re: different defaults in batchabrsvc
      | ||    `* Re: different defaults in batchDave Froble
      | ||     +- Re: different defaults in batchabrsvc
      | ||     +* Re: different defaults in batchbill
      | ||     |`- Re: different defaults in batchArne Vajhøj
      | ||     `* Re: different defaults in batchSingle Stage to Orbit
      | ||      `* Re: different defaults in batchDave Froble
      | ||       `- Re: different defaults in batchSingle Stage to Orbit
      | |+* Re: different defaults in batchJohnny Billquist
      | ||`* Re: different defaults in batchbill
      | || +* Re: different defaults in batchArne Vajhøj
      | || |`* Re: different defaults in batchbill
      | || | +* Re: different defaults in batchArne Vajhøj
      | || | |`* Re: different defaults in batchbill
      | || | | +- Re: different defaults in batchArne Vajhøj
      | || | | `* Re: different defaults in batchJohnny Billquist
      | || | |  `- Re: different defaults in batchJake Hamby (Solid State Jake)
      | || | +- Re: different defaults in batchSteven Schweda
      | || | `- Re: different defaults in batchArne Vajhøj
      | || `- Re: different defaults in batchJohnny Billquist
      | |`- Re: different defaults in batchgah4
      | `* Re: different defaults in batchgah4
      |  `* Re: different defaults in batchJohnny Billquist
      |   `- Re: different defaults in batchSimon Clubley
      `* Re: different defaults in batchArne Vajhøj
       +* Re: different defaults in batchDave Froble
       |+- Re: different defaults in batchArne Vajhøj
       |`* Re: different defaults in batchArne Vajhøj
       | `- Re: different defaults in batchArne Vajhøj
       `* Re: different defaults in batchgah4
        `* Re: different defaults in batchbill
         `- Re: different defaults in batchSimon Clubley

Pages:12
Re: different defaults in batch

<uh1otl$21lpk$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30687&group=comp.os.vms#30687

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sat, 21 Oct 2023 20:04:05 -0400
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <uh1otl$21lpk$1@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh1fiq$9hb$1@news.misty.com>
<kpj4p4F13meU2@mid.individual.net> <uh1no7$21enc$1@dont-email.me>
<kpj6gdF13mfU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Oct 2023 00:04:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="49848ed4edef16d0e431c6721b7e3439";
logging-data="2152244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19qF1Uh5rFz8ISS/C1UOr7n44lM0XbbOh4="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:dAFLkBIocQBtRSX8vXRFkVwxCTo=
In-Reply-To: <kpj6gdF13mfU2@mid.individual.net>
Content-Language: en-US
 by: Arne Vajhøj - Sun, 22 Oct 2023 00:04 UTC

On 10/21/2023 7:51 PM, bill wrote:
> On 10/21/2023 7:44 PM, Arne Vajhøj wrote:
>> On 10/21/2023 7:22 PM, bill wrote:
>>> On 10/21/2023 5:24 PM, Johnny Billquist wrote:
>>>> On 2023-10-21 17:39, bill wrote:
>>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>>>> Are you telling me that you have never seen i, j, ...
>>>>>> used as variable in a for loop in C?
>>>>>>
>>>>>
>>>>> Probably, but if someone is going to use a single letter variable
>>>>> for a loop index more likely would be a, b, x, y, z.  But I'm sure
>>>>> an i would show up more for it being the first letter of the word
>>>>> index than any influence from Fortran.  Can't say I have ever seen
>>>>> j used.
>>>>
>>>> i and j as loop variables probably beats all other letters combined.
>>>>
>>>> If you haven't seen that, then I really wonder what code you have
>>>> looked at.
>>>>
>>>
>>> My early days doing production programming (In COBOL, Fortran, Pascal, C
>>> and a lot of different assemblers) was all done in an environment with
>>> very strict programming standards.  Probably explains a lot about my
>>> style and why I don't have problems with things like over-runs and
>>> bounds violations.  :-)
>>
>> C coding standards often allow or even encourage i and j.
>>
>> A few random examples:
>>
>> Linux kernel coding style:
>>
>> https://www.kernel.org/doc/html/v4.10/process/coding-style.html
>>
>> <quote>
>> LOCAL variable names should be short, and to the point. If you have
>> some random integer loop counter, it should probably be called i.
>> Calling it loop_counter is non-productive, if there is no chance of it
>> being mis-understood. Similarly, tmp can be just about any type of
>> variable that is used to hold a temporary value.
>> </quote>
>>
>> FreeBSD style guide:
>>
>> https://man.freebsd.org/cgi/man.cgi?style(9)
>>
>> <quote>
>> A for loop may declare and initialize its counting variable.
>>
>>             for (int    i = 0; i < 15; i++) {
>> </quote>
>>
>> Gnome coding style:
>>
>> https://developer.gnome.org/documentation/guidelines/programming/coding-style.html
>>
>> <quote>
>> for (i = 0; i < num_elements; i++) {
>> </quote>
>>
>
> To each his own.  I was taught with a much stricter standard
> and I think  it has done me well over my career.  I will admit
> that I have used i and variants like i1 and i2 for loops when
> writing something quick and dirty that I will only be using
> myself, but even then I know deep inside that I am doing
> something basically wrong.  :-)

Stricter?

Is DoD Ada guidelines strict enough for you?

https://apps.dtic.mil/sti/tr/pdf/ADA241772.pdf

page 84 has an example with a for loop using I.

https://www.adaic.org/resources/add_content/docs/95style/95style.pdf\

<quote>
To iterate over all elements of an array:
for I in Array_Name'Range loop
</quote>

Arne

Re: different defaults in batch

<kpj80qF13mfU3@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30690&group=comp.os.vms#30690

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sat, 21 Oct 2023 20:17:27 -0400
Lines: 97
Message-ID: <kpj80qF13mfU3@mid.individual.net>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh1fiq$9hb$1@news.misty.com>
<kpj4p4F13meU2@mid.individual.net> <uh1no7$21enc$1@dont-email.me>
<kpj6gdF13mfU2@mid.individual.net> <uh1otl$21lpk$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 3w8OcKupM7JCUQlnjaDO/A4wC44Tm8iGOS51U0vZa0Ux3L82Cm
Cancel-Lock: sha1:YP1zV9RPv1yp4sFntQCYpvpMyaU= sha256:+FQXVf4TijkfU8ut8BZTiCtHSZS4CdDjpJFpX71U9hY=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uh1otl$21lpk$1@dont-email.me>
 by: bill - Sun, 22 Oct 2023 00:17 UTC

On 10/21/2023 8:04 PM, Arne Vajhøj wrote:
> On 10/21/2023 7:51 PM, bill wrote:
>> On 10/21/2023 7:44 PM, Arne Vajhøj wrote:
>>> On 10/21/2023 7:22 PM, bill wrote:
>>>> On 10/21/2023 5:24 PM, Johnny Billquist wrote:
>>>>> On 2023-10-21 17:39, bill wrote:
>>>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>>>>> Are you telling me that you have never seen i, j, ...
>>>>>>> used as variable in a for loop in C?
>>>>>>>
>>>>>>
>>>>>> Probably, but if someone is going to use a single letter variable
>>>>>> for a loop index more likely would be a, b, x, y, z.  But I'm sure
>>>>>> an i would show up more for it being the first letter of the word
>>>>>> index than any influence from Fortran.  Can't say I have ever seen
>>>>>> j used.
>>>>>
>>>>> i and j as loop variables probably beats all other letters combined.
>>>>>
>>>>> If you haven't seen that, then I really wonder what code you have
>>>>> looked at.
>>>>>
>>>>
>>>> My early days doing production programming (In COBOL, Fortran,
>>>> Pascal, C
>>>> and a lot of different assemblers) was all done in an environment with
>>>> very strict programming standards.  Probably explains a lot about my
>>>> style and why I don't have problems with things like over-runs and
>>>> bounds violations.  :-)
>>>
>>> C coding standards often allow or even encourage i and j.
>>>
>>> A few random examples:
>>>
>>> Linux kernel coding style:
>>>
>>> https://www.kernel.org/doc/html/v4.10/process/coding-style.html
>>>
>>> <quote>
>>> LOCAL variable names should be short, and to the point. If you have
>>> some random integer loop counter, it should probably be called i.
>>> Calling it loop_counter is non-productive, if there is no chance of
>>> it being mis-understood. Similarly, tmp can be just about any type of
>>> variable that is used to hold a temporary value.
>>> </quote>
>>>
>>> FreeBSD style guide:
>>>
>>> https://man.freebsd.org/cgi/man.cgi?style(9)
>>>
>>> <quote>
>>> A for loop may declare and initialize its counting variable.
>>>
>>>             for (int    i = 0; i < 15; i++) {
>>> </quote>
>>>
>>> Gnome coding style:
>>>
>>> https://developer.gnome.org/documentation/guidelines/programming/coding-style.html
>>>
>>> <quote>
>>> for (i = 0; i < num_elements; i++) {
>>> </quote>
>>>
>>
>> To each his own.  I was taught with a much stricter standard
>> and I think  it has done me well over my career.  I will admit
>> that I have used i and variants like i1 and i2 for loops when
>> writing something quick and dirty that I will only be using
>> myself, but even then I know deep inside that I am doing
>> something basically wrong.  :-)
>
> Stricter?
>
> Is DoD Ada guidelines strict enough for you?
>
> https://apps.dtic.mil/sti/tr/pdf/ADA241772.pdf
>
> page 84 has an example with a for loop using I.
>
> https://www.adaic.org/resources/add_content/docs/95style/95style.pdf\
>
> <quote>
> To iterate over all elements of an array:
> for I in Array_Name'Range loop
> </quote>

OK. Well, my early programming days were also with DOD and
later with DOD Contractors. And they didn't believe in that
kind of programming. I see the number 95 in there. I assume
that's a year. Looks like someone got really lazy after I
left. It was 1988 when I left that world and went into academia.
I'll take the old way over the new way any day.

bill

Re: different defaults in batch

<uh1pro$21sh4$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30692&group=comp.os.vms#30692

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sat, 21 Oct 2023 20:20:08 -0400
Organization: A noiseless patient Spider
Lines: 102
Message-ID: <uh1pro$21sh4$1@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh1fiq$9hb$1@news.misty.com>
<kpj4p4F13meU2@mid.individual.net> <uh1no7$21enc$1@dont-email.me>
<kpj6gdF13mfU2@mid.individual.net> <uh1otl$21lpk$1@dont-email.me>
<kpj80qF13mfU3@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Oct 2023 00:20:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="49848ed4edef16d0e431c6721b7e3439";
logging-data="2159140"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18KZeDQ20aEFv1juMTA7ZOcvF+Zk727zNA="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:VVJ+mWArjxxS2TFbE3bazVdOPZM=
In-Reply-To: <kpj80qF13mfU3@mid.individual.net>
Content-Language: en-US
 by: Arne Vajhøj - Sun, 22 Oct 2023 00:20 UTC

On 10/21/2023 8:17 PM, bill wrote:
> On 10/21/2023 8:04 PM, Arne Vajhøj wrote:
>> On 10/21/2023 7:51 PM, bill wrote:
>>> On 10/21/2023 7:44 PM, Arne Vajhøj wrote:
>>>> On 10/21/2023 7:22 PM, bill wrote:
>>>>> On 10/21/2023 5:24 PM, Johnny Billquist wrote:
>>>>>> On 2023-10-21 17:39, bill wrote:
>>>>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>>>>>> Are you telling me that you have never seen i, j, ...
>>>>>>>> used as variable in a for loop in C?
>>>>>>>>
>>>>>>>
>>>>>>> Probably, but if someone is going to use a single letter variable
>>>>>>> for a loop index more likely would be a, b, x, y, z.  But I'm sure
>>>>>>> an i would show up more for it being the first letter of the word
>>>>>>> index than any influence from Fortran.  Can't say I have ever seen
>>>>>>> j used.
>>>>>>
>>>>>> i and j as loop variables probably beats all other letters combined.
>>>>>>
>>>>>> If you haven't seen that, then I really wonder what code you have
>>>>>> looked at.
>>>>>>
>>>>>
>>>>> My early days doing production programming (In COBOL, Fortran,
>>>>> Pascal, C
>>>>> and a lot of different assemblers) was all done in an environment with
>>>>> very strict programming standards.  Probably explains a lot about my
>>>>> style and why I don't have problems with things like over-runs and
>>>>> bounds violations.  :-)
>>>>
>>>> C coding standards often allow or even encourage i and j.
>>>>
>>>> A few random examples:
>>>>
>>>> Linux kernel coding style:
>>>>
>>>> https://www.kernel.org/doc/html/v4.10/process/coding-style.html
>>>>
>>>> <quote>
>>>> LOCAL variable names should be short, and to the point. If you have
>>>> some random integer loop counter, it should probably be called i.
>>>> Calling it loop_counter is non-productive, if there is no chance of
>>>> it being mis-understood. Similarly, tmp can be just about any type
>>>> of variable that is used to hold a temporary value.
>>>> </quote>
>>>>
>>>> FreeBSD style guide:
>>>>
>>>> https://man.freebsd.org/cgi/man.cgi?style(9)
>>>>
>>>> <quote>
>>>> A for loop may declare and initialize its counting variable.
>>>>
>>>>             for (int    i = 0; i < 15; i++) {
>>>> </quote>
>>>>
>>>> Gnome coding style:
>>>>
>>>> https://developer.gnome.org/documentation/guidelines/programming/coding-style.html
>>>>
>>>> <quote>
>>>> for (i = 0; i < num_elements; i++) {
>>>> </quote>
>>>>
>>>
>>> To each his own.  I was taught with a much stricter standard
>>> and I think  it has done me well over my career.  I will admit
>>> that I have used i and variants like i1 and i2 for loops when
>>> writing something quick and dirty that I will only be using
>>> myself, but even then I know deep inside that I am doing
>>> something basically wrong.  :-)
>>
>> Stricter?
>>
>> Is DoD Ada guidelines strict enough for you?
>>
>> https://apps.dtic.mil/sti/tr/pdf/ADA241772.pdf
>>
>> page 84 has an example with a for loop using I.
>>
>> https://www.adaic.org/resources/add_content/docs/95style/95style.pdf\
>>
>> <quote>
>> To iterate over all elements of an array:
>> for I in Array_Name'Range loop
>> </quote>
>
> OK.  Well, my early programming days were also with DOD and
> later with DOD Contractors.  And they didn't believe in that
> kind of programming.  I see the number 95 in there. I assume
> that's a year.  Looks like someone got really lazy after I
> left.  It was 1988 when I left that world and went into academia.
> I'll take the old way over the new way any day.

The last link is indeed from 1995.

The first link is from 1989.

Arne

Re: different defaults in batch

<7d372f82-07b3-4af5-894b-501cbf504ca3n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30694&group=comp.os.vms#30694

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7144:0:b0:412:14a0:448e with SMTP id h4-20020ac87144000000b0041214a0448emr109708qtp.1.1697937223435;
Sat, 21 Oct 2023 18:13:43 -0700 (PDT)
X-Received: by 2002:a05:6870:724b:b0:1e9:ade8:7417 with SMTP id
y11-20020a056870724b00b001e9ade87417mr2563013oaf.8.1697937223269; Sat, 21 Oct
2023 18:13:43 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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.os.vms
Date: Sat, 21 Oct 2023 18:13:42 -0700 (PDT)
In-Reply-To: <uh0ovj$1qb47$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=75.37.192.241; posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 75.37.192.241
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <uh0ovj$1qb47$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <7d372f82-07b3-4af5-894b-501cbf504ca3n@googlegroups.com>
Subject: Re: different defaults in batch
From: gah...@u.washington.edu (gah4)
Injection-Date: Sun, 22 Oct 2023 01:13:43 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2271
 by: gah4 - Sun, 22 Oct 2023 01:13 UTC

On Saturday, October 21, 2023 at 7:59:03 AM UTC-7, Arne Vajhøj wrote:
> On 10/21/2023 1:45 AM, gah4 wrote:
> > Many Unix programs work differently when stdout is a terminal instead
> > of a file. That often makes sense. Also, many people are used to them
> > working that way, and know what to do about it.

> If being a terminal activates some fancy color highlightning
> then fine.

> I still don't like changing behavior.
>
> It is not that hard to add /NOLIST and /NOMAP but it
> just irritates me.
Well for one example, more does its "more" thing only on a terminal,
otherwise it works more like cat.

Convenient when you used more, and then want to redirect to a file.
You don't have to remove the more, just add the redirect.

I suspect interactive editors will also check for a terminal.

Running vi from batch doesn't seem very useful.

Re: different defaults in batch

<c30fb513-10ae-48f2-bc8d-cb127427d74dn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30696&group=comp.os.vms#30696

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:6545:b0:775:74c5:95ea with SMTP id qc5-20020a05620a654500b0077574c595eamr109203qkn.1.1697937933123;
Sat, 21 Oct 2023 18:25:33 -0700 (PDT)
X-Received: by 2002:a05:6830:16c9:b0:6bd:c74e:f21d with SMTP id
l9-20020a05683016c900b006bdc74ef21dmr1663857otr.4.1697937932922; Sat, 21 Oct
2023 18:25:32 -0700 (PDT)
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.os.vms
Date: Sat, 21 Oct 2023 18:25:32 -0700 (PDT)
In-Reply-To: <uh0oog$1qb47$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=75.37.192.241; posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 75.37.192.241
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net>
<uh0oog$1qb47$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c30fb513-10ae-48f2-bc8d-cb127427d74dn@googlegroups.com>
Subject: Re: different defaults in batch
From: gah...@u.washington.edu (gah4)
Injection-Date: Sun, 22 Oct 2023 01:25:33 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: gah4 - Sun, 22 Oct 2023 01:25 UTC

On Saturday, October 21, 2023 at 7:55:17 AM UTC-7, Arne Vajhøj wrote:
> On 10/21/2023 8:45 AM, bill wrote:
> > On 10/21/2023 1:45 AM, gah4 wrote:

(snip)

> >> even though it used to be true in C, isn't any more, it does

> > When did C ever have "default typing" like Fortran?

> I don't think C ever allowed undeclared variables
> giving them a type.

> C does default return type of functions to int. It is
> horrible, but it does.

K&R C variables (and functions, as you note) default to int.

int is still the default type if you declare a variable without a type.

auto i;
static j;

declare int variables with the appropriate attribute.
(auto is the default, but you can still declare it.)

I believe short and long were originally modifiers, such
that short is short for short int, and long is short for long int.

And void wasn't added until the ANSI standard. Before that, it was
usual for functions to be int, and you weren't required to actually
return any value.

Re: different defaults in batch

<uh235i$27chd$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30701&group=comp.os.vms#30701

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sat, 21 Oct 2023 22:59:59 -0400
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <uh235i$27chd$1@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Oct 2023 02:58:58 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e3b4a5bce5fbbfb1713d8d212d8c917d";
logging-data="2339373"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RfOspYg43MEFYiqRLYz/fYOs+CFi+aDg="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:bUt3SEqdnVLOOvwMtpdGSwjNWhQ=
In-Reply-To: <kpj5a8F13meU3@mid.individual.net>
 by: Dave Froble - Sun, 22 Oct 2023 02:59 UTC

On 10/21/2023 7:31 PM, bill wrote:
> On 10/21/2023 1:48 PM, Arne Vajhøj wrote:
>> On 10/21/2023 12:12 PM, Arne Vajhøj wrote:
>>> On 10/21/2023 11:39 AM, bill wrote:
>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>>> On 10/21/2023 8:45 AM, bill wrote:
>>>>>> On 10/21/2023 1:45 AM, gah4 wrote:
>>>>>>> seem that many like to use i, j, k, l, m, and n for the
>>>>>>> first letter of integer variables in C and other languages,
>>>>>>> following the Fortran convention of over 60 years ago.
>>>>>>
>>>>>> I have also never seen this. Except for entries in the
>>>>>> obfuscated C contest the norm for C program, in my experience,
>>>>>> has always been to use meaningful names for variables and not
>>>>>> some old convention from a different language.
>>>>>
>>>>> Hmmm.
>>>>>
>>>>> Are you telling me that you have never seen i, j, ...
>>>>> used as variable in a for loop in C?
>>>>
>>>> Probably, but if someone is going to use a single letter variable
>>>> for a loop index more likely would be a, b, x, y, z. But I'm sure
>>>> an i would show up more for it being the first letter of the word
>>>> index than any influence from Fortran. Can't say I have ever seen
>>>> j used.
>>>
>>> My impression is that:
>>>
>>> for(i = 0, ...
>>> for(int i = 0, ...
>>>
>>> outnumber:
>>>
>>> for(a = 0, ...
>>> for(int a = 0, ...
>>>
>>> by a factor 1000.
>>>
>>> :-)
>>
>> The gentlemen K & R also use i and j in the C book.
>>
>> And the gentleman Stroustrup also use i in the C++ book.
>
> What can I say. The places where I worked frowned on (read
> that as forbid) single letter variables for any use at any
> time. They also frowned on the concept of IMPLICIT. Define
> everything and explain it in comments and the documentation.
>
> bill
>
>

As they were signing the paychecks, they were entitled to an opinion. But other
opinions are valid.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: different defaults in batch

<89d1876a-0705-49ca-8f30-bab6305e8f62n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30702&group=comp.os.vms#30702

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:953:b0:66d:347:80e0 with SMTP id dn19-20020a056214095300b0066d034780e0mr97277qvb.8.1697945745718;
Sat, 21 Oct 2023 20:35:45 -0700 (PDT)
X-Received: by 2002:a05:6870:8184:b0:1ea:37d:c12b with SMTP id
k4-20020a056870818400b001ea037dc12bmr2856677oae.2.1697945745506; Sat, 21 Oct
2023 20:35:45 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!3.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sat, 21 Oct 2023 20:35:45 -0700 (PDT)
In-Reply-To: <kpi9leF13meU1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=75.37.192.241; posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 75.37.192.241
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net>
<uh0oog$1qb47$1@dont-email.me> <kpi9leF13meU1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <89d1876a-0705-49ca-8f30-bab6305e8f62n@googlegroups.com>
Subject: Re: different defaults in batch
From: gah...@u.washington.edu (gah4)
Injection-Date: Sun, 22 Oct 2023 03:35:45 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 23
 by: gah4 - Sun, 22 Oct 2023 03:35 UTC

On Saturday, October 21, 2023 at 8:40:02 AM UTC-7, bill wrote:
> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:

(snip)

> > Are you telling me that you have never seen i, j, ...
> > used as variable in a for loop in C?

> Probably, but if someone is going to use a single letter variable
> for a loop index more likely would be a, b, x, y, z. But I'm sure
> an i would show up more for it being the first letter of the word
> index than any influence from Fortran. Can't say I have ever seen
> j used.

Mathematics notation for summation commonly uses i and j
as the index variables.

Since I didn't learn algebra and calculus until after Fortran,
I can't say which got it first, but I suspect it was math.

I do have a Fortran program with 26 one letter integer variables, though.

Re: different defaults in batch

<6b05d733-5581-4482-91a5-e6d41a4289fan@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30703&group=comp.os.vms#30703

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:6889:0:b0:418:1dbb:95de with SMTP id m9-20020ac86889000000b004181dbb95demr105960qtq.11.1697947490732;
Sat, 21 Oct 2023 21:04:50 -0700 (PDT)
X-Received: by 2002:a9d:6753:0:b0:6cd:a76:3072 with SMTP id
w19-20020a9d6753000000b006cd0a763072mr1685231otm.2.1697947490504; Sat, 21 Oct
2023 21:04:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sat, 21 Oct 2023 21:04:49 -0700 (PDT)
In-Reply-To: <kpj6gdF13mfU2@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=76.76.60.100; posting-account=OjKUgAkAAAAXAqdVEKd-Gc8RltEUx3Xq
NNTP-Posting-Host: 76.76.60.100
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net>
<uh0oog$1qb47$1@dont-email.me> <kpi9leF13meU1@mid.individual.net>
<uh1fiq$9hb$1@news.misty.com> <kpj4p4F13meU2@mid.individual.net>
<uh1no7$21enc$1@dont-email.me> <kpj6gdF13mfU2@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6b05d733-5581-4482-91a5-e6d41a4289fan@googlegroups.com>
Subject: Re: different defaults in batch
From: sms.anti...@gmail.com (Steven Schweda)
Injection-Date: Sun, 22 Oct 2023 04:04:50 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 16
 by: Steven Schweda - Sun, 22 Oct 2023 04:04 UTC

> I have also never seen this. [...]

> [...] Can't say I have ever seen j used.

> [...] I was taught with a much stricter standard [...]

If the only programs which you have ever seen were written by you,
then a qualifier like "I have never seen" does not mean what a typical
reader expects it to mean. To avoid wasting so much time of so many
people, you might consider using instead a qualifier like, say, "I never
do". (It's still foolish, but might promote fewer senseless arguments.)

For a good time, try commands like the following in the main
directory of almost any C project (written my neurotypical people):

search /statistics [...]*.c " i,", "i;"
search /statistics [...]*.c " j,", "j;"

Re: different defaults in batch

<uh2rob$sf$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30705&group=comp.os.vms#30705

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.80-218-16-84.dclient.hispeed.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 11:58:35 +0200
Organization: MGT Consulting
Message-ID: <uh2rob$sf$1@news.misty.com>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh1fiq$9hb$1@news.misty.com>
<kpj4p4F13meU2@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Oct 2023 09:58:35 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="80-218-16-84.dclient.hispeed.ch:80.218.16.84";
logging-data="911"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <kpj4p4F13meU2@mid.individual.net>
 by: Johnny Billquist - Sun, 22 Oct 2023 09:58 UTC

On 2023-10-22 01:22, bill wrote:
> On 10/21/2023 5:24 PM, Johnny Billquist wrote:
>> On 2023-10-21 17:39, bill wrote:
>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>> Are you telling me that you have never seen i, j, ...
>>>> used as variable in a for loop in C?
>>>>
>>>
>>> Probably, but if someone is going to use a single letter variable
>>> for a loop index more likely would be a, b, x, y, z.  But I'm sure
>>> an i would show up more for it being the first letter of the word
>>> index than any influence from Fortran.  Can't say I have ever seen
>>> j used.
>>
>> i and j as loop variables probably beats all other letters combined.
>>
>> If you haven't seen that, then I really wonder what code you have
>> looked at.
>>
>
> My early days doing production programming (In COBOL, Fortran, Pascal, C
> and a lot of different assemblers) was all done in an environment with
> very strict programming standards.  Probably explains a lot about my
> style and why I don't have problems with things like over-runs and
> bounds violations.  :-)

It's unlikely that avoiding single letter variable names for small,
simple loops, helped you avoid over-runs and bounds violations.

It's like using a register for a simple loop in assembler. Sure, you can
do the loops with a value somewhere in memory as well, but it's just
making for much more code, and less readable code at that.

I've worked in many places, and have faced many different coding styles
and requirements. Some of them really complex and elaborate. But I've
not encountered a single one that didn't recognize that for some
situations, and single letter variable name for small loops just makes
more sense to leave at that.

Johnny

Re: different defaults in batch

<uh2ruc$sf$2@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30706&group=comp.os.vms#30706

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.80-218-16-84.dclient.hispeed.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 12:01:48 +0200
Organization: MGT Consulting
Message-ID: <uh2ruc$sf$2@news.misty.com>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh1fiq$9hb$1@news.misty.com>
<kpj4p4F13meU2@mid.individual.net> <uh1no7$21enc$1@dont-email.me>
<kpj6gdF13mfU2@mid.individual.net> <uh1otl$21lpk$1@dont-email.me>
<kpj80qF13mfU3@mid.individual.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Oct 2023 10:01:48 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="80-218-16-84.dclient.hispeed.ch:80.218.16.84";
logging-data="911"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <kpj80qF13mfU3@mid.individual.net>
 by: Johnny Billquist - Sun, 22 Oct 2023 10:01 UTC

On 2023-10-22 02:17, bill wrote:
> On 10/21/2023 8:04 PM, Arne Vajhøj wrote:
>>
>> Stricter?
>>
>> Is DoD Ada guidelines strict enough for you?
>>
>> https://apps.dtic.mil/sti/tr/pdf/ADA241772.pdf
>>
>> page 84 has an example with a for loop using I.
>>
>> https://www.adaic.org/resources/add_content/docs/95style/95style.pdf\
>>
>> <quote>
>> To iterate over all elements of an array:
>> for I in Array_Name'Range loop
>> </quote>
>
> OK.  Well, my early programming days were also with DOD and
> later with DOD Contractors.  And they didn't believe in that
> kind of programming.  I see the number 95 in there. I assume
> that's a year.  Looks like someone got really lazy after I
> left.  It was 1988 when I left that world and went into academia.
> I'll take the old way over the new way any day.

Yes, Ada95 came out in 95. Before that you had Ada83. I believe the
guidelines on this one didn't change.
(I actually have done paid work in both Ada83 and Ada95.)

Johnny

Re: different defaults in batch

<uh2s9s$sf$3@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30707&group=comp.os.vms#30707

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.80-218-16-84.dclient.hispeed.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 12:07:56 +0200
Organization: MGT Consulting
Message-ID: <uh2s9s$sf$3@news.misty.com>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<c30fb513-10ae-48f2-bc8d-cb127427d74dn@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 22 Oct 2023 10:07:56 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="80-218-16-84.dclient.hispeed.ch:80.218.16.84";
logging-data="911"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <c30fb513-10ae-48f2-bc8d-cb127427d74dn@googlegroups.com>
 by: Johnny Billquist - Sun, 22 Oct 2023 10:07 UTC

On 2023-10-22 03:25, gah4 wrote:
> On Saturday, October 21, 2023 at 7:55:17 AM UTC-7, Arne Vajhøj wrote:
>> On 10/21/2023 8:45 AM, bill wrote:
>>> On 10/21/2023 1:45 AM, gah4 wrote:
>
> (snip)
>
>>>> even though it used to be true in C, isn't any more, it does
>
>>> When did C ever have "default typing" like Fortran?
>
>> I don't think C ever allowed undeclared variables
>> giving them a type.
>
>> C does default return type of functions to int. It is
>> horrible, but it does.
>
> K&R C variables (and functions, as you note) default to int.
>
> int is still the default type if you declare a variable without a type.
>
> auto i;
> static j;
>
> declare int variables with the appropriate attribute.
> (auto is the default, but you can still declare it.)

Sure. But for variables, they have to be declared. Even if it's just
"auto i;". You cannot use a variable that have not been declared in any way.

> And void wasn't added until the ANSI standard. Before that, it was
> usual for functions to be int, and you weren't required to actually
> return any value.

Well. They still return a value. But you've always been allowed to just
ignore the returned value of a function in C. Compilers these days
usually issue at least a warning if a non-void function don't explicitly
return a value, but I think it's still technically not disallowed (but I
could be wrong on that one...).

Johnny

Re: different defaults in batch

<kpkoanF13meU4@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30713&group=comp.os.vms#30713

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 10:01:56 -0400
Lines: 33
Message-ID: <kpkoanF13meU4@mid.individual.net>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<uh0ovj$1qb47$2@dont-email.me>
<7d372f82-07b3-4af5-894b-501cbf504ca3n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net NrDzb64zC0PN2kmK0kRrawbyrwzrY1weySlS320n3AIcXDhEXJ
Cancel-Lock: sha1:wY1t5l6eYsdkit4tAkMpSJE9eLE= sha256:ULGSbSTt/ruvyWCjmiGw6yVU4kelmZCEK0ohZ2UuBg8=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <7d372f82-07b3-4af5-894b-501cbf504ca3n@googlegroups.com>
 by: bill - Sun, 22 Oct 2023 14:01 UTC

On 10/21/2023 9:13 PM, gah4 wrote:
> On Saturday, October 21, 2023 at 7:59:03 AM UTC-7, Arne Vajhøj wrote:
>> On 10/21/2023 1:45 AM, gah4 wrote:
>>> Many Unix programs work differently when stdout is a terminal instead
>>> of a file. That often makes sense. Also, many people are used to them
>>> working that way, and know what to do about it.
>
>> If being a terminal activates some fancy color highlightning
>> then fine.
>
>> I still don't like changing behavior.
>>
>> It is not that hard to add /NOLIST and /NOMAP but it
>> just irritates me.
>
> Well for one example, more does its "more" thing only on a terminal,
> otherwise it works more like cat.
>
> Convenient when you used more, and then want to redirect to a file.
> You don't have to remove the more, just add the redirect.
>
> I suspect interactive editors will also check for a terminal.
>
> Running vi from batch doesn't seem very useful.

Actually, it works quite well (Vim warns about not having a terminal
but then, Vim isn't vi :-).

sed is better for the task but some people know vi better than sed.

bill

Re: different defaults in batch

<kpkouoF13meU5@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30714&group=comp.os.vms#30714

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 10:12:37 -0400
Lines: 74
Message-ID: <kpkouoF13meU5@mid.individual.net>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net A7ww9ee7vI3UhOd01Ehc9QED9Ns4WjlKIqTV3tuEEDdRlyOUZe
Cancel-Lock: sha1:2Sp7Lu+GW1NJjAqstGieScBDeSs= sha256:bDhOU/dxcAK9H+TJBlWviEjgB7FAbdp/KUsKTSi7GAY=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uh235i$27chd$1@dont-email.me>
 by: bill - Sun, 22 Oct 2023 14:12 UTC

On 10/21/2023 10:59 PM, Dave Froble wrote:
> On 10/21/2023 7:31 PM, bill wrote:
>> On 10/21/2023 1:48 PM, Arne Vajhøj wrote:
>>> On 10/21/2023 12:12 PM, Arne Vajhøj wrote:
>>>> On 10/21/2023 11:39 AM, bill wrote:
>>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>>>> On 10/21/2023 8:45 AM, bill wrote:
>>>>>>> On 10/21/2023 1:45 AM, gah4 wrote:
>>>>>>>> seem that many like to use i, j, k, l, m, and n for the
>>>>>>>> first letter of integer variables in C and other languages,
>>>>>>>> following the Fortran convention of over 60 years ago.
>>>>>>>
>>>>>>> I have also never seen this.  Except for entries in the
>>>>>>> obfuscated C contest the norm for C program, in my experience,
>>>>>>> has always been to use meaningful names for variables and not
>>>>>>> some old convention from a different language.
>>>>>>
>>>>>> Hmmm.
>>>>>>
>>>>>> Are you telling me that you have never seen i, j, ...
>>>>>> used as variable in a for loop in C?
>>>>>
>>>>> Probably, but if someone is going to use a single letter variable
>>>>> for a loop index more likely would be a, b, x, y, z.  But I'm sure
>>>>> an i would show up more for it being the first letter of the word
>>>>> index than any influence from Fortran.  Can't say I have ever seen
>>>>> j used.
>>>>
>>>> My impression is that:
>>>>
>>>> for(i = 0, ...
>>>> for(int i = 0, ...
>>>>
>>>> outnumber:
>>>>
>>>> for(a = 0, ...
>>>> for(int a = 0, ...
>>>>
>>>> by a factor 1000.
>>>>
>>>> :-)
>>>
>>> The gentlemen K & R also use i and j in the C book.
>>>
>>> And the gentleman Stroustrup also use i in the C++ book.
>>
>> What can I say.  The places where I worked frowned on (read
>> that as forbid) single letter variables for any use at any
>> time.  They also frowned on the concept of IMPLICIT.  Define
>> everything and explain it in comments and the documentation.
>>
>> bill
>>
>>
>
> As they were signing the paychecks, they were entitled to an opinion.
> But other opinions are valid.
>

Valid does not necessarily mean better or even good.

As an interesting note, out of curiosity, I grabbed a Fortran book
I had sitting here within easy reach. It's from 1983. There are
at least 30 example programs written (and copyrighted!) by the author.
While he uses I and J as indexes in a couple of them more often he uses
INDEX and other times he uses words like IREC, LOC, ICOUNT. The one he
uses the most was INDEX. So it appears there was a lot of variation.
I still hold to the opinion that single letter variables with no
immediate apparent function are a bad idea. The compiler can understand
it, but humans may become confused. :-)

bill

Re: different defaults in batch

<c940a012-b134-48b9-b7b8-7609552487b9n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30715&group=comp.os.vms#30715

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ac8:7399:0:b0:41b:1957:55b with SMTP id t25-20020ac87399000000b0041b1957055bmr225006qtp.4.1697985527494;
Sun, 22 Oct 2023 07:38:47 -0700 (PDT)
X-Received: by 2002:a05:6808:1b2b:b0:3a9:a49f:d6b8 with SMTP id
bx43-20020a0568081b2b00b003a9a49fd6b8mr2715615oib.0.1697985527350; Sun, 22
Oct 2023 07:38:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.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.os.vms
Date: Sun, 22 Oct 2023 07:38:46 -0700 (PDT)
In-Reply-To: <kpkouoF13meU5@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:4040:5ed9:7100:2472:6381:cc47:4a66;
posting-account=Ysq9BAoAAACGX1EcMMPkdNg4YcTg0TxG
NNTP-Posting-Host: 2600:4040:5ed9:7100:2472:6381:cc47:4a66
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net>
<uh0oog$1qb47$1@dont-email.me> <kpi9leF13meU1@mid.individual.net>
<uh0t9t$1rda6$1@dont-email.me> <uh12sn$1sjsj$1@dont-email.me>
<kpj5a8F13meU3@mid.individual.net> <uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c940a012-b134-48b9-b7b8-7609552487b9n@googlegroups.com>
Subject: Re: different defaults in batch
From: dansabrs...@yahoo.com (abrsvc)
Injection-Date: Sun, 22 Oct 2023 14:38:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5202
 by: abrsvc - Sun, 22 Oct 2023 14:38 UTC

On Sunday, October 22, 2023 at 10:12:45 AM UTC-4, bill wrote:
> On 10/21/2023 10:59 PM, Dave Froble wrote:
> > On 10/21/2023 7:31 PM, bill wrote:
> >> On 10/21/2023 1:48 PM, Arne Vajhøj wrote:
> >>> On 10/21/2023 12:12 PM, Arne Vajhøj wrote:
> >>>> On 10/21/2023 11:39 AM, bill wrote:
> >>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
> >>>>>> On 10/21/2023 8:45 AM, bill wrote:
> >>>>>>> On 10/21/2023 1:45 AM, gah4 wrote:
> >>>>>>>> seem that many like to use i, j, k, l, m, and n for the
> >>>>>>>> first letter of integer variables in C and other languages,
> >>>>>>>> following the Fortran convention of over 60 years ago.
> >>>>>>>
> >>>>>>> I have also never seen this. Except for entries in the
> >>>>>>> obfuscated C contest the norm for C program, in my experience,
> >>>>>>> has always been to use meaningful names for variables and not
> >>>>>>> some old convention from a different language.
> >>>>>>
> >>>>>> Hmmm.
> >>>>>>
> >>>>>> Are you telling me that you have never seen i, j, ...
> >>>>>> used as variable in a for loop in C?
> >>>>>
> >>>>> Probably, but if someone is going to use a single letter variable
> >>>>> for a loop index more likely would be a, b, x, y, z. But I'm sure
> >>>>> an i would show up more for it being the first letter of the word
> >>>>> index than any influence from Fortran. Can't say I have ever seen
> >>>>> j used.
> >>>>
> >>>> My impression is that:
> >>>>
> >>>> for(i = 0, ...
> >>>> for(int i = 0, ...
> >>>>
> >>>> outnumber:
> >>>>
> >>>> for(a = 0, ...
> >>>> for(int a = 0, ...
> >>>>
> >>>> by a factor 1000.
> >>>>
> >>>> :-)
> >>>
> >>> The gentlemen K & R also use i and j in the C book.
> >>>
> >>> And the gentleman Stroustrup also use i in the C++ book.
> >>
> >> What can I say. The places where I worked frowned on (read
> >> that as forbid) single letter variables for any use at any
> >> time. They also frowned on the concept of IMPLICIT. Define
> >> everything and explain it in comments and the documentation.
> >>
> >> bill
> >>
> >>
> >
> > As they were signing the paychecks, they were entitled to an opinion.
> > But other opinions are valid.
> >
> Valid does not necessarily mean better or even good.
>
> As an interesting note, out of curiosity, I grabbed a Fortran book
> I had sitting here within easy reach. It's from 1983. There are
> at least 30 example programs written (and copyrighted!) by the author.
> While he uses I and J as indexes in a couple of them more often he uses
> INDEX and other times he uses words like IREC, LOC, ICOUNT. The one he
> uses the most was INDEX. So it appears there was a lot of variation.
> I still hold to the opinion that single letter variables with no
> immediate apparent function are a bad idea. The compiler can understand
> it, but humans may become confused. :-)
>
>
> bill

You are correct. When I was teaching FORTRAN, it was common to use the initial letter to determine the variable type. Standard practice was to use single letters for "temporary" DO loop counters with more descriptive variables elsewhere. For example, within READ or WRITE statements: Write (2,6) a(i), I=1,10

Note that at that time, the IMPLICIT NONE was not yet common.

Dan

Re: different defaults in batch

<uh3p0n$2j00f$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30720&group=comp.os.vms#30720

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 14:19:00 -0400
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <uh3p0n$2j00f$1@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 22 Oct 2023 18:17:59 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e3b4a5bce5fbbfb1713d8d212d8c917d";
logging-data="2719759"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Xz5SAXmGjuMDZrFljmsRfcM5DxnNCu68="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:3SSsKAnAoweMwjX28Frg9W6P9XE=
In-Reply-To: <kpkouoF13meU5@mid.individual.net>
 by: Dave Froble - Sun, 22 Oct 2023 18:19 UTC

On 10/22/2023 10:12 AM, bill wrote:

> Valid does not necessarily mean better or even good.

Nor does it mean bad, either. That cuts both ways.

> As an interesting note, out of curiosity, I grabbed a Fortran book
> I had sitting here within easy reach. It's from 1983. There are
> at least 30 example programs written (and copyrighted!) by the author.
> While he uses I and J as indexes in a couple of them more often he uses
> INDEX and other times he uses words like IREC, LOC, ICOUNT. The one he
> uses the most was INDEX. So it appears there was a lot of variation.
> I still hold to the opinion that single letter variables with no
> immediate apparent function are a bad idea. The compiler can understand
> it, but humans may become confused. :-)
>
>
> bill
>

Ok, trivial, but then again, trivial sometimes occurs in programming.

For Z% = 1% to 10%
Print Z%
Next Z%

Ok, what is not apparent about Z% ?

And:

For This_is_the_Loop_Index_variable% = 1% to 10%
Print This_is_the_Loop-Index_variable%
Next This_is_the_Loop_Index_variable%

Sure seems less understandable after trying to read the variable name. As a
human I'd become so upset that I might become confused. The compiler won't
care, unless the multiple references to the variable get mis-spelled, and there
is much more possibility of doing so, I did just writing this. Can you find it?
Got to wonder how many times Z% might be mis-spelled?

KISS would seem to apply here ....

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: different defaults in batch

<d4ed1722-36b0-4156-8b9e-3b192e36f915n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30721&group=comp.os.vms#30721

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ad4:5304:0:b0:66d:3b0:2ce7 with SMTP id y4-20020ad45304000000b0066d03b02ce7mr135134qvr.6.1697998852121; Sun, 22 Oct 2023 11:20:52 -0700 (PDT)
X-Received: by 2002:a05:6830:c5:b0:6ce:34e5:e26e with SMTP id x5-20020a05683000c500b006ce34e5e26emr2205488oto.6.1697998851949; Sun, 22 Oct 2023 11:20:51 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!69.80.99.15.MISMATCH!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 22 Oct 2023 11:20:51 -0700 (PDT)
In-Reply-To: <uh3p0n$2j00f$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:4040:5ed9:7100:2472:6381:cc47:4a66; posting-account=Ysq9BAoAAACGX1EcMMPkdNg4YcTg0TxG
NNTP-Posting-Host: 2600:4040:5ed9:7100:2472:6381:cc47:4a66
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me> <ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me> <ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me> <e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me> <kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me> <uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net> <uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net> <uh3p0n$2j00f$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <d4ed1722-36b0-4156-8b9e-3b192e36f915n@googlegroups.com>
Subject: Re: different defaults in batch
From: dansabrs...@yahoo.com (abrsvc)
Injection-Date: Sun, 22 Oct 2023 18:20:52 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 11
 by: abrsvc - Sun, 22 Oct 2023 18:20 UTC

> For This_is_the_Loop_Index_variable% = 1% to 10%
> Print This_is_the_Loop-Index_variable%
> Next This_is_the_Loop_Index_variable%
>
> Sure seems less understandable after trying to read the variable name. As a
> human I'd become so upset that I might become confused. The compiler won't
> care, unless the multiple references to the variable get mis-spelled, and there
> is much more possibility of doing so, I did just writing this. Can you find it?

Yes: _ vs -

Dan

Re: different defaults in batch

<kpl9hiF13meU6@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30722&group=comp.os.vms#30722

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 14:55:43 -0400
Lines: 76
Message-ID: <kpl9hiF13meU6@mid.individual.net>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
<uh3p0n$2j00f$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net Ph9ozncDSLmGATD1aEcDPgUMFAPBwGGUlbxH0ZPHP0EjhmIgcw
Cancel-Lock: sha1:DKm263A3nM6zRDqtownTDvAQ6Cs= sha256:IWZtpWHWF3xamom3k64ZF3h1f/CzQ0clLDcr14CMUh0=
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <uh3p0n$2j00f$1@dont-email.me>
 by: bill - Sun, 22 Oct 2023 18:55 UTC

On 10/22/2023 2:19 PM, Dave Froble wrote:
> On 10/22/2023 10:12 AM, bill wrote:
>
>> Valid does not necessarily mean better or even good.
>
> Nor does it mean bad, either.  That cuts both ways.
>
>> As an interesting note, out of curiosity, I grabbed a Fortran book
>> I had sitting here within easy reach.  It's from 1983.  There are
>> at least 30 example programs written (and copyrighted!) by the author.
>> While he uses I and J as indexes in a couple of them more often he uses
>> INDEX and other times he uses words like IREC, LOC, ICOUNT.  The one he
>> uses the most was INDEX.  So it appears there was a lot of variation.
>> I still hold to the opinion that single letter variables with no
>> immediate apparent function are a bad idea.  The compiler can understand
>> it, but humans may become confused.  :-)
>>
>>
>> bill
>>
>
> Ok, trivial, but then again, trivial sometimes occurs in programming.
>
> For Z% = 1% to 10%
>     Print Z%
> Next Z%
>
> Ok, what is not apparent about Z% ?

We are back to the absurd. That's what I like about c.o.v.

>
> And:
>
> For This_is_the_Loop_Index_variable% = 1% to 10%
>     Print This_is_the_Loop-Index_variable%
> Next This_is_the_Loop_Index_variable%
>
> Sure seems less understandable after trying to read the variable name.

Because it is absurd. As is the program it's supposed to be.
The variable should be something simple but understandable.
Like INDEX or COUNT or even NUMBER.
> As a human I'd become so upset that I might become confused.  The

Because it's absurd.

> compiler won't care, unless the multiple references to the variable get
> mis-spelled, and there is much more possibility of doing so, I did just
> writing this.  Can you find it?

Saw it immediately. But then, it's only three lines. Compiler
would have flagged it and programmer would have fixed it if this
had been a real program longer than three lines. But then, only
an idiot would have used it.

> Got to wonder how many times Z% might
> be mis-spelled?

Wonder how one would recognize what Z% was and what it was used for in
the middle of a ten thousand line program?

>
> KISS would seem to apply here ....
>

I agree and a longer than one letter meaningfully named variable
meets that criteria.

bill

And with this, I withdraw. No one here is going to change the way
they program based on my opinion and I am certainly not going to
change the way I do it. To each his own.

Re: different defaults in batch

<00b35765384b195c6067516fab6e207ba4f95b80.camel@munted.eu>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30725&group=comp.os.vms#30725

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!palladium.buellnet!not-for-mail
From: alex.bu...@munted.eu (Single Stage to Orbit)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 20:46:35 +0100
Organization: One very high maintenance cat
Message-ID: <00b35765384b195c6067516fab6e207ba4f95b80.camel@munted.eu>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
<uh3p0n$2j00f$1@dont-email.me>
Reply-To: alex.buell@munted.eu
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: solani.org;
logging-data="609911"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Evolution 3.48.4
Cancel-Lock: sha1:hgIhSajqxAFGBQnveR4Vi518VYs=
X-User-ID: eJwNydkRACEIBNGUQJlBwnE58g9h/epX1dhUphtBw2B443m1+5EWaiyESq2ub2wXAK08MJ+Ul+h77C2kqzL0/izcFLU=
In-Reply-To: <uh3p0n$2j00f$1@dont-email.me>
 by: Single Stage to Orbi - Sun, 22 Oct 2023 19:46 UTC

On Sun, 2023-10-22 at 14:19 -0400, Dave Froble wrote:
>  This_is_the_Loop-Index_variable%

I see it. Programmer needs remedial lessons.
--
Tactical Nuclear Kittens

Re: different defaults in batch

<uh4gam$2o3s8$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30730&group=comp.os.vms#30730

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Sun, 22 Oct 2023 20:55:32 -0400
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <uh4gam$2o3s8$1@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
<uh3p0n$2j00f$1@dont-email.me>
<00b35765384b195c6067516fab6e207ba4f95b80.camel@munted.eu>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 23 Oct 2023 00:55:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="1a13ce767a1fba298873428a9a5249f9";
logging-data="2887560"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19m6ZWSyLRozczOuzjJCZG8HlibnWke5mQ="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:32lsOk6bD3Bcy6Fg1i3x7g6p9QM=
In-Reply-To: <00b35765384b195c6067516fab6e207ba4f95b80.camel@munted.eu>
 by: Dave Froble - Mon, 23 Oct 2023 00:55 UTC

On 10/22/2023 3:46 PM, Single Stage to Orbit wrote:
> On Sun, 2023-10-22 at 14:19 -0400, Dave Froble wrote:
>> This_is_the_Loop-Index_variable%
>
> I see it. Programmer needs remedial lessons.
>

Doncha think that I might have done that on purpose? I did, to illustrate how
mis-spellings could occur when going overboard on long variable names.
Actually, I originally spelled it correctly, then went back and changed it, just
to show what might be more likely.

To look at a past application I wrote, just for kicks, I reviewed my RMS_LOCKS
utility. It scans the lock database, building linked lists of everything, then
processes the data to find interlocks, or to just list all the locks.

Lots and lots of declared variables and structures ...
List counters had reasonable names, usually about 4 characters ...
And yes, some small tight loops ...

One size does not fit all, use what's reasonable, what's easy to read.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: different defaults in batch

<9c61654348cd9d225a7de4f928c3f67fc6956897.camel@munted.eu>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30743&group=comp.os.vms#30743

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!palladium.buellnet!not-for-mail
From: alex.bu...@munted.eu (Single Stage to Orbit)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Mon, 23 Oct 2023 10:00:48 +0100
Organization: One very high maintenance cat
Message-ID: <9c61654348cd9d225a7de4f928c3f67fc6956897.camel@munted.eu>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
<uh3p0n$2j00f$1@dont-email.me>
<00b35765384b195c6067516fab6e207ba4f95b80.camel@munted.eu>
<uh4gam$2o3s8$1@dont-email.me>
Reply-To: alex.buell@munted.eu
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: solani.org;
logging-data="633460"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Evolution 3.48.4
Cancel-Lock: sha1:cLnmf1wM72ZybZEyiugo+4Ohyuo=
In-Reply-To: <uh4gam$2o3s8$1@dont-email.me>
X-User-ID: eJwFwYEBwCAIA7CXbKGo5zCQ/09YIgtEbQ+FazQ3Ni6Y2dQ0Plow8mXqlTW63hyY93EyFycXThmFD1u9+ANUORU4
 by: Single Stage to Orbi - Mon, 23 Oct 2023 09:00 UTC

On Sun, 2023-10-22 at 20:55 -0400, Dave Froble wrote:
> On 10/22/2023 3:46 PM, Single Stage to Orbit wrote:
> > On Sun, 2023-10-22 at 14:19 -0400, Dave Froble wrote:
> > >  This_is_the_Loop-Index_variable%
> >
> > I see it. Programmer needs remedial lessons.
>
> Doncha think that I might have done that on purpose?  I did, to
> illustrate how mis-spellings could occur when going overboard on long
> variable names. Actually, I originally spelled it correctly, then
> went back and changed it, just to show what might be more likely.

Yes, that's true and I'm occasionally guilty of doing just that. Last
paper-bag issue was using the wrong function as there were two with
similiar names.

> To look at a past application I wrote, just for kicks, I reviewed my
> RMS_LOCKS utility.  It scans the lock database, building linked lists
> of everything, then processes the data to find interlocks, or to just
> list all the locks.
>
> Lots and lots of declared variables and structures ...
> List counters had reasonable names, usually about 4 characters ...
> And yes, some small tight loops ...

To unroll or not to unroll, that is the question.

> One size does not fit all, use what's reasonable, what's easy to
> read.

Again, true enough.
--
Tactical Nuclear Kittens

Re: different defaults in batch

<uh5lk3$33k1l$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30755&group=comp.os.vms#30755

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Mon, 23 Oct 2023 07:32:21 -0400
Organization: A noiseless patient Spider
Lines: 32
Message-ID: <uh5lk3$33k1l$2@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh0t9t$1rda6$1@dont-email.me>
<uh12sn$1sjsj$1@dont-email.me> <kpj5a8F13meU3@mid.individual.net>
<uh235i$27chd$1@dont-email.me> <kpkouoF13meU5@mid.individual.net>
<uh3p0n$2j00f$1@dont-email.me> <kpl9hiF13meU6@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 23 Oct 2023 11:32:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="090ca90be3c6b5f14178e670212226d3";
logging-data="3264565"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19sdiZj3D+eWXfFhRGkxaLk3hnxEn6fOzs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9/bp22Ueh4aoJKobRG5zQT6v0Mc=
Content-Language: en-US
In-Reply-To: <kpl9hiF13meU6@mid.individual.net>
 by: Arne Vajhøj - Mon, 23 Oct 2023 11:32 UTC

On 10/22/2023 2:55 PM, bill wrote:
> And with this, I withdraw.  No one here is going to change the way
> they program based on my opinion and I am certainly not going to
> change the way I do it.  To each his own.

I don't think many if any of the participants in this subthread
wanted you to change your style.

They were puzzled over you claim:

# > seem that many like to use i, j, k, l, m, and n for the
# > first letter of integer variables in C and other languages,
# > following the Fortran convention of over 60 years ago.
# # I have also never seen this. Except for entries in the
# obfuscated C contest the norm for C program, in my experience,
# has always been to use meaningful names for variables and not
# some old convention from a different language.

If you have said something like "I know it is common to use
i, j, ... for loop counters, but I don't like that practice",
then that would just be your preference.

But saying that you have not seen i, j, ... for loop
counters is weird as they actually are common.

Arne

Re: different defaults in batch

<uh5ou2$34a10$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30759&group=comp.os.vms#30759

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Mon, 23 Oct 2023 12:28:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <uh5ou2$34a10$2@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me> <ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me> <ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me> <e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <uh0ovj$1qb47$2@dont-email.me> <7d372f82-07b3-4af5-894b-501cbf504ca3n@googlegroups.com> <kpkoanF13meU4@mid.individual.net>
Injection-Date: Mon, 23 Oct 2023 12:28:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0b89ecb85b64c7a76d8508527fb676f";
logging-data="3287072"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3jXrMzuZMaGSOQSFTsFZdamLlbOuu9hk="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:9pdlH+setPM6rcAV4RLgk33GDqk=
 by: Simon Clubley - Mon, 23 Oct 2023 12:28 UTC

On 2023-10-22, bill <bill.gunshannon@gmail.com> wrote:
> On 10/21/2023 9:13 PM, gah4 wrote:
>>
>> I suspect interactive editors will also check for a terminal.
>>
>> Running vi from batch doesn't seem very useful.
>
> Actually, it works quite well (Vim warns about not having a terminal
> but then, Vim isn't vi :-).
>
> sed is better for the task but some people know vi better than sed.
>

vi seems to work everywhere. :-)

I strongly prefer emacs, but I have vi running on my Android phone for
small amounts of editing while away from a proper keyboard and a PC.

For various values of "works", it actually works just fine provided you
have a proper soft keyboard installed on your phone. (I use Hacker's Keyboard).

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: different defaults in batch

<uh5p4d$34a10$3@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=30761&group=comp.os.vms#30761

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Mon, 23 Oct 2023 12:32:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uh5p4d$34a10$3@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me> <ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me> <ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me> <e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me> <c30fb513-10ae-48f2-bc8d-cb127427d74dn@googlegroups.com> <uh2s9s$sf$3@news.misty.com>
Injection-Date: Mon, 23 Oct 2023 12:32:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c0b89ecb85b64c7a76d8508527fb676f";
logging-data="3287072"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18aYlsR3Glint6BgOBeFUB6efYo78XPNMw="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:/jHj2VsJ9FSBybl/AnUVWyGiBPE=
 by: Simon Clubley - Mon, 23 Oct 2023 12:32 UTC

On 2023-10-22, Johnny Billquist <bqt@softjar.se> wrote:
>
> Well. They still return a value. But you've always been allowed to just
> ignore the returned value of a function in C. Compilers these days
> usually issue at least a warning if a non-void function don't explicitly
> return a value, but I think it's still technically not disallowed (but I
> could be wrong on that one...).
>

That's what -Werror is for. :-)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: different defaults in batch

<uiel9t$18csv$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=31051&group=comp.os.vms#31051

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: different defaults in batch
Date: Tue, 7 Nov 2023 19:38:21 -0500
Organization: A noiseless patient Spider
Lines: 80
Message-ID: <uiel9t$18csv$2@dont-email.me>
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com>
<kphverF13mfU1@mid.individual.net> <uh0oog$1qb47$1@dont-email.me>
<kpi9leF13meU1@mid.individual.net> <uh1fiq$9hb$1@news.misty.com>
<kpj4p4F13meU2@mid.individual.net> <uh1no7$21enc$1@dont-email.me>
<kpj6gdF13mfU2@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 8 Nov 2023 00:38:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e907906be6e4b0d8cd7fa47462eb621b";
logging-data="1323935"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+m1y8VbA7r4SOyX981NJ/XcygDe3lCT78="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:9z2Jsfgw84tdE+RMu7Ca4sc0/kQ=
In-Reply-To: <kpj6gdF13mfU2@mid.individual.net>
Content-Language: en-US
 by: Arne Vajhøj - Wed, 8 Nov 2023 00:38 UTC

On 10/21/2023 7:51 PM, bill wrote:
> On 10/21/2023 7:44 PM, Arne Vajhøj wrote:
>> On 10/21/2023 7:22 PM, bill wrote:
>>> On 10/21/2023 5:24 PM, Johnny Billquist wrote:
>>>> On 2023-10-21 17:39, bill wrote:
>>>>> On 10/21/2023 10:55 AM, Arne Vajhøj wrote:
>>>>>> Are you telling me that you have never seen i, j, ...
>>>>>> used as variable in a for loop in C?
>>>>>>
>>>>>
>>>>> Probably, but if someone is going to use a single letter variable
>>>>> for a loop index more likely would be a, b, x, y, z.  But I'm sure
>>>>> an i would show up more for it being the first letter of the word
>>>>> index than any influence from Fortran.  Can't say I have ever seen
>>>>> j used.
>>>>
>>>> i and j as loop variables probably beats all other letters combined.
>>>>
>>>> If you haven't seen that, then I really wonder what code you have
>>>> looked at.
>>>>
>>>
>>> My early days doing production programming (In COBOL, Fortran, Pascal, C
>>> and a lot of different assemblers) was all done in an environment with
>>> very strict programming standards.  Probably explains a lot about my
>>> style and why I don't have problems with things like over-runs and
>>> bounds violations.  :-)
>>
>> C coding standards often allow or even encourage i and j.
>>
>> A few random examples:
>>
>> Linux kernel coding style:
>>
>> https://www.kernel.org/doc/html/v4.10/process/coding-style.html
>>
>> <quote>
>> LOCAL variable names should be short, and to the point. If you have
>> some random integer loop counter, it should probably be called i.
>> Calling it loop_counter is non-productive, if there is no chance of it
>> being mis-understood. Similarly, tmp can be just about any type of
>> variable that is used to hold a temporary value.
>> </quote>
>>
>> FreeBSD style guide:
>>
>> https://man.freebsd.org/cgi/man.cgi?style(9)
>>
>> <quote>
>> A for loop may declare and initialize its counting variable.
>>
>>             for (int    i = 0; i < 15; i++) {
>> </quote>
>>
>> Gnome coding style:
>>
>> https://developer.gnome.org/documentation/guidelines/programming/coding-style.html
>>
>> <quote>
>> for (i = 0; i < num_elements; i++) {
>> </quote>
>>
>
> To each his own.  I was taught with a much stricter standard
> and I think  it has done me well over my career.  I will admit
> that I have used i and variants like i1 and i2 for loops when
> writing something quick and dirty that I will only be using
> myself, but even then I know deep inside that I am doing
> something basically wrong.  :-)

I found this.

https://i.chzbgr.com/full/9833112832/hB64CB122/others-why-do-always-use-j-variabes-loops-programmers-disney-s-law

And immediately thought of this thread.

:-)

Arne

Re: different defaults in batch

<6b1d4d3a-d4a4-49c2-b371-fc0dc0c742c9n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=31054&group=comp.os.vms#31054

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ae9:f20c:0:b0:765:a4f2:51ec with SMTP id m12-20020ae9f20c000000b00765a4f251ecmr7777qkg.4.1699408923266;
Tue, 07 Nov 2023 18:02:03 -0800 (PST)
X-Received: by 2002:a05:6870:b509:b0:1e9:9202:20c6 with SMTP id
v9-20020a056870b50900b001e9920220c6mr230397oap.0.1699408922992; Tue, 07 Nov
2023 18:02:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.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.os.vms
Date: Tue, 7 Nov 2023 18:02:02 -0800 (PST)
In-Reply-To: <uh2ruc$sf$2@news.misty.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2600:1700:46b0:abc0:2d21:2f25:27d3:d24d;
posting-account=OGFVHQoAAAASiNAamRQec8BtkuXxYFnQ
NNTP-Posting-Host: 2600:1700:46b0:abc0:2d21:2f25:27d3:d24d
References: <ugsqdf$qt6p$1@dont-email.me> <ugts10$12u2v$1@dont-email.me>
<ugtsak$12u2v$2@dont-email.me> <ugtviv$13ime$4@dont-email.me>
<ugurj6$1akhd$1@dont-email.me> <ugv2qg$1c379$1@dont-email.me>
<e0a6b050-f02c-4942-9f61-e32a1c58990bn@googlegroups.com> <kphverF13mfU1@mid.individual.net>
<uh0oog$1qb47$1@dont-email.me> <kpi9leF13meU1@mid.individual.net>
<uh1fiq$9hb$1@news.misty.com> <kpj4p4F13meU2@mid.individual.net>
<uh1no7$21enc$1@dont-email.me> <kpj6gdF13mfU2@mid.individual.net>
<uh1otl$21lpk$1@dont-email.me> <kpj80qF13mfU3@mid.individual.net> <uh2ruc$sf$2@news.misty.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6b1d4d3a-d4a4-49c2-b371-fc0dc0c742c9n@googlegroups.com>
Subject: Re: different defaults in batch
From: jake.ha...@gmail.com (Jake Hamby (Solid State Jake))
Injection-Date: Wed, 08 Nov 2023 02:02:03 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5904
 by: Jake Hamby (Solid St - Wed, 8 Nov 2023 02:02 UTC

On Sunday, October 22, 2023 at 3:01:51 AM UTC-7, Johnny Billquist wrote:
> On 2023-10-22 02:17, bill wrote:
> >
> > OK. Well, my early programming days were also with DOD and
> > later with DOD Contractors. And they didn't believe in that
> > kind of programming. I see the number 95 in there. I assume
> > that's a year. Looks like someone got really lazy after I
> > left. It was 1988 when I left that world and went into academia.
> > I'll take the old way over the new way any day.
> Yes, Ada95 came out in 95. Before that you had Ada83. I believe the
> guidelines on this one didn't change.
> (I actually have done paid work in both Ada83 and Ada95.)
>
> Johnny

I learned Ada 83 at my university's CS program in the 1990s, but I haven't (yet?) done paid work in it. This was at CSU Pomona (Cal Poly, Pomona). They switched over to teaching Java a few years after a graduated and that seems to be the standard teaching language at many universities these days.

I also taught myself Ada 95 with GNAT and have been hopeful, on and off, that a "safe" language like Ada would take off. It now appears that the time has come, and that the new safe language is called Rust. The fact that AdaCore are now promoting their expertise in safety-critical software toolchains for Rust as well as for Ada, C, and C++ means the writing must be on the wall.

The newest and nicest version of Ada is Ada 2012. Ada's original claim to fame by the mid-1990s was that it had generics and exceptions before C++ copied them, it had tasking with safe message passing between tasks, and your programs would either fail to compile or throw an exception, as opposed to dumping core like other languages. It simply wasn't an option for most programmers because available compilers were too expensive, buggy, generated slow code, or some combination.

Ada 95 added objects, but with an awkward and confusing syntax. I just found a rather lengthy section of the Ada 2005 rationale explaining in detail how irritating it was to use objects in Ada 95 and how much cleaner it is to write "Y.Op(...)" as opposed to having to call the virtual method and pass it the object as the first parameter, e.g. "P.Op(Y, ...)".

https://www.adaic.org/resources/add_content/standards/05rat/html/Rat-1-3-1.html

Ada 95 greatly improved tasking, although I haven't bothered to learn the model properly since no one uses Ada. It also has a lot of support for multiple memory pools. You can write unsafe code in Ada, but it's very verbose, even by Ada standards, to declare types for data you're going to put on the heap instead of the stack or static storage, and that you're going to free yourself.

Personally, I think recent versions of C++ are the best solution for writing reliable software when a JVM-based language, or some other memory-safe language isn't an option. Getting back to coding standards, I was looking at MISRA and the actual standards appear to not be freely available, but I found something even better: JPL/NASA coding standards for C and C++.

https://nasa.github.io/fprime/UsersGuide/dev/code-style.html

Not a word about single-letter loop variable names being problematic. Lots of words about keeping your functions and code simple and straightforward. I especially like "The Power of 10" rules from Gerard J. Holzmann of the NASA/JPL Laboratory for Reliable Software:

https://en.wikipedia.org/wiki/The_Power_of_10:_Rules_for_Developing_Safety-Critical_Code

In practice, using C/C++ with many restrictions on "cleverness" and turning Clang's warning level all the way up, plus using static analysis tools, is what people are doing because the industry has collectively decided not to use Ada 2005/2012, and that's the next best thing. My one big reservation about Rust is that it really has too much cleverness in it for writing code that has to be rigorously reviewed for correctness. It's a clear improvement over C/C++ in memory-safety, but also a moving target.

Regards,
Jake Hamby

Pages:12
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor