Wednesday, June 10, 2020

Digest for comp.lang.c++@googlegroups.com - 25 updates in 8 topics

Sal LO <gegefffffff@gmail.com>: Jun 10 09:58AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
Juha Nieminen <nospam@thanks.invalid>: Jun 10 07:08PM

> On Tuesday, June 9, 2020 at 2:53:55 PM UTC-4, Juha Nieminen wrote:
>> Are you able to comprehend what other people write to you?
 
> Of course.
 
Clearly not, given your inability to respond to what I write.
gazelle@shell.xmission.com (Kenny McCormack): Jun 10 07:15PM

In article <rbrb46$1lm2$1@gioia.aioe.org>,
>>> Are you able to comprehend what other people write to you?
 
>> Of course.
 
>Clearly not, given your inability to respond to what I write.
 
Rick & Kiki are very much alike. They both are in transmit-only mode (*).
They have no interest in anything anyone else has to say.
 
And, of course, anyone who disagrees with them, just need to be preached to
again (and again and again until done).
 
(*) "write-only" would be the more "computer-ish" term.
 
--
The plural of "anecdote" is _not_ "data".
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jun 09 04:38PM -0700

James Kuyper <jameskuyper@alumni.caltech.edu> writes:
[...]
> One more minor quibble:
 
And another:
 
[...]
 
> Note that any pointer to a function can be converted to a pointer of any
> other type and back again, with the result being guaranteed to be equal
> to the original.
 
You accidentally a word.
 
Note that any pointer to a function can be converted to a pointer of any
other _function_ type and back again, with the result being guaranteed
to be equal to the original.
 
(The snipped context makes it obvious that you already knew that, of course.)
 
[...]
 
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
James Kuyper <jameskuyper@alumni.caltech.edu>: Jun 09 07:11PM -0400

On 6/9/20 4:21 AM, Scott Newman wrote:
...
> int (* CC pSub)( S *, int, int ) = sub;
...
> *vtable = (void *)pSub;
 
One more minor quibble:
 
"Converting a function pointer to an object pointer type or vice versa
is conditionally-supported. The meaning of such a conversion is
implementation-defined, except that if an implementation supports
conversions in both directions, converting a prvalue of one type to the
other type and back, possibly with different cv-qualification, shall
yield the original pointer value." (8.2.10p6).
 
So this supposedly "100% portable" code cannot be ported to systems (and
there are some in the real world) that do not support such conversions.
On such systems, the only function pointers that are guaranteed
convertible to void* are null pointers - which wouldn't be much use in
this context.
 
Note that any pointer to a function can be converted to a pointer of any
other type and back again, with the result being guaranteed to be equal
to the original. Therefore, while void* cannot be portably used for this
purpose, any arbitrary pointer to function type could be. I normally use
void(*)(void) for such purposes. However, there's no guarantee what type
any give implementation uses for it's vtable entries. While any two
pointer to function types are required to support round-trip
conversions, they are not required to all have the same representations,
or even the same size, so it could make a difference.
James Kuyper <jameskuyper@alumni.caltech.edu>: Jun 09 11:48PM -0400

On 6/9/20 7:38 PM, Keith Thompson wrote:
> other _function_ type and back again, with the result being guaranteed
> to be equal to the original.
 
> (The snipped context makes it obvious that you already knew that, of course.)
 
Thanks!
Scott Newman <scott69@gmail.com>: Jun 10 08:08AM +0200

>> My code is optimized for performance. So compile it with -O3.
 
> Same result.
 
You are lying.
James Kuyper <jameskuyper@alumni.caltech.edu>: Jun 10 11:43AM -0400

On 6/10/20 2:08 AM, Scott Newman wrote:
>>> My code is optimized for performance. So compile it with -O3.
 
>> Same result.
 
> You are lying.
 
You don't have to take his word for it. See
<https://godbolt.org/z/hHza4->. It doesn't say "segmentation violation"
anywhere that I can see. I might have missed something, I don't use
godbolt.org very often. However, you'll notice that the output in the
right pane only has the "3" from the first cout line. The -1 that you
probably expected to be produced by the second cout line is nowhere to
be seen.
I got the same results with version 10.0. With the latest version of
clang, I got the sanitizer results Ben described - and again, only the 3
appeared, not the -1.
So, are you going to claim that godbolt.org is lying?
Scott Newman <scott69@gmail.com>: Jun 10 06:03PM +0200

> So, are you going to claim that godbolt.org is lying?
 
You've modified the code.
Ben Bacarisse <ben.usenet@bsb.me.uk>: Jun 10 05:21PM +0100

> right pane only has the "3" from the first cout line. The -1 that you
> probably expected to be produced by the second cout line is nowhere to
> be seen.
 
Also, It reports the program "returned" 139 (though YMMV) showing that
the execution did not run to the end of main.
 
> clang, I got the sanitizer results Ben described - and again, only the 3
> appeared, not the -1.
> So, are you going to claim that godbolt.org is lying?
 
Just to simplify things a bit... whilst you included all the options I
did but it's only -fsanitize=undefined that is catching the error.
 
--
Ben.
Sal LO <gegefffffff@gmail.com>: Jun 10 09:57AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
James Kuyper <jameskuyper@alumni.caltech.edu>: Jun 10 01:12PM -0400

On 6/10/20 12:03 PM, Scott Newman wrote:
>> So, are you going to claim that godbolt.org is lying?
 
> You've modified the code.
 
I copy-pasted the code directly from your message. Then I told
Thunderbird to show me the message source, and copy-pasted some of the
main headers from your message in order to clearly identify where it
comes from. I preceded each of those headers with //, making them C++
comments, which shouldn't have any effect on either the compilation or
the execution of the program. I didn't intend to make any other
modifications - if you've found any, they were unintentional. Let me
know what they are, and I'll be happy to correct them. Alternatively,
you can make the correction yourself, and share the results with us.
 
One of the wonderful things about godbolt is that it lets you experiment
with a wide variety of different compilers. I'd be very interested in
knowing which compilers you've found for which the code compiles without
error and executes as intended. Most compilers have lots of options, and
I'm not sure which ones would be appropriate for making your code work
as intended - but presumably you do. Could you do some checking, and let
us know the results?
Sal LO <gegefffffff@gmail.com>: Jun 10 09:59AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
Sal LO <gegefffffff@gmail.com>: Jun 10 09:59AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
Sal LO <gegefffffff@gmail.com>: Jun 10 09:59AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
Sal LO <gegefffffff@gmail.com>: Jun 10 09:58AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jun 09 06:20PM -0700

On 6/9/2020 1:29 PM, Vir Campestris wrote:
 
>> Indeed. However, they are fairly similar nonetheless. Just enough to
>> make one ponder... ;^)
 
> I hadn't noticed. Bonita seems far more sane.
 
Agreed.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jun 09 06:22PM -0700

On 6/9/2020 1:40 PM, Ian Collins wrote:
>> real?
 
> An obvious and successful troll.  Either a Bonita alias or copycat.  It
> amazes that otherwise sensible posters keep responding to both of them.
 
Sometimes, just sometimes, some side threads can be created from the
trolling, that is actually interesting.
Keith Thompson <Keith.S.Thompson+u@gmail.com>: Jun 09 06:54PM -0700

>> them.
 
> Sometimes, just sometimes, some side threads can be created from the
> trolling, that is actually interesting.
 
This is not an example of that phenomenon.
 
--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips Healthcare
void Void(void) { Void(); } /* The recursive call of the void */
Daniel P <danielaparker@gmail.com>: Jun 09 08:09PM -0700

On Tuesday, June 9, 2020 at 4:30:05 PM UTC-4, Vir Campestris wrote:
 
> Bonita seems far more sane.
 
Scott Newman's posts lack any sign of intelligence, Bonita's do not. I can't imagine Chris Thomasson finding anything interesting in Scott Newman's worthy of a reply, as he clearly has in Bonita's. On the other hand, Scott Newman's posts are clearly mimicking some less fortunate aspects of Bonita's style.
 
Daniel
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jun 09 08:49PM -0700

On 6/9/2020 8:09 PM, Daniel P wrote:
> On Tuesday, June 9, 2020 at 4:30:05 PM UTC-4, Vir Campestris wrote:
 
>> Bonita seems far more sane.
 
> Scott Newman's posts lack any sign of intelligence, Bonita's do not.
 
Indeed. Bonita is smart. Its just the insults and the lack of
attributions that sparked something within me to, take an interest in
the apparent similarities.
 
 
> I can't imagine Chris Thomasson finding anything interesting in Scott Newman's worthy of a reply, as he clearly has in Bonita's.
 
Bonita's input has created very interesting threads. Imho, Bonita
created a very interesting read write mutex. Nice and interesting. I
even recreated it in Relacy.
 
> ? On the other hand, Scott Newman's posts are clearly mimicking some less fortunate aspects of Bonita's style.
 
This is basically impossible to disagree with. Humm...
 
 
 
Sal LO <gegefffffff@gmail.com>: Jun 10 09:58AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jun 09 10:17PM -0700

On 6/4/2020 10:53 AM, Mr Flibble wrote:
 
> Spacecraft displays should be 4:3 and NOT widescreen to ensure
> consistency with 2001: A Space Odyssey.
 
> /Flibble
 
They need a resolution big enough to show the damn aliens:
 
http://siggrapharts.ning.com/photo/alien-anatomy
 
;^)
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Jun 09 10:25PM -0700

On 6/9/2020 10:17 PM, Chris M. Thomasson wrote:
 
> They need a resolution big enough to show the damn aliens:
 
> http://siggrapharts.ning.com/photo/alien-anatomy
 
> ;^)
 
4000x2300 , small but good enough for this image.
Sal LO <gegefffffff@gmail.com>: Jun 10 09:58AM -0700

https://youtu.be/4dZMCc0awgM?t=27
 
https://youtu.be/4dZMCc0awgM?t=27
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: