Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <8734p3rjno.fsf@bsb.me.uk>
Deutsch   English   Français   Italiano  
<8734p3rjno.fsf@bsb.me.uk>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ben Bacarisse <ben@bsb.me.uk>
Newsgroups: comp.lang.c
Subject: Re: Baby X is bor nagain
Date: Sun, 23 Jun 2024 12:19:23 +0100
Organization: A noiseless patient Spider
Lines: 108
Message-ID: <8734p3rjno.fsf@bsb.me.uk>
References: <v494f9$von8$1@dont-email.me> <20240613174354.00005498@yahoo.com>
	<v4okn9$flpo$2@dont-email.me> <20240617002924.597@kylheku.com>
	<v4pddb$m5th$1@dont-email.me> <20240618115650.00006e3f@yahoo.com>
	<v4rv0o$1b7h1$1@dont-email.me> <20240618184026.000046e1@yahoo.com>
	<v4sd75$1ed31$1@dont-email.me>
	<877celzx14.fsf@nosuchdomain.example.com>
	<v4u85k$1t2pu$2@dont-email.me> <v4ucmn$1u14i$1@dont-email.me>
	<v4v2br$22c0m$1@dont-email.me> <v4v5nu$230rh$2@dont-email.me>
	<v4vfrn$24rv6$1@dont-email.me> <v50n9s$2fkko$1@dont-email.me>
	<v50poh$2g4ha$1@dont-email.me> <87iky3svqh.fsf@bsb.me.uk>
	<874j9nxsdy.fsf@nosuchdomain.example.com> <874j9ns382.fsf@bsb.me.uk>
	<86h6dlhb34.fsf@linuxsc.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Sun, 23 Jun 2024 13:19:26 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="8e298ef9233142ad2625f347aab31424";
	logging-data="349947"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/2iBZ/ktWXddbrtHPzlryq5YOSFMmV4eo="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:iIOAnNEyvGzZBcvUE04VdMf572U=
	sha1:lec+i1xCEIHcsltNcSZgB0A62mI=
X-BSB-Auth: 1.fd44ce4704c8c57a2984.20240623121923BST.8734p3rjno.fsf@bsb.me.uk
Bytes: 6560

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

> Ben Bacarisse <ben@bsb.me.uk> writes:
>
>> Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:
>>
>>> Ben Bacarisse <ben@bsb.me.uk> writes:
>>> [...]
>>>
>>>> On a C language point, I don't think the standard says anything about
>>>> sorting with non-order functions like the one above.  Is an
>>>> implementation of qsort permitted to misbehave (for example by not
>>>> terminating) when the comparison function does not implement a proper
>>>> order relation?
>>>
>>> N1570 7.22.5p4 (applies to bsearch and qsort):
>>> """
>>> When the same objects (consisting of size bytes, irrespective of
>>> their current positions in the array) are passed more than once to
>>> the comparison function, the results shall be consistent with one
>>> another.  That is, for qsort they shall define a total ordering on
>>> the array, and for bsearch the same object shall always compare
>>> the same way with the key.
>>> """
>>>
>>> That's a "shall" outside a constraint, so violating it results in
>>> undefined behavior.
>>
>> I think it should be clearer.  What the "that is" phrase seems to
>> clarify in no way implies a total order, merely that the repeated
>> comparisons or the same elements are consistent with one another.  That
>> the comparison function defines a total order on the elements is, to me,
>> a major extra constraint that should not be written as an apparent
>> clarification to something the does not imply it:  repeated calls should
>> be consistent with one another and, in addition, a total order should be
>> imposed on the elements present.
>
> I think you're misreading the first sentence.

Let's hope so.  That's why I said it should be clearer, not that it was
wrong.

> Suppose we are in
> court listening to an ongoing murder trial.  Witness one comes in
> and testifies that Alice left the house before Bob.  Witness two
> comes in (after witness one has gone) and testifies that Bob left
> the house before Cathy.  Witness three comes in (after the first
> two have gone) and testifies that Cathy left the house before
> Alice.  None of the witnesses have contradicted either of the
> other witnesses, but the testimonies of the three witnesses are
> not consistent with one another.

My (apparently incorrect) reading of the first sentence is that the
consistency is only required between the results of multiple calls
between each pair.  In other words, if the witnesses are repeatedly
asked, again and again, if Alice left before Bob and/or if Bob left
before Alice the results would always be consistent (with, of course,
the same required of repeatedly asking about the other pairs of people).

> Try a web search
>
>     "consistent with" definition
>
> for more explanation.

Seriously?

> Also, for "one another", if we say the
> children in the Jones family get along with one another, we don't
> mean that each child gets along with at least one of the others,
> but instead mean that every child gets along with every other
> child, that is, that they all get along with each other.

The sentence in question has, to my mind, already stated what the "one
another" refers to -- the multiple calls between pairs containing the
same objects.  I get you think that's not the intended meaning, but I
get my reading so strongly that I struggle to see the other.

> Whether
> or not some other reading (of that problem sentence in the C
> standard) is sensible, surely the reading I have suggested is a
> plausible one.  Do you agree?  It seems clear, given how the
> second sentence is phrased, that this suggested reading is what
> was intended.

I still can't read it the way you do.  Every time I try, I find the
consistency is to be taken as applying to the results of the multiple
calls between pairs of the same objects.  Nothing more.  It starts with
"When the same objects".  It seems so clear that the consistency is all
about the multiple calls with these same objects.  I keep trying to see
your reading of it, but I can't.

> I don't mean to defend the quality of writing in this passage.
> Certainly it would be nice if the meaning could have been stated
> more plainly.  But I think it's an overstatement to say that the
> first sentence in no way implies a total order.

I have a second objection that promoted that remark.  If I take the
(apparently) intended meaning of the first sentence, I think that
"consistent" is too weak to imply even a partial order.  In dog club
tonight, because of how they get on, I will ensure that Enzo is walking
behind George, that George is walking behind Benji, Benji behind Gibson,
Gibson behind Pepper and Pepper behind Enzo.  In what sense is this
"ordering" not consistent?  All the calls to the comparison function are
consistent with each other.

-- 
Ben.