Wednesday, May 27, 2020

Digest for comp.lang.c++@googlegroups.com - 17 updates in 4 topics

Manfred <noname@add.invalid>: May 27 03:21PM +0200

On 5/26/2020 1:18 PM, Mr Flibble wrote:
>> };
 
>> Using the "is a" logic relationship:
>> An apple "is a" fruit.
 
I'll give this one last chance.
This thread already sounds pretty much like a dialogue between deaf people.
 
> {
>     // what we are actually taking about which is bogus.
> };
 
This is what you have been repeating, but that's not what the standard
says about the relationship between pointers and iterators.
As far as I can understand you got this idea from Daniel quoting
footnote 261 in n4659, "This definition applies to pointers, since
pointers are iterators."
 
What I have been trying really hard to explain to you is that the
footnote sentence "pointers are iterators" states a "is a" relationship,
which is /not/ an identity relationship.
Your conclusion of "self-referential definition" (your point 3 above)
can only follow from the interpretation of the sentence "pointers are
iterators" as identity between pointers and iterators (your point 2
above), which is /not/ the case, and /not/ what the standard says.
 
 
>> In human language:
>> An apple is a fruit, but not all fruits are apples.
 
> I already used that as an example.
 
So what?
 
 
>> How else would you express the above in proper English?
 
> Try reading a post properly before replying to it.
 
This sounds like a lightning of theater of the absurd - which I find
great, by the way (the theater, not your comment: Beckett was
considerably better than you in the creative field).
 
>> "is a" relationship is an identity. In logic it is not.
>> Hence my correction of your step 3) above.
 
> See above for why you remain wrong.
 
Maybe you can see above why my correction of your conclusion is correct.
If not, too bad - I'm going to stop here anyway.
 
Daniel P <danielaparker@gmail.com>: May 27 06:49AM -0700

On Tuesday, May 26, 2020 at 7:18:37 AM UTC-4, Mr Flibble wrote:
> {
> // what we are actually taking about which is bogus.
> };
 
I think Mr Flibble attributes a meaning to "abstraction" that is not present in
the Standard, and certainly not in logic or mathematics. That reductio absurdum
doesn't follow.
 
Daniel
James Kuyper <jameskuyper@alumni.caltech.edu>: May 27 10:13AM -0400

On 5/27/20 9:21 AM, Manfred wrote:
> On 5/26/2020 1:18 PM, Mr Flibble wrote:
...
 
> What I have been trying really hard to explain to you is that the
> footnote sentence "pointers are iterators" states a "is a" relationship,
> which is /not/ an identity relationship.
 
I've been trying hard, and failing, to figure out what he might have
been misunderstanding to justify his incorrect conclusions about the
circularity of our arguments. Misinterpreting such statements as
implying an identity relationship would make our arguments appear
circular, so that might be the explanation.
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 27 09:47PM +0100

On 27/05/2020 14:21, Manfred wrote:
 
>> See above for why you remain wrong.
 
> Maybe you can see above why my correction of your conclusion is correct.
> If not, too bad - I'm going to stop here anyway.
 
My conclusion is correct.
 
The Standard says that an iterator is an abstraction of a pointer. A thing cannot be an abstraction of itself ergo a pointer is not an iterator.
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais
 
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say."
Daniel P <danielaparker@gmail.com>: May 27 02:15PM -0700

On Wednesday, May 27, 2020 at 4:47:32 PM UTC-4, Mr Flibble wrote:
 
> The Standard says that an iterator is an abstraction of a pointer. A thing
> cannot be an abstraction of itself ergo a pointer is not an iterator.
 
In type theory, any type is trivially a subtype of itself.
 
In mathematics, a group may be regarded as an abstraction of the set of integers, and the set of integers _is_ a group.
 
The considerations here are analogous.
 
Daniel
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 27 10:51PM +0100

On 27/05/2020 22:15, Daniel P wrote:
 
> In type theory, any type is trivially a subtype of itself.
 
> In mathematics, a group may be regarded as an abstraction of the set of integers, and the set of integers _is_ a group.
 
> The considerations here are analogous.
 
Erroneous analogy. False analogy. A thing cannot be an abstraction of itself. An iterator is an abstraction of iterators? Have a word, mate.
 
/Flibble
 
--
"Snakes didn't evolve, instead talking snakes with legs changed into snakes." - Rick C. Hodgin
 
"You won't burn in hell. But be nice anyway." – Ricky Gervais
 
"I see Atheists are fighting and killing each other again, over who doesn't believe in any God the most. Oh, no..wait.. that never happens." – Ricky Gervais
 
"Suppose it's all true, and you walk up to the pearly gates, and are confronted by God," Byrne asked on his show The Meaning of Life. "What will Stephen Fry say to him, her, or it?"
"I'd say, bone cancer in children? What's that about?" Fry replied.
"How dare you? How dare you create a world to which there is such misery that is not our fault. It's not right, it's utterly, utterly evil."
"Why should I respect a capricious, mean-minded, stupid God who creates a world that is so full of injustice and pain. That's what I would say."
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: May 26 04:52PM -0700

On 5/24/2020 7:47 PM, Sam wrote:
> math pendantically make it possible for 1*pow(2, 8), here, to result in
> 255 getting added to your "v". Surprise!
 
> Was, all of that, your intent here?
 
Basically. However, I want to extend this to handle higher bases. Right
how its only a 2-ary tree. It can be extended to n-ary. The code is down
right crude and very basic for now.
 
 
> why not, instead of all that, this can't be done as simply as:
 
>             v += bit * (1UL << i);
> ?
 
I just coded this up really fast. Was not thinking of optimizing at all.
 
 
>> Can you compile and run this thing?
 
> Yes, I can. And I got the same results as you, so what's the next step?
 
Well, to make it go n-ary. Also, its a try at getting my _highly_
experimental encryption based on complex numbers into integer land:
 
https://github.com/ChrisMThomasson/fractal_cipher/blob/master/RIFC/cpp/ct_rifc_sample.cpp
 
 
>> Notice the pattern in the ct (middle) column:
 
>> 0, 1, 2, 3, 4, 6, 5, 7, 8, 12, 10, 14, 9, 13, 11, 15, ...
 
> Yes, I noticed it. Happy to confirm it.
 
Thank you for taking the time to give it a go. I was not expecting to
reproduce the sequence, but there it is! Interesting.
The Real Non Homosexual <cdalten@gmail.com>: May 26 06:58PM -0700

I don't have a C++ compiler on my computer anymore otherwise I would have also tried to run it. Uhh....I just hang out here so that I can troll Dan Cross.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: May 27 12:26PM +0200

On 27.05.2020 01:52, Chris M. Thomasson wrote:
 
> Basically. However, I want to extend this to handle higher bases. Right
> how its only a 2-ary tree. It can be extended to n-ary. The code is down
> right crude and very basic for now.
 
Oh look, an efficient integral power function:
 
 
namespace impl
{
constexpr inline auto intpow( const double base, const int
exponent )
-> double
{
double result = 1;
double weight = base;
for( int n = exponent; n != 0; weight *= weight ) {
if( is_odd( n ) ) {
result *= weight;
}
n /= 2;
}
return result;
}
} // namespace impl
/// @endcond
 
/// \brief Efficient *x* to the *n*'th power, when *n* is an integer.
///
/// \param base The *x* in "*x* to the *n*'th".
/// \param exponent The *n* in "*x* to the *n*'th".
///
/// Essentially this is Horner's rule adapted to calculating a
power, so that the
/// number of floating point multiplications is at worst O(log2(n)).
constexpr inline auto intpow( const double base, const int exponent )
-> double
{
return (0?0
: exponent == 0? 1.0
: exponent < 0? 1.0/impl::intpow( base, -exponent )
: impl::intpow( base, exponent )
);
}
 
 
<url:
https://github.com/alf-p-steinbach/cppx-core-language/blob/master/source/cppx-core-language/calc/floating-point-operations.hpp>
 
 
[snip]
 
 
- Alf
Bart <bc@freeuk.com>: May 27 12:21PM +0100

On 25/05/2020 03:47, Sam wrote:
> why not, instead of all that, this can't be done as simply as:
 
>             v += bit * (1UL << i);
> ?
 
When i = 0, don't (2<<0) and pow(2,0) give different results? (Namely 2
and 1.0)
 
 
>> Notice the pattern in the ct (middle) column:
 
>> 0, 1, 2, 3, 4, 6, 5, 7, 8, 12, 10, 14, 9, 13, 11, 15, ...
 
> Yes, I noticed it. Happy to confirm it.
 
So can I, but in a completely different language. But I had to use **
(ie. pow) not shifts.
Ben Bacarisse <ben.usenet@bsb.me.uk>: May 27 01:01PM +0100

>> ?
 
> When i = 0, don't (2<<0) and pow(2,0) give different results? (Namely
> 2 and 1.0)
 
Yes, but the suggestion was to use 1UL << i, not 2 << i. (I might use
1ull to get be sure to get the widest unsigned standard type.)
 
 
>> Yes, I noticed it. Happy to confirm it.
 
> So can I, but in a completely different language. But I had to use **
> (ie. pow) not shifts.
 
C++'s shifts on unsigned types are defined in terms of powers, so
provided you can represent the value in the chosen type, you can rely on
shifts to do the job.
 
--
Ben.
Bart <bc@freeuk.com>: May 27 03:22PM +0100

On 27/05/2020 13:01, Ben Bacarisse wrote:
>> 2 and 1.0)
 
> Yes, but the suggestion was to use 1UL << i, not 2 << i. (I might use
> 1ull to get be sure to get the widest unsigned standard type.)
 
OK, that's probably why it didn't work!
 
Using 1<<i and i<<(level-i-1) worked as far as I could see.
(Calculations all using signed 64 bits in the language I used.)
Manfred <noname@add.invalid>: May 27 03:36PM +0200

On 5/27/2020 12:46 AM, Sam wrote:
>> contained object may survive its container.
 
> Actually, it's the opposite: the contained object may not survive its
> container.
 
No it's not the opposite.
The container I am referring to is the "basket" of your example upthread:
 
 
> const apple &getApple() const & { return fuji; }
 
> apple getApple() && { return fuji; }
> };
 
wherein you wish that
 
const auto &lunch=get_current_basket()->getApple();
 
yields an apple that survives the basket.
 
 
> And in case of std::unique_ptr, it's guaranteed not to survive its
> container.
 
std::unique_ptr is a smart pointer. I was not referring to it as a
container.
 
> My contract, is that penthouse() returns a container for an office of
> some kind that implements get_available_hours() whose lifetime exists as
> long as the object that implements get_available_hours() exists.
 
So, you want some available_hours object to be part of (contained
within) an office object, and still survive the office.
 
> automatically extended, as per the current rules of doing so.
 
> Also: whatever object penthouse() returned has served its purpose, and
> can go away, and it doesn't have to exist until the end of the scope.
 
Right, but then if you want available_hours to be a self standing
object, why do you declare it with auto& ?
 
Also: I notice some possible overuse of auto for my taste here.
 
rick.c.hodgin@gmail.com: May 26 09:20PM -0700

[Jesus Loves You] Messages of hope and a future
 
Jesus believed in the global flood. There is unavoidable evidence
of a world-wide flood. Did you know that the Chinese symbols for
words relating to the flood depict Noah's Ark?
 
Global Flood, As in the days of Noah so are we now:
https://www.youtube.com/watch?v=ISCcXB4s0kk
 
Will you let Jesus satisfy your soul?
 
Who is Jesus? What does He bring to you?
https://www.youtube.com/watch?v=fNsuaNSwzIs
 
-----
The messages above are from the DTBM (Discover The Book Ministries)
channel on YouTube. They're by a teacher that really explains things,
and is so gentle. He doesn't make you feel guilty about things you've
done wrong from a Biblical perspective, but teaches you the truth and
gives you space to move from within your own heart.
 
God loves you. Judgment is coming soon for sin. Jesus came to
give us all an escape from that judgment. If you believe in Jesus,
and3 ask Him to forgive your sin He will. You can be set free from
that coming courtroom appearance before God to give an account of
your life of sin unto death. You can be forgiven so when you stand
before God you will be unashamed, without fear. You can have etern-
ity secure right now.
 
Things regarding Jesus seem foolish ... until you start investigating
them with a truth-seeking heart desiring to honestly and truly know
what the Bible teaches and why. If you move in that way, God will
open up your understanding, and the foolishness will be replaced with
knowledge and faith leading to the salvation of your soul from death,
from judgment, from the lake of fire.
 
You are not promised tomorrow. Don't put it off. Seek to learn the
truth, exactly what the Bible teaches warts and all, today.
 
All any Christian asks you to do is: SEEK THE TRUTH. DEMAND IT
EVEN. INSIST THAT THE BIBLE REVEAL TO YOU THE FULL EXPLANATION OF
WHAT IS SAYS AND WHY. The truth-seeking soul will not be disappointed.
 
--
Rick C. Hodgin
Juha Nieminen <nospam@thanks.invalid>: May 27 06:35AM

> [Jesus Loves You] Messages of hope and a future
 
You may get a sense of martyrdom and righteous victimhood when you keep
spamming this newsgroup with provocative off-topic content and getting
negative reactions. However, even if your god were real and exactly
like you believe him to be, even he wouldn't approve of you behaving
like this. I think that even he would rebuke you for this kind of
disruptive behavior. He would not be pleased with you. I don't think
even he would want you to spread his word in this manner.
 
The fact that you don't accept that makes you an obsessed bigot.
"Öö Tiib" <ootiib@hot.ee>: May 27 12:57AM -0700

On Wednesday, 27 May 2020 09:35:32 UTC+3, Juha Nieminen wrote:
> However, even if your god were real and exactly
> like you believe him to be, even he wouldn't approve of you behaving
> like this.
 
Why? God loves all spammers. He did pray and his mail boxes are full of
that vital information. So God deserves to be advertised in same manner
as the other goodies.
rick.c.hodgin@gmail.com: May 27 05:05AM -0700

Listen to the videos. The teacher explains it with archaeological
evidence, multi-cultural parallelism in flood legends, and scientific
analysis and observation in the physical world.
 
I care about your eternal soul. Watch the videos and learn the facts
and decide for yourself from an informed point of view if what I teach
is true or not.
 
Satan deceives people into believing lies. God only is always truthful.
Remember that when you hear alternate explanations for things recounted
in the Biblical narrative.
 
You are valuable, a remarkable creation of God. I want to see you
thriving in Heaven.
 
--
Rick C. Hodgin
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: