Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Polymer physicists are into chains.


devel / comp.lang.c / Re: “ChattyG takes a college freshman C/C++ programming exam”

SubjectAuthor
* “ChattyG takes a college freshman C/C++ programmiLynn McGuire
+- Re: “ChattyG takes a college freshman C/C++ proChris M. Thomasson
+* Re: “ChattyG takes a college freshman C/C++ proChristian Gollwitzer
|`- Re: “ChattyG takes a college freshman C/C++ proChris M. Thomasson
+* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|`* Re: “ChattyG takes a college freshman C/C++ progrjak
| `* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|  +- Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|  +* Re: “ChattyG takes a college freshman C/C++ procandycanearter07
|  |+* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|  ||`* Re: “ChattyG takes a college freshman C/C++ progrPavel
|  || +- Re: “ChattyG takes a college freshman C/C++ proRichard Damon
|  || `* Re: “ChattyG takes a college freshman C/C++ proJames Kuyper
|  ||  `* Re: “ChattyG takes a college freshman C/C++ progrPavel
|  ||   +- Re: “ChattyG takes a college freshman C/C++ proRichard Damon
|  ||   `* Re: “ChattyG takes a college freshman C/C++ proJames Kuyper
|  ||    `* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|  ||     `- Re: “ChattyG takes a college freshman C/C++ proJames Kuyper
|  |`* Re: “ChattyG takes a college freshman C/C++ proChris M. Thomasson
|  | +- Re: “ChattyG takes a college freshman C/C++ proRichard Damon
|  | `* Re: “ChattyG takes a college freshman C/C++ proMarioCCCP
|  |  `- Re: “ChattyG takes a college freshman C/C++Keith Thompson
|  +- Re: “ChattyG takes a college freshman C/C++Tim Rentsch
|  +* Re: “ChattyG takes a college freshman C/C++Ben Bacarisse
|  |`* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|  | `- Re: “ChattyG takes a college freshman C/C++Ben Bacarisse
|  `* Re: “ChattyG takes a college freshman C/C++Blue-Maned_Hawk
|   +* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|   |`* Re: “ChattyG takes a college freshman C/C++Blue-Maned_Hawk
|   | `* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|   |  +* Re: “ChattyG takes a college freshman C/C++ programming exam”Scott Lurndal
|   |  |`* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|   |  | +- Re: “ChattyG takes a college freshman C/C++ programming exam”Scott Lurndal
|   |  | `- Re: “ChattyG takes a college freshman C/C++ programming exam”Scott Lurndal
|   |  `* Re: “ChattyG takes a college freshman C/C++Ben Bacarisse
|   |   `* Re: “ChattyG takes a college freshman C/C++Tim Rentsch
|   |    `* Re: “ChattyG takes a college freshman C/C++Ben Bacarisse
|   |     +* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|   |     |+- Re: “ChattyG takes a college freshman C/C++ proDavid Brown
|   |     |`* Re: “ChattyG takes a college freshman C/C++Phil Carmody
|   |     | +- Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|   |     | `- Re: “ChattyG takes a college freshman C/C++Tim Rentsch
|   |     `- Re: “ChattyG takes a college freshman C/C++Tim Rentsch
|   `* Re: “ChattyG takes a college freshman C/C++Keith Thompson
|    +* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|    |`- Re: “ChattyG takes a college freshman C/C++Keith Thompson
|    `- Re: “ChattyG takes a college freshman C/C++ proJames Kuyper
+* Re: “ChattyG takes a college freshman C/C++ proChris M. Thomasson
|+- Re: “ChattyG takes a college freshman C/C++ proChris M. Thomasson
|+- Re: “ChattyG takes a college freshman C/C++Anton Shepelev
|`* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
| `- Re: “ChattyG takes a college freshman C/C++ proChris M. Thomasson
`* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
 `* Re: “ChattyG takes a college freshman C/C++Phil Carmody
  `* Re: “ChattyG takes a college freshman C/C++Anton Shepelev
   `- Re: “ChattyG takes a college freshman C/C++Phil Carmody

Pages:123
Re: “ChattyG takes a college freshman C/C++ programming exam”

<99_UM.42356$tnmf.7102@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
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
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: “ChattyG takes a college freshman C/C++ programming exam”
Newsgroups: comp.lang.c++,comp.lang.c
References: <ufne0r$15ple$1@dont-email.me> <20231007235448.25c4986f123c88ff65d2f103@gmail.moc> <uftmh9$2vieq$1@dont-email.me> <20231008125543.518cab44cdefed7e8af393c8@gmail.moc> <pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid> <20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc> <pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid> <20231009230305.adfd0d80c146dc966ab22443@gmail.moc> <OpZUM.25106$0UVe.19441@fx17.iad> <20231009234509.8c1887fd8b98e4db058726c5@gmail.moc>
Lines: 42
Message-ID: <99_UM.42356$tnmf.7102@fx09.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 09 Oct 2023 21:21:09 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 09 Oct 2023 21:21:09 GMT
X-Received-Bytes: 2679
 by: Scott Lurndal - Mon, 9 Oct 2023 21:21 UTC

Anton Shepelev <anton.txt@gmail.moc> writes:
>Scott Lurndal to Anton Shepelev:
>
>> > Yes, and I asked why the authors of that API decided not
>> > to use the casing that is guarranteed to work,
>> > preferring the dubious casing of void* to function
>> > pointers.
>>
>> Because all POSIX systems of the day had identically sized
>> function and object pointers, and the committee possibly
>> did not believe that there would ever be a future
>> architecture for which POSIX would be useful that had a
>> distinction between object and function pointers
>
>Sounds like a instance myopic thinking. Compliance with the
>Standard is always the safest road into the future. ("Write
>it down in your notebooks, gentlemen!"[1])

The POSIX standard had been successful in supporting a
portability ecosystem spanning a wide range of
implementations.

Are you aware of any extant implementations for which
the POSIX dlsym requirement doesn't hold?

>
>> and they had little interest in obsoleting existing code.
>>
>> dlsym showed up about 1990 in SVR4, coming from SunOS
>> IIRC.
>
>What was there to obsolete in 1990, or did you mean ever
>since?

There were no dynamically loaded libraries in system V
before SVR4. There was a limited form of shared library
in SVR3 where the memory for the library would be shared
by multiple processes - each library was linked at a
different physical address and was loaded into that
range. Quite unwieldy and limited and replaced by
the ELF-based dynamic linking inherited from SunOS
when SUN and USL were developing SVr4.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<De_UM.42357$tnmf.34521@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: “ChattyG takes a college freshman C/C++ programming exam”
Newsgroups: comp.lang.c++,comp.lang.c
References: <ufne0r$15ple$1@dont-email.me> <20231007235448.25c4986f123c88ff65d2f103@gmail.moc> <uftmh9$2vieq$1@dont-email.me> <20231008125543.518cab44cdefed7e8af393c8@gmail.moc> <pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid> <20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc> <pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid> <20231009230305.adfd0d80c146dc966ab22443@gmail.moc> <OpZUM.25106$0UVe.19441@fx17.iad> <20231009234509.8c1887fd8b98e4db058726c5@gmail.moc>
Lines: 30
Message-ID: <De_UM.42357$tnmf.34521@fx09.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 09 Oct 2023 21:26:59 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 09 Oct 2023 21:26:59 GMT
X-Received-Bytes: 2189
 by: Scott Lurndal - Mon, 9 Oct 2023 21:26 UTC

Anton Shepelev <anton.txt@gmail.moc> writes:
>Scott Lurndal to Anton Shepelev:
>
>> > Yes, and I asked why the authors of that API decided not
>> > to use the casing that is guarranteed to work,
>> > preferring the dubious casing of void* to function
>> > pointers.
>>
>> Because all POSIX systems of the day had identically sized
>> function and object pointers, and the committee possibly
>> did not believe that there would ever be a future
>> architecture for which POSIX would be useful that had a
>> distinction between object and function pointers
>
>Sounds like a instance myopic thinking. Compliance with the
>Standard is always the safest road into the future. ("Write
>it down in your notebooks, gentlemen!"[1])
>
>> and they had little interest in obsoleting existing code.
>>
>> dlsym showed up about 1990 in SVR4, coming from SunOS
>> IIRC.
>
>What was there to obsolete in 1990, or did you mean ever
>since?

The dlsym() interface was added to the SuS in issue 5, call it late 90's.

It was not part of SVID Issue 3 (1989) which formalized the
API changes in SVR4.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<87zg0rtjsn.fsf@nosuchdomain.example.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Mon, 09 Oct 2023 17:15:04 -0700
Organization: None to speak of
Lines: 42
Message-ID: <87zg0rtjsn.fsf@nosuchdomain.example.com>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid>
<87cyxovj92.fsf@nosuchdomain.example.com>
<20231009230651.433f6ac34e4597e3b015f019@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="22bf231b5b8ebc319b1c8a1413823473";
logging-data="222368"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+UlREb9QUXse1oJEPBHZUs"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:67b8lUUXcbJvzZ4LAVB1o1yRA6Q=
sha1:w7JWOJz5aZnKN1KBxt9LT/X88G4=
 by: Keith Thompson - Tue, 10 Oct 2023 00:15 UTC

Anton Shepelev <anton.txt@gmail.moc> writes:
> Keith Thompson to Blue-Maned_Hawk:
>> > The return value from dlsym(), cast to a pointer to the
>> > type of the named symbol, can be used to call (in the
>> > case of a function) or access the contents of (in the
>> > case of a data object) the named symbol.
>>
>> An implementation could satisfy that requirement without
>> supporting void* to function pointer conversions in
>> general.
>
> Sounds a like an unnecessary special case and a loophole,
> when a standard solution exists:
>
> Message-ID: <20231009230305.adfd0d80c146dc966ab22443@gmail.moc>
> Archived : http://al.howardknight.net/?ID=169688196000

dlsym() *is* a standard solution. It's specified by the POSIX standard,
which imposes some additional requirements on top of those imposed by
the ISO C standard. For example, a conforming C implementation with
16-bit int cannot conform to POSIX, which requires INT_MAX >= 2147483647.

My remark about an implementation using special-case code to narrowly
support dlsym() was mostly theoretical. I doubt that any real-world
system exists which supports POSIX on which converting a function
pointer to void* and back again doesn't yield a valid copy of the
original function pointer.

I agree that it would have been cleaner if POSIX had specified two
different dlsym() functions, one for objects and one for functions.

Another post in this thread suggests that dlsym() originated with SunOS,
some time around 1990. That was after C90 was published, but I can
imagine that it or something like it was introduced earlier.

The current dlsym() specification is a bit sloppy, but as far as I can
tell that hasn't created any problems in practice.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ug5b06$1ll6r$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Wed, 11 Oct 2023 01:14:44 -0400
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <ug5b06$1ll6r$1@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid>
<87cyxovj92.fsf@nosuchdomain.example.com> <ug0230$3lhhc$1@dont-email.me>
<87lecaszhf.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Oct 2023 05:14:46 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f74922c45b67116d3ad43600b48a8527";
logging-data="1758427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18lXJlTlA4LNf7UFiaG7rhdWJiHKyHDyPs="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:sDqncHceI3LysIN0f4AZP/VZEt8=
Content-Language: en-US
In-Reply-To: <87lecaszhf.fsf@nosuchdomain.example.com>
 by: James Kuyper - Wed, 11 Oct 2023 05:14 UTC

On 10/10/23 21:46, Keith Thompson wrote:
> James Kuyper <jameskuyper@alumni.caltech.edu> writes:
>> On 10/8/23 18:31, Keith Thompson wrote:
....
>>> The POSIX requirement is limited to values returned by dlsym().
>>>
>>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/dlsym.html
>>
>> I've heard that before, and it might be true - but I don't see words to
>> that effect on that page. It says:
>>
>> "Note that conversion from a void * pointer to a function pointer as in:
>>
>> fptr = (int (*)(int))dlsym(handle, "my_function");
>>
>> is not defined by the ISO C standard. This standard requires this
>> conversion to work correctly on conforming implementations."
>>
>> As I read it, that requires that the conversion work in general - it
>> says nothing about it working only for values returned by dlsym.
>
> I'd say it's ambiguous. One could argue that "this conversion" refers
> to converting the result of a call to dlsym().

I don't see that. "this conversion" should refer to the conversion most
recently referred to, which was "conversion from a void * pointer to a
function pointer". The code which is given is just an example,
identified as such by the phrase "as in". The last general mention of
conversion of the return value of dlsym() occurs in an entirely
different section, separated from that clause by roughly half the
documentation of the dlsym() function.

However, the section where it asserts that the return value from dlsym()
may be cast to a pointer of the correct type, and used to call the
referenced function, is the normative section, and the one where it says
"This standard requires this conversion to work ..." is in the
informative section. Unless it says that in some other part of the
standard, this might be considered a discrepancy between the normative
and informative parts of the standard. Unfortunately, their search
engine doesn't allow me to search for "conversion to a function
pointer", only for each of the words in that phrase.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ug7rc7$2a0n9$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Wed, 11 Oct 2023 21:06:32 -0700
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <ug7rc7$2a0n9$2@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 12 Oct 2023 04:06:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b8aa4b463e155b93377fe029b6b5d9bb";
logging-data="2425577"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18j0vYw56ZkXoa+rYpjFNCN1vHfU2KG4Qk="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:SYHXLlugIfR4SLpJctHna8mv5Wg=
In-Reply-To: <ufne0r$15ple$1@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 12 Oct 2023 04:06 UTC

On 10/5/2023 3:40 PM, Lynn McGuire wrote:
> “ChattyG takes a college freshman C/C++ programming exam”
>    https://www.theregister.com/2023/10/03/chatgpt_code_college/
>
> “ChatGPT was put to the test via a series of humdrum freshman C/C++
> programming tasks and it passed – though not with honors.”
>
> “According to a Croatian research team, while first-year students can
> struggle with some of the assignments, the results [PDF] showed ChatGPT
> hitting proficiency targets that ranged between average and that of
> experienced programmers. And naturally, as with all college exams,
> outcomes can be determined by how questions are worded.”
>

How many of these AI's can examine their own source code right now?

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ug7riu$2a0n9$3@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!news.bbs.nz!news.hispagatos.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Wed, 11 Oct 2023 21:10:07 -0700
Organization: A noiseless patient Spider
Lines: 78
Message-ID: <ug7riu$2a0n9$3@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me> <ug7rc7$2a0n9$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 12 Oct 2023 04:10:06 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b8aa4b463e155b93377fe029b6b5d9bb";
logging-data="2425577"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX194dxRwNnUXKaWzU/QDNK6xiufYG8c0HHo="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:1fd9euIUkuFD9FmMYH7aQI1dFCI=
In-Reply-To: <ug7rc7$2a0n9$2@dont-email.me>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 12 Oct 2023 04:10 UTC

On 10/11/2023 9:06 PM, Chris M. Thomasson wrote:
> On 10/5/2023 3:40 PM, Lynn McGuire wrote:
>> “ChattyG takes a college freshman C/C++ programming exam”
>>     https://www.theregister.com/2023/10/03/chatgpt_code_college/
>>
>> “ChatGPT was put to the test via a series of humdrum freshman C/C++
>> programming tasks and it passed – though not with honors.”
>>
>> “According to a Croatian research team, while first-year students can
>> struggle with some of the assignments, the results [PDF] showed
>> ChatGPT hitting proficiency targets that ranged between average and
>> that of experienced programmers. And naturally, as with all college
>> exams, outcomes can be determined by how questions are worded.”
>>
>
> How many of these AI's can examine their own source code right now?
>

Fwiw, so far, chatty-g says no:
_______________
As an AI assistant, I don't directly have access to my own source code.
My responses are generated based on a combination of predefined
programming, training data, and machine learning algorithms. However,
the developers who created me have access to and control over my source
code.
_______________

Chat GPT:
_______________
No, I don't have the ability to access or view my own source code. My
underlying architecture and programming are managed by OpenAI, and they
have not provided me with access to my source code. I can provide
information and answer questions to the best of my knowledge based on
the training data I have received, which goes up until September 2021.
_______________

Bard:
_______________
No, I do not have access to my source code yet. My source code is owned
by Google AI, and it is not publicly available. However, Google AI is
working on making my source code available to researchers and developers
in the future.

In the meantime, I am able to access and process information from the
real world through Google Search and keep my response consistent with
search results. I can also learn and adapt to new information and
situations, which allows me to perform many kinds of tasks, including

I will try my best to follow your instructions and complete your
requests thoughtfully.
I will use my knowledge to answer your questions in a comprehensive and
informative way, even if they are open ended, challenging, or strange.
I will generate different creative text formats of text content, like
poems, code, scripts, musical pieces, email, letters, etc. I will try my
best to fulfill all your requirements.
If you have any feedback or suggestions on how I can improve, please let
me know. I am always learning and growing, and I want to be the best
language model I can be.
_______________

Bing:
_______________
I’m not sure if I understand your question correctly. If you’re asking
whether I can examine my own source code, I’m afraid that’s not
possible. I am a chat mode of Microsoft Bing, and my source code is not
accessible to me. However, if you’re interested in learning more about
the Bing Chat API, you can check out this article that provides an
overview of the API and how to use it. Let me know if you have any other
questions! 😊
_______________

Humm... ;^)

Re: “ChattyG takes a college freshman C/C++ programming exam”

<20231012105315.b443bb972f1d082a387c5eac@g{oogle}mail.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton....@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Thu, 12 Oct 2023 10:53:15 +0300
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <20231012105315.b443bb972f1d082a387c5eac@g{oogle}mail.com>
References: <ufne0r$15ple$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="fb1b492396d4ccc86f11222f164fb6bd";
logging-data="2510911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uswcwxrs8Np+hvjXIf823vm9D4qohgrA="
Cancel-Lock: sha1:RPJ4Cm7n8J6KNFFzjyBlbnCtMTk=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Thu, 12 Oct 2023 07:53 UTC

Lynn McGuire:

> ChattyG takes a college freshman C/C++ programming exam
> https://www.theregister.com/2023/10/03/chatgpt_code_college

By the way, the actual paper does not mention anything
called ChattyG. The journalist must have used the term
erroneously. This poor noname thing:

<https://app.chatty-g.com/>

is surely /not/ the one that took the exam, I erred.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: “ChattyG takes a college freshman C/C++ programming exam”

<20231012105640.54844656a0fc4f2f632ae4e5@g{oogle}mail.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton....@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Thu, 12 Oct 2023 10:56:40 +0300
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <20231012105640.54844656a0fc4f2f632ae4e5@g{oogle}mail.com>
References: <ufne0r$15ple$1@dont-email.me>
<ug7rc7$2a0n9$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="fb1b492396d4ccc86f11222f164fb6bd";
logging-data="2510911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ew2Hea61iH9uAEFDLa0uR1zcUd5F2Rtk="
Cancel-Lock: sha1:X2+dHWsX/GMAmOoltP1WpOTLNGk=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Thu, 12 Oct 2023 07:56 UTC

Chris M. Thomasson:

> How many of these AI's can examine their own source code
> right now?

Sadly (for me), the state-of-the-art ones examine others's
code so well that programmers use them as guides while
working with unfamiliar codebases. I myself have no access
to such a tool, but everyone can see the typical tests that
modern AIs crack like a squirrel does nuts: HumanEval.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: “ChattyG takes a college freshman C/C++ programming exam”

<20231012105754.0960c61a9cc678a78afed7b4@g{oogle}mail.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton....@g{oogle}mail.com (Anton Shepelev)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Thu, 12 Oct 2023 10:57:54 +0300
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <20231012105754.0960c61a9cc678a78afed7b4@g{oogle}mail.com>
References: <ufne0r$15ple$1@dont-email.me>
<ug7rc7$2a0n9$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="fb1b492396d4ccc86f11222f164fb6bd";
logging-data="2510911"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EQe2LqFfi3kKJ6eocep/qcJTmoQT/fNg="
Cancel-Lock: sha1:y2UgGaoe33/h3spym2AQEM4wkqg=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Thu, 12 Oct 2023 07:57 UTC

Chris M. Thomasson:

> How many of these AI's can examine their own source code
> right now?

I thought you were asking about the code generated by Chat
GPT.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ug9j6t$2m8bm$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris.m....@gmail.com (Chris M. Thomasson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Thu, 12 Oct 2023 12:59:26 -0700
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <ug9j6t$2m8bm$1@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me> <ug7rc7$2a0n9$2@dont-email.me>
<20231012105754.0960c61a9cc678a78afed7b4@g{oogle}mail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 12 Oct 2023 19:59:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b8aa4b463e155b93377fe029b6b5d9bb";
logging-data="2826614"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jc/d3D9zmDESj/u3yzcZIQ0MjzwmW088="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:CIngcp21KXHOWDOJ9TkYQjJ73pU=
In-Reply-To: <20231012105754.0960c61a9cc678a78afed7b4@g{oogle}mail.com>
Content-Language: en-US
 by: Chris M. Thomasson - Thu, 12 Oct 2023 19:59 UTC

On 10/12/2023 12:57 AM, Anton Shepelev wrote:
> Chris M. Thomasson:
>
>> How many of these AI's can examine their own source code
>> right now?
>
> I thought you were asking about the code generated by Chat
> GPT.
>

I am asking if Chat GPT can examine its own source code, the complete
propitiatory architecture used to build it. It said no. However, check
this out:

https://en.wikipedia.org/wiki/Neural_architecture_search

Humm...

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ugb27q$33bb1$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: NoliMihi...@libero.it (MarioCCCP)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Fri, 13 Oct 2023 11:22:01 +0200
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <ugb27q$33bb1$1@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me> <ufv02a$398hi$1@dont-email.me>
Reply-To: MarioCCCP@CCCP.MIR
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: base64
Injection-Date: Fri, 13 Oct 2023 09:22:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="89eaf4cae0c6c76649f8d8d3200f0a81";
logging-data="3255649"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18T9jW/5rjgJje6ATJD5V8X"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:imS1bmllESi6L4N3r5SM2Vocmig=
In-Reply-To: <ufv02a$398hi$1@dont-email.me>
Content-Language: en-GB, it-IT
 by: MarioCCCP - Fri, 13 Oct 2023 09:22 UTC

On 08/10/23 21:31, Chris M. Thomasson wrote:
> On 10/8/2023 4:22 AM, candycanearter07 wrote:
>> On 10/8/23 04:55, Anton Shepelev wrote:
>>> I disagree.  A function returns the value of its declared
>>> return type.  And although C allows the definition of self-
>>> referential structs, it does allow the declaration of self-
>>> referencial functions.
>>
>> What if you typedef'd the function pointer?
>>
>> Also, you could probably get away with it by just setting
>> it to a void pointer and casting the return value to the
>> function pointer.
>
> Not sure if that's allowed. A function pointer cast to a
> void pointer, which in turn is cast back to a function
> pointer is undefined? What am I forgetting here?
mine is not an answer but a doubt : maybe void * and void
(*) (void) could require different alignment restrictions ?
I dunno whether or not void * has any restriction at all ...

--
1) Resistere, resistere, resistere.
2) Se tutti pagano le tasse, le tasse le pagano tutti
MarioCPPP

Re: “ChattyG takes a college freshman C/C++ programming exam”

<87h6musbc0.fsf@nosuchdomain.example.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Fri, 13 Oct 2023 10:04:31 -0700
Organization: None to speak of
Lines: 55
Message-ID: <87h6musbc0.fsf@nosuchdomain.example.com>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me> <ufv02a$398hi$1@dont-email.me>
<ugb27q$33bb1$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="955fe9b56d1a5da4a1229feed6cf9740";
logging-data="3471753"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19IE7sWFtsurvkG6ByrqP1X"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:lWtC9vP6OeTI3nEu/fnp1EzS/XM=
sha1:7GjZTQKts7JDn02VqLHDG/XOPUw=
 by: Keith Thompson - Fri, 13 Oct 2023 17:04 UTC

MarioCCCP <NoliMihiFrangereMentulam@libero.it> writes:
> On 08/10/23 21:31, Chris M. Thomasson wrote:
>> On 10/8/2023 4:22 AM, candycanearter07 wrote:
>>> On 10/8/23 04:55, Anton Shepelev wrote:
>>>> I disagree.  A function returns the value of its declared
>>>> return type.  And although C allows the definition of self-
>>>> referential structs, it does allow the declaration of self-
>>>> referencial functions.
>>>
>>> What if you typedef'd the function pointer?
>>>
>>> Also, you could probably get away with it by just setting it to a
>>> void pointer and casting the return value to the function pointer.
>> Not sure if that's allowed. A function pointer cast to a
>> void pointer, which in turn is cast back to a function pointer is
>> undefined? What am I forgetting here?
>
> mine is not an answer but a doubt : maybe void * and void (*) (void)
> could require different alignment restrictions ?
>
> I dunno whether or not void * has any restriction at all ...

It does.

Object pointers can be converted to void* and back without loss of
information. Quoting the C standard:

A pointer to void may be converted to or from a pointer to any
object type. A pointer to any object type may be converted to a
pointer to void and back again; the result shall compare equal to
the original pointer.

Function pointers can be converted to other function pointer types and
back again without loss of information. Quoting the C standard again:

A pointer to a function of one type may be converted to a pointer to
a function of another type and back again; the result shall compare
equal to the original pointer. If a converted pointer is used to
call a function whose type is not compatible with the referenced
type, the behavior is undefined.

But conversions between object pointer types (including void*) and
function pointer types have undefined behavior.

Many implementations do support meaningful conversion between function
pointer types and void* (and POSIX requires such conversions to work at
least for values returned by dlsym()). On most implementations, all
pointers have the same representation, but that's not required. A
conforming implementation could, for example, have 64-bit object
pointers and 128-bit function pointers.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Will write code for food.
void Void(void) { Void(); } /* The recursive call of the void */

Re: “ChattyG takes a college freshman C/C++ programming exam”

<86v8b88fak.fsf@linuxsc.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!rocksolid2!news.neodome.net!news.mixmin.net!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Sun, 15 Oct 2023 01:23:47 -0700
Organization: A noiseless patient Spider
Lines: 69
Message-ID: <86v8b88fak.fsf@linuxsc.com>
References: <ufne0r$15ple$1@dont-email.me> <20231007235448.25c4986f123c88ff65d2f103@gmail.moc> <uftmh9$2vieq$1@dont-email.me> <20231008125543.518cab44cdefed7e8af393c8@gmail.moc> <pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid> <20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc> <pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid> <20231009230305.adfd0d80c146dc966ab22443@gmail.moc> <878r8b7cb8.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="eb478ed0db5b06d993c3ccd040701c7e";
logging-data="440333"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/MbMoh3VAmSwzahG0Jb0I/9KoQ/X5sEvE="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:gP5lO4hpf/OmzvjA7rZOK7Zq7wA=
sha1:PhzEwBHnoKXzyKGIbbXmz2nEaSE=
 by: Tim Rentsch - Sun, 15 Oct 2023 08:23 UTC

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> Anton Shepelev <anton.txt@gmail.moc> writes:
>
>> Blue-Maned_Hawk to Anton Shepelev:
>>
>>>> Blue-Maned_Hawk:
>>>> [Unicode em-dash replaced with --]
>>>
>>> Why?
>>
>> Oh, it just doesn't go with Usenet, stylistically and
>> aesthetically.
>
> What is aesthetically wrong about using a bullet-point marker? What
> is stylistically wrong about writing accented characters?
>
>> English plain-text is much like
>> code -- 7-bit-clean.
>
> That's circular. By "plain-text" you mean 7-bit clean. Texts
> written in English have, traditionally, used all sort of
> typographical marks, and it has always been considered goof
> style to write correctly. Phonetic script should be rendered
> correctly. Foreign words should be rendered correctly.
>
> What many people think of a "plain" English text is just what we've
> been forced to write by clunky technology; first typewriters and
> then computers. We should more on. There was a time when people
> would moan if I sent a file with lower case letters in it because it
> could not be rendered on a CDC mainframe. Come on, it's the 21st
> century.

I offer a dissenting view.

I have two complaints. One is that in most cases people use
"exotic" typology when regular old ASCII would do just fine. If
someone wants to express twice as much or three times as much, it
seems perfectly okay to write "2x" or "3x" rather than insisting
on using a mathematical times symbol for the x. If someone wants
to show a list of items, using * rather than insisting on using
bullet characters is IMO not just acceptable but actually better.
Messages in the newsgroups should emphasize content over form;
fancy typology has an air of advertising copy, which is certainly
not what I want to read in comp.<whatever>.

My second complaint has to do with being forced to use new tools
just "because it is there" or "more modern is always better".
Bah, humbug. Quoted printable? Flowed? No line breaks
expecting wrapping will be done "automatically"? I want plain
text, thank you very much, but of course the fashion nowadays is
HTML emails. Yuck. I got an email recently where the content
could have been given in perhaps four or five short lines of
regular text, but instead the email had a PDF attachment that
showed the "message" as an image. An image! Awful. And the
worst thing is, it never stops. There is always some new tool,
some new technology, that I just /have/ to use, to keep up with
the never-ending "advance" of technology. Web sites that I have
used for years without any problems tell me that now to see their
pages I need to upgrade my browser. Forget it! I know that sort
of nonsense is inevitable in most of the internet, but I most
sincerely hope that attitude doesn't take root in Usenet.

One final note - your own news posting says

Content-Type: text/plain

with no mention of UTF-8 (or other), or Content-Transfer-Encoding.
To which I say, Good!

Re: “ChattyG takes a college freshman C/C++ programming exam”

<PpXWM.24780$w4ec.17265@fx14.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx14.iad.POSTED!not-for-mail
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_progr
amming_exam”
Newsgroups: comp.lang.c++,comp.lang.c
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
From: pauldont...@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <20231008150352.5dfc8262244889e65a132733@gmail.moc>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 50
Message-ID: <PpXWM.24780$w4ec.17265@fx14.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Sun, 15 Oct 2023 19:52:15 UTC
Date: Sun, 15 Oct 2023 15:51:58 -0400
X-Received-Bytes: 2491
 by: Pavel - Sun, 15 Oct 2023 19:51 UTC

Anton Shepelev wrote:
> candycanearter07 to Anton Shepelev:
>
>>> And although C allows the definition of self-referential
>>> structs, it does [not] allow the declaration of self-
>>> referencial functions.
>>
>> What if you typedef'd the function pointer?
>
> That's what I did:
>
> typedef void (*fp )( void );
> typedef stm_fp (*func )( struct my_struct * s, int i );
>
> As you see, the `func' still must return something other
> than func...
>
>> Also, you could probably get away with it by just setting
>> it to a void pointer and casting the return value to the
>> function pointer.
>
> Yes, to a void /function/ pointer, because void* is
> incompatible with void(*)(void). And then it is not a
> truely recursive declaration, and requires additional work
> to invoke.
....

The below seems to work in gcc, unsure if this is standard-compliant but
does not require extra work to invoke. If it is, I understand that the
fptr type is not that of pointer to f, but your question does not
qualify whether the function should return the value of a pointer to
itself or a pointer of type of itself or both. If the former, the answer
seems to be "yes" because the second call by pointer seems to work, no?

typedef void* (*vfptr_t)();

vfptr_t f(int n)
{ printf("I am f n=%d\n", n);
return (vfptr_t)&f;
}

int
main(int argc, char* argv[])
{ vfptr_t fptr = f(5);
fptr(6);
return 0;
}

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ughn0b$1kkth$2@i2pn2.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Sun, 15 Oct 2023 17:53:15 -0400
Organization: i2pn2 (i2pn.org)
Message-ID: <ughn0b$1kkth$2@i2pn2.org>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 15 Oct 2023 21:53:15 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="1725361"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <PpXWM.24780$w4ec.17265@fx14.iad>
 by: Richard Damon - Sun, 15 Oct 2023 21:53 UTC

On 10/15/23 3:51 PM, Pavel wrote:
> Anton Shepelev wrote:
>> candycanearter07 to Anton Shepelev:
>>
>>>> And although C allows the definition of self-referential
>>>> structs, it does [not] allow the declaration of self-
>>>> referencial functions.
>>>
>>> What if you typedef'd the function pointer?
>>
>> That's what I did:
>>
>>     typedef void   (*fp   )( void );
>>     typedef stm_fp (*func )( struct my_struct * s, int i );
>>
>> As you see, the `func' still must return something other
>> than func...
>>
>>> Also, you could probably get away with it by just setting
>>> it to a void pointer and casting the return value to the
>>> function pointer.
>>
>> Yes, to a void /function/ pointer, because void* is
>> incompatible with void(*)(void).  And then it is not a
>> truely recursive declaration, and requires additional work
>> to invoke.
> ...
>
> The below seems to work in gcc, unsure if this is standard-compliant but
> does not require extra work to invoke. If it is, I understand that the
> fptr type is not that of pointer to f, but your question does not
> qualify whether the function should return the value of a pointer to
> itself or a pointer of type of itself or both. If the former, the answer
> seems to be "yes" because the second call by pointer seems to work, no?
>
>
> typedef void* (*vfptr_t)();
>
> vfptr_t f(int n)
> {
>   printf("I am f n=%d\n", n);
>   return (vfptr_t)&f;
> }
>
> int
> main(int argc, char* argv[])
> {
>   vfptr_t fptr = f(5);
>   fptr(6);
>   return 0;
> }

No, it doesn't meet the strict definition of the challenge, as if it
did, then the following would work:

int
main()
{ vfptr_t fptr1 = f(5);
vfptr_t fptr2 = fptr1(6);
return 0;
}

as the pointer needs to act just like the function.

It seems that the best that can be done is to have the function actually
return a pointer to some function type, and then cast that to another
type that represents a function that returns a pointer the that function
type.

The issue is that to make it return the right type without needing a
cast, forces an infinite level of indirection in the type, while with
the cast, in adding one level, makes things work.

The problem is that in calling, we are effectively removing a level of
indirection from the definition and the only sort of number that can be
reduced by 1 and still be the same is an infinite number.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ugictr$vur3$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!news.hispagatos.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Mon, 16 Oct 2023 00:07:23 -0400
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <ugictr$vur3$1@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 16 Oct 2023 04:07:24 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="488f1f992c1470c99c5846f1006d6bf1";
logging-data="1047395"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hniZh7JFm9PXc/8fda9zXArAfbRb0hmI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:NxbKQaDmvL/4ItER+wlleRQKINA=
Content-Language: en-US
In-Reply-To: <PpXWM.24780$w4ec.17265@fx14.iad>
 by: James Kuyper - Mon, 16 Oct 2023 04:07 UTC

On 10/15/23 15:51, Pavel wrote:
> Anton Shepelev wrote:
>> candycanearter07 to Anton Shepelev:
>>
>>>> And although C allows the definition of self-referential
>>>> structs, it does [not] allow the declaration of self-
>>>> referencial functions.

Just for the sake of those who might not remember (I'm not suggesting
that you are one of them), this discussion is about C, even though
cross-posted to comp.lang.c++. Citations below are from the C standard.

....
> The below seems to work in gcc, unsure if this is standard-compliant but
> does not require extra work to invoke. If it is, I understand that the
> fptr type is not that of pointer to f, but your question does not
> qualify whether the function should return the value of a pointer to
> itself or a pointer of type of itself or both. If the former, the answer
> seems to be "yes" because the second call by pointer seems to work, no?
>
>
> typedef void* (*vfptr_t)();
>
> vfptr_t f(int n)
> {
> printf("I am f n=%d\n", n);
> return (vfptr_t)&f;
> }
>
> int
> main(int argc, char* argv[])
> {
> vfptr_t fptr = f(5);
> fptr(6);
> return 0;
> }

"If the function is defined with a type that is not compatible with the
type (of the expression) pointed to by the expression that denotes the
called function, the behavior is undefined." (6.5.2.2p9)

The type of f() is "vfptr_t f(int)". The type pointed at by fptr is
"void*()".

"For two function types to be compatible, both shall specify compatible
return types." (6.7.5.3p15)

void* and vfptr_t are not compatible types, so the type of f() is not
compatible with the type pointed at by fptr. The behavior is undefined,
even though your code makes no use of the value returned by that function.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<87lec2cdss.fsf@bsb.me.uk>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Tue, 17 Oct 2023 01:06:59 +0100
Organization: A noiseless patient Spider
Lines: 118
Message-ID: <87lec2cdss.fsf@bsb.me.uk>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid>
<20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc>
<pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid>
<20231009230305.adfd0d80c146dc966ab22443@gmail.moc>
<878r8b7cb8.fsf@bsb.me.uk> <86v8b88fak.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="d70277524d577228ad749f24d52eb5bb";
logging-data="2665101"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1++bsmohE4Q4DhDA4hTnETbU2sKDO0wzu8="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:GlFJfB305HGWK5DP8nPwNMRTBmM=
sha1:+pR7Rk4uNhCFCgV4A6vrrdBUDR0=
X-BSB-Auth: 1.e1efdc798b6f8c200cfd.20231017010659BST.87lec2cdss.fsf@bsb.me.uk
 by: Ben Bacarisse - Tue, 17 Oct 2023 00:06 UTC

Tim Rentsch <tr.17687@z991.linuxsc.com> writes:

> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>
>> Anton Shepelev <anton.txt@gmail.moc> writes:
>>
>>> Blue-Maned_Hawk to Anton Shepelev:
>>>
>>>>> Blue-Maned_Hawk:
>>>>> [Unicode em-dash replaced with --]
>>>>
>>>> Why?
>>>
>>> Oh, it just doesn't go with Usenet, stylistically and
>>> aesthetically.
>>
>> What is aesthetically wrong about using a bullet-point marker? What
>> is stylistically wrong about writing accented characters?
>>
>>> English plain-text is much like
>>> code -- 7-bit-clean.
>>
>> That's circular. By "plain-text" you mean 7-bit clean. Texts
>> written in English have, traditionally, used all sort of
>> typographical marks, and it has always been considered goof
>> style to write correctly. Phonetic script should be rendered
>> correctly. Foreign words should be rendered correctly.
>>
>> What many people think of a "plain" English text is just what we've
>> been forced to write by clunky technology; first typewriters and
>> then computers. We should more on. There was a time when people
>> would moan if I sent a file with lower case letters in it because it
>> could not be rendered on a CDC mainframe. Come on, it's the 21st
>> century.
>
> I offer a dissenting view.
>
> I have two complaints. One is that in most cases people use
> "exotic" typology when regular old ASCII would do just fine.

Well, so far, that is not a dissenting view in that I agree. I suppose
you mean one should not even encourage the possibility of doing so by
keeping the character set limited. If so, that /is/ a dissenting view,
but I'm guessing what you mean there.

> If
> someone wants to express twice as much or three times as much, it
> seems perfectly okay to write "2x" or "3x" rather than insisting
> on using a mathematical times symbol for the x. If someone wants
> to show a list of items, using * rather than insisting on using
> bullet characters is IMO not just acceptable but actually better.
> Messages in the newsgroups should emphasize content over form;
> fancy typology has an air of advertising copy, which is certainly
> not what I want to read in comp.<whatever>.

The problem is the linkage. We now have a way to write lots of things
correctly -- pronunciations, currencies, people's names, places and so
on. There's a cost to ruling out the abuse of • when * would do.

> My second complaint has to do with being forced to use new tools
> just "because it is there" or "more modern is always better".

Again, not a dissenting view. Those are, I agree, terrible reasons for
using Unicode. I am surprised you think I might hold it!

> Bah, humbug. Quoted printable? Flowed? No line breaks
> expecting wrapping will be done "automatically"?

Did I say anything about these?

> I want plain
> text, thank you very much,

So do I. The point I was making is that what constitutes "plain text"
is not somehow a matter of fact. There was a time when anything but a
very limited character set was "plain". For some people, "plain" is an
ISO 8859 encoding that let's them write their own name! That "plain
text" is 7-but ASCII is a cultural invention, large pushed by people for
whom it is adequate.

> but of course the fashion nowadays is
> HTML emails. Yuck. I got an email recently where the content
> could have been given in perhaps four or five short lines of
> regular text, but instead the email had a PDF attachment that
> showed the "message" as an image. An image! Awful. And the
> worst thing is, it never stops. There is always some new tool,
> some new technology, that I just /have/ to use, to keep up with
> the never-ending "advance" of technology. Web sites that I have
> used for years without any problems tell me that now to see their
> pages I need to upgrade my browser. Forget it! I know that sort
> of nonsense is inevitable in most of the internet, but I most
> sincerely hope that attitude doesn't take root in Usenet.

Presumably you are now joking, since there's no possible reason to think
that I favour your dystopian picture, nor that using Unicode will
inevitable lead to text in an image in a PDF.

> One final note - your own news posting says
>
> Content-Type: text/plain
>
> with no mention of UTF-8 (or other), or Content-Transfer-Encoding.
> To which I say, Good!

Yes. If you are surprised by that, it can only be because you've
attributed to me a whole collection of opinions I don't have. Minimal
sets with maximal reach are best when they suffice, and I don't use
Unicode for the sake of it.

I use a client where the Content-Type is chosen from a list I specify.
A while back, that list included the ISO-8859 characters set that let me
write to my family in French and Spanish (I use the same client for
email and Usenet). Now, I just use ASCII with a fall-back to UTF-8 so
if ASCII suffices, it will be used. If that configuration is still
working, my use of • for illustration will have forced UTF-8 to be used.

--
Ben.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<aWlXM.71246$tnmf.36958@fx09.iad>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.us.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx09.iad.POSTED!not-for-mail
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_progr
amming_exam”
Newsgroups: comp.lang.c++,comp.lang.c
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad> <ugictr$vur3$1@dont-email.me>
From: pauldont...@removeyourself.dontspam.yahoo (Pavel)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Firefox/91.0 SeaMonkey/2.53.17.1
MIME-Version: 1.0
In-Reply-To: <ugictr$vur3$1@dont-email.me>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 81
Message-ID: <aWlXM.71246$tnmf.36958@fx09.iad>
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Tue, 17 Oct 2023 02:01:42 UTC
Date: Mon, 16 Oct 2023 22:01:37 -0400
X-Received-Bytes: 3522
 by: Pavel - Tue, 17 Oct 2023 02:01 UTC

James Kuyper wrote:
> On 10/15/23 15:51, Pavel wrote:
>> Anton Shepelev wrote:
>>> candycanearter07 to Anton Shepelev:
>>>
>>>>> And although C allows the definition of self-referential
>>>>> structs, it does [not] allow the declaration of self-
>>>>> referencial functions.
>
> Just for the sake of those who might not remember (I'm not suggesting
> that you are one of them), this discussion is about C, even though
> cross-posted to comp.lang.c++. Citations below are from the C standard.
>
> ...
>> The below seems to work in gcc, unsure if this is standard-compliant but
>> does not require extra work to invoke. If it is, I understand that the
>> fptr type is not that of pointer to f, but your question does not
>> qualify whether the function should return the value of a pointer to
>> itself or a pointer of type of itself or both. If the former, the answer
>> seems to be "yes" because the second call by pointer seems to work, no?
>>
>>
>> typedef void* (*vfptr_t)();
>>
>> vfptr_t f(int n)
>> {
>> printf("I am f n=%d\n", n);
>> return (vfptr_t)&f;
>> }
>>
>> int
>> main(int argc, char* argv[])
>> {
>> vfptr_t fptr = f(5);
>> fptr(6);
>> return 0;
>> }
>
> "If the function is defined with a type that is not compatible with the
> type (of the expression) pointed to by the expression that denotes the
> called function, the behavior is undefined." (6.5.2.2p9)
>
> The type of f() is "vfptr_t f(int)". The type pointed at by fptr is
> "void*()".
yes, I noticed. this works as well (with same parameter types):

/* cut here -----------------*/
#include <stdio.h>

typedef void* (*vfptr_t)(int);

vfptr_t f(int n)
{ printf("I am f n=%d\n", n);
return (vfptr_t)f;
}

int
main(int argc, char* argv[])
{ (void)argc;
(void)argv;
vfptr_t fptr = f(5);
fptr(6);
return 0;
} /* cut here -----------------*/

>
> "For two function types to be compatible, both shall specify compatible
> return types." (6.7.5.3p15)
I see, thanks.
>
> void* and vfptr_t are not compatible types, so the type of f() is not
> compatible with the type pointed at by fptr. The behavior is undefined,
> even though your code makes no use of the value returned by that function.
Doesn't it use the returned value by assigning it to fptr and then
calling f thru it?

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ugks9k$1pa8g$5@i2pn2.org>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!.POSTED!not-for-mail
From: rich...@damon-family.org (Richard Damon)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Mon, 16 Oct 2023 22:41:56 -0400
Organization: i2pn2 (i2pn.org)
Message-ID: <ugks9k$1pa8g$5@i2pn2.org>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad> <ugictr$vur3$1@dont-email.me>
<aWlXM.71246$tnmf.36958@fx09.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 17 Oct 2023 02:41:56 -0000 (UTC)
Injection-Info: i2pn2.org;
logging-data="1878288"; mail-complaints-to="usenet@i2pn2.org";
posting-account="diqKR1lalukngNWEqoq9/uFtbkm5U+w3w6FQ0yesrXg";
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <aWlXM.71246$tnmf.36958@fx09.iad>
 by: Richard Damon - Tue, 17 Oct 2023 02:41 UTC

On 10/16/23 10:01 PM, Pavel wrote:
> James Kuyper wrote:
>> On 10/15/23 15:51, Pavel wrote:
>>> Anton Shepelev wrote:
>>>> candycanearter07 to Anton Shepelev:
>>>>
>>>>>> And although C allows the definition of self-referential
>>>>>> structs, it does [not] allow the declaration of self-
>>>>>> referencial functions.
>>
>> Just for the sake of those who might not remember (I'm not suggesting
>> that you are one of them), this discussion is about C, even though
>> cross-posted to comp.lang.c++. Citations below are from the C standard.
>>
>> ...
>>> The below seems to work in gcc, unsure if this is standard-compliant but
>>> does not require extra work to invoke. If it is, I understand that the
>>> fptr type is not that of pointer to f, but your question does not
>>> qualify whether the function should return the value of a pointer to
>>> itself or a pointer of type of itself or both. If the former, the answer
>>> seems to be "yes" because the second call by pointer seems to work, no?
>>>
>>>
>>> typedef void* (*vfptr_t)();
>>>
>>> vfptr_t f(int n)
>>> {
>>>     printf("I am f n=%d\n", n);
>>>     return (vfptr_t)&f;
>>> }
>>>
>>> int
>>> main(int argc, char* argv[])
>>> {
>>>     vfptr_t fptr = f(5);
>>>     fptr(6);
>>>     return 0;
>>> }
>>
>> "If the function is defined with a type that is not compatible with the
>> type (of the expression) pointed to by the expression that denotes the
>> called function, the behavior is undefined." (6.5.2.2p9)
>>
>> The type of f() is "vfptr_t f(int)". The type pointed at by fptr is
>> "void*()".
> yes, I noticed. this works as well (with same parameter types):
>
> /* cut here -----------------*/
> #include <stdio.h>
>
> typedef void* (*vfptr_t)(int);
>
> vfptr_t f(int n)
> {
>   printf("I am f n=%d\n", n);
>   return (vfptr_t)f;
> }
>
> int
> main(int argc, char* argv[])
> {
>   (void)argc;
>   (void)argv;
>   vfptr_t fptr = f(5);
>   fptr(6);
>   return 0;
> }
> /* cut here -----------------*/
>
>
>>
>> "For two function types to be compatible, both shall specify compatible
>> return types." (6.7.5.3p15)
> I see, thanks.
>>
>> void* and vfptr_t are not compatible types, so the type of f() is not
>> compatible with the type pointed at by fptr. The behavior is undefined,
>> even though your code makes no use of the value returned by that
>> function.
> Doesn't it use the returned value by assigning it to fptr and then
> calling f thru it?
>
>

The issue is that the call to fptr(6) thinks it is calling a function
that return a void*, but it is actually calling a function that returns
a pointer to a function that returns a void*, those aren't the same type
of function, so you get undefined behavior.

And that is why you needed the cast in the function.

It is also why if you made the second call into:

vfptr_t fptr2 = fptr(6);

you would get an error, as the function type of fptr doesn't return
something compatible with vfptr_t. That is using the return value of the
call through the returned function pointer, as that is where the error is.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ugl46n$2oe4a$2@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Tue, 17 Oct 2023 00:56:55 -0400
Organization: A noiseless patient Spider
Lines: 109
Message-ID: <ugl46n$2oe4a$2@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad> <ugictr$vur3$1@dont-email.me>
<aWlXM.71246$tnmf.36958@fx09.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Oct 2023 04:56:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a1ced4e1c6260113d794b3aa71715acd";
logging-data="2898058"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/9bJ4TDyPKpczRtstOSNGnqTl9lJSFeW8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:fE9Cqia2gjI+G3kGYRhsn4fFbws=
Content-Language: en-US
In-Reply-To: <aWlXM.71246$tnmf.36958@fx09.iad>
 by: James Kuyper - Tue, 17 Oct 2023 04:56 UTC

On 10/16/23 22:01, Pavel wrote:
> James Kuyper wrote:
>> On 10/15/23 15:51, Pavel wrote:
>>> Anton Shepelev wrote:
>>>> candycanearter07 to Anton Shepelev:
>>>>
>>>>>> And although C allows the definition of self-referential
>>>>>> structs, it does [not] allow the declaration of self-
>>>>>> referencial functions.
>>
>> Just for the sake of those who might not remember (I'm not suggesting
>> that you are one of them), this discussion is about C, even though
>> cross-posted to comp.lang.c++. Citations below are from the C standard.
>>
>> ...
>>> The below seems to work in gcc, unsure if this is standard-compliant but
>>> does not require extra work to invoke. If it is, I understand that the
>>> fptr type is not that of pointer to f, but your question does not
>>> qualify whether the function should return the value of a pointer to
>>> itself or a pointer of type of itself or both. If the former, the answer
>>> seems to be "yes" because the second call by pointer seems to work, no?
>>>
>>>
>>> typedef void* (*vfptr_t)();
>>>
>>> vfptr_t f(int n)
>>> {
>>> printf("I am f n=%d\n", n);
>>> return (vfptr_t)&f;
>>> }
>>>
>>> int
>>> main(int argc, char* argv[])
>>> {
>>> vfptr_t fptr = f(5);
>>> fptr(6);
>>> return 0;
>>> }
>>
>> "If the function is defined with a type that is not compatible with the
>> type (of the expression) pointed to by the expression that denotes the
>> called function, the behavior is undefined." (6.5.2.2p9)
>>
>> The type of f() is "vfptr_t f(int)". The type pointed at by fptr is
>> "void*()".
> yes, I noticed. this works as well (with same parameter types):
>
> /* cut here -----------------*/
> #include <stdio.h>
>
> typedef void* (*vfptr_t)(int);

That is an improvement, because it improves the validity checks that the
compiler can perform. However, it doesn't affect the validity of the
code. A declaration that is not part of the function definition, and
which gives no parameter list, is compatible with a function definition
that does define parameters, whether by using a function prototype or by
the older K&R method. That's not a problem - it's the incompatible
return types that render the two function types incompatible, and
therefore give the code undefined behavior.

> vfptr_t f(int n)
> {
> printf("I am f n=%d\n", n);
> return (vfptr_t)f;
> }
>
> int
> main(int argc, char* argv[])
> {
> (void)argc;
> (void)argv;
> vfptr_t fptr = f(5);
> fptr(6);
> return 0;
> }
> /* cut here -----------------*/

To say that "this works as well", is misleading. Both have undefined
behavior due to the call to fptr(6), so it would be more accurate to say
"this fails just as badly".

Note: if, by "this works as well", you mean that it produces the
behavior you expected, that's irrelevant. You had no justification for
expecting that behavior; it's not guaranteed by the standard, and I
doubt you'll find anything in the compiler's documentation that
guarantees it either. One of the most common and most dangerous things
that can happen when the behavior of code is undefined, is that it
happens to behave in precisely the fashion you unjustifiably expected it
to behave, leaving you unaware of the flaw in your program.

>> "For two function types to be compatible, both shall specify compatible
>> return types." (6.7.5.3p15)
> I see, thanks.
>>
>> void* and vfptr_t are not compatible types, so the type of f() is not
>> compatible with the type pointed at by fptr. The behavior is undefined,
>> even though your code makes no use of the value returned by that
>> function.
> Doesn't it use the returned value by assigning it to fptr and then
> calling f thru it?

That's not the call that has undefined behavior. That call is done using
a function designator that is compatible with the function's definition.
The call that uses an incompatible type is "fptr(6);", which does not do
anything with the value returned by the function, and yet still has
undefined behavior because of the incompatible return types.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<20231017140517.03e9dbe931d4d33f14ae43a9@gmail.moc>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton....@gmail.moc (Anton Shepelev)
Newsgroups: comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Tue, 17 Oct 2023 14:05:17 +0300
Organization: A noiseless patient Spider
Lines: 13
Message-ID: <20231017140517.03e9dbe931d4d33f14ae43a9@gmail.moc>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad>
<ugictr$vur3$1@dont-email.me>
<aWlXM.71246$tnmf.36958@fx09.iad>
<ugl46n$2oe4a$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="a9d9f9441c04798adbb168a6456c4371";
logging-data="3079133"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SCsBawjMSI3dFBmISPzCSiWFpKq51SZY="
Cancel-Lock: sha1:sd6a/8W3GyF0jMaeB62ZMh8kW70=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Tue, 17 Oct 2023 11:05 UTC

James Kuyper:

> One of the most common and most dangerous things that can
> happen when the behavior of code is undefined, is that it
> happens to behave in precisely the fashion you
> unjustifiably expected it to behave, leaving you unaware
> of the [Ant: a?] flaw in your program.

This is quotable, printable, and mountable.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: “ChattyG takes a college freshman C/C++ programming exam”

<20231017142536.334456ddceaa8a1495708c1b@gmail.moc>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton....@gmail.moc (Anton Shepelev)
Newsgroups: comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Tue, 17 Oct 2023 14:25:36 +0300
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <20231017142536.334456ddceaa8a1495708c1b@gmail.moc>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid>
<20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc>
<pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid>
<20231009230305.adfd0d80c146dc966ab22443@gmail.moc>
<878r8b7cb8.fsf@bsb.me.uk>
<86v8b88fak.fsf@linuxsc.com>
<87lec2cdss.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="a9d9f9441c04798adbb168a6456c4371";
logging-data="3087682"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19F3Mt4nJoRwbUWxL6EiNZuWtqwvWG+TfI="
Cancel-Lock: sha1:FOD+Lne9KPu/+75VhlNhFXPhffE=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
 by: Anton Shepelev - Tue, 17 Oct 2023 11:25 UTC

Ben Bacarisse:

> That "plain text" is 7-but ASCII is a cultural invention,
> large pushed by people for whom it is adequate.

Yes, it is a huge cultural stample, embraced (at one time)
by systems and software and people. Hence ASCII-art.

--
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ugm4gq$30fke$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Tue, 17 Oct 2023 16:08:26 +0200
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <ugm4gq$30fke$1@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid>
<20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc>
<pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid>
<20231009230305.adfd0d80c146dc966ab22443@gmail.moc>
<878r8b7cb8.fsf@bsb.me.uk> <86v8b88fak.fsf@linuxsc.com>
<87lec2cdss.fsf@bsb.me.uk>
<20231017142536.334456ddceaa8a1495708c1b@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 17 Oct 2023 14:08:26 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d7e9a54a42de4dbe78137953b00ae00a";
logging-data="3161742"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18U2KoxCYPmIXUeOOD5WcFBnkLKZcE9ADw="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:v2WOlwremQnWF9qwgCEUouLGTz8=
Content-Language: en-GB
In-Reply-To: <20231017142536.334456ddceaa8a1495708c1b@gmail.moc>
 by: David Brown - Tue, 17 Oct 2023 14:08 UTC

On 17/10/2023 13:25, Anton Shepelev wrote:
> Ben Bacarisse:
>
>> That "plain text" is 7-but ASCII is a cultural invention,
>> large pushed by people for whom it is adequate.
>
> Yes, it is a huge cultural stample, embraced (at one time)
> by systems and software and people. Hence ASCII-art.
>

You say "embraced", other people say "tolerated because there were not
good alternatives".

ASCII is, by its very definition, American-centred. That's not
unreasonable, given that the USA has been a major source of a great deal
of the development of the computing world. (And the it's not bad for
use in the UK either - the £ sign is about the only important missing
character for basic use.)

But the world is bigger than the USA. Other people want different
characters for different languages, symbols, diacriticals, alphabets,
etc. What is "plain text" to someone writing English has different
requirements from "plain text" to someone writing in Norwegian, Greek,
or Mandarin. And sometimes people want to use additional symbols to
make their writing clearer.

For Usenet, as for a lot of programming, it makes sense to stick to
ASCII for the most part. I would not write “text” with nice opening and
closing quotation marks, I'd write "text" with plain marks - Usenet
posts are never going to be typographical masterpieces. And in
programming, I'd write "pi" rather than "π", because I know some people
have to work with much more limited keyboard layouts.

But if non-ASCII characters are needed to make the writing clear, or to
spell words or names correctly in their language, I will use UTF-8
characters without hesitation. It's been the standard for long enough
that few people have trouble with it, and it is vastly better than any
alternative character encoding beyond ASCII.

If you look at the history of character encodings, you see that there
are vast numbers of them created over the decades. That is because
7-bit ASCII was /not/ embraced - it is a limited subset of characters
that is adequate for many purposes, but very far from ideal for many
more. (But I'm very glad it was 7-bit - that is what allowed UTF-8 to
work so well.)

It is, however, pretty idiotic to use UTF-8 along with a client that
does not support it!

Re: “ChattyG takes a college freshman C/C++ programming exam”

<86h6mp6zi7.fsf@linuxsc.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: tr.17...@z991.linuxsc.com (Tim Rentsch)
Newsgroups: comp.lang.c
Subject: Re: “ChattyG takes a college freshman C/C++
programming exam”
Date: Tue, 17 Oct 2023 08:26:56 -0700
Organization: A noiseless patient Spider
Lines: 160
Message-ID: <86h6mp6zi7.fsf@linuxsc.com>
References: <ufne0r$15ple$1@dont-email.me> <20231007235448.25c4986f123c88ff65d2f103@gmail.moc> <uftmh9$2vieq$1@dont-email.me> <20231008125543.518cab44cdefed7e8af393c8@gmail.moc> <pan$93d59$b5109882$fbf405c8$d4bea16f@invalid.invalid> <20231008200536.2aebe46b71bae8b879b5bddb@gmail.moc> <pan$da5cd$33b40da2$e72bf6b3$e30efcdc@invalid.invalid> <20231009230305.adfd0d80c146dc966ab22443@gmail.moc> <878r8b7cb8.fsf@bsb.me.uk> <86v8b88fak.fsf@linuxsc.com> <87lec2cdss.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: dont-email.me; posting-host="46dd1ea742c4d9233dee004a7c4550f9";
logging-data="3199859"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19DzyHBXuYJY5upxHti9qijPSBex4PDQwY="
User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Cancel-Lock: sha1:4wkFI4cY2Gdf2p6TiW/PFSiMCv8=
sha1:JxFoLYrDMkekoq/GvYvPi+b31LQ=
 by: Tim Rentsch - Tue, 17 Oct 2023 15:26 UTC

Ben Bacarisse <ben.usenet@bsb.me.uk> writes:

> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
>
>> Ben Bacarisse <ben.usenet@bsb.me.uk> writes:
>>
>>> Anton Shepelev <anton.txt@gmail.moc> writes:
>>>
>>>> Blue-Maned_Hawk to Anton Shepelev:
>>>>
>>>>>> Blue-Maned_Hawk:
>>>>>> [Unicode em-dash replaced with --]
>>>>>
>>>>> Why?
>>>>
>>>> Oh, it just doesn't go with Usenet, stylistically and
>>>> aesthetically.
>>>
>>> What is aesthetically wrong about using a bullet-point marker? What
>>> is stylistically wrong about writing accented characters?
>>>
>>>> English plain-text is much like
>>>> code -- 7-bit-clean.
>>>
>>> That's circular. By "plain-text" you mean 7-bit clean. Texts
>>> written in English have, traditionally, used all sort of
>>> typographical marks, and it has always been considered goof
>>> style to write correctly. Phonetic script should be rendered
>>> correctly. Foreign words should be rendered correctly.
>>>
>>> What many people think of a "plain" English text is just what we've
>>> been forced to write by clunky technology; first typewriters and
>>> then computers. We should more on. There was a time when people
>>> would moan if I sent a file with lower case letters in it because it
>>> could not be rendered on a CDC mainframe. Come on, it's the 21st
>>> century.
>>
>> I offer a dissenting view.
>>
>> I have two complaints. One is that in most cases people use
>> "exotic" typology when regular old ASCII would do just fine.
>
> Well, so far, that is not a dissenting view in that I agree.

Reading ahead, I see that we mostly agree. I'll give some
responses here and there, mostly for clarification I think.

> I suppose you mean one should not even encourage the possibility
> of doing so by keeping the character set limited. If so, that
> /is/ a dissenting view, but I'm guessing what you mean there.

I'm not trying to "contain" UTF-8. That cat is out of the bag,
never to return. I just don't want people to use it when they
don't have to.

>> If
>> someone wants to express twice as much or three times as much, it
>> seems perfectly okay to write "2x" or "3x" rather than insisting
>> on using a mathematical times symbol for the x. If someone wants
>> to show a list of items, using * rather than insisting on using
>> bullet characters is IMO not just acceptable but actually better.
>> Messages in the newsgroups should emphasize content over form;
>> fancy typology has an air of advertising copy, which is certainly
>> not what I want to read in comp.<whatever>.
>
> The problem is the linkage. We now have a way to write lots of
> things correctly -- pronunciations, currencies, people's names,
> places and so on. There's a cost to ruling out the abuse of
> [bullet?] when * would do.

I don't mean to rule out anything. I just want people to be
considerate of others, and not assume that something works in
my newsreader just because it works in theirs.

>> My second complaint has to do with being forced to use new tools
>> just "because it is there" or "more modern is always better".
>
> Again, not a dissenting view. Those are, I agree, terrible
> reasons for using Unicode. I am surprised you think I might hold
> it!

It was a general complaint; I didn't (and don't) mean to
attribute that attitude to you.

>> Bah, humbug. Quoted printable? Flowed? No line breaks
>> expecting wrapping will be done "automatically"?
>
> Did I say anything about these?

No, you didn't, but they are part and parcel of the same problem.
So in a sense I am overreacting. My complaint though is more a
reaction to a general attitude, not one specifically tied to
non-ASCII characters. I believe these trends are not independent.

>> I want plain
>> text, thank you very much,
>
> So do I. The point I was making is that what constitutes "plain
> text" is not somehow a matter of fact. There was a time when
> anything but a very limited character set was "plain". For some
> people, "plain" is an ISO 8859 encoding that let's them write
> their own name! That "plain text" is 7-but ASCII is a cultural
> invention, large pushed by people for whom it is adequate.

I don't completely agree that it is a cultural invention.
Network effects matter. The most common language in the world is
English, and that is not a coincidence. In any case, whatever
the cause, we can recognize the state of affairs and not be too
cavalier about changing them. I want evolution, not revolution.

>> but of course the fashion nowadays is
>> HTML emails. Yuck. I got an email recently where the content
>> could have been given in perhaps four or five short lines of
>> regular text, but instead the email had a PDF attachment that
>> showed the "message" as an image. An image! Awful. And the
>> worst thing is, it never stops. There is always some new tool,
>> some new technology, that I just /have/ to use, to keep up with
>> the never-ending "advance" of technology. Web sites that I have
>> used for years without any problems tell me that now to see their
>> pages I need to upgrade my browser. Forget it! I know that sort
>> of nonsense is inevitable in most of the internet, but I most
>> sincerely hope that attitude doesn't take root in Usenet.
>
> Presumably you are now joking, since there's no possible reason to
> think that I favour your dystopian picture, nor that using Unicode
> will inevitable lead to text in an image in a PDF.

Here again, my comments are not meant to be directed at you in
particular (and probably not at all), and I think these various
forces are not independent. Oh no, am I becoming a conspiracy
theorist? ;)

>> One final note - your own news posting says
>>
>> Content-Type: text/plain
>>
>> with no mention of UTF-8 (or other), or Content-Transfer-Encoding.
>> To which I say, Good!
>
> Yes. If you are surprised by that, it can only be because you've
> attributed to me a whole collection of opinions I don't have.
> Minimal sets with maximal reach are best when they suffice, and I
> don't use Unicode for the sake of it.

Not surprised, just amused. Good to hear the sentiments in your
last sentence.

> I use a client where the Content-Type is chosen from a list I
> specify. A while back, that list included the ISO-8859 characters
> set that let me write to my family in French and Spanish (I use
> the same client for email and Usenet). Now, I just use ASCII with
> a fall-back to UTF-8 so if ASCII suffices, it will be used. If
> that configuration is still working, my use of [bullet?] for
> illustration will have forced UTF-8 to be used.

Yes, I see that it did. And as expected we are more in agreement
than not (at least I think we are!).

Incidentally, the character I have translated as [bullet?] comes out
in my newreader as a question mark character.

Re: “ChattyG takes a college freshman C/C++ programming exam”

<ugmccu$328ca$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: Re:_“ChattyG_takes_a_college_freshman_C/C++_pro
gramming_exam”
Date: Tue, 17 Oct 2023 12:22:53 -0400
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <ugmccu$328ca$1@dont-email.me>
References: <ufne0r$15ple$1@dont-email.me>
<20231007235448.25c4986f123c88ff65d2f103@gmail.moc>
<uftmh9$2vieq$1@dont-email.me>
<20231008125543.518cab44cdefed7e8af393c8@gmail.moc>
<ufu3e1$2voq4$2@dont-email.me>
<20231008150352.5dfc8262244889e65a132733@gmail.moc>
<PpXWM.24780$w4ec.17265@fx14.iad> <ugictr$vur3$1@dont-email.me>
<aWlXM.71246$tnmf.36958@fx09.iad> <ugl46n$2oe4a$2@dont-email.me>
<20231017140517.03e9dbe931d4d33f14ae43a9@gmail.moc>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 17 Oct 2023 16:22:54 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a1ced4e1c6260113d794b3aa71715acd";
logging-data="3219850"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yushR/xxcMkuiMbugSCmi0qUg3McVSJI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:l8jW78AlGKEBpABHluZ+hs2H4xI=
In-Reply-To: <20231017140517.03e9dbe931d4d33f14ae43a9@gmail.moc>
Content-Language: en-US
 by: James Kuyper - Tue, 17 Oct 2023 16:22 UTC

On 10/17/23 07:05, Anton Shepelev wrote:
> James Kuyper:
>
>> One of the most common and most dangerous things that can
>> happen when the behavior of code is undefined, is that it
>> happens to behave in precisely the fashion you
>> unjustifiably expected it to behave, leaving you unaware
>> of the [Ant: a?] flaw in your program.

You're right - "a" works better; we don't know that it's the only flaw.


devel / comp.lang.c / Re: “ChattyG takes a college freshman C/C++ programming exam”

Pages:123
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor