Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Got Mole problems? Call Avogadro at 6.02 x 10^23.


computers / comp.os.vms / Re: ChatGPT solved it for me, again...

SubjectAuthor
* ChatGPT solved it for me, again...Slo
+* Re: ChatGPT solved it for me, again...Arne Vajhøj
|+* Re: ChatGPT solved it for me, again...Steven Schweda
||`- Re: ChatGPT solved it for me, again...Arne Vajhøj
|+* Re: ChatGPT solved it for me, again...David Wade
||`* Re: ChatGPT solved it for me, again...Slo
|| +- Re: ChatGPT solved it for me, again...Slo
|| +- Re: ChatGPT solved it for me, again...Slo
|| `* Re: ChatGPT solved it for me, again...Johnny Billquist
||  +- Re: ChatGPT solved it for me, again...cao...@pitbulluk.org
||  `* Re: ChatGPT solved it for me, again...Steven Schweda
||   +- Re: ChatGPT solved it for me, again...Johnny Billquist
||   `- Re: ChatGPT solved it for me, again...gah4
|`* Re: ChatGPT solved it for me, again...Hans Bachner
| `* Re: ChatGPT solved it for me, again...Arne Vajhøj
|  +* Re: ChatGPT solved it for me, again...Slo
|  |+* Re: ChatGPT solved it for me, again...Simon Clubley
|  ||+* Re: ChatGPT solved it for me, again...Arne Vajhøj
|  |||`* Re: ChatGPT solved it for me, again...Simon Clubley
|  ||| +* Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||| |`* Re: ChatGPT solved it for me, again...Simon Clubley
|  ||| | +* Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||| | |+* Re: ChatGPT solved it for me, again...Slo
|  ||| | ||+* Re: ChatGPT solved it for me, again...Slo
|  ||| | |||`- Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||| | ||+- Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||| | ||`- Re: ChatGPT solved it for me, again...bill
|  ||| | |`* Re: ChatGPT solved it for me, again...Simon Clubley
|  ||| | | `- Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||| | +- Re: ChatGPT solved it for me, again...bill
|  ||| | `* Re: ChatGPT solved it for me, again...Johnny Billquist
|  ||| |  +* Re: ChatGPT solved it for me, again...Simon Clubley
|  ||| |  |`- Re: ChatGPT solved it for me, again...Johnny Billquist
|  ||| |  `* Re: ChatGPT solved it for me, again...bill
|  ||| |   +- Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||| |   `- Re: ChatGPT solved it for me, again...Dan Cross
|  ||| `* Re: ChatGPT solved it for me, again...Johnny Billquist
|  |||  `* Re: ChatGPT solved it for me, again...Arne Vajhøj
|  |||   `* Re: ChatGPT solved it for me, again...Simon Clubley
|  |||    `- Re: ChatGPT solved it for me, again...Arne Vajhøj
|  ||`- Re: ChatGPT solved it for me, again...Johnny Billquist
|  |+- Re: ChatGPT solved it for me, again...Arne Vajhøj
|  |`- Re: ChatGPT solved it for me, again...Single Stage to Orbit
|  `* Re: ChatGPT solved it for me, again...Single Stage to Orbit
|   `* Re: ChatGPT solved it for me, again...Stephen Hoffman
|    `- Re: ChatGPT solved it for me, again...Single Stage to Orbit
+* Re: ChatGPT solved it for me, again...Michael Kraemer @ home
|`* Re: ChatGPT solved it for me, again...Slo
| `* Re: ChatGPT solved it for me, again...Simon Clubley
|  `* Re: ChatGPT solved it for me, again...Slo
|   +* Re: ChatGPT solved it for me, again...Slo
|   |+* Re: ChatGPT solved it for me, again...Simon Clubley
|   ||`* Re: ChatGPT solved it for me, again...Slo
|   || `- Re: ChatGPT solved it for me, again...Simon Clubley
|   |`- Re: ChatGPT solved it for me, again...Johnny Billquist
|   +* Re: ChatGPT solved it for me, again...Robert A. Brooks
|   |+- Re: ChatGPT solved it for me, again...Slo
|   |+* Re: ChatGPT solved it for me, again...Johnny Billquist
|   ||`- Re: ChatGPT solved it for me, again...bill
|   |`- Re: ChatGPT solved it for me, again...bill
|   +- Re: ChatGPT solved it for me, again...bill
|   `* Re: ChatGPT solved it for me, again...Andy Burns
|    `* Re: ChatGPT solved it for me, again...Slo
|     `* Re: ChatGPT solved it for me, again...bill
|      +- Re: ChatGPT solved it for me, again...Slo
|      `- Re: ChatGPT solved it for me, again...gah4
+- Re: ChatGPT solved it for me, again...Simon Clubley
+- Re: ChatGPT solved it for me, again...Stephen Hoffman
`- Re: ChatGPT solved it for me, again...gah4

Pages:123
Re: ChatGPT solved it for me, again...

<k54s5nFgdqoU2@mid.individual.net>

  copy mid

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

  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: ChatGPT solved it for me, again...
Date: Wed, 15 Feb 2023 15:04:09 -0500
Lines: 15
Message-ID: <k54s5nFgdqoU2@mid.individual.net>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net>
<f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me>
<e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net kRZRVzXnLv6ahjuacA1SPAf9lOl9b5Zh0rIO6RYZ1lhSn6Evn8
Cancel-Lock: sha1:7rLxfROg66FUEikNHHHuoBK2UxQ=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Content-Language: en-US
In-Reply-To: <e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
 by: bill - Wed, 15 Feb 2023 20:04 UTC

On 2/15/2023 11:43 AM, Slo wrote:
>
> I apologize for my previous response. Hewlett Packard Enterprise (HPE) sold OpenVMS
> to VMS Software Inc. (VSI) in 2014. VSI is an independent software company that specializes
> in OpenVMS and is now the owner of the OpenVMS operating system.
Is this realy true? Does VSI own VMS or merely hold an exclusive
license to develop and sell it? We have herd that there are things
they can not do (like Open Source it) which would tend to show not
ownership but limited allowed access.

I am not a lawyer.
But then, neither is ChatGPT. :-)

bill

Re: ChatGPT solved it for me, again...

<k54se8FgdqoU3@mid.individual.net>

  copy mid

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

  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: ChatGPT solved it for me, again...
Date: Wed, 15 Feb 2023 15:08:41 -0500
Lines: 32
Message-ID: <k54se8FgdqoU3@mid.individual.net>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net>
<f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me>
<e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
<tsj3h1$2thbc$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 dEPr/ocgMrK0O4pe4AxQhw1mr/5lgxt8609RO102c71wrfMncZ
Cancel-Lock: sha1:SNKSJURzs3s0Y+wzEoSPlfrvJOM=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Content-Language: en-US
In-Reply-To: <tsj3h1$2thbc$1@dont-email.me>
 by: bill - Wed, 15 Feb 2023 20:08 UTC

On 2/15/2023 12:07 PM, Robert A. Brooks wrote:
> On 2/15/2023 11:43 AM, Slo wrote:
>  > ==============================
>> wrong owner
>> ==============================
>> I apologize for my previous response. Hewlett Packard Enterprise (HPE)
>> sold OpenVMS
>> to VMS Software Inc. (VSI) in 2014. VSI is an independent software
>> company that specializes
>> in OpenVMS and is now the owner of the OpenVMS operating system. Since
>> acquiring
>> OpenVMS, VSI has been working on updating and modernizing the
>> operating system to
>> make it more compatible with modern hardware and software. VSI
>> continues to provide
>> support and updates for OpenVMS to its customers.
>> ==============================
>
>
> Still not correct.  HP (it was not HPE at the time) sold us the
> development rights,
> not the ownership of the existing intellectual property.
>
> This is among the reasons why VSI will not open-source VMS; it's not
> VSI's call.
>

Thanks Rob. You confirmed my post before I even sent it.
Beat that ChatGPT.....

bill

Re: ChatGPT solved it for me, again...

<k54si3FgdqpU2@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!lilly.ping.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: bill.gun...@gmail.com (bill)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Wed, 15 Feb 2023 15:10:44 -0500
Lines: 37
Message-ID: <k54si3FgdqpU2@mid.individual.net>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net>
<f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me>
<e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
<tsj3h1$2thbc$1@dont-email.me> <tsjbol$gbc$3@news.misty.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net xXGUBWs7B3Mpo5Ai2MSz2As34UfBfloURZJrLVg8dNUF1X29qT
Cancel-Lock: sha1:8t8Vir5itD12x0HB025s2oGkPto=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Content-Language: en-US
In-Reply-To: <tsjbol$gbc$3@news.misty.com>
 by: bill - Wed, 15 Feb 2023 20:10 UTC

On 2/15/2023 2:28 PM, Johnny Billquist wrote:
> On 2023-02-15 18:07, Robert A. Brooks wrote:
>> On 2/15/2023 11:43 AM, Slo wrote:
>>   > ==============================
>>> wrong owner
>>> ==============================
>>> I apologize for my previous response. Hewlett Packard Enterprise
>>> (HPE) sold OpenVMS
>>> to VMS Software Inc. (VSI) in 2014. VSI is an independent software
>>> company that specializes
>>> in OpenVMS and is now the owner of the OpenVMS operating system.
>>> Since acquiring
>>> OpenVMS, VSI has been working on updating and modernizing the
>>> operating system to
>>> make it more compatible with modern hardware and software. VSI
>>> continues to provide
>>> support and updates for OpenVMS to its customers.
>>> ==============================
>>
>>
>> Still not correct.  HP (it was not HPE at the time) sold us the
>> development rights,
>> not the ownership of the existing intellectual property.
>>
>> This is among the reasons why VSI will not open-source VMS; it's not
>> VSI's call.
>
> Hello Mentec repeat. :-P
> (How I wish I could manage to sort that out...)
>

Yeah, I wonder what is going on with the current owner.
Never hear anything anymore.

bill

Re: ChatGPT solved it for me, again...

<821a3614-5b11-44a4-9fea-7284d53fc832n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a0c:9a41:0:b0:56b:fb9d:eb75 with SMTP id q1-20020a0c9a41000000b0056bfb9deb75mr301179qvd.70.1676496495699;
Wed, 15 Feb 2023 13:28:15 -0800 (PST)
X-Received: by 2002:a0c:f144:0:b0:56c:22f:701d with SMTP id
y4-20020a0cf144000000b0056c022f701dmr335370qvl.14.1676496495556; Wed, 15 Feb
2023 13:28:15 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 15 Feb 2023 13:28:15 -0800 (PST)
In-Reply-To: <d86ae48a-e278-488a-9b9d-cc19790c71bdn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:885e:b133:16be:88e3;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:885e:b133:16be:88e3
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <tsi82e$2rmer$1@dont-email.me>
<c8fb53a8-8a11-48bc-b81a-45bad06d533cn@googlegroups.com> <tsiftc$e85$1@news.misty.com>
<d86ae48a-e278-488a-9b9d-cc19790c71bdn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <821a3614-5b11-44a4-9fea-7284d53fc832n@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: gah...@u.washington.edu (gah4)
Injection-Date: Wed, 15 Feb 2023 21:28:15 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2509
 by: gah4 - Wed, 15 Feb 2023 21:28 UTC

On Wednesday, February 15, 2023 at 5:56:21 AM UTC-8, Steven Schweda wrote:

(snip on "too much power")

> Not really. Some (mostly older) voltage regulators had a minimum
> load requirement. Connect them to a smaller load, and the output
> voltage could exceed the rated value, with potential damage as the
> result.

When the IBM PC/AT came out, the hard disk was optional.
If you didn't order it, you got a 15W resistor where it would go.

Sometime later, I had such a resistor that I would use when
testing PC power supplies.

And I did once have a non-IBM power supply, as they say:
"let the magic smoke out".

As far as I know, the voltage didn't exceed the rating,
but after the smoke came out, I didn't try again.

ATX power supplies are required to work under 0 load,
They might not be required to work well, though.

I have an ATX power supply tester that tests with
zero load. Of course that doesn't really test it!

In any case, yes, using too big a power supply
isn't a good idea. And even when it works, they
are less efficient. (Or, at least, the efficiency
requirements are lower.)

Re: ChatGPT solved it for me, again...

<c6a6c39c-ccb5-4f61-aef9-6b88a238029dn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a0c:f253:0:b0:56e:a32a:cf0b with SMTP id z19-20020a0cf253000000b0056ea32acf0bmr357884qvl.76.1676497181890;
Wed, 15 Feb 2023 13:39:41 -0800 (PST)
X-Received: by 2002:a05:622a:5987:b0:3bb:810c:78fe with SMTP id
gb7-20020a05622a598700b003bb810c78femr211999qtb.12.1676497181724; Wed, 15 Feb
2023 13:39:41 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Wed, 15 Feb 2023 13:39:41 -0800 (PST)
In-Reply-To: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:885e:b133:16be:88e3;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:885e:b133:16be:88e3
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c6a6c39c-ccb5-4f61-aef9-6b88a238029dn@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: gah...@u.washington.edu (gah4)
Injection-Date: Wed, 15 Feb 2023 21:39:41 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2547
 by: gah4 - Wed, 15 Feb 2023 21:39 UTC


To follow up on another thread, I asked ChatGPT about running
a VAX 6000 in a dorm room:

"It is technically possible to run a VAX 6000 in a college dorm room, but it would likely not be practical or feasible for several reasons.

First, the VAX 6000 is a large and complex mainframe computer that was originally designed for use in data centers and other large computing environments. It requires a significant amount of power and cooling to operate, and may produce a lot of noise and heat, which could be disruptive and potentially dangerous in a small dorm room.

Second, obtaining a VAX 6000 and setting it up for operation would likely be prohibitively expensive and time-consuming. These systems are no longer manufactured, and may be difficult to find for sale on the secondhand market.. Additionally, setting up a VAX 6000 would require a significant amount of technical knowledge and expertise, and may require specialized tools and equipment.

Overall, while it is technically possible to run a VAX 6000 in a college dorm room, it is not practical or advisable for most individuals or organizations. Modern computing technologies, such as cloud computing and virtualization, offer much more efficient and cost-effective solutions for most computing needs."

Re: ChatGPT solved it for me, again...

<k55471Flpf3U1@mid.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: use...@andyburns.uk (Andy Burns)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Wed, 15 Feb 2023 22:21:21 +0000
Lines: 10
Message-ID: <k55471Flpf3U1@mid.individual.net>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net>
<f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me>
<e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net jlJ4PbcLESFR6D8LRrrBrQqcWd+cdpCe+w3l19mR3d/uyk5Cqb
Cancel-Lock: sha1:eZaHjH8EwhvP9XLeGOwojoScKRM=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Content-Language: en-GB
In-Reply-To: <e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
 by: Andy Burns - Wed, 15 Feb 2023 22:21 UTC

Slo wrote:

> I'm wondering if somebody else on the
> planet (outside my session) asked that question now, it gave the correct answer.

I thought it wasn't allowed to go and do "live" research from the
internet, to prevent it becoming racist, like with other previous "chat"
AIs?

Re: ChatGPT solved it for me, again...

<tsla71$38n9e$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Thu, 16 Feb 2023 13:14:09 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <tsla71$38n9e$1@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com> <k53tc4FfvbvU1@mid.individual.net> <f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com> <tsimmb$2t4ei$2@dont-email.me> <e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com> <ec2f8632-2130-44d1-93ac-8051197f30b9n@googlegroups.com> <tsjadp$2v9p5$1@dont-email.me> <3b1500d9-66b7-4725-a2b7-36742e6e8822n@googlegroups.com>
Injection-Date: Thu, 16 Feb 2023 13:14:09 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="4e58f831900e6d6d7bb572314492a9f6";
logging-data="3431726"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hvgo11BLz0Rqs+vrPdYEX0mWy/gG75PI="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:MQ/uN2DTQwbkk8FW2q1/B+kLmnY=
 by: Simon Clubley - Thu, 16 Feb 2023 13:14 UTC

On 2023-02-15, Slo <slovuj@gmail.com> wrote:
>> IOW, tell the person what they want to hear (and charge a lot of money).
>
> True. I feed it fake info and it just develops on it... GIGO. What interests me
> is how this will impact, the already compromised, educational systems
> everywhere. I'm still recovering from the disappointment when
> calculators moved into schools. Ask anyone over 20-30 what is
> 7x6 or 8x9 -- my kids (now adults) don't know, and don't care...
> Yes, this tech will be misused and abused in unpredictable ways,
> as Hoff suggets.
>

Unfortunately, there are lots of skills that are dying off as a result
of people becoming dependent on technology (and not knowing what to do
when it fails).

For example, I wonder how many of them can still read a paper map and
navigate using it ?

That last thought comes as a result of doing just that and someone nearby
on the trail saying you don't see that much any more (navigating by paper
maps). Made me think about what they would do if their technology failed
on them in the middle of nowhere...

Simon.

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

Re: ChatGPT solved it for me, again...

<k570fcF7jcU1@mid.individual.net>

  copy mid

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

  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: han...@bachner.priv.at (Hans Bachner)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Thu, 16 Feb 2023 16:29:49 +0100
Lines: 81
Message-ID: <k570fcF7jcU1@mid.individual.net>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$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 sXzAUdyEO1vC/vIXUPjnjgUIhFdfjosKB4Yfn7P/sJFjU8q24=
Cancel-Lock: sha1:RpvYhkQYHCX/EXQeNlTYqwSq6Ys=
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.13.1
Content-Language: en-US
In-Reply-To: <tsh6vi$2lhib$1@dont-email.me>
 by: Hans Bachner - Thu, 16 Feb 2023 15:29 UTC

Arne Vajhøj schrieb am 15.02.2023 um 00:54:
> On 2/14/2023 5:44 PM, Slo wrote:
>> I have these two boxes, but was never sure about this, so I asked
>> ChatGPT for help. I took apart the PWS 500au simply because of
>> lack of space -- it works perfectly! I don't know what to do
>> with the parts, but would like to at least reuse the power supply, hence:
>>
>> Me:
>> Can the power supply from DIGITAL Personal Workstation 500au used in
>> AlphaStation XP1000
>>
>> ChatGPT:
>> The Digital Personal Workstation 500au and the AlphaStation XP1000 are
>> from
>> different generations of Digital/Compaq/HP workstations, and they have
>> different power supply requirements.
>> The Digital Personal Workstation 500au uses a 200-watt power supply,
>> while
>> the AlphaStation XP1000 uses a 700-watt power supply. [...]
>
> Did it?
>
> https://www.williamstein.org/people/buhler/JPB/tech-specs.pdf
> says that a 500au got a 300W power supply
>
> https://www.manualslib.com/manual/711131/Compaq-Alphastation-Xp1000.html
> says that XP1000 has a 400W power supply
>
> I am not a HW guy but those references saying 300W and 400W
> look pretty credible.
>
> I would love to know where ChatGPT got the 200W and 70)W from.
>
> Arne

The QuickSpecs of the XP1000 (V22 dated 31-Dec-2001, from "HPE Product
Bulletins") say:

> AlphaStation XP1000 Systems include:
>
> Tower enclosure with Alpha 21264A (EV67) 667-MHz CPU with 64-KB data cache,
> 64-KB instruction cache, and 4-MB Level 2 cache
> Five Expansion slots on two buses: [...]
> Two memory option banks, four DIMM slots per bank, maximum 2-GB memory
> Six Storage bays: [...]
> 400W power supply <<<==================
> Onboard wide UltraSCSI adapter
> Onboard 16-bit Soundblaster compatible audio
> Onboard 10/100 Ethernet (Twisted pair); ThinWire and Thick wire optional
> Integrated I/O [...]s
> 1.44-MB diskette drive
> 650-MB 40X CD-ROM drive
> Factory Installed Software: Tru64 UNIX or OpenVMS
> Protected by Compaq Services, including a three-year on-site limited warranty

The SOC (Systems and Options Catalog) for the "Compaq DPW Enhanced
a-Series & au-Series V4.0  6 January 2000" says:

> Short tower enclosure with
> - Alpha microprocessor 21164 500/600 MHz CPU
> Compaq DPW Workstations a-Series, or
> - Alpha microprocessor 21164 500/600 MHz CPU
> Compaq DPW Workstations au-Series.
> - Optional 4 MB cache
> - Five I/O slots [...]
> - Three DIMM banks (six slots) (1.5 GB maximum)
> - Six storage bays [...]
> - 300 W power supply <<<==================
> - Onboard Qlogic Wide Ultra SCSI Adapter
> - Onboard 16-bit audio (not supported on OpenVMS)
> - 10/100 BaseT Ethernet Twisted pair (ThinWire—optional)
> - 1.44 MB diskette drive.
> - 32X CD-ROM drive.
> - Factory installed software [...]

This is the most "official" data I found.

Hans.

Re: ChatGPT solved it for me, again...

<9848ee11-d152-454c-b847-982d082efee8n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:c40c:0:b0:73b:28cb:632f with SMTP id d12-20020a37c40c000000b0073b28cb632fmr477687qki.12.1676577112742;
Thu, 16 Feb 2023 11:51:52 -0800 (PST)
X-Received: by 2002:a05:620a:270a:b0:72b:25b4:565a with SMTP id
b10-20020a05620a270a00b0072b25b4565amr348499qkp.0.1676577112455; Thu, 16 Feb
2023 11:51:52 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.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: Thu, 16 Feb 2023 11:51:52 -0800 (PST)
In-Reply-To: <k55471Flpf3U1@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:b03:4c80:412f:fa71:8223:3092;
posting-account=8lr06goAAABywL0WFRfF7Hu_shXozcZn
NNTP-Posting-Host: 2a01:e0a:b03:4c80:412f:fa71:8223:3092
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net> <f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me> <e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
<k55471Flpf3U1@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9848ee11-d152-454c-b847-982d082efee8n@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: slo...@gmail.com (Slo)
Injection-Date: Thu, 16 Feb 2023 19:51:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2297
 by: Slo - Thu, 16 Feb 2023 19:51 UTC

> > I'm wondering if somebody else on the
> > planet (outside my session) asked that question now, it gave the correct answer.
> I thought it wasn't allowed to go and do "live" research from the
> internet, to prevent it becoming racist, like with other previous "chat" AIs?

They clearly state that their data is from 2021 and no internet searching
is taking place. However, given the millions of daily sessions (where the
humans are correcting ChatGPT's hallucinations), it's very likely that
this data is being stored and somehow integrated. The question is
when will it be used live, and how is it verified. That's why I wondered if
it's already part of the "knowledge" -- including the fake info some users
(like myself with a "COBOL device driver") are purposefully giving it.
I may check from time to time with the same question to see how good
a student it is. Of course, it may just parrot anything we tell it...

Re: ChatGPT solved it for me, again...

<k57gp8Ftd0mU2@mid.individual.net>

  copy mid

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

  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: ChatGPT solved it for me, again...
Date: Thu, 16 Feb 2023 15:08:08 -0500
Lines: 14
Message-ID: <k57gp8Ftd0mU2@mid.individual.net>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net>
<f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me>
<e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
<k55471Flpf3U1@mid.individual.net>
<9848ee11-d152-454c-b847-982d082efee8n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net aPSd1Q6E+q4KnTAnfCSJfgkiRHGerWk7EJUTRZ7m/HSGBJD+2q
Cancel-Lock: sha1:zO3MXz2zEvUv1W8xPeNxnU3OI6Q=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Content-Language: en-US
In-Reply-To: <9848ee11-d152-454c-b847-982d082efee8n@googlegroups.com>
 by: bill - Thu, 16 Feb 2023 20:08 UTC

On 2/16/2023 2:51 PM, Slo wrote:
>
> I may check from time to time with the same question to see how good
> a student it is. Of course, it may just parrot anything we tell it...

What else would you expect it to do? Contrary to what people want
to believe machines have no intelligence and no ability to learn.
They can only store large amounts of data, search it for some term
and then regurgitate the data they have stored. If enough people
say the earth is flat that will become the answer. It has no way
of verifying that what it "knows" has any real meaning at all.

bill

Re: ChatGPT solved it for me, again...

<279e612b-2c41-46ba-a0fe-2f869b777b4an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:ae9:e70a:0:b0:71f:b8ba:ff4d with SMTP id m10-20020ae9e70a000000b0071fb8baff4dmr515650qka.11.1676579514265;
Thu, 16 Feb 2023 12:31:54 -0800 (PST)
X-Received: by 2002:a0c:a912:0:b0:56e:f4ef:be13 with SMTP id
y18-20020a0ca912000000b0056ef4efbe13mr306619qva.31.1676579513855; Thu, 16 Feb
2023 12:31:53 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.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: Thu, 16 Feb 2023 12:31:53 -0800 (PST)
In-Reply-To: <k57gp8Ftd0mU2@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:b03:4c80:412f:fa71:8223:3092;
posting-account=8lr06goAAABywL0WFRfF7Hu_shXozcZn
NNTP-Posting-Host: 2a01:e0a:b03:4c80:412f:fa71:8223:3092
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net> <f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me> <e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
<k55471Flpf3U1@mid.individual.net> <9848ee11-d152-454c-b847-982d082efee8n@googlegroups.com>
<k57gp8Ftd0mU2@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <279e612b-2c41-46ba-a0fe-2f869b777b4an@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: slo...@gmail.com (Slo)
Injection-Date: Thu, 16 Feb 2023 20:31:54 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2223
 by: Slo - Thu, 16 Feb 2023 20:31 UTC

On Thursday, February 16, 2023 at 9:08:12 PM UTC+1, bill wrote:
> On 2/16/2023 2:51 PM, Slo wrote:
> >
> > I may check from time to time with the same question to see how good
> > a student it is. Of course, it may just parrot anything we tell it...
> What else would you expect it to do? Contrary to what people want
> to believe machines have no intelligence and no ability to learn.
> They can only store large amounts of data, search it for some term
> and then regurgitate the data they have stored. If enough people
> say the earth is flat that will become the answer. It has no way
> of verifying that what it "knows" has any real meaning at all.
>
> bill

Agreed. Let's have fun with it and use it where it makes sense an poses
no risks.

Re: ChatGPT solved it for me, again...

<tsmnca$3e1n8$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Thu, 16 Feb 2023 21:04:49 -0500
Organization: A noiseless patient Spider
Lines: 105
Message-ID: <tsmnca$3e1n8$2@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 17 Feb 2023 02:04:58 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3606248"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iRmz00CbiwA2VBQz6dKwe7avgM3TYqjQ="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:1fVT9rJt+5FqVRDEfmKYFEDkEVk=
Content-Language: en-US
In-Reply-To: <k570fcF7jcU1@mid.individual.net>
 by: Arne Vajhøj - Fri, 17 Feb 2023 02:04 UTC

On 2/16/2023 10:29 AM, Hans Bachner wrote:
> Arne Vajhøj schrieb am 15.02.2023 um 00:54:
>> On 2/14/2023 5:44 PM, Slo wrote:
>>> I have these two boxes, but was never sure about this, so I asked
>>> ChatGPT for help. I took apart the PWS 500au simply because of
>>> lack of space -- it works perfectly! I don't know what to do
>>> with the parts, but would like to at least reuse the power supply,
>>> hence:
>>>
>>> Me:
>>> Can the power supply from DIGITAL Personal Workstation 500au used in
>>> AlphaStation XP1000
>>>
>>> ChatGPT:
>>> The Digital Personal Workstation 500au and the AlphaStation XP1000
>>> are from
>>> different generations of Digital/Compaq/HP workstations, and they have
>>> different power supply requirements.
>>> The Digital Personal Workstation 500au uses a 200-watt power supply,
>>> while
>>> the AlphaStation XP1000 uses a 700-watt power supply. [...]
>>
>> Did it?
>>
>> https://www.williamstein.org/people/buhler/JPB/tech-specs.pdf
>> says that a 500au got a 300W power supply
>>
>> https://www.manualslib.com/manual/711131/Compaq-Alphastation-Xp1000.html
>> says that XP1000 has a 400W power supply
>>
>> I am not a HW guy but those references saying 300W and 400W
>> look pretty credible.
>>
>> I would love to know where ChatGPT got the 200W and 70)W from.

> The QuickSpecs of the XP1000 (V22 dated 31-Dec-2001, from "HPE Product
> Bulletins") say:
>
>> AlphaStation XP1000 Systems include:

>> 400W power supply             <<<==================

> The SOC (Systems and Options Catalog) for the "Compaq DPW Enhanced
> a-Series & au-Series V4.0  6 January 2000" says:

>> Short tower enclosure with

>> -   300 W power supply             <<<==================

> This is the most "official" data I found.

Yep.

The ChatGPT answer was just wrong.

I cannot provide any artificial intelligence, but
here is something (I intended to post this earlier
in this thread):

$ run ArtificialStupidity
Utility to check power supply compatibility.
Enter name of system #1: 500au
Enter name of system #2: XP1000
500au and XP1000 cannot use the same power supply as they use 200 and
850 watt

$ typ ArtificialStupidity.pas
program artificialstupidity(input,output);

type
pstr = varying [255] of char;

function get_wattage(sys : pstr) : integer;

begin
get_wattage := (trunc(random * 1000000) mod 20) * 50 + 200;
end;

var
sys1, sys2 : pstr;
watt1, watt2 : integer;

begin
seed(clock);
writeln('Utility to check power supply compatibility.');
write('Enter name of system #1: ');
readln(sys1);
write('Enter name of system #2: ');
readln(sys2);
watt1 := get_wattage(sys1);
watt2 := get_wattage(sys2);
if watt1 = watt2 then begin
writeln(sys1, ' and ', sys2, ' can use the same power supply (',
watt1:1, ' watt)');
end else begin
writeln(sys1, ' and ', sys2, ' cannot use the same power supply
as they use ', watt1:1, ' and ', watt2:1, ' watt');
end;
end.

:-)

Arne

Re: ChatGPT solved it for me, again...

<72adc860-ebc7-442a-ae75-d6bff2f9d031n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:6214:3602:b0:56e:a4c0:cf64 with SMTP id nv2-20020a056214360200b0056ea4c0cf64mr87594qvb.3.1676602316212;
Thu, 16 Feb 2023 18:51:56 -0800 (PST)
X-Received: by 2002:ac8:7111:0:b0:3b7:fda5:e05 with SMTP id
z17-20020ac87111000000b003b7fda50e05mr521136qto.9.1676602316065; Thu, 16 Feb
2023 18:51:56 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.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: Thu, 16 Feb 2023 18:51:55 -0800 (PST)
In-Reply-To: <k57gp8Ftd0mU2@mid.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=2601:602:9700:4689:8463:948e:b3db:a2ed;
posting-account=gLDX1AkAAAA26M5HM-O3sVMAXdxK9FPA
NNTP-Posting-Host: 2601:602:9700:4689:8463:948e:b3db:a2ed
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<k53tc4FfvbvU1@mid.individual.net> <f6d17eee-a7ff-423b-aa63-eb6e18ab330an@googlegroups.com>
<tsimmb$2t4ei$2@dont-email.me> <e382cf0c-51cb-4a54-a593-8028c0b63d3an@googlegroups.com>
<k55471Flpf3U1@mid.individual.net> <9848ee11-d152-454c-b847-982d082efee8n@googlegroups.com>
<k57gp8Ftd0mU2@mid.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <72adc860-ebc7-442a-ae75-d6bff2f9d031n@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: gah...@u.washington.edu (gah4)
Injection-Date: Fri, 17 Feb 2023 02:51:56 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2200
 by: gah4 - Fri, 17 Feb 2023 02:51 UTC

On Thursday, February 16, 2023 at 12:08:12 PM UTC-8, bill wrote:

(snip)

> What else would you expect it to do? Contrary to what people want
> to believe machines have no intelligence and no ability to learn.
> They can only store large amounts of data, search it for some term
> and then regurgitate the data they have stored. If enough people
> say the earth is flat that will become the answer. It has no way
> of verifying that what it "knows" has any real meaning at all.
I don't know about learn, but it does have some memory.
You can ask follow-on questions, and it will remember what came before.

I don't know that it uses the memory for other users, but it does
for the one asking the original question.

Re: ChatGPT solved it for me, again...

<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a0c:9a0d:0:b0:56a:65ba:280 with SMTP id p13-20020a0c9a0d000000b0056a65ba0280mr909639qvd.77.1676635131578;
Fri, 17 Feb 2023 03:58:51 -0800 (PST)
X-Received: by 2002:a0c:f191:0:b0:537:75b6:f351 with SMTP id
m17-20020a0cf191000000b0053775b6f351mr909032qvl.63.1676635131117; Fri, 17 Feb
2023 03:58:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.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: Fri, 17 Feb 2023 03:58:50 -0800 (PST)
In-Reply-To: <tsmnca$3e1n8$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:b03:4c80:412f:fa71:8223:3092;
posting-account=8lr06goAAABywL0WFRfF7Hu_shXozcZn
NNTP-Posting-Host: 2a01:e0a:b03:4c80:412f:fa71:8223:3092
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net> <tsmnca$3e1n8$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: slo...@gmail.com (Slo)
Injection-Date: Fri, 17 Feb 2023 11:58:51 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2851
 by: Slo - Fri, 17 Feb 2023 11:58 UTC

Sorry Arne, I don't trust your coding skills and an ancient language :-)
Me: Convert this code to C
============================
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
int get_wattage(char *sys) {
return (rand() % 20) * 50 + 200;
} int main() {
char sys1[256], sys2[256];
int watt1, watt2;
srand(time(NULL));
printf("Utility to check power supply compatibility.\n");
printf("Enter name of system #1: ");
fgets(sys1, 256, stdin);
printf("Enter name of system #2: ");
fgets(sys2, 256, stdin);
sys1[strcspn(sys1, "\n")] = '\0';
sys2[strcspn(sys2, "\n")] = '\0';
watt1 = get_wattage(sys1);
watt2 = get_wattage(sys2);
if (watt1 == watt2) {
printf("%s and %s can use the same power supply (%d watt)\n", sys1, sys2, watt1);
} else {
printf("%s and %s cannot use the same power supply as they use %d and %d watt\n", sys1, sys2, watt1, watt2);
}
return 0;
} ============================
I did not test it. It also gave these comments:

Note that the pstr type from the original Pascal code has been replaced with C-style strings
(null-terminated arrays of characters), and the random function has been replaced with the
rand function from the C standard library. The clock function from the original Pascal code
has been replaced with the time function from the C standard library to seed the random
number generator. The trunc function from Pascal has not been used in the C code, as C
automatically truncates floating-point values when they are cast to integers.

Re: ChatGPT solved it for me, again...

<tsnuug$3koj1$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 13:20:16 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <tsnuug$3koj1$1@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com> <tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net> <tsmnca$3e1n8$2@dont-email.me> <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
Injection-Date: Fri, 17 Feb 2023 13:20:16 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="d4f1fe7df632104357f52e8adc4a0221";
logging-data="3826273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bl32pVQuOs8Oc/CMNQ+8Rukzm+PnTOZs="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:5jBmmMICr7eL4JytcB5t1DPtfbk=
 by: Simon Clubley - Fri, 17 Feb 2023 13:20 UTC

On 2023-02-17, Slo <slovuj@gmail.com> wrote:
> Sorry Arne, I don't trust your coding skills and an ancient language :-)

That ancient language is more secure than C. :-)

> Me: Convert this code to C
>============================
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <time.h>
> int get_wattage(char *sys) {
> return (rand() % 20) * 50 + 200;
> }
> int main() {
> char sys1[256], sys2[256];
> int watt1, watt2;
> srand(time(NULL));
> printf("Utility to check power supply compatibility.\n");
> printf("Enter name of system #1: ");
> fgets(sys1, 256, stdin);
> printf("Enter name of system #2: ");
> fgets(sys2, 256, stdin);
> sys1[strcspn(sys1, "\n")] = '\0';
> sys2[strcspn(sys2, "\n")] = '\0';

OUCH! OUCH! OUCH!!!!!

fgets() is not guaranteed to return a newline character.

Here's an online man page that confirms this:

https://linux.die.net/man/3/fgets

I hope people using this technology with "real" code understand and
recognise this kind of thing...

> watt1 = get_wattage(sys1);
> watt2 = get_wattage(sys2);
> if (watt1 == watt2) {
> printf("%s and %s can use the same power supply (%d watt)\n", sys1, sys2, watt1);
> } else {
> printf("%s and %s cannot use the same power supply as they use %d and %d watt\n", sys1, sys2, watt1, watt2);
> }
> return 0;
> }
>============================
> I did not test it. It also gave these comments:
>
> Note that the pstr type from the original Pascal code has been replaced with C-style strings
> (null-terminated arrays of characters), and the random function has been replaced with the
> rand function from the C standard library. The clock function from the original Pascal code
> has been replaced with the time function from the C standard library to seed the random
> number generator. The trunc function from Pascal has not been used in the C code, as C
> automatically truncates floating-point values when they are cast to integers.

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

Re: ChatGPT solved it for me, again...

<tsnv7h$3kqmj$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 08:24:57 -0500
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <tsnv7h$3kqmj$1@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me>
<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 17 Feb 2023 13:25:05 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3828435"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XjXF3xAyWPyThL4nwfJNbk6gFbPtc6TA="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:7M2fVZfGPlUTtE7zIof9TvLWcxs=
Content-Language: en-US
In-Reply-To: <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
 by: Arne Vajhøj - Fri, 17 Feb 2023 13:24 UTC

On 2/17/2023 6:58 AM, Slo wrote:
> Sorry Arne, I don't trust your coding skills and an ancient language :-)

Pascal is from 1970 and C is from 1972. Big difference?

> Me: Convert this code to C
> ============================
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <time.h>
> int get_wattage(char *sys) {
> return (rand() % 20) * 50 + 200;
> }
> int main() {
> char sys1[256], sys2[256];
> int watt1, watt2;
> srand(time(NULL));
> printf("Utility to check power supply compatibility.\n");
> printf("Enter name of system #1: ");
> fgets(sys1, 256, stdin);
> printf("Enter name of system #2: ");
> fgets(sys2, 256, stdin);
> sys1[strcspn(sys1, "\n")] = '\0';
> sys2[strcspn(sys2, "\n")] = '\0';
> watt1 = get_wattage(sys1);
> watt2 = get_wattage(sys2);
> if (watt1 == watt2) {
> printf("%s and %s can use the same power supply (%d watt)\n", sys1, sys2, watt1);
> } else {
> printf("%s and %s cannot use the same power supply as they use %d and %d watt\n", sys1, sys2, watt1, watt2);
> }
> return 0;
> }
> ============================
> I did not test it.

It seems to work.

The code is not bad.

There are a few things I would do different. I would
never use strcspn for this. But somebody else may have
a different opinion on that topic.

> It also gave these comments:
>
> Note that the pstr type from the original Pascal code has been replaced with C-style strings
> (null-terminated arrays of characters), and the random function has been replaced with the
> rand function from the C standard library. The clock function from the original Pascal code
> has been replaced with the time function from the C standard library to seed the random
> number generator.

All correct.

> The trunc function from Pascal has not been used in the C code, as C
> automatically truncates floating-point values when they are cast to integers.

The explanation is BS. The difference is that C rand return an integer
while VMS Pascal Random returns a floating point.

Arne

Re: ChatGPT solved it for me, again...

<tsnvbu$3kqmj$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 08:27:17 -0500
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <tsnvbu$3kqmj$2@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me>
<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 17 Feb 2023 13:27:26 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3828435"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XFFmla/RdVVnt8GyyArc9TYKlksxYtTc="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:+EClNqnKOsoC8odY2PAsrnFefXE=
In-Reply-To: <tsnuug$3koj1$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Fri, 17 Feb 2023 13:27 UTC

On 2/17/2023 8:20 AM, Simon Clubley wrote:
> On 2023-02-17, Slo <slovuj@gmail.com> wrote:
>> Sorry Arne, I don't trust your coding skills and an ancient language :-)
>
> That ancient language is more secure than C. :-)
>
>> Me: Convert this code to C
>> ============================
>> #include <stdio.h>
>> #include <stdlib.h>
>> #include <string.h>
>> #include <time.h>
>> int get_wattage(char *sys) {
>> return (rand() % 20) * 50 + 200;
>> }
>> int main() {
>> char sys1[256], sys2[256];
>> int watt1, watt2;
>> srand(time(NULL));
>> printf("Utility to check power supply compatibility.\n");
>> printf("Enter name of system #1: ");
>> fgets(sys1, 256, stdin);
>> printf("Enter name of system #2: ");
>> fgets(sys2, 256, stdin);
>> sys1[strcspn(sys1, "\n")] = '\0';
>> sys2[strcspn(sys2, "\n")] = '\0';
>
> OUCH! OUCH! OUCH!!!!!
>
> fgets() is not guaranteed to return a newline character.

And?

Arne

Re: ChatGPT solved it for me, again...

<tso11b$3l0kq$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 13:55:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <tso11b$3l0kq$1@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com> <tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net> <tsmnca$3e1n8$2@dont-email.me> <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com> <tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 17 Feb 2023 13:55:55 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="d4f1fe7df632104357f52e8adc4a0221";
logging-data="3834522"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18V0yRyih2AOXccGSn2AjngYKD55VDcvr8="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:nS4ac2r4wkuI3tq4x1KYY+FWZa0=
 by: Simon Clubley - Fri, 17 Feb 2023 13:55 UTC

On 2023-02-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
> On 2/17/2023 8:20 AM, Simon Clubley wrote:
>> On 2023-02-17, Slo <slovuj@gmail.com> wrote:
>>> Sorry Arne, I don't trust your coding skills and an ancient language :-)
>>
>> That ancient language is more secure than C. :-)
>>
>>> Me: Convert this code to C
>>> ============================
>>> #include <stdio.h>
>>> #include <stdlib.h>
>>> #include <string.h>
>>> #include <time.h>
>>> int get_wattage(char *sys) {
>>> return (rand() % 20) * 50 + 200;
>>> }
>>> int main() {
>>> char sys1[256], sys2[256];
>>> int watt1, watt2;
>>> srand(time(NULL));
>>> printf("Utility to check power supply compatibility.\n");
>>> printf("Enter name of system #1: ");
>>> fgets(sys1, 256, stdin);
>>> printf("Enter name of system #2: ");
>>> fgets(sys2, 256, stdin);
>>> sys1[strcspn(sys1, "\n")] = '\0';
>>> sys2[strcspn(sys2, "\n")] = '\0';
>>
>> OUCH! OUCH! OUCH!!!!!
>>
>> fgets() is not guaranteed to return a newline character.
>
> And?
>

Take a closer look Arne.

That code will continue searching memory for a byte with the value of
a newline character and will then modify the first such byte it finds.

In other words, an out of bounds write vulnerability that may be
exploitable in some circumstances when the code is part of a larger
program.

Even worse, the generated code _appears_ to work ok for normal inputs.

Simon.

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

Re: ChatGPT solved it for me, again...

<tso1mo$3kqmi$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 09:07:12 -0500
Organization: A noiseless patient Spider
Lines: 60
Message-ID: <tso1mo$3kqmi$1@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me>
<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
<tso11b$3l0kq$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 17 Feb 2023 14:07:20 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3828434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mkyWiMqy5f+JhPJjVl70Hfd+sEvIBgoM="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:XfJYaKCLEP7ExSkU0HJoFUrDep8=
Content-Language: en-US
In-Reply-To: <tso11b$3l0kq$1@dont-email.me>
 by: Arne Vajhøj - Fri, 17 Feb 2023 14:07 UTC

On 2/17/2023 8:55 AM, Simon Clubley wrote:
> On 2023-02-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 2/17/2023 8:20 AM, Simon Clubley wrote:
>>> On 2023-02-17, Slo <slovuj@gmail.com> wrote:
>>>> Sorry Arne, I don't trust your coding skills and an ancient language :-)
>>>
>>> That ancient language is more secure than C. :-)
>>>
>>>> Me: Convert this code to C
>>>> ============================
>>>> #include <stdio.h>
>>>> #include <stdlib.h>
>>>> #include <string.h>
>>>> #include <time.h>
>>>> int get_wattage(char *sys) {
>>>> return (rand() % 20) * 50 + 200;
>>>> }
>>>> int main() {
>>>> char sys1[256], sys2[256];
>>>> int watt1, watt2;
>>>> srand(time(NULL));
>>>> printf("Utility to check power supply compatibility.\n");
>>>> printf("Enter name of system #1: ");
>>>> fgets(sys1, 256, stdin);
>>>> printf("Enter name of system #2: ");
>>>> fgets(sys2, 256, stdin);
>>>> sys1[strcspn(sys1, "\n")] = '\0';
>>>> sys2[strcspn(sys2, "\n")] = '\0';
>>>
>>> OUCH! OUCH! OUCH!!!!!
>>>
>>> fgets() is not guaranteed to return a newline character.
>>
>> And?
>
> Take a closer look Arne.
>
> That code will continue searching memory for a byte with the value of
> a newline character and will then modify the first such byte it finds.

????

fgets may not return a newline but it will return a terminating
null byte.

strcspn will stop when it reach the terminating null byte.

I do not see the problem.

> In other words, an out of bounds write vulnerability that may be
> exploitable in some circumstances when the code is part of a larger
> program.
>
> Even worse, the generated code _appears_ to work ok for normal inputs.

Well - I don't see it.

Arne

Re: ChatGPT solved it for me, again...

<tso27i$3l597$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 14:16:18 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <tso27i$3l597$1@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com> <tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net> <tsmnca$3e1n8$2@dont-email.me> <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com> <tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me> <tso11b$3l0kq$1@dont-email.me> <tso1mo$3kqmi$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 17 Feb 2023 14:16:18 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="d4f1fe7df632104357f52e8adc4a0221";
logging-data="3839271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TmsubMvmFgiOkui5R7spUcTw3dUcYLlE="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:Q0KchqeiYEfZyX1t2CNJsgxd6iY=
 by: Simon Clubley - Fri, 17 Feb 2023 14:16 UTC

On 2023-02-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
>
> strcspn will stop when it reach the terminating null byte.
>

Are you sure about that ?

https://linux.die.net/man/3/strcspn

There's no mention of stopping at a null and no mention of what the
return value is when the byte is not found within the string if it
were to stop at a terminating null.

Simon.

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

Re: ChatGPT solved it for me, again...

<tso2jt$3kqmi$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 09:22:45 -0500
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <tso2jt$3kqmi$2@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me>
<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
<tso11b$3l0kq$1@dont-email.me> <tso1mo$3kqmi$1@dont-email.me>
<tso27i$3l597$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 17 Feb 2023 14:22:53 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3828434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Ypc6XG/3q5PxvDY+f9ix8hN1X3om6wNQ="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:j1XsiceDj0rQPNjEOPik28KmVoc=
In-Reply-To: <tso27i$3l597$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Fri, 17 Feb 2023 14:22 UTC

On 2/17/2023 9:16 AM, Simon Clubley wrote:
> On 2023-02-17, Arne Vajhøj <arne@vajhoej.dk> wrote:
>>
>> strcspn will stop when it reach the terminating null byte.
>
> Are you sure about that ?

Yes.

> https://linux.die.net/man/3/strcspn
>
> There's no mention of stopping at a null and no mention of what the
> return value is when the byte is not found within the string if it
> were to stop at a terminating null.

"The strcspn() function returns the number of bytes in the initial
segment of s which are not in the string reject."

strcspn("abc\n", "\n") will return 3.

strcspn("abc", "\n") will also return 3.

That is what it says.

Arne

Re: ChatGPT solved it for me, again...

<fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a0c:f253:0:b0:56e:a32a:cf0b with SMTP id z19-20020a0cf253000000b0056ea32acf0bmr1078641qvl.76.1676645130727;
Fri, 17 Feb 2023 06:45:30 -0800 (PST)
X-Received: by 2002:a05:6214:1849:b0:56c:1865:feb with SMTP id
d9-20020a056214184900b0056c18650febmr198459qvy.3.1676645130367; Fri, 17 Feb
2023 06:45:30 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 17 Feb 2023 06:45:29 -0800 (PST)
In-Reply-To: <tso2jt$3kqmi$2@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:b03:4c80:412f:fa71:8223:3092;
posting-account=8lr06goAAABywL0WFRfF7Hu_shXozcZn
NNTP-Posting-Host: 2a01:e0a:b03:4c80:412f:fa71:8223:3092
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me> <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
<tso11b$3l0kq$1@dont-email.me> <tso1mo$3kqmi$1@dont-email.me>
<tso27i$3l597$1@dont-email.me> <tso2jt$3kqmi$2@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: slo...@gmail.com (Slo)
Injection-Date: Fri, 17 Feb 2023 14:45:30 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3102
 by: Slo - Fri, 17 Feb 2023 14:45 UTC

Me: But fgets() is not guaranteed to return a newline character. Can you improve the code?
==========================
You're correct that fgets() may not return the newline character if the
input buffer is filled before encountering a newline. Here's an updated
version of the code that handles this case:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

int get_wattage(char *sys) {
return (rand() % 20) * 50 + 200;
}

int main() {
srand(time(NULL));
char sys1[256], sys2[256];
int watt1, watt2;

printf("Utility to check power supply compatibility.\n");
printf("Enter name of system #1: ");
if (fgets(sys1, 256, stdin) == NULL) {
perror("fgets failed");
exit(1);
}
sys1[strcspn(sys1, "\n")] = '\0';
if (sys1[0] == '\0') {
fprintf(stderr, "Invalid input: system name cannot be empty\n");
exit(1);
}
printf("Enter name of system #2: ");
if (fgets(sys2, 256, stdin) == NULL) {
perror("fgets failed");
exit(1);
}
sys2[strcspn(sys2, "\n")] = '\0';
if (sys2[0] == '\0') {
fprintf(stderr, "Invalid input: system name cannot be empty\n");
exit(1);
}
watt1 = get_wattage(sys1);
watt2 = get_wattage(sys2);

if (watt1 == watt2) {
printf("%s and %s can use the same power supply (%d watt)\n", sys1, sys2, watt1);
} else {
printf("%s and %s cannot use the same power supply as they use %d and %d watt\n", sys1, sys2, watt1, watt2);
}
return 0;
} ==========================

Re: ChatGPT solved it for me, again...

<357828a1-0ad4-418e-92ea-7d1b5c250914n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a37:892:0:b0:71f:b89c:69b7 with SMTP id 140-20020a370892000000b0071fb89c69b7mr90065qki.7.1676645680813;
Fri, 17 Feb 2023 06:54:40 -0800 (PST)
X-Received: by 2002:ac8:4095:0:b0:3bd:119d:d60d with SMTP id
p21-20020ac84095000000b003bd119dd60dmr437144qtl.5.1676645680408; Fri, 17 Feb
2023 06:54:40 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Fri, 17 Feb 2023 06:54:40 -0800 (PST)
In-Reply-To: <fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:b03:4c80:412f:fa71:8223:3092;
posting-account=8lr06goAAABywL0WFRfF7Hu_shXozcZn
NNTP-Posting-Host: 2a01:e0a:b03:4c80:412f:fa71:8223:3092
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me> <a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
<tso11b$3l0kq$1@dont-email.me> <tso1mo$3kqmi$1@dont-email.me>
<tso27i$3l597$1@dont-email.me> <tso2jt$3kqmi$2@dont-email.me> <fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <357828a1-0ad4-418e-92ea-7d1b5c250914n@googlegroups.com>
Subject: Re: ChatGPT solved it for me, again...
From: slo...@gmail.com (Slo)
Injection-Date: Fri, 17 Feb 2023 14:54:40 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3076
 by: Slo - Fri, 17 Feb 2023 14:54 UTC

Let's see how well it survives the round trip:
Me: Convert this C code to Pascal
==================================
Here's the Pascal equivalent of the provided C code:
program power_supply_compatibility;
uses sysutils;
var
sys1, sys2: string;
watt1, watt2: integer;
function get_wattage(sys: string): integer;
begin
Randomize;
get_wattage := (Random(32767) mod 20) * 50 + 200;
end;
begin
WriteLn('Utility to check power supply compatibility.');
Write('Enter name of system #1: ');
ReadLn(sys1);
Write('Enter name of system #2: ');
ReadLn(sys2);
watt1 := get_wattage(sys1);
watt2 := get_wattage(sys2);
if watt1 = watt2 then
WriteLn(sys1, ' and ', sys2, ' can use the same power supply (', watt1, ' watt)')
else
WriteLn(sys1, ' and ', sys2, ' cannot use the same power supply as they use ', watt1, ' and ', watt2, ' watt');
end.

Notes:
The main differences between the C code and the Pascal code are:
In Pascal, the uses keyword is used to import the sysutils unit, which includes the Randomize function.
In Pascal, the Randomize function is used to initialize the random number generator.
In Pascal, the ReadLn function is used to read input from the user.
In Pascal, the WriteLn procedure is used to output text to the user.
In Pascal, the mod operator is used to compute the remainder of a division.
==================================

Re: ChatGPT solved it for me, again...

<tso4hb$3kqmi$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 09:55:32 -0500
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <tso4hb$3kqmi$3@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me>
<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
<tso11b$3l0kq$1@dont-email.me> <tso1mo$3kqmi$1@dont-email.me>
<tso27i$3l597$1@dont-email.me> <tso2jt$3kqmi$2@dont-email.me>
<fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 17 Feb 2023 14:55:40 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3828434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1930+T8rGVAXsaUkNw97gjhqgvAdYGMLYY="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:5qXVs5ozqaxnDV8PtuV7A03qwUQ=
Content-Language: en-US
In-Reply-To: <fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>
 by: Arne Vajhøj - Fri, 17 Feb 2023 14:55 UTC

On 2/17/2023 9:45 AM, Slo wrote:
> Me: But fgets() is not guaranteed to return a newline character. Can you improve the code?
> ==========================
> You're correct that fgets() may not return the newline character if the
> input buffer is filled before encountering a newline. Here's an updated
> version of the code that handles this case:

The code did not have a problem with missing newline.

The code did not handle errors or empty input.

> if (fgets(sys1, 256, stdin) == NULL) {
> perror("fgets failed");
> exit(1);
> }

> if (sys1[0] == '\0') {
> fprintf(stderr, "Invalid input: system name cannot be empty\n");
> exit(1);
> }

> if (fgets(sys2, 256, stdin) == NULL) {
> perror("fgets failed");
> exit(1);
> }

> if (sys2[0] == '\0') {
> fprintf(stderr, "Invalid input: system name cannot be empty\n");
> exit(1);
> }

But neither did the Pascal code.

Arne

Re: ChatGPT solved it for me, again...

<tso4qu$3kqmi$4@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: ChatGPT solved it for me, again...
Date: Fri, 17 Feb 2023 10:00:38 -0500
Organization: A noiseless patient Spider
Lines: 46
Message-ID: <tso4qu$3kqmi$4@dont-email.me>
References: <66d83417-1175-4bc0-a049-3df36e14fb5dn@googlegroups.com>
<tsh6vi$2lhib$1@dont-email.me> <k570fcF7jcU1@mid.individual.net>
<tsmnca$3e1n8$2@dont-email.me>
<a7db0d71-3fe6-4661-8688-3f8c184f0ae9n@googlegroups.com>
<tsnuug$3koj1$1@dont-email.me> <tsnvbu$3kqmj$2@dont-email.me>
<tso11b$3l0kq$1@dont-email.me> <tso1mo$3kqmi$1@dont-email.me>
<tso27i$3l597$1@dont-email.me> <tso2jt$3kqmi$2@dont-email.me>
<fe033036-3d0a-4c62-ab5d-186117533c0an@googlegroups.com>
<357828a1-0ad4-418e-92ea-7d1b5c250914n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 17 Feb 2023 15:00:46 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23993ab34d3e3c919cf74fffb0ff97ee";
logging-data="3828434"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199zDjQaeGLnVQVUZqMFW90TyNWdbBba4o="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.7.2
Cancel-Lock: sha1:pPAaYlLBsOFg166YYID9pROzKFw=
In-Reply-To: <357828a1-0ad4-418e-92ea-7d1b5c250914n@googlegroups.com>
Content-Language: en-US
 by: Arne Vajhøj - Fri, 17 Feb 2023 15:00 UTC

On 2/17/2023 9:54 AM, Slo wrote:
> Let's see how well it survives the round trip:
> Me: Convert this C code to Pascal
> ==================================
> Here's the Pascal equivalent of the provided C code:
> program power_supply_compatibility;
> uses sysutils;
> var
> sys1, sys2: string;
> watt1, watt2: integer;
> function get_wattage(sys: string): integer;
> begin
> Randomize;
> get_wattage := (Random(32767) mod 20) * 50 + 200;
> end;
> begin
> WriteLn('Utility to check power supply compatibility.');
> Write('Enter name of system #1: ');
> ReadLn(sys1);
> Write('Enter name of system #2: ');
> ReadLn(sys2);
> watt1 := get_wattage(sys1);
> watt2 := get_wattage(sys2);
> if watt1 = watt2 then
> WriteLn(sys1, ' and ', sys2, ' can use the same power supply (', watt1, ' watt)')
> else
> WriteLn(sys1, ' and ', sys2, ' cannot use the same power supply as they use ', watt1, ' and ', watt2, ' watt');
> end.
>
> Notes:
> The main differences between the C code and the Pascal code are:
> In Pascal, the uses keyword is used to import the sysutils unit, which includes the Randomize function.
> In Pascal, the Randomize function is used to initialize the random number generator.
> In Pascal, the ReadLn function is used to read input from the user.
> In Pascal, the WriteLn procedure is used to output text to the user.
> In Pascal, the mod operator is used to compute the remainder of a division.
> ==================================

The builds with Delphi and FPC (but not with VMS Pascal).

But it managed to sneak in a logical bug.

Randomize should be called once and not in get_wattage.

Arne

Pages:123
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor