Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Going the speed of light is bad for your age.


computers / comp.os.linux.misc / Re: self-documenting APL, not COBOL and tricks

SubjectAuthor
* Linux on a small memory PCThe Natural Philosopher
+* Re: Linux on a small memory PCMarco Moock
|+- Re: Linux on a small memory PCThe Natural Philosopher
|`* Re: Linux on a small memory PCAndreas Kohlbach
| `* Re: Linux on a small memory PCThe Natural Philosopher
|  +* Re: Linux on a small memory PCRobert Heller
|  |`* Re: Linux on a small memory PCAndreas Kohlbach
|  | +* Re: Linux on a small memory PCRichard Kettlewell
|  | |`* Re: Linux on a small memory PCThe Natural Philosopher
|  | | `- Re: Linux on a small memory PCRichard Kettlewell
|  | `* Re: Linux on a small memory PCThe Natural Philosopher
|  |  `* Re: Linux on a small memory PCAndreas Kohlbach
|  |   `* Re: Linux on a small memory PCThe Natural Philosopher
|  |    `* Re: Linux on a small memory PCAndreas Kohlbach
|  |     `* Fwd: Linux on a small memory PC25B.Z959
|  |      `* Re: Fwd: Linux on a small memory PCAndreas Kohlbach
|  |       `* Re: Fwd: Linux on a small memory PC25B.Z959
|  |        `* Re: Fwd: Linux on a small memory PCAndreas Kohlbach
|  |         `* Re: Fwd: Linux on a small memory PC25B.Z959
|  |          +* Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |          |`- Re: Fwd: Linux on a small memory PC25B.Z959
|  |          `* Re: Fwd: Linux on a small memory PCDan Espen
|  |           +* Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |           |`* Re: Fwd: Linux on a small memory PCComputer Nerd Kev
|  |           | +* Re: Fwd: Linux on a small memory PCComputer Nerd Kev
|  |           | |+* Re: Fwd: Linux on a small memory PCTom Furie
|  |           | ||`- Re: Fwd: Linux on a small memory PCAndreas Kohlbach
|  |           | |`- Re: Fwd: Linux on a small memory PCTom Furie
|  |           | +* Re: Fwd: Linux on a small memory PCDan Espen
|  |           | |+* Re: Fwd: Linux on a small memory PCDavid W. Hodgins
|  |           | ||`- Re: Fwd: Linux on a small memory PCDan Espen
|  |           | |+* Re: Fwd: Linux on a small memory PCComputer Nerd Kev
|  |           | ||+* Re: Fwd: Linux on a small memory PCDan Espen
|  |           | |||+* The Y2K problem - again (was: Fwd: Linux on a small memory PC)Andreas Kohlbach
|  |           | ||||`- Re: The Y2K problem - again (was: Fwd: Linux on a small memory PC)Peter Flass
|  |           | |||`* Re: Fwd: Linux on a small memory PCComputer Nerd Kev
|  |           | ||| `- Re: Fwd: Linux on a small memory PCTom Furie
|  |           | ||`* Re: Fwd: Linux on a small memory PCDavid W. Hodgins
|  |           | || `- Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |           | |`* Re: Fwd: Linux on a small memory PCEric Pozharski
|  |           | | +* Re: Fwd: Linux on a small memory PCDan Espen
|  |           | | |`- Re: Fwd: Linux on a small memory PCEric Pozharski
|  |           | | `- Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |           | +- Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |           | `* Re: Fwd: Linux on a small memory PCAndreas Kohlbach
|  |           |  `- Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |           `* Re: Fwd: Linux on a small memory PC25B.Z959
|  |            +- Re: Fwd: Linux on a small memory PC25B.Z959
|  |            `* Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |             `* Re: Fwd: Linux on a small memory PCDan Espen
|  |              +* Re: Fwd: Linux on a small memory PCDavid W. Hodgins
|  |              |`* Re: Fwd: Linux on a small memory PCDan Espen
|  |              | `- Re: Fwd: Linux on a small memory PCDavid W. Hodgins
|  |              `* Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |               `* Re: Fwd: Linux on a small memory PC25B.Z959
|  |                +* Re: Fwd: Linux on a small memory PCCharlie Gibbs
|  |                |`- Re: Fwd: Linux on a small memory PC25B.Z959
|  |                +* Re: Fwd: Linux on a small memory PCPeter Flass
|  |                |+* Re: Fwd: Linux on a small memory PCThe Natural Philosopher
|  |                ||`* Re: Fwd: Linux on a small memory PCPeter Flass
|  |                || +* Re: COBOL and tricksLew Pitcher
|  |                || |+* Re: COBOL and tricksPeter Flass
|  |                || ||+* Re: COBOL and tricksDavid W. Hodgins
|  |                || |||+* Re: COBOL and tricksDan Espen
|  |                || ||||+* Re: COBOL and tricksPeter Flass
|  |                || |||||+* Re: COBOL and tricksCharlie Gibbs
|  |                || ||||||`* Re: COBOL and tricks25B.Z959
|  |                || |||||| `* Re: COBOL and tricksPeter Flass
|  |                || ||||||  `- Re: COBOL and tricksCharlie Gibbs
|  |                || |||||`- Re: COBOL and tricksDan Espen
|  |                || ||||`- Re: COBOL and tricksRichard Kettlewell
|  |                || |||`* Re: COBOL and tricksCharlie Gibbs
|  |                || ||| +- Re: COBOL and tricksPeter Flass
|  |                || ||| `- Re: COBOL and tricksDan Espen
|  |                || ||+* Re: COBOL and tricksDan Espen
|  |                || |||+* Re: COBOL and tricksPeter Flass
|  |                || ||||+* Re: COBOL and tricksCharlie Gibbs
|  |                || |||||+- Re: COBOL and tricksAhem A Rivet's Shot
|  |                || |||||`* Re: COBOL and tricksThe Natural Philosopher
|  |                || ||||| `- Re: COBOL and tricksPeter Flass
|  |                || ||||`* Re: COBOL and tricksDan Espen
|  |                || |||| `- Re: COBOL and tricksCharlie Gibbs
|  |                || |||`* Re: COBOL and tricksCharlie Gibbs
|  |                || ||| `- Re: COBOL and tricksPeter Flass
|  |                || ||+- Re: COBOL and tricksScott Lurndal
|  |                || ||+* Re: COBOL and tricksD.J.
|  |                || |||`* Re: COBOL and tricks25B.Z959
|  |                || ||| +* Re: COBOL and tricksTauno Voipio
|  |                || ||| |`- Re: COBOL and tricks25B.Z959
|  |                || ||| +- Re: COBOL and tricksScott Lurndal
|  |                || ||| +- Re: COBOL and tricksG.K.
|  |                || ||| +- Re: COBOL and tricksD.J.
|  |                || ||| `- Re: COBOL and tricksAnne & Lynn Wheeler
|  |                || ||`* Re: COBOL and tricksCharlie Gibbs
|  |                || || `- Re: COBOL and tricksDan Espen
|  |                || |+* Re: COBOL and tricksAnne & Lynn Wheeler
|  |                || ||`* Re: COBOL and tricksPeter Flass
|  |                || || +* Re: COBOL and tricksThe Natural Philosopher
|  |                || || |`- Re: COBOL and tricksPeter Flass
|  |                || || `* Re: COBOL and tricksScott Lurndal
|  |                || ||  +- Re: COBOL and tricksPeter Flass
|  |                || ||  `- Re: COBOL and tricksDan Espen
|  |                || |`* Re: COBOL and tricks25B.Z959
|  |                || `* Re: Fwd: Linux on a small memory PCThe Natural Philosopher
|  |                |`* Re: Fwd: Linux on a small memory PCJ. Clarke
|  |                `* Re: Fwd: Linux on a small memory PCJ. Clarke
|  `* Re: Linux on a small memory PCPancho
+* Re: Linux on a small memory PCJoerg Lorenz
`- Re: Linux on a small memory PC25B.Z959

Pages:123456789101112131415161718192021222324252627282930313233
Re: COBOL and tricks

<UmbEK.680660$JVi.520871@fx17.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9643&group=comp.os.linux.misc#9643

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <871quvs7m8.fsf@usenet.ankman.de> <tb71r6$14eug$1@dont-email.me> <2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com> <tb7qih$14eug$2@dont-email.me> <gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com> <1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org> <tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me> <tbo9oj$rej$1@news.misty.com> <tbok3d$1udf5$1@dont-email.me> <8mYDK.543532$70j.52459@fx16.iad> <tbq037$29e35$1@dont-email.me>
Lines: 27
Message-ID: <UmbEK.680660$JVi.520871@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 27 Jul 2022 13:48:36 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 27 Jul 2022 13:48:36 GMT
X-Received-Bytes: 1999
 by: Scott Lurndal - Wed, 27 Jul 2022 13:48 UTC

Dan Espen <dan1espen@gmail.com> writes:
>Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>
>> On 2022-07-26, Dan Espen <dan1espen@gmail.com> wrote:
>>
>>> For IBM mainframes the COBOL compiler is going to be way more efficient
>>> than C because the COBOL compiler is way more likely to be using packed
>>> decimal.
>>
>> As long as you're referring to data fields, that's true.
>> But I once knocked 30% off a program's execution time by
>> simply changing all subscripts from COMP-3 (packed decimal)
>> to COMP-4 (binary). (The original author obviously had
>> no real-world experience.)
>
>Now the right solution is
>
>USAGE IS INDEX
>
>Of course you don't use packed decimal for indexes.

On IBM machines, that's true. Not true on Burroughs machines,
where non-BCD is far more costly (there are only two binary
instructions, B2D and D2B that convert back and forth, primarily
used by the OS to compute binary disk block numbers for the
disk/pack hardware).

Re: COBOL and tricks

<PpbEK.680661$JVi.171668@fx17.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9644&group=comp.os.linux.misc#9644

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx17.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com> <HpKdnfYAbfikikP_nZ2dnUU7-cvNnZ2d@earthlink.com> <574555364.680474584.174865.peter_flass-yahoo.com@news.eternal-september.org> <5bOdndBzuNkG5kL_nZ2dnUU7-UnNnZ2d@earthlink.com> <tbpfr4$2off$2@gal.iecc.com> <8OqdnRDKdfFSPn3_nZ2dnUU7-f_NnZ2d@earthlink.com>
Lines: 17
Message-ID: <PpbEK.680661$JVi.171668@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 27 Jul 2022 13:51:43 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 27 Jul 2022 13:51:43 GMT
X-Received-Bytes: 1531
 by: Scott Lurndal - Wed, 27 Jul 2022 13:51 UTC

"25B.Z959" <25B.Z959@nada.net> writes:
>On 7/26/22 3:38 PM, John Levine wrote:
>> According to 25B.Z959 <25B.Z959@nada.net>:
>>> Even my ASM ... every line has a comment, an ongoing
>>> narrative of what's happening and why. Based on that
>>> you could translate it into a dozen higher-level
>>> languages.
>>
>> i += 2; // Add 1 to i.
>
> Um ... that'd add TWO to i .......

Um, the point was that over time the comments often
no longer reflect the code, as the code gets updated
and the programmer doesn't update the comment. Granted
it's more likely to occur when the comment -isn't- on the
same line as the code to which the comment applies.

Re: COBOL and tricks

<tbrh7i$2hi7k$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9645&group=comp.os.linux.misc#9645

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dan1espen@gmail.com (Dan Espen)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 10:14:09 -0400
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <tbrh7i$2hi7k$1@dont-email.me>
References: <871quvs7m8.fsf@usenet.ankman.de> <tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbok3d$1udf5$1@dont-email.me>
<8mYDK.543532$70j.52459@fx16.iad> <tbq037$29e35$1@dont-email.me>
<UmbEK.680660$JVi.520871@fx17.iad>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="0a61fa83997e9e06e6a0cf9c33af4553";
logging-data="2672884"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Hr31wtldFONvFLamcqfhyr1+a+G9hPzM="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:wK3EUpbmL14WN2p+estmFcdfx3Q=
 by: Dan Espen - Wed, 27 Jul 2022 14:14 UTC

scott@slp53.sl.home (Scott Lurndal) writes:

> Dan Espen <dan1espen@gmail.com> writes:
>>Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>>
>>> On 2022-07-26, Dan Espen <dan1espen@gmail.com> wrote:
>>>
>>>> For IBM mainframes the COBOL compiler is going to be way more efficient
>>>> than C because the COBOL compiler is way more likely to be using packed
>>>> decimal.
>>>
>>> As long as you're referring to data fields, that's true.
>>> But I once knocked 30% off a program's execution time by
>>> simply changing all subscripts from COMP-3 (packed decimal)
>>> to COMP-4 (binary). (The original author obviously had
>>> no real-world experience.)
>>
>>Now the right solution is
>>
>>USAGE IS INDEX
>>
>>Of course you don't use packed decimal for indexes.
>
> On IBM machines, that's true. Not true on Burroughs machines,
> where non-BCD is far more costly (there are only two binary
> instructions, B2D and D2B that convert back and forth, primarily
> used by the OS to compute binary disk block numbers for the
> disk/pack hardware).

So, Burroughs machines use decimal numbers as indexes?
They must have decimal memory addressing too.

--
Dan Espen

Re: COBOL and tricks

<fJcEK.36268$kY1.12692@fx06.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9646&group=comp.os.linux.misc#9646

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <871quvs7m8.fsf@usenet.ankman.de> <2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com> <tb7qih$14eug$2@dont-email.me> <gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com> <1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org> <tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me> <tbo9oj$rej$1@news.misty.com> <tbok3d$1udf5$1@dont-email.me> <8mYDK.543532$70j.52459@fx16.iad> <tbq037$29e35$1@dont-email.me> <UmbEK.680660$JVi.520871@fx17.iad> <tbrh7i$2hi7k$1@dont-email.me>
Lines: 36
Message-ID: <fJcEK.36268$kY1.12692@fx06.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Wed, 27 Jul 2022 15:20:43 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Wed, 27 Jul 2022 15:20:43 GMT
X-Received-Bytes: 2444
 by: Scott Lurndal - Wed, 27 Jul 2022 15:20 UTC

Dan Espen <dan1espen@gmail.com> writes:
>scott@slp53.sl.home (Scott Lurndal) writes:
>
>> Dan Espen <dan1espen@gmail.com> writes:
>>>Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>>>
>>>> On 2022-07-26, Dan Espen <dan1espen@gmail.com> wrote:
>>>>
>>>>> For IBM mainframes the COBOL compiler is going to be way more efficient
>>>>> than C because the COBOL compiler is way more likely to be using packed
>>>>> decimal.
>>>>
>>>> As long as you're referring to data fields, that's true.
>>>> But I once knocked 30% off a program's execution time by
>>>> simply changing all subscripts from COMP-3 (packed decimal)
>>>> to COMP-4 (binary). (The original author obviously had
>>>> no real-world experience.)
>>>
>>>Now the right solution is
>>>
>>>USAGE IS INDEX
>>>
>>>Of course you don't use packed decimal for indexes.
>>
>> On IBM machines, that's true. Not true on Burroughs machines,
>> where non-BCD is far more costly (there are only two binary
>> instructions, B2D and D2B that convert back and forth, primarily
>> used by the OS to compute binary disk block numbers for the
>> disk/pack hardware).
>
>So, Burroughs machines use decimal numbers as indexes?
>They must have decimal memory addressing too.

Yes. Memory was decimally addressed to the digit (nibble). A very
easy machine to debug on, you very seldom needed to work in any
base other than ten.

Re: COBOL and tricks

<tbrtse$2j0q3$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9647&group=comp.os.linux.misc#9647

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 18:50:05 +0100
Organization: A little, after lunch
Lines: 8
Message-ID: <tbrtse$2j0q3$1@dont-email.me>
References: <871quvs7m8.fsf@usenet.ankman.de>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbocqu$1silh$1@dont-email.me>
<87pmhsow2z.fsf@LkoBDZeT.terraraq.uk> <tbp097$21k72$1@dont-email.me>
<tbp677$lv1$1@gioia.aioe.org> <tbr4fl$2g6gm$1@dont-email.me>
<20220727122854.a33d600de3a32339f5162e73@eircom.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 27 Jul 2022 17:50:06 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="4ffb97d083fdf6cd35e8c376bf948503";
logging-data="2720579"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+BB6501IyY1/iW9P0DrnvLsdJ0XNCt96w="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:+zMIR3wquWqY85lQaXzL3352BLo=
In-Reply-To: <20220727122854.a33d600de3a32339f5162e73@eircom.net>
Content-Language: en-GB
 by: The Natural Philosop - Wed, 27 Jul 2022 17:50 UTC

On 27/07/2022 12:28, Ahem A Rivet's Shot wrote:
> Note that the C standard does technically allow the compiler or the
> compiled program to execute the author
That sounds nasty

--
No Apple devices were knowingly used in the preparation of this post.

Re: COBOL and tricks

<tbrv02$2j6nl$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9648&group=comp.os.linux.misc#9648

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 19:09:05 +0100
Organization: A little, after lunch
Lines: 20
Message-ID: <tbrv02$2j6nl$1@dont-email.me>
References: <871quvs7m8.fsf@usenet.ankman.de> <tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbocqu$1silh$1@dont-email.me>
<87pmhsow2z.fsf@LkoBDZeT.terraraq.uk> <tbp097$21k72$1@dont-email.me>
<tbp677$lv1$1@gioia.aioe.org> <tbr4fl$2g6gm$1@dont-email.me>
<tbr9e9$tb4$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 27 Jul 2022 18:09:06 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="4ffb97d083fdf6cd35e8c376bf948503";
logging-data="2726645"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7H8PyN0EOrmyVqro361YcNoX4QJ2QQPg="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:HNIZqFiix8KycLlyBanvxJl7Lzo=
Content-Language: en-GB
In-Reply-To: <tbr9e9$tb4$1@gioia.aioe.org>
 by: The Natural Philosop - Wed, 27 Jul 2022 18:09 UTC

On 27/07/2022 13:01, Andy Walker wrote:
> After all, the high-level language programmer is not
> expected to know where in storage the objects used by the program reside.

When you are programming chips with no paging and memory mapped IO you
realise that C is not a 'high level language'

As I said, despite Richards assertions to the contrary, it is a fast way
to write assembler in an 8 or 16 bit microcontroller environment.
It has all the right keywords for bitwise operations, it can effectively
'peek' and 'poke' physical RAM locations for I/O purposes. The only time
I needed to drop to assembler was to write a multitasking executive, to
access Intel type I/O instructions, or write a wrapper for interrupts.

It has all the right tools for comms work, where the header on a byte
stream completely changes the nature and the data size of what follows.
Impossible in some languages without declaring vast clumsy unions.

--
No Apple devices were knowingly used in the preparation of this post.

Re: COBOL and tricks

<tbrv39$2j6nl$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9649&group=comp.os.linux.misc#9649

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 19:10:49 +0100
Organization: A little, after lunch
Lines: 32
Message-ID: <tbrv39$2j6nl$2@dont-email.me>
References: <871quvs7m8.fsf@usenet.ankman.de>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbocqu$1silh$1@dont-email.me>
<87pmhsow2z.fsf@LkoBDZeT.terraraq.uk> <tbp097$21k72$1@dont-email.me>
<tbp677$lv1$1@gioia.aioe.org> <tbr4fl$2g6gm$1@dont-email.me>
<87tu72ofnw.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 27 Jul 2022 18:10:49 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="4ffb97d083fdf6cd35e8c376bf948503";
logging-data="2726645"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XfH78xRH9hDaf6OamR2TqHQiEHkilVsI="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:Y3xQIfl6C0BXRYJVTAwNQe60NP8=
Content-Language: en-GB
In-Reply-To: <87tu72ofnw.fsf@LkoBDZeT.terraraq.uk>
 by: The Natural Philosop - Wed, 27 Jul 2022 18:10 UTC

On 27/07/2022 14:20, Richard Kettlewell wrote:
> The Natural Philosopher <tnp@invalid.invalid> writes:
>> On 26/07/2022 17:53, Andy Walker wrote:
>>> Whether a compiler "should" assume that is a matter of opinion.
>>> But the compiler is /entitled/ to assume that, because if it is null then
>>> the behaviour on dereferencing was undefined,
>>
>> Why is that? memory address of 0 is a valid memory address. At least
>> in hardware terms.
>
> You’re still thinking about C as ‘portable assembler’.
It is.

>
>> Does the C language enforce that memory at (page) address 0 is
>> unaddressable?
>
> It’s not about what it enforces; it’s about what it doesn’t enforce. In
> this case, it places no constraints on the implementation’s behavior
> when a null pointer (or any other kind of invalid pointer) is
> dereferenced. Modern implementations exploit this absence of constraints
> in their code generation.
>
Then the coder was as I said an idiot for dereferencing a pointer that
was clearly expected to possibly be null
]

--
There is nothing a fleet of dispatchable nuclear power plants cannot do
that cannot be done worse and more expensively and with higher carbon
emissions and more adverse environmental impact by adding intermittent
renewable energy.

Re: COBOL and tricks

<QcfEK.721211$X_i.340291@fx18.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9650&group=comp.os.linux.misc#9650

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
Newsgroups: alt.folklore.computers,comp.os.linux.misc
From: cgibbs@kltpzyxm.invalid (Charlie Gibbs)
Subject: Re: COBOL and tricks
References: <871quvs7m8.fsf@usenet.ankman.de>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbocqu$1silh$1@dont-email.me>
<87pmhsow2z.fsf@LkoBDZeT.terraraq.uk>
<20220726151015.7f8dc972fa92debff0ecfaa2@eircom.net>
<87edy8ori7.fsf@LkoBDZeT.terraraq.uk> <tbp0n6$21no4$1@dont-email.me>
<tbp2cv$224ma$1@dont-email.me> <rsUDK.104202$Me2.65661@fx47.iad>
<tbpkie$26fje$3@dont-email.me>
User-Agent: slrn/1.0.3 (Linux)
Lines: 22
Message-ID: <QcfEK.721211$X_i.340291@fx18.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 27 Jul 2022 18:10:56 UTC
Date: Wed, 27 Jul 2022 18:10:56 GMT
X-Received-Bytes: 2109
 by: Charlie Gibbs - Wed, 27 Jul 2022 18:10 UTC

On 2022-07-26, Vir Campestris <vir.campestris@invalid.invalid> wrote:

> The first system I learned assembler on was a DECSystem10. That had the
> registers mapped into the first 16 memory addresses, so an access via a
> null pointer would have given the the contents of the first register.

In addition to the registers, the Univac 9300 stored things like the
program counter and the currently-executing instruction in low memory.
I came up with all sorts of fun ways to write a one-instruction loop.

I culminated that phase of hackery by writing a routine that would
fill memory with a copy of the Add Immediate instruction that would
decrement the program counter by 8 (twice the length of the instruction
itself), and top it off with a branch in low memory back to the end
of memory. When run, this program would loop through all of memory -
backwards.

--
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <cgibbs@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.

Re: COBOL and tricks

<RcfEK.721212$X_i.20633@fx18.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9651&group=comp.os.linux.misc#9651

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
Newsgroups: alt.folklore.computers,comp.os.linux.misc
From: cgibbs@kltpzyxm.invalid (Charlie Gibbs)
Subject: Re: COBOL and tricks
References: <ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com>
<HpKdnfYAbfikikP_nZ2dnUU7-cvNnZ2d@earthlink.com>
<574555364.680474584.174865.peter_flass-yahoo.com@news.eternal-september.org>
<5bOdndBzuNkG5kL_nZ2dnUU7-UnNnZ2d@earthlink.com>
<tbpfr4$2off$2@gal.iecc.com>
<2028996710.680561665.014893.peter_flass-yahoo.com@news.eternal-september.org>
User-Agent: slrn/1.0.3 (Linux)
Lines: 22
Message-ID: <RcfEK.721212$X_i.20633@fx18.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 27 Jul 2022 18:10:57 UTC
Date: Wed, 27 Jul 2022 18:10:57 GMT
X-Received-Bytes: 1482
 by: Charlie Gibbs - Wed, 27 Jul 2022 18:10 UTC

On 2022-07-26, Peter Flass <peter_flass@yahoo.com> wrote:

> John Levine <johnl@taugh.com> wrote:
>
>> According to 25B.Z959 <25B.Z959@nada.net>:
>>
>>> Even my ASM ... every line has a comment, an ongoing
>>> narrative of what's happening and why. Based on that
>>> you could translate it into a dozen higher-level
>>> languages.
>>
>> i += 2; // Add 1 to i.
>
> For some values of one ;-)

I've heard it as "for sufficiently large values of 1".

--
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <cgibbs@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.

Re: COBOL and tricks

<ScfEK.721213$X_i.452708@fx18.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9652&group=comp.os.linux.misc#9652

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
Newsgroups: alt.folklore.computers,comp.os.linux.misc
From: cgibbs@kltpzyxm.invalid (Charlie Gibbs)
Subject: Re: COBOL and tricks
References: <ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com>
<HpKdnfYAbfikikP_nZ2dnUU7-cvNnZ2d@earthlink.com>
<574555364.680474584.174865.peter_flass-yahoo.com@news.eternal-september.org>
<5bOdndBzuNkG5kL_nZ2dnUU7-UnNnZ2d@earthlink.com>
<tbpfr4$2off$2@gal.iecc.com>
<8OqdnRDKdfFSPn3_nZ2dnUU7-f_NnZ2d@earthlink.com>
<PpbEK.680661$JVi.171668@fx17.iad>
User-Agent: slrn/1.0.3 (Linux)
Lines: 34
Message-ID: <ScfEK.721213$X_i.452708@fx18.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 27 Jul 2022 18:10:58 UTC
Date: Wed, 27 Jul 2022 18:10:58 GMT
X-Received-Bytes: 2094
 by: Charlie Gibbs - Wed, 27 Jul 2022 18:10 UTC

On 2022-07-27, Scott Lurndal <scott@slp53.sl.home> wrote:

> "25B.Z959" <25B.Z959@nada.net> writes:
>
>> On 7/26/22 3:38 PM, John Levine wrote:
>>
>>> According to 25B.Z959 <25B.Z959@nada.net>:
>>>
>>>> Even my ASM ... every line has a comment, an ongoing
>>>> narrative of what's happening and why. Based on that
>>>> you could translate it into a dozen higher-level
>>>> languages.
>>>
>>> i += 2; // Add 1 to i.
>>
>> Um ... that'd add TWO to i .......
>
> Um, the point was that over time the comments often
> no longer reflect the code, as the code gets updated
> and the programmer doesn't update the comment. Granted
> it's more likely to occur when the comment -isn't- on the
> same line as the code to which the comment applies.

Misleading comments are worse than no comments at all.
My advice to people who don't want to maintain comments is
to delete them entirely. (The comments, that is, not the
recalcitrant programmers - although this is one of those
cases where the gene pool could use a little chlorine.)

--
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <cgibbs@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.

Re: COBOL and tricks

<ScfEK.721214$X_i.472313@fx18.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9653&group=comp.os.linux.misc#9653

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx18.iad.POSTED!not-for-mail
Newsgroups: alt.folklore.computers,comp.os.linux.misc
From: cgibbs@kltpzyxm.invalid (Charlie Gibbs)
Subject: Re: COBOL and tricks
References: <ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com>
<HpKdnfYAbfikikP_nZ2dnUU7-cvNnZ2d@earthlink.com>
<574555364.680474584.174865.peter_flass-yahoo.com@news.eternal-september.org>
<5bOdndBzuNkG5kL_nZ2dnUU7-UnNnZ2d@earthlink.com>
<tbpfr4$2off$2@gal.iecc.com> <9mYDK.543533$70j.452979@fx16.iad>
<tbpk8g$26fje$2@dont-email.me>
<4e6dnbM2AIdWO33_nZ2dnUU7-cXNnZ2d@earthlink.com>
User-Agent: slrn/1.0.3 (Linux)
Lines: 43
Message-ID: <ScfEK.721214$X_i.472313@fx18.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Wed, 27 Jul 2022 18:10:58 UTC
Date: Wed, 27 Jul 2022 18:10:58 GMT
X-Received-Bytes: 2994
 by: Charlie Gibbs - Wed, 27 Jul 2022 18:10 UTC

On 2022-07-27, 25B.Z959 <25B.Z959@nada.net> wrote:

> On 7/26/22 4:53 PM, Vir Campestris wrote:
>
>> The useful comments don't say _what_ you're doing, they say _why_.
>
> 'Zactly ... it needs to be a 'narrative' - both WHAT and WHY.
> Doesn't matter if it's ASM or COBOL or FORTRAN or Python. If
> you or anybody would EVER need to go back and tweak the pgm
> it really NEEDS serious commenting. Alas it's kinda RARE to
> see this ..... the old "Well *I* know what it's all about NOW"
> attitude. Wait a couple years until the boss decides your form
> needs some new data fields or entry box #7 moved 10 spaces to
> the right 'cause it would 'look nicer' .... :-)

Don't laugh. Once upon a time, every shop in Canada that ran payroll
had to modify their programs that generated T4 forms (Statement of
Remuneration Paid) because someone in Ottawa decided to move one
box one space to the right.

The hairiest change I was involved in, though, was when the government
decided to turn the form upside down, i.e. put the row of numbers
across the top rather than the bottom. (Or maybe it was the other way
around, I can't remember.) I was maintaining the program in a shop
whose card-based machine's memory was so small that it didn't have
room to store all of an employee's information. It would read the
card containing the employee's name, print it out, then work its
way through the cards with the employee's address, city, etc.
Finally it would read the card with the actual numbers and
print them. The card deck was sorted by employee number and
a sequence code that ensured that name, address, and statistics
were in the proper order. Not only did I have to overhaul the
program's logic to handle the different sequence, the entire
card deck had to be re-punched (and re-sorted) with the modified
sequence code.

There has to be a better way to fight unemployment...

--
/~\ Charlie Gibbs | Microsoft is a dictatorship.
\ / <cgibbs@kltpzyxm.invalid> | Apple is a cult.
X I'm really at ac.dekanfrus | Linux is anarchy.
/ \ if you read it the right way. | Pick your poison.

Re: COBOL and tricks

<47KdnfUVhe4hC3z_nZ2dnUU7-LudnZ2d@giganews.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9654&group=comp.os.linux.misc#9654

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 27 Jul 2022 14:49:16 -0500
Sender: Dennis Boone <drb@yagi.h-net.org>
From: drb@ihatespam.msu.edu (Dennis Boone)
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com> <tb7qih$14eug$2@dont-email.me> <gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com> <1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org> <HpKdnfYAbfikikP_nZ2dnUU7-cvNnZ2d@earthlink.com> <574555364.680474584.174865.peter_flass-yahoo.com@news.eternal-september.org> <5bOdndBzuNkG5kL_nZ2dnUU7-UnNnZ2d@earthlink.com> <8mYDK.543531$70j.517354@fx16.iad> <XNKdne9AffQPNH3_nZ2dnUU7-cvNnZ2d@earthlink.com>
User-Agent: tin/2.6.1-20211226 ("Convalmore") (FreeBSD/13.0-RELEASE-p6 (amd64))
Message-ID: <47KdnfUVhe4hC3z_nZ2dnUU7-LudnZ2d@giganews.com>
Date: Wed, 27 Jul 2022 14:49:16 -0500
Lines: 8
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-OjL8mTTx4NFRri3ue+IY7yT1eOLpsv6jxiRxV9iLDfAP7sqNu+jiwjrzzmBK7FeAbShb1GfeUuH3DuW!6lhBYW2omMIlzA082EJityEGe1Gbs13Uqar2YwrktQ8WzAYLaxymmqBkMNRh2OaCEivVDDc=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 1796
 by: Dennis Boone - Wed, 27 Jul 2022 19:49 UTC

> There's an old joke about a college prof (and a friend
> of mine had one JUST like it) where the prof slams down
> five lines of ultra-dense next-level math on the blackboard
> then kinda half turns to the class and says "So, obviously ..."

The flip side one is "and now, by simple arithmetic... oops".

DE

Re: COBOL and tricks

<20220727212832.614305a9b1fbc92090881ebb@eircom.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9655&group=comp.os.linux.misc#9655

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: steveo@eircom.net (Ahem A Rivet's Shot)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 21:28:32 +0100
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <20220727212832.614305a9b1fbc92090881ebb@eircom.net>
References: <ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad>
<tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<HpKdnfYAbfikikP_nZ2dnUU7-cvNnZ2d@earthlink.com>
<574555364.680474584.174865.peter_flass-yahoo.com@news.eternal-september.org>
<5bOdndBzuNkG5kL_nZ2dnUU7-UnNnZ2d@earthlink.com>
<8mYDK.543531$70j.517354@fx16.iad>
<XNKdne9AffQPNH3_nZ2dnUU7-cvNnZ2d@earthlink.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="1bcfeabb7aef395021c0124232059fde";
logging-data="2764268"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18LeKieuvs1IHJv5aw3vI99/o+Azwsl5cw="
Cancel-Lock: sha1:oXiBMQOLnKnexIHMUzDEc/jYwCc=
X-Clacks-Overhead: "GNU Terry Pratchett"
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0)
 by: Ahem A Rivet's - Wed, 27 Jul 2022 20:28 UTC

On Tue, 26 Jul 2022 22:57:21 -0400
"25B.Z959" <25B.Z959@nada.net> wrote:

> There's an old joke about a college prof (and a friend
> of mine had one JUST like it) where the prof slams down
> five lines of ultra-dense next-level math on the blackboard
> then kinda half turns to the class and says "So, obviously ..."

There's a (possibly apocryphal) story of a professor who upon being
challenged on one such obviously, paused to think for a bit then left the
room for some time before returning to declare that yes it was obvious.

--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/

Re: COBOL and tricks

<1352867007.680652526.943304.peter_flass-yahoo.com@news.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9656&group=comp.os.linux.misc#9656

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: peter_flass@yahoo.com (Peter Flass)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 15:19:16 -0700
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <1352867007.680652526.943304.peter_flass-yahoo.com@news.eternal-september.org>
References: <16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad>
<tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com>
<tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com>
<tbok3d$1udf5$1@dont-email.me>
<8mYDK.543532$70j.52459@fx16.iad>
<tbq037$29e35$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="a16b3457bb7b36b5e538578efcd4d32e";
logging-data="2790195"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YKDhcY0Cg9RMG9VWoonYy"
User-Agent: NewsTap/5.3.1 (iPad)
Cancel-Lock: sha1:wowN4qZzXupkDB/1/AF1PogWV1o=
sha1:tO2VZRvJFFr3QKO3Itn+WbHY6TY=
 by: Peter Flass - Wed, 27 Jul 2022 22:19 UTC

Dan Espen <dan1espen@gmail.com> wrote:
> Charlie Gibbs <cgibbs@kltpzyxm.invalid> writes:
>
>> On 2022-07-26, Dan Espen <dan1espen@gmail.com> wrote:
>>
>>> For IBM mainframes the COBOL compiler is going to be way more efficient
>>> than C because the COBOL compiler is way more likely to be using packed
>>> decimal.
>>
>> As long as you're referring to data fields, that's true.
>> But I once knocked 30% off a program's execution time by
>> simply changing all subscripts from COMP-3 (packed decimal)
>> to COMP-4 (binary). (The original author obviously had
>> no real-world experience.)
>
> Now the right solution is
>
> USAGE IS INDEX
>
> Of course you don't use packed decimal for indexes. USAGE DISPLAY is no
> good either. But early on most of us knew to use COMP before usage
> index was invented.
>
>

I stopped using COBOL before then.

--
Pete

Re: COBOL and tricks

<78932213.680652662.242581.peter_flass-yahoo.com@news.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9657&group=comp.os.linux.misc#9657

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: peter_flass@yahoo.com (Peter Flass)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Wed, 27 Jul 2022 15:19:17 -0700
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <78932213.680652662.242581.peter_flass-yahoo.com@news.eternal-september.org>
References: <tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad>
<tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com>
<tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com>
<tbocqu$1silh$1@dont-email.me>
<87pmhsow2z.fsf@LkoBDZeT.terraraq.uk>
<tbp097$21k72$1@dont-email.me>
<tbp677$lv1$1@gioia.aioe.org>
<tbr4fl$2g6gm$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="a16b3457bb7b36b5e538578efcd4d32e";
logging-data="2790195"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/1ZSqk5CSO/5e1/HJEVnd"
User-Agent: NewsTap/5.3.1 (iPad)
Cancel-Lock: sha1:gAlOL5s9sHXSaLCFUaH5KFO7ryg=
sha1:Mdh3BdW4ILF7VP4QmbYdEu62iIU=
 by: Peter Flass - Wed, 27 Jul 2022 22:19 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 26/07/2022 17:53, Andy Walker wrote:
>> Whether a compiler "should" assume that is a matter of opinion.
>> But the compiler is /entitled/ to assume that, because if it is null then
>> the behaviour on dereferencing was undefined,
>
> Why is that? memory address of 0 is a valid memory address. At least in
> hardware terms.
> Does the C language enforce that memory at (page) address 0 is
> unaddressable?
>
>

It’s the hardware access bits and/or memory map. Virtual address 0 can be
anything the system wants it to be.

--
Pete

Re: COBOL and tricks

<S9WdndFIOv3VdXz_nZ2dnUU7-IPNnZ2d@earthlink.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9658&group=comp.os.linux.misc#9658

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeds.phibee-telecom.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 27 Jul 2022 20:37:12 -0500
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <871quvs7m8.fsf@usenet.ankman.de>
<ouSdnQ4MiuXqxFf_nZ2dnUU7-L3NnZ2d@earthlink.com>
<87sfn8pr5t.fsf@usenet.ankman.de>
<UN6dnUE56LtnLE3_nZ2dnUU7-fXNnZ2d@earthlink.com>
<87zghai2dh.fsf@usenet.ankman.de>
<16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com>
From: 25B.Z959@nada.net (25B.Z959)
Date: Wed, 27 Jul 2022 21:37:06 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <tblva2$105$1@news.misty.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Message-ID: <S9WdndFIOv3VdXz_nZ2dnUU7-IPNnZ2d@earthlink.com>
Lines: 76
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 98.77.165.113
X-Trace: sv3-3SfA9eyXHoDUqp9NXkT+03xnRTT+O0vdSqV4w5A2VNbhY6dPqWcUa8s3iL1zG8PaSVsfxpTaNh5HvYH!73fHA7aLDUBVKHEMB4u0kCJuTZxxeZbT5m0jfmIPh44EVbfF68RDKB/NH4ftZl3xcCHsNHdUMsLr!kME9Qv+6h3ru2nipve6V
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 5547
 by: 25B.Z959 - Thu, 28 Jul 2022 01:37 UTC

On 7/25/22 7:37 AM, Johnny Billquist wrote:
> On 2022-07-24 00:23, Peter Flass wrote:
> > 25B.Z959 <25B.Z959@nada.net> wrote:
> >>    Sometimes that IS a factor ... you have to have people who
> >>    can write it. But 1990 ... IMHO it should have been 'C'.
> >>
> >
> > IMNSHO, COBOL. C is a terrible language for those types of language.
> Things
> >   that are so dimple in COBOL, like moving a character string with blank
> > fill, or formatting numeric output, requires calling subroutines in
> C, and
> > lack of length checking on string moves is a recipe for disaster.
> This is one of the weirder arguments I've ever seen:
> "requires calling a subroutine in C". As if that somehow is a problem?
> Not to mention it's a function, and not a subroutine. Any claim of "used
> the language quite a bit" sounds hollow after that.
>
> A statement to move a character string in COBOL will in the end be a
> subroutine call as well.
>
> And lack of length checking depends on the function. Nothing prevents
> you from using strncpy in C. Or write your own, with whatever
> characteristic you want. It will actually be pretty efficient.
> Comparable to the provided functions.
>
> > I have used both languages quite a bit, perhaps COBOL more, years
> ago, but
> > neither is my preferred language, so I have no dog in this fight.
> > …
> Seems like your C is both rusty and bad.
>
> >>    Mostly I like "terse" languages - less typing and lots
> >>    of room left over for comments at the ends of the lines.
> >
> > Sounds like assembler ;-)
> >
> > It’s too easy to write tricky code with side-effects in C. COBOL
> might not
> > be as self-documenting as advertised, but the operation of each
> statement
> > is pretty obvious and easily understood.
> What kind of side effects are we talking about? The operation of each
> statement in C is very obvious and easy to understand.
> Most people get into trouble because of memory handling. Not the
> language semantics.
> But that is where you get to the point where things gets even harder to
> even do in COBOL. And if you manage to do it, it won't be easily
> understood.

Consider "print x" ... those of us that go back some years
will acutely recognize how "print x" stands atop a veritable
Everest of subroutines, device abstractors, drivers for
display controllers .........

CPUs don't *have* a "print x".

Long long back I was writing something akin to 'Notepad' for
the first IBM-PCs (this was in the days of 'edlin' and the
"A>" prompt) with MASM. Now I had (and still have) the
IBM-PC TECHNICAL REFERENCE MANUAL and it was only there where
all the ROM-BIOS calls were described in detail. You could
"print x" ... but it took some BIOS calls to actually push it
out to the screen. OR - you could poke values directly into
the display buffer ... preferably during the blanking inverval.

Depending on WHAT you need to do, COBOL can be great, or
just awful, perhaps even unusable. Whatever it is you CAN
do it in 'C' ... but it might take so MUCH 'C' that you
never actually dare begin.

In short, no 'perfect' all-purpose solutions. Be a bit
versatile or you'll never get it done.

All the talk about COBOL ... I've installed the OpenCOBOL IDE
and am gonna re-learn the language to some degree :-)

Re: COBOL and tricks

<npGdnW_hT7d-ZXz_nZ2dnUU7-UfNnZ2d@earthlink.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9659&group=comp.os.linux.misc#9659

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 27 Jul 2022 21:48:03 -0500
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <871quvs7m8.fsf@usenet.ankman.de>
<87sfn8pr5t.fsf@usenet.ankman.de>
<UN6dnUE56LtnLE3_nZ2dnUU7-fXNnZ2d@earthlink.com>
<87zghai2dh.fsf@usenet.ankman.de>
<16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com>
From: 25B.Z959@nada.net (25B.Z959)
Date: Wed, 27 Jul 2022 22:48:02 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <tbo9oj$rej$1@news.misty.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Message-ID: <npGdnW_hT7d-ZXz_nZ2dnUU7-UfNnZ2d@earthlink.com>
Lines: 65
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 98.77.165.113
X-Trace: sv3-rTkHEH4s+C1d77xe5MSe0OO6DWGs2UgP3DSBmspPZwnaWI6nyScMweOx83WbrEhjq79nf4pVOCQZb9+!NjvrX95/lIftlT358BF7nSRvYubrx0bjo0oUUQTbSVnho0tPB+OdjYrOKLJ2DdSEjZOJOKJGZx2H!RznLfUxc7SYRlztrW+CG
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 5157
 by: 25B.Z959 - Thu, 28 Jul 2022 02:48 UTC

On 7/26/22 4:48 AM, Johnny Billquist wrote:
> On 2022-07-26 01:42, Dan Espen wrote:
>> Johnny Billquist <bqt@softjar.se> writes:
>>
>>> On 2022-07-24 00:23, Peter Flass wrote:
>>>> 25B.Z959 <25B.Z959@nada.net> wrote:
>>>>>     Sometimes that IS a factor ... you have to have people who
>>>>>     can write it. But 1990 ... IMHO it should have been 'C'.
>>>>>
>>>>
>>>> IMNSHO, COBOL. C is a terrible language for those types of
>>>    language. Things
>>>>    that are so dimple in COBOL, like moving a character string with
>>>> blank
>>>> fill, or formatting numeric output, requires calling subroutines in
>>>    C, and
>>>> lack of length checking on string moves is a recipe for disaster.
>>> This is one of the weirder arguments I've ever seen:
>>> "requires calling a subroutine in C". As if that somehow is a problem?
>>> Not to mention it's a function, and not a subroutine. Any claim of
>>> "used the language quite a bit" sounds hollow after that.
>>>
>>> A statement to move a character string in COBOL will in the end be a
>>> subroutine call as well.
>>
>> And why do you think that?
>>
>> I've sure seen lots of COBOL MOVE instructions generate a single
>> hardware instruction.
>
> Depends on the compiler and hardware, and so on...
> Which actually leads to the point that the same is true in C.
> You might think you are calling a function like strncpy(). And you are,
> on an abstract level. However, modern C compilers understands what this
> is, and will in fact insert the required code directly in the
> instruction stream, which, again depending on the hardware, might end up
> being a single instruction.

True. The damned hardware dictates the details.

Oh "strncpy(st,st,5)" ... where your destination
is the also the source ... may not work as expected
on all compilers. This has lately popped up in GCC
where it wasn't an issue before. It'll probably
go away with the next sub-sub version. Meanwhile I
had to write a 'MYstrncpy()'. Probably gets even more
interesting if yer after a "strsegcpy(*src, *dest, start,end)"
where 'start' is an offset to *src ... ie you're copying up to
n chars starting from somewhere in the middle of the string
and building the result from *src onwards.

So - the hardware can dictate the ASM, but micro-revisions
in the compiler can make for unexpected results as well.
I wonder how many programs break because of such things ?

> So in which way was COBOL better than C? In the end, claiming
> superiority of a language based on that one have a function, while the
> other have it as a statement is about as silly an argument as I have
> ever seen. And all the extra claims to support that view are even sillier.

Well, sometimes a function works better, sometimes
a statement, sometimes a sub ..... if yer language
can easily be bent to doing all three ways then
you're golden. 'C' is more like that than COBOL, but
ya gotta add more comments :-)

Re: COBOL and tricks

<HfGdnTBrybggZnz_nZ2dnUU7-Q_NnZ2d@earthlink.com>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9660&group=comp.os.linux.misc#9660

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail
NNTP-Posting-Date: Wed, 27 Jul 2022 22:00:13 -0500
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <871quvs7m8.fsf@usenet.ankman.de>
<UN6dnUE56LtnLE3_nZ2dnUU7-fXNnZ2d@earthlink.com>
<87zghai2dh.fsf@usenet.ankman.de>
<16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbok3d$1udf5$1@dont-email.me>
From: 25B.Z959@nada.net (25B.Z959)
Date: Wed, 27 Jul 2022 23:00:12 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <tbok3d$1udf5$1@dont-email.me>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Message-ID: <HfGdnTBrybggZnz_nZ2dnUU7-Q_NnZ2d@earthlink.com>
Lines: 61
X-Usenet-Provider: http://www.giganews.com
NNTP-Posting-Host: 98.77.165.113
X-Trace: sv3-dWnQM7Bob2gQGuFifSDc50jsbTyTRZ1EI6fo884yEp+etH5ZmQ4ArM7Yo6Jo2xXAN79r8MFBDGMsJ5H!owClGnqxmQQpNKtohFC5AtGWdNnzJZIK6ADGmnz0YvfAdUirliwHfiP9bEgYITmPhgnwxAcemi7r!ttz+WiCNOmxskqYkQs55
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Original-Bytes: 4874
 by: 25B.Z959 - Thu, 28 Jul 2022 03:00 UTC

On 7/26/22 7:44 AM, Dan Espen wrote:
> Johnny Billquist <bqt@softjar.se> writes:
>
>> On 2022-07-26 01:42, Dan Espen wrote:
>>> Johnny Billquist <bqt@softjar.se> writes:
>>>
>>>> On 2022-07-24 00:23, Peter Flass wrote:
>>>>> 25B.Z959 <25B.Z959@nada.net> wrote:
>>>>>> Sometimes that IS a factor ... you have to have people who
>>>>>> can write it. But 1990 ... IMHO it should have been 'C'.
>>>>>>
>>>>>
>>>>> IMNSHO, COBOL. C is a terrible language for those types of
>>>> language. Things
>>>>> that are so dimple in COBOL, like moving a character string with blank
>>>>> fill, or formatting numeric output, requires calling subroutines in
>>>> C, and
>>>>> lack of length checking on string moves is a recipe for disaster.
>>>> This is one of the weirder arguments I've ever seen:
>>>> "requires calling a subroutine in C". As if that somehow is a problem?
>>>> Not to mention it's a function, and not a subroutine. Any claim of
>>>> "used the language quite a bit" sounds hollow after that.
>>>>
>>>> A statement to move a character string in COBOL will in the end be a
>>>> subroutine call as well.
>>> And why do you think that?
>>> I've sure seen lots of COBOL MOVE instructions generate a single
>>> hardware instruction.
>>
>> Depends on the compiler and hardware, and so on...
>> Which actually leads to the point that the same is true in C.
>> You might think you are calling a function like strncpy(). And you
>> are, on an abstract level. However, modern C compilers understands
>> what this is, and will in fact insert the required code directly in
>> the instruction stream, which, again depending on the hardware, might
>> end up being a single instruction.
>>
>> So in which way was COBOL better than C? In the end, claiming
>> superiority of a language based on that one have a function, while the
>> other have it as a statement is about as silly an argument as I have
>> ever seen. And all the extra claims to support that view are even
>> sillier.
>
> This is all true, an IBM mainframe C compiler CAN generate a single
> instruction for a memcpy or strncpy. Providing the compiler can tell
> the length of the move at compile time. Something that is a lot more
> likely for COBOL than C.
>
> For IBM mainframes the COBOL compiler is going to be way more efficient
> than C because the COBOL compiler is way more likely to be using packed
> decimal.

But then it has to deal with packed decimals ... :-)

'Efficient' is kind of relative - is it fewer ASM bytes
or fewer ultimate CPU cycles ?

Little microcontrollers can be educational in this respect.
Almost no RAM, or EEPROM, or clock speed. What's "efficient"
can change in just a few lines.

Re: COBOL and tricks

<tbtqao$314m5$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9661&group=comp.os.linux.misc#9661

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: dan1espen@gmail.com (Dan Espen)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Thu, 28 Jul 2022 07:01:42 -0400
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <tbtqao$314m5$1@dont-email.me>
References: <871quvs7m8.fsf@usenet.ankman.de>
<16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbok3d$1udf5$1@dont-email.me>
<HfGdnTBrybggZnz_nZ2dnUU7-Q_NnZ2d@earthlink.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: reader01.eternal-september.org; posting-host="819f8ae1c3f80df6b673798547c6f0d7";
logging-data="3183301"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Dc0BWB5qIAUfXPPCufGa3D7PzdHU1Ius="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:yj7VBudYrV384cl7uTzPizrnKQo=
 by: Dan Espen - Thu, 28 Jul 2022 11:01 UTC

"25B.Z959" <25B.Z959@nada.net> writes:

> On 7/26/22 7:44 AM, Dan Espen wrote:
>> Johnny Billquist <bqt@softjar.se> writes:
>>
>>> On 2022-07-26 01:42, Dan Espen wrote:
>>>> Johnny Billquist <bqt@softjar.se> writes:
>>>>
>>>>> On 2022-07-24 00:23, Peter Flass wrote:
>>>>>> 25B.Z959 <25B.Z959@nada.net> wrote:
>>>>>>> Sometimes that IS a factor ... you have to have people who
>>>>>>> can write it. But 1990 ... IMHO it should have been 'C'.
>>>>>>>
>>>>>>
>>>>>> IMNSHO, COBOL. C is a terrible language for those types of
>>>>> language. Things
>>>>>> that are so dimple in COBOL, like moving a character string with blank
>>>>>> fill, or formatting numeric output, requires calling subroutines in
>>>>> C, and
>>>>>> lack of length checking on string moves is a recipe for disaster.
>>>>> This is one of the weirder arguments I've ever seen:
>>>>> "requires calling a subroutine in C". As if that somehow is a problem?
>>>>> Not to mention it's a function, and not a subroutine. Any claim of
>>>>> "used the language quite a bit" sounds hollow after that.
>>>>>
>>>>> A statement to move a character string in COBOL will in the end be a
>>>>> subroutine call as well.
>>>> And why do you think that?
>>>> I've sure seen lots of COBOL MOVE instructions generate a single
>>>> hardware instruction.
>>>
>>> Depends on the compiler and hardware, and so on...
>>> Which actually leads to the point that the same is true in C.
>>> You might think you are calling a function like strncpy(). And you
>>> are, on an abstract level. However, modern C compilers understands
>>> what this is, and will in fact insert the required code directly in
>>> the instruction stream, which, again depending on the hardware, might
>>> end up being a single instruction.
>>>
>>> So in which way was COBOL better than C? In the end, claiming
>>> superiority of a language based on that one have a function, while the
>>> other have it as a statement is about as silly an argument as I have
>>> ever seen. And all the extra claims to support that view are even
>>> sillier.
>> This is all true, an IBM mainframe C compiler CAN generate a single
>> instruction for a memcpy or strncpy. Providing the compiler can tell
>> the length of the move at compile time. Something that is a lot more
>> likely for COBOL than C.
>> For IBM mainframes the COBOL compiler is going to be way more
>> efficient
>> than C because the COBOL compiler is way more likely to be using packed
>> decimal.
>
>
> But then it has to deal with packed decimals ... :-)
>
> 'Efficient' is kind of relative - is it fewer ASM bytes
> or fewer ultimate CPU cycles ?
>
> Little microcontrollers can be educational in this respect.
> Almost no RAM, or EEPROM, or clock speed. What's "efficient"
> can change in just a few lines.

CPU cycles. Converting decimal/binary is always slow.

--
Dan Espen

Re: COBOL and tricks

<pNvEK.167841$vZ1.103955@fx04.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9662&group=comp.os.linux.misc#9662

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx04.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <871quvs7m8.fsf@usenet.ankman.de> <tb6u29$15u9k$2@dont-email.me> <2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org> <tb71r6$14eug$1@dont-email.me> <2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com> <tb7qih$14eug$2@dont-email.me> <gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com> <1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org> <tblva2$105$1@news.misty.com> <S9WdndFIOv3VdXz_nZ2dnUU7-IPNnZ2d@earthlink.com>
Lines: 20
Message-ID: <pNvEK.167841$vZ1.103955@fx04.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 28 Jul 2022 13:02:13 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 28 Jul 2022 13:02:13 GMT
X-Received-Bytes: 1678
 by: Scott Lurndal - Thu, 28 Jul 2022 13:02 UTC

"25B.Z959" <25B.Z959@nada.net> writes:
>On 7/25/22 7:37 AM, Johnny Billquist wrote:

> Consider "print x" ... those of us that go back some years
> will acutely recognize how "print x" stands atop a veritable
> Everest of subroutines, device abstractors, drivers for
> display controllers .........
>
> CPUs don't *have* a "print x".

Arguable. e.g. the intel OUT instruction can easily print 'x',
and REP OUT can print an entire string.

>
> Long long back I was writing something akin to 'Notepad' for
> the first IBM-PCs (this was in the days of 'edlin' and the
> "A>" prompt) with MASM.

That would be quite late to the game.

Re: COBOL and tricks

<tbu5ci$34568$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9663&group=comp.os.linux.misc#9663

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: tnp@invalid.invalid (The Natural Philosopher)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Thu, 28 Jul 2022 15:10:25 +0100
Organization: A little, after lunch
Lines: 23
Message-ID: <tbu5ci$34568$1@dont-email.me>
References: <871quvs7m8.fsf@usenet.ankman.de>
<16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad> <tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com> <tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com> <tbok3d$1udf5$1@dont-email.me>
<HfGdnTBrybggZnz_nZ2dnUU7-Q_NnZ2d@earthlink.com>
<tbtqao$314m5$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 28 Jul 2022 14:10:26 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="1d8f11dc94085889f884cd4c5c6cbb14";
logging-data="3282120"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/6FwEoV9UlvRqjWbuPhA8nKzfYjuedQc="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.11.0
Cancel-Lock: sha1:YZmYNdXC+IFI6TUd0uTBlaOR/6s=
Content-Language: en-GB
In-Reply-To: <tbtqao$314m5$1@dont-email.me>
 by: The Natural Philosop - Thu, 28 Jul 2022 14:10 UTC

On 28/07/2022 12:01, Dan Espen wrote:
> "25B.Z959" <25B.Z959@nada.net> writes:
>
>
>>
>> But then it has to deal with packed decimals ... :-)
>>
>> 'Efficient' is kind of relative - is it fewer ASM bytes
>> or fewer ultimate CPU cycles ?
>>
Depends. Sometimes it was lack of EPROM space
Sometimes it was lack of CPU Hz.
What isn't efficient is low source code byte count achieved by removing
the comments

--
It is the folly of too many to mistake the echo of a London coffee-house
for the voice of the kingdom.

Jonathan Swift

Re: COBOL and tricks

<20220728181109.04a4d1841fcf6011eba52fbb@eircom.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9664&group=comp.os.linux.misc#9664

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: steveo@eircom.net (Ahem A Rivet's Shot)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Thu, 28 Jul 2022 18:11:09 +0100
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <20220728181109.04a4d1841fcf6011eba52fbb@eircom.net>
References: <871quvs7m8.fsf@usenet.ankman.de>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad>
<tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com>
<tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com>
<tbok3d$1udf5$1@dont-email.me>
<HfGdnTBrybggZnz_nZ2dnUU7-Q_NnZ2d@earthlink.com>
<tbtqao$314m5$1@dont-email.me>
<tbu5ci$34568$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="924e339f80df9f7ac82d7f99872780ce";
logging-data="3382127"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX189hUxDTmTow0zIZRfdnR/e6VP5+s3G3cc="
Cancel-Lock: sha1:QrhnuIO3l8ngbsMNoZT5ZugOtsQ=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd13.0)
X-Clacks-Overhead: "GNU Terry Pratchett"
 by: Ahem A Rivet's - Thu, 28 Jul 2022 17:11 UTC

On Thu, 28 Jul 2022 15:10:25 +0100
The Natural Philosopher <tnp@invalid.invalid> wrote:

> What isn't efficient is low source code byte count achieved by removing
> the comments

It is in interpreted code!

--
Steve O'Hara-Smith
Odds and Ends at http://www.sohara.org/

Re: COBOL and tricks

<2044901849.680728052.410272.peter_flass-yahoo.com@news.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9665&group=comp.os.linux.misc#9665

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: peter_flass@yahoo.com (Peter Flass)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Thu, 28 Jul 2022 12:13:11 -0700
Organization: A noiseless patient Spider
Lines: 87
Message-ID: <2044901849.680728052.410272.peter_flass-yahoo.com@news.eternal-september.org>
References: <87sfn8pr5t.fsf@usenet.ankman.de>
<UN6dnUE56LtnLE3_nZ2dnUU7-fXNnZ2d@earthlink.com>
<87zghai2dh.fsf@usenet.ankman.de>
<16ydncnktcv0sE__nZ2dnUU7-Q3NnZ2d@earthlink.com>
<tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad>
<tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com>
<S9WdndFIOv3VdXz_nZ2dnUU7-IPNnZ2d@earthlink.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="3a497d4689ee941d379842d995c65407";
logging-data="3409432"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mzrfR1HExb82u5CU8G66B"
User-Agent: NewsTap/5.3.1 (iPad)
Cancel-Lock: sha1:3dNt3AkhkCn08uZQpdo8wOPWdtg=
sha1:aLZIMqsmUddopqF3RtZAqKBsvIM=
 by: Peter Flass - Thu, 28 Jul 2022 19:13 UTC

25B.Z959 <25B.Z959@nada.net> wrote:
> On 7/25/22 7:37 AM, Johnny Billquist wrote:
>> On 2022-07-24 00:23, Peter Flass wrote:
>>> 25B.Z959 <25B.Z959@nada.net> wrote:
>>>>     Sometimes that IS a factor ... you have to have people who
>>>>     can write it. But 1990 ... IMHO it should have been 'C'.
>>>>
>>>
>>> IMNSHO, COBOL. C is a terrible language for those types of language.
>> Things
>>>    that are so dimple in COBOL, like moving a character string with blank
>>> fill, or formatting numeric output, requires calling subroutines in
>> C, and
>>> lack of length checking on string moves is a recipe for disaster.
>> This is one of the weirder arguments I've ever seen:
>> "requires calling a subroutine in C". As if that somehow is a problem?
>> Not to mention it's a function, and not a subroutine. Any claim of "used
>> the language quite a bit" sounds hollow after that.
>>
>> A statement to move a character string in COBOL will in the end be a
>> subroutine call as well.
>>
>> And lack of length checking depends on the function. Nothing prevents
>> you from using strncpy in C. Or write your own, with whatever
>> characteristic you want. It will actually be pretty efficient.
>> Comparable to the provided functions.
>>
>>> I have used both languages quite a bit, perhaps COBOL more, years
>> ago, but
>>> neither is my preferred language, so I have no dog in this fight.
>>> …
>> Seems like your C is both rusty and bad.
>>
>>>>     Mostly I like "terse" languages - less typing and lots
>>>>     of room left over for comments at the ends of the lines.
>>>
>>> Sounds like assembler ;-)
>>>
>>> It’s too easy to write tricky code with side-effects in C. COBOL
>> might not
>>> be as self-documenting as advertised, but the operation of each
>> statement
>>> is pretty obvious and easily understood.
>> What kind of side effects are we talking about? The operation of each
>> statement in C is very obvious and easy to understand.
>> Most people get into trouble because of memory handling. Not the
>> language semantics.
>> But that is where you get to the point where things gets even harder to
>> even do in COBOL. And if you manage to do it, it won't be easily
>> understood.
>
> Consider "print x" ... those of us that go back some years
> will acutely recognize how "print x" stands atop a veritable
> Everest of subroutines, device abstractors, drivers for
> display controllers .........
>
> CPUs don't *have* a "print x".

I think the 1401 did. It had instructions for “read a card”, “print a
line”, etc.

>
> Long long back I was writing something akin to 'Notepad' for
> the first IBM-PCs (this was in the days of 'edlin' and the
> "A>" prompt) with MASM. Now I had (and still have) the
> IBM-PC TECHNICAL REFERENCE MANUAL and it was only there where
> all the ROM-BIOS calls were described in detail. You could
> "print x" ... but it took some BIOS calls to actually push it
> out to the screen. OR - you could poke values directly into
> the display buffer ... preferably during the blanking inverval.
>
> Depending on WHAT you need to do, COBOL can be great, or
> just awful, perhaps even unusable. Whatever it is you CAN
> do it in 'C' ... but it might take so MUCH 'C' that you
> never actually dare begin.
>
> In short, no 'perfect' all-purpose solutions. Be a bit
> versatile or you'll never get it done.
>
> All the talk about COBOL ... I've installed the OpenCOBOL IDE
> and am gonna re-learn the language to some degree :-)
>

--
Pete

Re: COBOL and tricks

<337089555.680728311.711454.peter_flass-yahoo.com@news.eternal-september.org>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9666&group=comp.os.linux.misc#9666

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: peter_flass@yahoo.com (Peter Flass)
Newsgroups: alt.folklore.computers,comp.os.linux.misc
Subject: Re: COBOL and tricks
Date: Thu, 28 Jul 2022 12:13:12 -0700
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <337089555.680728311.711454.peter_flass-yahoo.com@news.eternal-september.org>
References: <tauc3e$3cjkn$1@dont-email.me>
<BbKdnS4bVeX7G07_nZ2dnUU7-RXNnZ2d@earthlink.com>
<L0XAK.382240$ssF.266663@fx14.iad>
<tb1iih$3pthf$2@dont-email.me>
<cL_AK.547297$X_i.178414@fx18.iad>
<JJadnSUvZb3dlUv_nZ2dnUU7-fXNnZ2d@earthlink.com>
<1034215367.679945065.348792.peter_flass-yahoo.com@news.eternal-september.org>
<tb6u29$15u9k$2@dont-email.me>
<2074045549.679949818.212355.peter_flass-yahoo.com@news.eternal-september.org>
<tb71r6$14eug$1@dont-email.me>
<2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com>
<tb7qih$14eug$2@dont-email.me>
<gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com>
<1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org>
<tblva2$105$1@news.misty.com>
<tbn9oq$1h6ku$2@dont-email.me>
<tbo9oj$rej$1@news.misty.com>
<tbok3d$1udf5$1@dont-email.me>
<HfGdnTBrybggZnz_nZ2dnUU7-Q_NnZ2d@earthlink.com>
<tbtqao$314m5$1@dont-email.me>
<tbu5ci$34568$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader01.eternal-september.org; posting-host="3a497d4689ee941d379842d995c65407";
logging-data="3409432"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18FTX+O22DF3T3EokfIpOUG"
User-Agent: NewsTap/5.3.1 (iPad)
Cancel-Lock: sha1:BoB04yOw6xOQQglQhnwd5dS8M3M=
sha1:z8cpMb0h0XkziQf74s+JRuIBOkA=
 by: Peter Flass - Thu, 28 Jul 2022 19:13 UTC

The Natural Philosopher <tnp@invalid.invalid> wrote:
> On 28/07/2022 12:01, Dan Espen wrote:
>> "25B.Z959" <25B.Z959@nada.net> writes:
>>
>>
>>>
>>> But then it has to deal with packed decimals ... :-)
>>>
>>> 'Efficient' is kind of relative - is it fewer ASM bytes
>>> or fewer ultimate CPU cycles ?
>>>
> Depends. Sometimes it was lack of EPROM space
> Sometimes it was lack of CPU Hz.
> What isn't efficient is low source code byte count achieved by removing
> the comments
>

Unless your source is on paper tape.

--
Pete

Re: COBOL and tricks

<3LBEK.112721$El2.78325@fx45.iad>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=9667&group=comp.os.linux.misc#9667

  copy link   Newsgroups: alt.folklore.computers comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx45.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: scott@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: COBOL and tricks
Newsgroups: alt.folklore.computers,comp.os.linux.misc
References: <87sfn8pr5t.fsf@usenet.ankman.de> <tb71r6$14eug$1@dont-email.me> <2aadnYfne4Fc9Er_nZ2dnUU7-WnNnZ2d@earthlink.com> <tb7qih$14eug$2@dont-email.me> <gKydnS1iKPAP1EH_nZ2dnUU7-L3NnZ2d@earthlink.com> <1993356671.680307216.022066.peter_flass-yahoo.com@news.eternal-september.org> <tblva2$105$1@news.misty.com> <S9WdndFIOv3VdXz_nZ2dnUU7-IPNnZ2d@earthlink.com> <2044901849.680728052.410272.peter_flass-yahoo.com@news.eternal-september.org>
Lines: 22
Message-ID: <3LBEK.112721$El2.78325@fx45.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Thu, 28 Jul 2022 19:49:19 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Thu, 28 Jul 2022 19:49:19 GMT
X-Received-Bytes: 1817
 by: Scott Lurndal - Thu, 28 Jul 2022 19:49 UTC

Peter Flass <peter_flass@yahoo.com> writes:
>25B.Z959 <25B.Z959@nada.net> wrote:
>> On 7/25/22 7:37 AM, Johnny Billquist wrote:

>>> But that is where you get to the point where things gets even harder to
>>> even do in COBOL. And if you manage to do it, it won't be easily
>>> understood.
>>
>> Consider "print x" ... those of us that go back some years
>> will acutely recognize how "print x" stands atop a veritable
>> Everest of subroutines, device abstractors, drivers for
>> display controllers .........
>>
>> CPUs don't *have* a "print x".
>
>I think the 1401 did. It had instructions for “read a card”, “print a
>line”, etc.

The PDP-8 has instructions to read a card, to read and
write from a teletype or paper tape punch et alia.

Many computers of that era have similar capabilities.


computers / comp.os.linux.misc / Re: self-documenting APL, not COBOL and tricks

Pages:123456789101112131415161718192021222324252627282930313233
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor