Friday, September 23, 2016

Digest for comp.lang.c++@googlegroups.com - 11 updates in 5 topics

Real Troll <real.troll@trolls.com>: Sep 23 12:50PM -0400

On 22/09/2016 17:28, Rick C. Hodgin wrote:
> Please somebody, reply with this content quoted so Leigh (Mr. Flibble)
> can hear this message. Best regards, Rick C. Hodgin
 
 
You could ask Jesus to do it for you. He is still alive and kicking at
this link:
 
<https://twitter.com/JRfromPTC>
 
You can see his videos at this link:
 
<https://photoshoptrainingchannel.com/5-photoshop-tricks/>
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 23 10:04AM -0700

On Friday, September 23, 2016 at 12:47:25 PM UTC-4, Real Troll wrote:
 
> You could ask Jesus to do it for you. He is still alive and kicking at
> this link:
> You can see his videos at this link:
 
I have posted my request. It is now a witness given by everyone who reads
it and does not post it against themselves.
 
"Real Troll," Jesus Christ will forgive your sin and give you eternal life.
All you have to do is come to Him believing and ask Him. No special hoops
to jump through. No back flips. Just an honest pursuit of the truth, and
a sincere heart in wanting to be saved.
 
Best regards,
Rick C. Hodgin
Real Troll <real.troll@trolls.com>: Sep 23 01:35PM -0400

On 23/09/2016 18:04, Rick C. Hodgin wrote:
> "Real Troll," Jesus Christ will forgive your sin and give you eternal
> life.
 
oooooooh!!! I'm excited about this crap!!!
 
What sin are you talking about? Giving you a link of Jesus is a sin?
Since when? This talk about eternal life, can I ask him to forget about
it because I don't think it is a good idea to have eternal life. It is
better to enjoy life while you are young and healthy and when it becomes
difficult and painful then it is time to the honorable thing - i.e. to
use a silver bullet!!
 
 
Have you thought of going to Charlotte NC and pray for for all those
looters, muggers, drug users and armed robbers? that is where you
should be spending your time, not here! Religion was meant for those
type of people, not for educated intelligent people.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 23 10:45AM -0700

On Friday, September 23, 2016 at 1:33:29 PM UTC-4, Real Troll wrote:
 
> oooooooh!!! I'm excited about this crap!!!
 
> What sin are you talking about? Giving you a link of Jesus is a sin?
> Since when?
 
The Law gives man notification of His sin before God. The sting of death
is sin; and the strength of sin is the Law. It is the Law God gave us
which points out our sin.
 
By examining the Law God gave us, you will see your sin
 
> better to enjoy life while you are young and healthy and when it becomes
> difficult and painful then it is time to the honorable thing - i.e. to
> use a silver bullet!!
 
Our lives are not supposed to be this way. We were never intended to age
or be infirmed. We were created to live forever with God, as His children.
But because of sin, all of that has changed. We now live in this fallen
world which has death, disease, hate, war, killing, murders, and strife.
And it is that very thing which Jesus came to take away, to restore us from
sin, from all of the death, disease, hate, war, killing, murders, and
strife, and to put an end to sin forever.
 
It's what He did at the cross. He made a way for us to be restored to His
eternal plan for us in a body that never ages, never has pain, never gets
hungry, never thirsts, never is weak or has a bad day, but is always more
strong and viral than we ever were in our prime. And our mental faculties
will be unrestrained as well, so that we always think completely clearly.
 
It is the world God intended. And it is the enemy of God who tempted Adam
and Eve to sin which has brought us to this place.
 
> Have you thought of going to Charlotte NC and pray for for all those
> looters, muggers, drug users and armed robbers? that is where you
> should be spending your time, not here!
 
A Christian can do both, and is expected to do both.
 
> Religion was meant for those
> type of people, not for educated intelligent people.
 
Having a saving relationship with Jesus Christ has almost nothing
whatsoever to do with religion. The two are as different as night
and day. It is that which I'm trying to teach everybody.
 
Best regards,
Rick C. Hodgin
crusader.mike@gmail.com: Sep 23 04:17AM -0700

Hi,
 
It occurred to me that I don't really know exactly how values are passed into functions (and I am using C++ for almost 2 decades). Simple rule of 'never pass anything non-trivial by value' always worked for me. But recently I stumbled upon few articles which claim that pass-by-value makes sense if function being called is going to make a copy anyway.
 
So, exactly what happens on stack when you have some non-trivial expression, like F f = f(g1(...), g2(...))? After thinking a bit I came to conclusion that if I was a compiler writer -- I'd implement it in such was that values returned by g1() and g2() were created in locations where f() expects them to be. So, basically, no copy constructors will get called -- f will simply take ownership of object constructed by g1 and g2 and destroy them when execution leaves f's scope.
 
I have a great trust in people behind C++ compilers, but just in case I've decided to check it out. Here is a very simple code:
 
 
#include <cstdio>
 
using std::printf;
 
struct H21
{
H21() { printf("H21 ctor\n"); }
~H21() { printf("H21 dtor\n"); }
H21(H21 const&) {}
};
 
H21 h21() { return H21(); }
 
struct H22
{
H22() { printf("H22 ctor\n"); }
~H22() { printf("H22 dtor\n"); }
H22(H22 const&) {}
};
 
H22 h22() { return H22(); }
 
struct G2
{
G2() { printf("G2 ctor\n"); }
~G2() { printf("G2 dtor\n"); }
G2(G2 const&) {}
};
 
G2 g2(H21, H22) { return G2(); }
 
struct H11
{
H11() { printf("H11 ctor\n"); }
~H11() { printf("H11 dtor\n"); }
H11(H11 const&) {}
};
 
H11 h11() { return H11(); }
 
struct H12
{
H12() { printf("H12 ctor\n"); }
~H12() { printf("H12 dtor\n"); }
H12(H12 const&) {}
};
 
H12 h12() { return H12(); }
 
struct G1
{
G1() { printf("G1 ctor\n"); }
~G1() { printf("G1 dtor\n"); }
G1(G1 const&) {}
};
 
G1 g1(H11, H12) { return G1(); }
 
struct F
{
F() { printf("F ctor\n"); }
~F() { printf("F dtor\n"); }
};
 
F f(G1, G2) { return F(); }
 
int main()
{
F v = f(g1(h11(), h12()), g2(h21(), h22()));
return 0;
}
 
If you compile and run it in MSVC 2015 it'll produce exactly what I expect it to:
 
H22 ctor
H21 ctor
G2 ctor
H21 dtor
H22 dtor
H12 ctor
H11 ctor
G1 ctor
H11 dtor
H12 dtor
F ctor
G1 dtor
G2 dtor
F dtor
 
 
Now. I would not be posting this if everything was according to my expectations, right? :-)
 
If you comment out every copy constructor, output changes to this:
 
H22 ctor
H21 ctor
G2 ctor
H21 dtor
H22 dtor
H12 ctor
H11 ctor
G1 ctor
H11 dtor
H12 dtor
F ctor
G1 dtor
G2 dtor
G1 dtor <-- next 6 lines are totally unexpected
H11 dtor
H12 dtor
G2 dtor
H21 dtor
H22 dtor
F dtor
 
Now this is totally unexpected. For some reason compiler decided to make few extra copies (by means of either copy ctor or move ctor). I made these objects real big (added int v[1000]) -- it changed nothing.
 
Question #1: Why? What is going on here?
 
 
I tried this code with GCC 5.4.0 and it's output doesn't make any sense at all (though I am surely glad it doesn't create extra copies):
 
H22 ctor
H21 ctor
G2 ctor
H12 ctor
H11 ctor
G1 ctor
F ctor
G1 dtor
H11 dtor
H12 dtor
G2 dtor
H21 dtor
H22 dtor
F dtor
 
hiding copy constructors has no effect on GCC.
 
Question #2: Why GCC output looks like this? What is going on here?
 
Question #3: What happened to comp.lang.c++.moderated in Google Groups? It shows last message from May 22 for me.
 
Regards,
Michael.
Paavo Helde <myfirstname@osa.pri.ee>: Sep 23 03:25PM +0300

On 23.09.2016 14:34, Stefan Ram wrote:
 
> You seem to have written a user-defined constructor.
> That might have kept the compiler from generating
> a move constructor.
 
Normal user-defined constructor does not affect generation of implicit
move constructor (user-defined copy constructors, copy assignments, move
assignments and destructors do).
 
>> Google Groups? It shows last message from May 22 for me.
 
> When I posted there, they modified my posts (changed
> indentations)
 
Really? Only indendantion? If I were a moderator, I would certainly
change the ::std:: prefixes as well.
 
Cheers
Paavo
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 23 06:36PM +0200

On 23.09.2016 14:25, Paavo Helde wrote:
>> indentations)
 
> Really? Only indendantion? If I were a moderator, I would certainly
> change the ::std:: prefixes as well.
 
At the end it was my impression that it was only Victor Bazarov holding
the fort, and he posted here in clc++ about the technical problems.
 
Essentially the tech problems began years ago when the servers we used
at a university in Australia, I think it was, were shut down. Daveed
found alternative free hosting. But now, recently, also that stopped
working.
 
I was unable to help much after I got really ill and then went through a
year or two of surgery. After that I didn't really get back into it,
though with some effort and iron will, which I lack, I probably could
have. And the popularity of a group like clc++m depends much on prompt
moderation so that one gets interesting back-and-forth exchanges.
 
In short, clc++m is apparently dead.
 
I'm sorry.
 
 
- Alf (inactive mod)
woodbrian77@gmail.com: Sep 22 09:00PM -0700

On Thursday, September 22, 2016 at 7:12:48 AM UTC-5, Rick C. Hodgin wrote:
 
> https://www.youtube.com/channel/UCMlGfpWw-RUdWX_JbLCukXg
 
> Best regards,
> Rick C. Hodgin
 
 
Thanks, I watched some of this one
 
CppCon 2016: Grill The Committee Panel
 
https://www.youtube.com/watch?v=CPgxw1EzC54
 
But at 1 hour, 9 minutes and 30 seconds it stopped
working. I tried skipping ahead but that didn't help
either. While writing this posting, I left the video
running and there were a few seconds that made it through,
but mostly nothing.
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
woodbrian77@gmail.com: Sep 23 08:26AM -0700

> either. While writing this posting, I left the video
> running and there were a few seconds that made it through,
> but mostly nothing.
 
Now I'm able to receive the portion of the video that I had
trouble with yesterday.
Luca Risolia <luca.risolia@linux-projects.org>: Sep 23 02:38PM +0200

On 06/09/2016 16:16, Öö Tiib wrote:
> Those solutions are how to think out of the box to solve some actual
> problem that we know nothing of, so we can't use those approaches
> for to erase elements from vector. ;-)
 
The more alternatives the better ;)
ram@zedat.fu-berlin.de (Stefan Ram): Sep 23 11:34AM

>So, exactly what happens on stack when you have some
 
There is no stack. C++ is not assembler.
 
>For some reason compiler decided to make few extra copies
 
You seem to have written a user-defined constructor.
That might have kept the compiler from generating
a move constructor.
 
>Question #3: What happened to comp.lang.c++.moderated in
>Google Groups? It shows last message from May 22 for me.
 
When I posted there, they modified my posts (changed
indentations) and were not willing to discuss the matter
in the newsgroup. So I refrained from posting there.
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: