Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"Marriage is low down, but you spend the rest of your life paying for it." -- Baskins


computers / comp.sys.mac.apps / OT - ChatGPT is better than I thought.

SubjectAuthor
* OT - ChatGPT is better than I thought.Alan Browne
`* Re: OT - ChatGPT is better than I thought.moi
 `* Re: OT - ChatGPT is better than I thought.Alan Browne
  `- Re: OT - ChatGPT is better than I thought.Martha Simons

1
OT - ChatGPT is better than I thought.

<xpXWM.57473$tnmf.24953@fx09.iad>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1074&group=comp.sys.mac.apps#1074

  copy link   Newsgroups: comp.sys.mac.apps comp.sys.mac.system
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Newsgroups: comp.sys.mac.apps,comp.sys.mac.system
Content-Language: en-US
From: bitbuc...@blackhole.com (Alan Browne)
Subject: OT - ChatGPT is better than I thought.
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 58
Message-ID: <xpXWM.57473$tnmf.24953@fx09.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Sun, 15 Oct 2023 19:51:57 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Sun, 15 Oct 2023 15:51:57 -0400
X-Received-Bytes: 2366
 by: Alan Browne - Sun, 15 Oct 2023 19:51 UTC

Preamble: I suck at C and I'm proficient in Pascal.

While debugging a piece of C I got into a serious case of pointer mangling.

So, I asked ChatGPT to prepare a table comparing the two.

"please prepare a table comparing pointer data types and pointer
operands between FreePascal and C. Use FreePascal as the starting
point."

Resulted in a nicely prepared table and I quickly debugged my program
(for slow values of quickly).

But that's not it...

Then, on a whim: I asked: "
prepare a comparison of pascal record to C struc where the pascal record
has elements: a, b: word; c:array [1..10] of real; and next which is a
pointer to the record type.

And it did. And it made an error. So I said to it:
"I believe you need to first have a pointer to the MyRecord such as:
MyRecordPtr = ^MyRecord before the record and next should be of type
MyRecordPtr."

ChatGPT replied:
"You are absolutely correct, and I apologize for the oversight. In both
Pascal and C, when you have a pointer to a record or struct within the
same type definition, you should declare a type for that pointer first.
Here's the corrected comparison:"

and put out the correct form (which is - for the case requested):

type
MyRecordPtr = ^MyRecord; // Declare a pointer type
MyRecord = record
a, b: Word;
c: array[1..10] of Real;
next: MyRecordPtr; // Use the pointer type
end;

and for C:

struct MyStruct {
unsigned short a;
unsigned short b;
float c[10];
struct MyStruct* next;
};

(Nasty C letting programmers declare new types and vars on the fly ...
sigh).

--
“Markets can remain irrational longer than your can remain solvent.”
- John Maynard Keynes.

Re: OT - ChatGPT is better than I thought.

<kp3g1tFdt2dU1@mid.individual.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1075&group=comp.sys.mac.apps#1075

  copy link   Newsgroups: comp.sys.mac.apps comp.sys.mac.system
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: findlayb...@blueyonder.co.uk (moi)
Newsgroups: comp.sys.mac.apps,comp.sys.mac.system
Subject: Re: OT - ChatGPT is better than I thought.
Date: Mon, 16 Oct 2023 01:56:29 +0100
Lines: 62
Message-ID: <kp3g1tFdt2dU1@mid.individual.net>
References: <xpXWM.57473$tnmf.24953@fx09.iad>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net c3KGXAU0iiqkZuJJC1HC3g+qexh0mrX22Mqcxkdj34a/uGLGMw
Cancel-Lock: sha1:dJ2R08VJG1CRCRoBQ/bk14vBRT4= sha256:bzyIKWviRuyx9YKX5zX8mV+mCITcrmGDfZZhY1yzOpE=
User-Agent: Mozilla Thunderbird
Content-Language: en-GB
In-Reply-To: <xpXWM.57473$tnmf.24953@fx09.iad>
 by: moi - Mon, 16 Oct 2023 00:56 UTC

On 15/10/2023 20:51, Alan Browne wrote:
>
> Preamble: I suck at C and I'm proficient in Pascal.
>
> While debugging a piece of C I got into a serious case of pointer mangling.
>
> So, I asked ChatGPT to prepare a table comparing the two.
>
>    "please prepare a table comparing pointer data types and pointer
>     operands between FreePascal and C.  Use FreePascal as the starting
>     point."
>
> Resulted in a nicely prepared table and I quickly debugged my program
> (for slow values of quickly).
>
> But that's not it...
>
> Then, on a whim: I asked: "
> prepare a comparison of pascal record to C struc where the pascal record
> has elements:   a, b: word; c:array [1..10] of real; and next which is a
> pointer to the record type.
>
> And it did.  And it made an error.  So I said to it:
> "I believe you need to first have a pointer to the MyRecord such as:
> MyRecordPtr = ^MyRecord before the record and next should be of type
> MyRecordPtr."
>
> ChatGPT replied:
> "You are absolutely correct, and I apologize for the oversight. In both
> Pascal and C, when you have a pointer to a record or struct within the
> same type definition, you should declare a type for that pointer first.
> Here's the corrected comparison:"
>
> and put out the correct form (which is - for the case requested):
>
> type
>   MyRecordPtr = ^MyRecord;  // Declare a pointer type
>   MyRecord = record
>     a, b: Word;
>     c: array[1..10] of Real;
>     next: MyRecordPtr;  // Use the pointer type
>   end;
>
> and for C:
>
> struct MyStruct {
>   unsigned short a;
>   unsigned short b;
>   float c[10];
>   struct MyStruct* next;
> };
>
> (Nasty C letting programmers declare new types and vars on the fly ...
> sigh).
>
>
Hmmm.
Those declarations do not represent the same types.
[1..10] is not the same as [10].
--
Bill F.

Re: OT - ChatGPT is better than I thought.

<%vaXM.40149$0UVe.30433@fx17.iad>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1076&group=comp.sys.mac.apps#1076

  copy link   Newsgroups: comp.sys.mac.apps comp.sys.mac.system
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!fx17.iad.POSTED!not-for-mail
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: OT - ChatGPT is better than I thought.
Content-Language: en-US
Newsgroups: comp.sys.mac.apps,comp.sys.mac.system
References: <xpXWM.57473$tnmf.24953@fx09.iad>
<kp3g1tFdt2dU1@mid.individual.net>
From: bitbuc...@blackhole.com (Alan Browne)
In-Reply-To: <kp3g1tFdt2dU1@mid.individual.net>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Lines: 40
Message-ID: <%vaXM.40149$0UVe.30433@fx17.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 16 Oct 2023 13:02:51 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 16 Oct 2023 09:02:51 -0400
X-Received-Bytes: 1838
 by: Alan Browne - Mon, 16 Oct 2023 13:02 UTC

On 2023-10-15 20:56, moi wrote:
> On 15/10/2023 20:51, Alan Browne wrote:

>> and put out the correct form (which is - for the case requested):
>>
>> type
>>    MyRecordPtr = ^MyRecord;  // Declare a pointer type
>>    MyRecord = record
>>      a, b: Word;
>>      c: array[1..10] of Real;
>>      next: MyRecordPtr;  // Use the pointer type
>>    end;
>>
>> and for C:
>>
>> struct MyStruct {
>>    unsigned short a;
>>    unsigned short b;
>>    float c[10];
>>    struct MyStruct* next;
>> };
>>
>> (Nasty C letting programmers declare new types and vars on the fly ...
>> sigh).
>>
>>
> Hmmm.
> Those declarations do not represent the same types.

For Pascal "Real" is platform dependent and can be 32 or 64 bits.

> [1..10] is not the same as [10].

In C it would be 0 based, but in both you get a 10 element array of real
numbers.

--
“Markets can remain irrational longer than your can remain solvent.”
- John Maynard Keynes.

Re: OT - ChatGPT is better than I thought.

<3b9c1a8a-68fd-46d3-8ba3-b1e446546c83n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=1113&group=comp.sys.mac.apps#1113

  copy link   Newsgroups: comp.sys.mac.apps
X-Received: by 2002:a05:6214:5289:b0:67a:a83d:d323 with SMTP id kj9-20020a056214528900b0067aa83dd323mr85941qvb.0.1701942029203;
Thu, 07 Dec 2023 01:40:29 -0800 (PST)
X-Received: by 2002:a05:6870:e30a:b0:1fb:34e6:cebf with SMTP id
z10-20020a056870e30a00b001fb34e6cebfmr2805450oad.0.1701942028920; Thu, 07 Dec
2023 01:40:28 -0800 (PST)
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.sys.mac.apps
Date: Thu, 7 Dec 2023 01:40:28 -0800 (PST)
In-Reply-To: <%vaXM.40149$0UVe.30433@fx17.iad>
Injection-Info: google-groups.googlegroups.com; posting-host=45.248.78.242; posting-account=PaJhrAoAAADjpjDn8DfY8y-4Eya4vC-J
NNTP-Posting-Host: 45.248.78.242
References: <xpXWM.57473$tnmf.24953@fx09.iad> <kp3g1tFdt2dU1@mid.individual.net>
<%vaXM.40149$0UVe.30433@fx17.iad>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <3b9c1a8a-68fd-46d3-8ba3-b1e446546c83n@googlegroups.com>
Subject: Re: OT - ChatGPT is better than I thought.
From: marthasi...@gmail.com (Martha Simons)
Injection-Date: Thu, 07 Dec 2023 09:40:29 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2880
 by: Martha Simons - Thu, 7 Dec 2023 09:40 UTC

On Monday, October 16, 2023 at 4:02:56 PM UTC+3, Alan Browne wrote:
> On 2023-10-15 20:56, moi wrote:
> > On 15/10/2023 20:51, Alan Browne wrote:
>
> >> and put out the correct form (which is - for the case requested):
> >>
> >> type
> >> MyRecordPtr = ^MyRecord; // Declare a pointer type
> >> MyRecord = record
> >> a, b: Word;
> >> c: array[1..10] of Real;
> >> next: MyRecordPtr; // Use the pointer type
> >> end;
> >>
> >> and for C:
> >>
> >> struct MyStruct {
> >> unsigned short a;
> >> unsigned short b;
> >> float c[10];
> >> struct MyStruct* next;
> >> };
> >>
> >> (Nasty C letting programmers declare new types and vars on the fly ...
> >> sigh).
> >>
> >>
> > Hmmm.
> > Those declarations do not represent the same types.
> For Pascal "Real" is platform dependent and can be 32 or 64 bits.
> > [1..10] is not the same as [10].
> In C it would be 0 based, but in both you get a 10 element array of real
> numbers.
> --
> “Markets can remain irrational longer than your can remain solvent.”
> - John Maynard Keynes.

https://chat.openai.com/g/g-2IqDEDp7c-essay-typer
https://chat.openai.com/g/g-6sIiosQhh-write-my-essay-bot
https://chat.openai.com/g/g-ldMROHWp6-gpt-paraphrasing-tool
https://chat.openai.com/g/g-2IqDEDp7c-essay-typer
https://chat.openai.com/g/g-wznfN7mwL-chatgpt-essay-writer
https://chat.openai.com/g/g-BKo6liIEe-ai-essay-writer-by-eduwriter-ai

https://www.bulbapp.com/u/ai-essay-writer
https://www.bulbapp.com/u/essay-typer

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor