Thursday, October 13, 2016

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

"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Oct 13 11:49PM +0200

On 13.10.2016 23:24, Stefan Ram wrote:
> In a video someone said, there was no small-vector optimization
> anymore. Some requirement of C++11 or C++14 (inadvertently?) made it
> impossible.
 
Yes, that iterators and references remain valid and refer to the same
items after a swap.
 
Also, that a swap doesn't copy or swap or move individual items.
 
I.e. swap really means swapping buffers, not just buffer contents.
 
• • •
 
C++11 §23.2.1/8 (a.k.a. container.requirements.general/8):
 
"The expression a.swap(b), for containers a and b of a standard
container type other than array, shall exchange the values of a and b
without invoking any move, copy, or swap operations on the individual
container elements. Any Compare, Pred, or Hash objects belonging to a
and b shall be swappable and shall be exchanged by unqualified calls to
non-member swap. If
allocator_traits<allocator_type>::propagate_on_container_swap::value is
true, then the allocators of a and b shall also be exchanged using an
unqualified call to non-member swap. Otherwise, they shall not be
swapped, and the behavior is undefined unless a.get_allocator() ==
b.get_allocator(). Every iterator referring to an element in one
container before the swap shall refer to the same element in the other
container after the swap. It is unspecified whether an iterator with
value a.end() before the swap will have value b.end() after the swap.
"
 
 
> #include <string>
 
> int main() { ::std::basic_string< double > s{ 1.2, 3.6 }; ::std::cout
> << s.at( 0 )<< '\n'; }
 
Well, in order to properly specialize `std::basic_string` you should
provide a corresponding `std::char_traits`. That doesn't make sense
here. And from that you can conclude, that `std::basic_string` was not
made for this.
 
I'd simply use a raw array, or possibly a `std::array`.
 
If you want the predictable/reliable range checking of `at` you can just
code up a little helper function for indexing.
 
 
Cheers & hth.,
 
- Alf
Lynn McGuire <lynnmcguire5@gmail.com>: Oct 13 12:43PM -0500

On 10/12/2016 3:27 PM, Melzzzzz wrote:
> It is said that light was first created then Sun and stars ;)
> And before light Earth was already there ;)
> And what was Earth in Bible? You tell me. It isn't planet for sure ;)
 
Please, the Bible is 100% correlative with science. You are mistaking the terminology of the prose with facts.
 
"1 In the beginning God created the heavens and the earth. 2 Now the earth was formless and empty, darkness was over the surface of
the deep, and the Spirit of God was hovering over the waters."
 
"3 And God said, "Let there be light," and there was light. 4 God saw that the light was good, and he separated the light from the
darkness. 5 God called the light "day," and the darkness he called "night." And there was evening, and there was morning—the first day."
 
The Big Bang created a very small amount of matter and an incredible amount of energy, the temperature must have been in millions of
Kevin. The universe started expanding, the temperature dropped and the matter started condensing into stars. The planets were
created via stars. And the universe is still expanding and the temperature is still dropping.
 
Lynn
scott@slp53.sl.home (Scott Lurndal): Oct 13 05:46PM

>> And before light Earth was already there ;)
>> And what was Earth in Bible? You tell me. It isn't planet for sure ;)
 
>Please, the Bible is 100% correlative with science.
 
Bullshit.
 
>"1 In the beginning God created the heavens and the earth.
 
And your proof for this statement is? Note that self-referential
proof is not acceptable.
 
2 Now the earth was formless and empty, darkness was over the surface of
>the deep, and the Spirit of God was hovering over the waters."
 
And your proof for this statement is?
Real Troll <real.troll@trolls.com>: Oct 13 02:15PM -0400

On 12/10/2016 17:40, Mr Flibble wrote:
> Rick C. Hodgin down the pub with his mate at Christmas time:
 
At first I thought you wanted to say that Rick C Idiot has become
another suicide bomber and I was just about to open a bottle to rejoice
for the fact that we won't see him ever again but you disappointed me.
 
How old is he, do you know? The sooner he goes the better it would be
for the mankind!!!!!!!!!!!!!!!!!!!!!!
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 13 11:47AM -0700

On Thursday, October 13, 2016 at 2:09:06 PM UTC-4, Real Troll wrote:
> for the fact that we won't see him ever again but you disappointed me.
 
> How old is he, do you know? The sooner he goes the better it would be
> for the mankind!!!!!!!!!!!!!!!!!!!!!!
 
I am 47 years old (or about 17,231 days):
 
http://www.visual-freepro.org/wiki/index.php/Rick_C._Hodgin
https://www.facebook.com/rick.c.hodgin
https://www.linkedin.com/in/rick-hodgin-24bb1864
 
Best regards,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 13 11:55AM -0700

On Thursday, October 13, 2016 at 1:46:27 PM UTC-4, Scott Lurndal wrote:
> >> And what was Earth in Bible? You tell me. It isn't planet for sure ;)
 
> >Please, the Bible is 100% correlative with science.
 
> .. .
 
Have you examined it, Scott? Or did you, like I did, summarily conclude
upon the initial mention of anything related to God or the Bible, based
on the many failings of men who profess faith in Jesus Christ, that it must
be complete nonsense?
 
It wasn't until I began to examine things personally, and deeply, that I
came to see it as truth.
 
> >"1 In the beginning God created the heavens and the earth.
 
> And your proof for this statement is? Note that self-referential
> proof is not acceptable.
 
It's not possible that the Big Bang existed. At a time frame of before
approximately 10^(-31) seconds in the traditional model, things would've
been accelerating at speeds beyond the speed of light. Since we know
that's not possible, it's not possible for the Big Bang to have happened
even if we assume that it wasn't created by God and use our mathematical
model.
 
> 2 Now the earth was formless and empty, darkness was over the surface of
> >the deep, and the Spirit of God was hovering over the waters."
 
> And your proof for this statement is?
 
There is no proof of it. But there's also nothing to contradict it. If
we begin at the fact that there is nothing to contradict it, then we can
chalk it up to an unproven claim the Bible makes, and then go on to see
if other claims the Bible makes are actually true, those we can actually
verify.
 
You'll find when you begin investigating the Bible, it is correct. The
things it claims are either directly verifiable, or they cannot be
disproven. And when you press in deeply, you'll see that the model the
Bible gives in all areas is accurate, accounts for what could have
happened, and is, when you come to know the character and nature of Jesus
Christ, an accurate account of what did happen.
 
Press in, Scott. Seek the honest and true truth for yourself. Do not
take ANYONE's word for it. Study for yourself and examine deep, deep,
and come to find the truth out for yourself.
 
And I advise the same for everyone else. Do not summarily dismiss this
point because there is so much riding on it ... if what the Bible says
is true. And since I'm not asking you for money, or to join my church,
or to do anything other than seek the truth and examine it for yourself,
then what do I have to gain by doing this? Nothing. My prompting of
you is legitimately based upon my faith, and in teaching others that
which He first taught me. I care about your eternal soul, and I am
advising you toward the end which leads to salvation for your eternal
soul, and an eternity lived prospering in paradise (as God intended it
to be BEFORE sin came in and destroyed everything). So it can be again,
through Jesus Christ and the forgiveness of sin He freely offers us.
 
Best regards,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 13 12:07PM -0700

On Thursday, October 13, 2016 at 2:58:24 PM UTC-4, Rick C. Hodgin wrote:
> that's not possible, it's not possible for the Big Bang to have happened
> even if we assume that it wasn't created by God and use our mathematical
> model.
 
Here is a video outlining several answers that believers in the model
of molecules to man evolution (Big Bang to people over billions of
years) cannot answer, and are assuming on faith that their beliefs are
correct, proving that molecules to man evolution is a literal religion,
and not science:
 
https://www.youtube.com/watch?v=seGBTsLpMdI
 
Best regards,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 13 12:20PM -0700

On Thursday, October 13, 2016 at 3:07:51 PM UTC-4, Rick C. Hodgin wrote:
> correct, proving that molecules to man evolution is a literal religion,
> and not science:
 
> https://www.youtube.com/watch?v=seGBTsLpMdI
 
Now, you move into the areas of genetics research and you are absolutely
forced to conclude design. There are so many facets working in multiple
different dimensions atop the raw chemical sequence that is the A/T, C/G
of DNA, that the information systems built atop it could not have come
about by random chance no matter how much time they were given. It's
literally mathematically impossible in this universe.
 
And then you look at the varied life forms, the varied speciation within
each kind, the purpose of all of those life forms (to support man, God's
greatest creation), and you come away with not only a designer, but an
incredibly loving designer.
 
And then you look at the problems with this world, the way that there is
fighting and hate and war and disease and death and you naturally ask
yourself questions, "Why?" And then a document like the Bible is given
to you which answers those questions: sin.
 
It adds up to the truth. It adds up to a revelation. It adds up to that
which all people world-wide need to be set free from the system they're
an active part in, even if they aren't actively being a part of it so as
by their actions, simply by being alive they are directly and eternally
involved ... God's creation here upon the Earth.
 
-----
Upon the Earth we occupy these bodies. They have issues, disease is here,
we are not all of equal strength, equal reflexes, equal mental abilities,
and so on. We are varied and distinct. But these bodies are not our final
home. These are temporary tents that we occupy while we are here upon this
Earth.
 
The day is coming for each of us when we will leave this Earth. Could be
later today, tomorrow, next week, next month, next year, or after. But at
some point, each of us has an appointment with eternity. What happens then?
 
The Bible teaches us the truth about ourselves, the truth about eternity,
the truth about God, the truth about sin, the truth about the enemies of
God, and the necessity each of us possess to be set free from the crossfire
we've found ourselves in the midst of.
 
Each of us is born into sin, the sin of Adam brought forth through the many
generations unto the death we all must occupy at some point when our final
breath on this Earth is drawn. But that's not the end of our existence.
 
We are eternal beings who, for a time occupy this body. Why? Why does God
keep us here? It is because of the nature of the battle we face, which is
a battle against sin. Sin was introduced here upon the Earth, and it is
here upon the Earth that we must find forgiveness of sin, personally and
individually.
 
The original sin of Adam exists, but each of us also carry our own sin.
You need only spend a moment reading the 10 commandments to find out that
you have violated most if not all of them:
 
http://biblehub.com/kjv/exodus/20.htm
 
Each of us is guilty. God knows this. And those who are saved also know
this. But because of sin there is a great deception hanging over our
minds such that we do not know this. But God has promised that all people
who seek the truth, who come looking for the real truth, and who are not
content to be wrapped up in and believe the lie, that ALL who come to Him
seeking the truth honestly and truly, ALL of them will find it. It is His
promise to us, because Jesus Christ is truth, and all who seek Him find
Him, and all who find Him are set free by Him.
 
There is so much to this teaching, but for each of us it begins with a
journey in pursuit of the truth. We must seek after the things we find
in this world rightly, and truly, and purposefully, and with our sights
and sails heading always for the truth. And in so doing we are known to
God to be doing this, AND IT IS HE HIMSELF who then reaches into our
innermost being, flipping whatever switches are required, enabling us by
His grace and supernatural powers, to be able to literally come to know
the truth. Until this happens, we'll never find it, and will be forever
blind to it.
 
I urge each of you, with all that I possess in my life, to seek after
the truth with a full effort. Pursue it with vigor. Search for it like
you were searching for gold. In so doing you will find it, and in
finding it you will save your eternal soul by coming to Jesus Christ and
asking forgiveness for your sin, so that you too can live on in eternity
with God, in the paradise of God, prospering forever in a body that never
ages, and is more beautiful than the angels.
 
Best regards,
Rick C. Hodgin
Real Troll <real.troll@trolls.com>: Oct 13 04:59PM -0400

Your mental age seems to be 8.75!! Jesus got it wrong here then!!!
 
On 13/10/2016 19:47, Rick C. Hodgin wrote:
"Chris M. Thomasson" <invalid@invalid.invalid>: Oct 13 02:35PM -0700

On 10/13/2016 11:55 AM, Rick C. Hodgin wrote:
> that's not possible, it's not possible for the Big Bang to have happened
> even if we assume that it wasn't created by God and use our mathematical
> model.
[...]
 
IMVVHO, our universe is contained in a black hole, contained in our
parent universe. Time between the parent and child are radically
different. Its almost like a super massive black hole is a bifurcation
point. It can create another universe contained within itself. Its very
fractal in nature, creating a cosmic tree where branching points are
very massive stars exploding. I think God is this tree, with no
beginning, and no end. It was never created and will never die.
 
Oh well, call me crazy...
 
;^)
jacobnavia <jacob@jacob.remcomp.fr>: Oct 13 11:38PM +0200

Le 13/10/2016 à 19:46, Scott Lurndal a écrit :
>>> And what was Earth in Bible? You tell me. It isn't planet for sure ;)
 
>> Please, the Bible is 100% correlative with science.
 
> Bullshit.
 
Look, bull shit is useful for many insects and bacteria, that live
inside that. You can't compare that with the bible, something that
regorges of destruction and violence.
 
Bull shit is useful, much more than all bibles around.
 
Thesis:
 
If this all powerful god exists, can he forget?
 
Becvause if he is unable to forget he is not all powerful anymore: there
is one thing he can't do: forget.
 
So, this being god must be able to forget.
 
But if he forgets, then he can't remember what he has forgotten, hence
he is not all powerful anymore either.
 
Q.E.D.
 
The existence of an all powerful being is a contradiction in itself.
 
There is no god, nobody has ever seen one, he has no mass, like the
virgin, the saint espirit, and all the 3500 gods in existence today.
 
Those gods have no mass. They are just legends, like Santa Claus, and
many other legends and myths.
 
And please do not confuse science with religion. Galileo was forced to
retract because he contradicted the holy scriptures.
 
Yes, he did. And that contradiction is at the source of science: when
mankind stopped believing in that obsolete schema passed by religion and
started to *investigate* the universe in which we were born into.
 
The emancipation from religion is the basis of science.
Gareth Owen <gwowen@gmail.com>: Oct 13 10:45PM +0100

> But if he forgets, then he can't remember what he has forgotten, hence
> he is not all powerful anymore either.
 
> Q.E.D.
 
No, that's logically wrong. To have the capability to forget is not the
same thing as having forgotten, and your reasoning relies on them being
the same.
 
I wish they still taught formal logic in schools.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 12 05:20PM -0700

Chris M. Thomasson wrote:
> ROFL!!!!! I mock YOU rick! not God.
 
And why do you mock me? Because I post the truth about Jesus Christ.
 
Best regards,
Rick C. Hodgin
"Chris M. Thomasson" <invalid@invalid.invalid>: Oct 12 06:18PM -0700

On 10/12/2016 5:20 PM, Rick C. Hodgin wrote:
> Chris M. Thomasson wrote:
>> ROFL!!!!! I mock YOU rick! not God.
 
> And why do you mock me? Because I post the truth about Jesus Christ.
 
Because you make God look really bad.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 12 06:26PM -0700

Chris M. Thomasson wrote:
> > > ROFL!!!!! I mock YOU rick! not God.
> > And why do you mock me? Because I post the truth about Jesus Christ.
 
> Because you make God look really bad.
 
I've posted twice to you asking you to seek the truth. You have not
understood what I've posted, and it is the view you have through
your misunderstanding that makes God look bad.
 
You'll never find the truth, Chris, until you start looking for it. As long
as you continue to not seek the truth, to not try to get a true and
proper understanding, your destination after death remains the same.
 
Best regards,
Rick C. Hodgin
scott@slp53.sl.home (Scott Lurndal): Oct 13 12:44PM

>> > And why do you mock me? Because I post the truth about Jesus Christ.
 
>> Because you make God look really bad.
 
>I've posted twice to you asking you to seek the truth.
 
No, you've posted a lot of nonsense and fairy tales. You have
no right to ask anyone anything.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 13 06:50AM -0700

On Thursday, October 13, 2016 at 8:44:48 AM UTC-4, Scott Lurndal wrote:
 
> >I've posted twice to you asking you to seek the truth.
 
> No, you've posted a lot of nonsense and fairy tales. You have
> no right to ask anyone anything.
 
I am pointing people to seek the truth with a full and honest effort.
It's not possible that this request is an objectionable form of advice.
The truth is what we must all seek in all things.
 
Satan sends us falseness. Alternatives to what God has established in
creation, and for all time. God's ways are right and true and proper
and will endure. Satan's alternatives are weak, and false, and designed
to harm us, and none of them will endure. They do not even stand up to
rigorous scrutiny. Everything Satan does always comes back to identify
exactly the point at which he strayed from truth. He is the master of
it, and many people will be consumed by his lies by not seeking the
truth.
 
-----
I have found the truth in Jesus Christ. He Himself proclaimed He is the
truth. Now He either is, or He isn't. If He is, then His proclamation
of being the truth is also true.
 
I am asking each of you to seek that fact out for yourself. To search
with a full and honest effort the truth of the matter. If you do, He
promises you that you will find the truth, and that the truth will make
you free. And I testify that what He promises is completely true, for
I have personally experienced it.
 
Seek the truth. Seek it fully. Wholly. Completely. Accept no
substitutes. No cheap copies. No pretenders. Seek the truth, the
whole truth, and nothing but the truth, and let truth dictate the
reality of those things around you. If you do, you'll be amazed.
 
Best regards,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Oct 13 02:26PM -0700

19 quotes by C.H. Spurgeon about the dangers of money:
 
http://center.spurgeon.org/2016/10/13/19-spurgeon-quotes-about-the-dangers-of-money/
 
Best regards,
Rick C. Hodgin
ram@zedat.fu-berlin.de (Stefan Ram): Oct 13 09:24PM

In a video someone said, there was no small-vector optimization
anymore. Some requirement of C++11 or C++14 (inadvertently?)
made it impossible. But he said that at the same time, people
took great care to have a small-string optimization. So, how
do you store an array of two double values in modern C++?
I made up the following code. What do you think about it?
 
#include <initializer_list>
#include <ostream>
#include <iostream>
#include <string>
 
int main()
{ ::std::basic_string< double > s{ 1.2, 3.6 };
::std::cout << s.at( 0 )<< '\n'; }
Tim Rentsch <txr@alumni.caltech.edu>: Oct 13 09:59AM -0700

> i.e., too ?abstract,? to qualify as a patent-eligible invention."
 
> http://www.cafc.uscourts.gov/sites/default/files/opinions-orders/15-1769.Opinion.9-28-2016.1.PDF
 
> This is huge.
 
Note that this comment is not the opinion of the Court, but
only one member of the Court.
 
Personally I thought his reasoning was pretty awful, but I
encourage people to read it themselves and draw their own
conclusions.
 
Note also that another member of the Court dissented, not
(just) from this solitary opinion but from the majority
opinion for the case under consideration.
Ab <abood.sh3@gmail.com>: Oct 12 07:49PM -0700

template <typename elementType = int, int numberOfElements = 5>
class Array
{
//some code
private:
// the number of objects currently instantiated
static size_t arrayCount;
};
 
 
// class Array_include.h
#include "Array.h" // Array class definition
using namespace std;
 
// initializing the template static member arrayCount
template <typename elementType, int numberOfElements>
size_t Array<elementType, numberOfElements>::arrayCount = 0;
 
// ^^^ code block (using GCC compiler) gave me compilation error, and in
//visual studio it worked without any issues, does anyone know why?
Ian Collins <ian-news@hotmail.com>: Oct 13 05:10PM +1300

On 10/13/16 03:49 PM, Ab wrote:
 
> // class Array_include.h
> #include "Array.h" // Array class definition
> using namespace std;
 
In a header?? No!
 
> size_t Array<elementType, numberOfElements>::arrayCount = 0;
 
> // ^^^ code block (using GCC compiler) gave me compilation error, and in
> //visual studio it worked without any issues, does anyone know why?
 
What was the error?
 
--
Ian
mark <mark@invalid.invalid>: Oct 13 10:47AM +0200

On 2016-10-13 04:49, Ab wrote:
> size_t Array<elementType, numberOfElements>::arrayCount = 0;
 
> // ^^^ code block (using GCC compiler) gave me compilation error, and in
> //visual studio it worked without any issues, does anyone know why?
 
You should post the error. Maybe an include for size_t is missing. It's
used in quite a few headers, so an explicit include is usually not needed.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Oct 13 04:38PM +0200

On 13.10.2016 04:49, Ab wrote:
> // the number of objects currently instantiated
> static size_t arrayCount;
> };
 
This will give you one `arrayCount` for each used combination of
template parameter values.
 
 
> // class Array_include.h
> #include "Array.h" // Array class definition
> using namespace std;
 
Don't ever do this (in the global namespace) in a header.
 
 
> size_t Array<elementType, numberOfElements>::arrayCount = 0;
 
> // ^^^ code block (using GCC compiler) gave me compilation error, and in
> //visual studio it worked without any issues, does anyone know why?
 
Readers can /guess/ that you've not include a header that defines
`size_t` in the global namespace.
 
The primary such header is `<stddef.h>`.
 
But really, why t.f. are you posting without quoting the error message,
and without a complete, minimal example that reproduces the error?
 
• • •
 
See the old FAQ's "How do I post a question about code that doesn't work
correctly?" e.g. as mirrored at <url:
http://www.dietmar-kuehl.de/mirror/c++-faq/how-to-post.html#faq-5.8>
 
 
Cheers, & hth.,
 
- Alf
Louis Krupp <lkrupp@nospam.pssw.com.invalid>: Oct 13 10:42AM -0600

On Thu, 13 Oct 2016 16:38:30 +0200, "Alf P. Steinbach"
 
>The primary such header is `<stddef.h>`.
 
>But really, why t.f. are you posting without quoting the error message,
>and without a complete, minimal example that reproduces the error?
 
It's all part of the learning process. Brevity might be the soul of
wit, but it needs to be fine-tuned to the situation. It took me a
while to catch on.
 
Louis
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: