Tuesday, September 27, 2016

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

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

On 26/09/2016 18:27, Richard wrote:
 
> Hmm. Seems like all these bible thumping assholes that insist on
> ruining this newsgroup have most of these characteristics.
 
And you are aiding and abetting them to do just that!!
Juha Nieminen <nospam@thanks.invalid>: Sep 27 06:16AM


>> Hmm. Seems like all these bible thumping assholes that insist on
>> ruining this newsgroup have most of these characteristics.
 
> And you are aiding and abetting them to do just that!!
 
How, exactly? The thread already exists. Writing to it isn't going
to change anything.
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Juha Nieminen <nospam@thanks.invalid>: Sep 27 06:17AM

> Being good isn't enough. Being great isn't enough. Being the best person
> you can possibly be isn't enough.
 
Yeah, being a self-righteous hypocritical asshole is much better, you
retarded narcissistic imbecile.
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 27 03:45AM -0700

Juha Nieminen wrote:
> [snip]
 
Come to Him and ask Him to forgive your multitude of sins.
He will forgive every last one, no matter what you've done or to
whom. He has the power, authority, and desire to forgive you. He's
> only waiting for you to come to Him and ask for forgiveness. I
> pray you do. I would like to see you in Heaven.
 
-----
Each of us should pay special attention to how we regard God in
our hearts.
 
http://biblehub.com/kjv/revelation/22.htm
10 And he saith unto me, Seal not the sayings of the prophecy of
this book: for the time is at hand.
11 He that is unjust, let him be unjust still: and he which is
filthy, let him be filthy still: and he that is righteous, let him
be righteous still: and he that is holy, let him be holy still.
 
12 And, behold, I come quickly; and my reward is with me,
to give every man according as his work shall be.
13 I am Alpha and Omega, the beginning and the end, the first
and the last.
 
14 Blessed are they that do his commandments, that they
may have right to the tree of life, and may enter in through the
gates into the city.
15 For without are dogs, and sorcerers, and whoremongers, and
murderers, and idolaters, and whosoever loveth and maketh
a lie.
 
He is giving each of us there in Revelation 22:11-12 the opportunity
to reveal unto God for ourselves who we are, so that it will not be
He who condemns a person to Hell, but the person themselves
by the full revelation of their character, their substance, and their
being before God (who has made Himself known in countless ways
before their eyes, hearts, and minds).
 
-----
I point you to truth, Juha. It is not my creation, but is of God. I do
not hold exclusive rights or access to this information. It's why
I teach you, so that you can possess it too and teach others, for
once you taste of the Lord ... you can do no other. He's that
amazing, that enthralling, that astounding, and He's unlike other
things. He's a leader, and He makes us His by His wonderful,
marvelous attributes and deeds.
 
I pray you come to know Him. I would like to see you in Heaven.
 
Best regards,
Rick C. Hodgin
Real Troll <real.troll@trolls.com>: Sep 27 01:45PM -0400

On 27/09/2016 07:16, Juha Nieminen wrote:
> How, exactly? The thread already exists. Writing to it isn't going
> to change anything.
 
Responding to Rick C Idiot is going to change everything. Best thing is
to ignore him and some would even filter him out so that no reply his
posted by mistake. He is someone who thinks that Jesus Christ has given
him the right to spam these newsgroups.
Lynn McGuire <lynnmcguire5@gmail.com>: Sep 26 09:43PM -0500

"2 major reasons why modern C++ is a performance beast"
https://www.oreilly.com/ideas/2-major-reasons-why-modern-c-is-a-performance-beast
 
"The Prime Directive in the C/C++ continuum has always been performance. As I often tell groups when teaching C++, when I ask a
question beginning with "Why" concerning the rationale for a particular C++ language or library feature, they have a 90% chance of
getting the answer right by replying with a single word: "Performance.""
 
Yup.
 
Lynn
woodbrian77@gmail.com: Sep 26 08:14PM -0700

On Monday, September 26, 2016 at 9:43:26 PM UTC-5, Lynn McGuire wrote:
> question beginning with "Why" concerning the rationale for a particular C++ language or library feature, they have a 90% chance of
> getting the answer right by replying with a single word: "Performance.""
 
> Yup.
 
He makes some good points, but he claims there's no more
need for raw pointers as of C++ 2014. Oy vey. Raw pointers
are still needed, but not as much as in the past.
 
 
Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
"Öö Tiib" <ootiib@hot.ee>: Sep 27 03:53AM -0700


> He makes some good points, but he claims there's no more
> need for raw pointers as of C++ 2014. Oy vey. Raw pointers
> are still needed, but not as much as in the past.
 
He seems correct. There are no need to use raw pointers in C++.
We may want to use those for legacy reasons, for convenience
or for optimizing something. For about same reason we may want
to use inline assembler. It felt already like that with C++2003
plus boost library.
 
For example the three (most prominent IMHO) raw pointer
usages:
* 'main' can have raw pointer argument;
* for covariant return;
* for interfacing with other programming languages.
 
Can any of those really described as a "need"? Can you
name some more important cases?
Ben Bacarisse <ben.usenet@bsb.me.uk>: Sep 27 02:54PM +0100

>> On Monday, September 26, 2016 at 9:43:26 PM UTC-5, Lynn McGuire wrote:
>> > "2 major reasons why modern C++ is a performance beast"
>> > https://www.oreilly.com/ideas/2-major-reasons-why-modern-c-is-a-performance-beast
<snip>
> * for interfacing with other programming languages.
 
> Can any of those really described as a "need"? Can you
> name some more important cases?
 
I suppose it depends on what constitutes "use" or "need". C++ string
literals convert to raw pointers, so
 
std::string greeting("Hello world");
 
"needs" raw pointers in some sense.
 
--
Ben.
Melzzzzz <Melzzzzz@zzzzz.com>: Sep 27 01:56PM

> or for optimizing something. For about same reason we may want
> to use inline assembler. It felt already like that with C++2003
> plus boost library.
 
Hm, what about filling mmaped framebuffer? Or doing ray tracing?
There are a lot more, but these examples came first to me...
 
 
--
press any key to continue or any other to quit
woodbrian77@gmail.com: Sep 27 09:43AM -0700

On Tuesday, September 27, 2016 at 5:54:25 AM UTC-5, Öö Tiib wrote:
> * for interfacing with other programming languages.
 
> Can any of those really described as a "need"? Can you
> name some more important cases?
 

Most containers and smart pointer classes use raw pointers.
 
constexpr basic_string_view(const CharT* s, size_type count);
 
Application programmers don't have to use raw pointers as
much as in the past, but raw pointers are an important part
of the language. The author of that article says there's
no more need for raw pointers "in the language."
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 27 06:58PM +0200

On 27.09.2016 12:53, Öö Tiib wrote:
 
>> He makes some good points, but he claims there's no more
>> need for raw pointers as of C++ 2014. Oy vey. Raw pointers
>> are still needed, but not as much as in the past.
 
The author conflates use of pointers with ownership, presumably because
that's what he feels is important. One could start taking him seriously
if he pointed out the ownership issue as such, but he doesn't. He just
conflates.
 
 
> * for covariant return;
> * for interfacing with other programming languages.
 
> Can any of those really described as a "need"?
 
Yes, the last point.
 
The arguments of `main` are not really needed because they're a
non-portable solution for what they were designed for, namely to be able
to handle command line arguments that include file names. In order to
write portable code that also works in Windows, they can't be used for
that purpose. So they're only useful for learners and in Unix-land.
 
Covariant returns are not needed because it's trivial to implement
covariant returns, and because that has to be done anyway with non-raw
type, albeit with some code size overhead.
 
 
> Can you name some more important cases?
 
Raw pointers are good for referring to objects without carrying ownership.
 
And yes, practitioners need that.
 
It would be extraordinarily inefficient & verbose, i.e. extremely silly,
to use e.g. `std::weak_ptr` for such references.
 
More generally, practitioners need clean tools that are designed for a
single purpose. A smart pointer can't be easily divided into its
constituent responsibilities: ownership management, and reference. When
you need one without the other, you can't easily use a smart pointer.
 
Raw pointers are also good for referring to functions. They're
reseatable (assignable). References are much more cumbersome for this.
 
Cheers, & hth.,
 
- Alf
scott@slp53.sl.home (Scott Lurndal): Sep 27 05:09PM

> But I believe that it is simpler to always use C++ string
> literals than to sometimes use C string literals and
> sometimes C++ string literals.
 
Do you actually write programs that do something useful, or
do you just teach?
scott@slp53.sl.home (Scott Lurndal): Sep 27 05:11PM

>to handle command line arguments that include file names. In order to
>write portable code that also works in Windows, they can't be used for
>that purpose. So they're only useful for learners and in Unix-land.
 
Fortunately, a large fraction of C++ code never needs to run on
Windows. Thankfully.
ram@zedat.fu-berlin.de (Stefan Ram): Sep 26 11:34PM

>Not sure exactly what you're quoting here or what you're asking for
>rationale about, can you clarify?
 
The rationale for the apparent guideline to write
 
const int i = 2;
 
instead of
 
int const i = 2;
 
. I was quoting the Library Design Guidelines
(Standard Library Guidelines) from isocpp.org.
ram@zedat.fu-berlin.de (Stefan Ram): Sep 27 12:25AM

>this regard MSVC is correct and GCC (as I said before)
>"doesn't make any sense". Hence, my question -- what happens
>here? Is it allowed under C++ standard?
 
I believe that I now might have actually understood your
question, but I have no answer yet.
 
But while reading about the subject, I came along this from
12.8p15 of C++03:
 
»when a temporary class object that has not been bound
to a reference (12.2) would be copied to a class object
with the same cv-unqualified type, the copy operation
can be omitted by constructing the temporary object
directly into the target of the omitted copy«.
 
However, I cannot find this wording in a recent draft!
(The corresponding location might be 12.8p31.)
 
Possibly, I was able to simplify your source code somewhat
as follows:
 
main.cpp
 
#include <iostream>
#include <ostream>
 
struct H
{ H() { ::std::cout << "+\n"; }
~H() { ::std::cout << "-\n"; }
H( H const & ) {}};
 
int g( H h ){ return 0; }
int log( int ){ ::std::cout << "returned from g.\n"; return 0; }
int main(){ log( g( H() )); }
 
transcript
 
+
returned from g.
-
 
Now, we might be able to say that you would prefer the output:
 
+
-
returned from g.
 
because the object »h« should be destroyed when the
incarnation of the function »g« ends and not later.
ram@zedat.fu-berlin.de (Stefan Ram): Sep 27 02:59AM

>for a particular C++ language or library feature, they have a
>90% chance of getting the answer right by replying with a
>single word: "Performance.""
 
Recently, while teaching C++, I showed statistics from TIOBE
and benchmarksgame.alioth.debian.org, and commented: C++
is popular, but not as popular as C, and it's fast, but not
as fast as C.
 
"My queen, you are the fairest here so true.
But Snow White beyond the mountains at the
seven dwarfs is a thousand times more beautiful
than you."
ram@zedat.fu-berlin.de (Stefan Ram): Sep 27 03:50PM

>directly into the target of the omitted copy«.
 
>However, I cannot find this wording in a recent draft!
>(The corresponding location might be 12.8p31.)
 
It is possible that 8.6p17.6.1 now holds a similar
requirement:
 
»If the initializer expression is a prvalue and the
cv-unqualified version of the source type is the same
class as the class of the destination, the initializer
expression is used to initialize the destination object.
[ Example: T x = T(T(T())); calls the T default
constructor to initialize x. - end example ]«.
ram@zedat.fu-berlin.de (Stefan Ram): Sep 27 03:59PM

>literals convert to raw pointers, so
> std::string greeting("Hello world");
>"needs" raw pointers in some sense.
 
In my course I now call such string literals
"C string literals" as opposed to the C++ string
literals I am using throughout, as in:
 
main.cpp
 
#include <iostream>
#include <ostream>
#include <string>
 
using namespace ::std::literals;
 
int main() { ::std::cout << "Hallo, Welt"s << "\n"s; }
 
transcript
 
Hallo, Welt
 
Using »s« above does not simplify things, far from it!
But I believe that it is simpler to always use C++ string
literals than to sometimes use C string literals and
sometimes C++ string literals.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 27 08:26AM -0700

What did Jesus suffer in our place upon the cross? And why?
 
Beaten:
https://www.youtube.com/watch?v=d8BQKEmvKvA
 
Nailed to a cross, hung to die:
https://www.youtube.com/watch?v=PYHQuayhMeU
 
And when He gave up the Ghost, an Earthquake:
https://www.youtube.com/watch?v=njUlc2QP_7k&t=1m11s
 
Resurrection:
https://www.youtube.com/watch?v=j2Mnsxj2N7Y&t=0m11s
 
It is generally accepted that the beating shown in the movie The Passion of
The Christ, albeit very graphic, is insufficient. He was regarded as being
hung upon the cross in a form "unrecognizable as a man.". Cut and maimed so
badly, beaten to the core with his bones poking through, his muscles torn.
 
Psalm 22 speaks of some of this:
 
http://biblehub.com/kjv/psalms/22.htm
 
14 I am poured out like water, and all my bones are out of joint: my
heart is like wax; it is melted in the midst of my bowels.
 
15 My strength is dried up like a potsherd; and my tongue cleaveth to
my jaws; and thou hast brought me into the dust of death.
 
16 For dogs have compassed me: the assembly of the wicked have inclosed
me: they pierced my hands and my feet.
 
17 I may tell all my bones: they look and stare upon me.
 
He took all of this to set us free from the punishment of sin. And what
we see here on the Earth is only what happened in the flesh. What then
happened to Him in Hell when God the Father poured out His wrath full
strength upon His Son for ALL of the sin of ALL the believers, past,
present, and future ... the Bible records it literally crushed Him.
 
We haven't seen that part on this side of the grave. But it was far
worse than He endured here upon the Earth. The pouring out of punishment
literally crushed God. And such a punishment awaits all who don't find
salvation in Jesus Christ. And there's no coming back from that degree
of punishment by anyone ... except the One who's already come back, the
One who reaches out to save you right now today, so that you might live
and not receive that punishment, being set free by His blood, by His love,
by His free offer of salvation.
 
He stands with His arms out waiting for you to come to Him. I pray you
do. You have tremendous value and I would like to see you in Heaven.
 
-----
If you've never seen the Passion of the Christ, it conveys the story of the
last days on Earth for Jesus, the passion. It covers some of His teaching
in the time before, the triumphant entry into Jerusalem, His betrayal, the
mock trial where they found no fault in Him, and the sentence of Pontius
Pilate who condemned Him to death by crucifixion even though he found no
fault in Him, but Pilate was afraid of an uprising and even more bloodshed,
so He condemned an innocent man to keep the peace, as it were.
 
You can read about the story in the Bible:
 
Matthew 26:36+
http://biblehub.com/kjv/matthew/26.htm#36
 
Mark 14:32+
http://biblehub.com/kjv/mark/14.htm#32
 
Luke 22:39+
http://biblehub.com/kjv/luke/22.htm#39
 
John 18:1+
http://biblehub.com/kjv/john/18.htm
 
-----
Some key passages:
 
Luke 23:23-24 -- The sentence of death by crucifixion
23 And [the crowd was] instant with loud voices, requiring that he
might be crucified. And the voices of them and of the chief
priests [the Jewish authority] prevailed.
24 And Pilate gave sentence that it should be as they required.
 
Luke 23:44-46 -- The death
44 And it was about the sixth hour, and there was a darkness over
all the earth until the ninth hour.
45 And the sun was darkened, and the veil of the temple was rent
in the midst.
46 And when Jesus had cried with a loud voice, he said, Father,
into thy hands I commend my spirit: and having said thus,
he gave up the ghost.
 
Luke 23:52-53 -- The burial
52 This man [Joseph of Arimathaea] went unto Pilate, and begged
the body of Jesus.
53 And he took it down, and wrapped it in linen, and laid it in
a sepulchre that was hewn in stone, wherein never man before
was laid.
 
Luke 24:1-7 -- The Resurrection
1 Now upon the first day of the week, very early in the morning,
they came unto the sepulchre, bringing the spices which they
had prepared, and certain others with them.
2 And they found the stone rolled away from the sepulchre.
3 And they entered in, and found not the body of the Lord Jesus.
4 And it came to pass, as they were much perplexed thereabout,
behold, two men stood by them in shining garments:
5 And as they were afraid, and bowed down their faces to the earth,
they said unto them, Why seek ye the living among the dead?
6 He is not here, but is risen: remember how he spake unto you when
he was yet in Galilee,
7 Saying, The Son of man must be delivered into the hands of sinful
men, and be crucified, and the third day rise again.
 
-----
The Passion of the Christ movie is available at your local movie rental
place, and online for purchase or viewing. Netflix periodically has it
for viewing, but right now it's on Netflix DVD-only.
 
The Bible teaches us that "Faith comes by hearing, and hearing by the
word of God" (http://biblehub.com/kjv/romans/10-17.htm).
 
If your faith is weak, read the Bible. The words of the Bible are His
words, penned by men through the power and guidance of His Holy Spirit.
The words of the Bible are alive and active and they will increase one's
faith, and lead the truth seeker into knowledge of the truth, as much as
they're able to receive.
 
But for the one not seeking the truth, it will forever be a veiled enigma
that seems undecipherable, unintelligible, unbelievable, and a book to be
mocked and poked fun at, along with all those who believe in the One the
book speaks about, Jesus Christ.
 
It is that way because of the division between the born again nature,
and the natural man. The two are irreconcilable, and they are polar
opposites. The natural man cannot receive the things of God, and the
born again person cannot continue for long in the things of man, for
the ways of God are far greater, as they lead to life, life eternal,
and life more abundant.
 
Best regards,
Rick C. Hodgin
infocim249@gmail.com: Sep 27 02:28AM -0700

Big data is a term that describes the large volume of data which has both structured and unstructured that overloads a business on a day-to-day basis. Big Data Analyst Training It's not the amount of data that's important, It's how the companies handle the data that matters the most. A big data analyst needs/demands a different skill sets and abilities and in general a big data analyst's next step can be that of a big data scientist. A big data analyst needs to be able to support the business and management with clear and intelligent analyses on the data (nearby/ close/ currently important). Nowadays, this is no wonder that IT professionals are looking for ways to cash in on this rich vein of job opportunity.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 27 03:51AM -0700

This YouTube channel covers many HPC topics, including big data:
 
https://www.youtube.com/user/RichReport
 
A few months back there was a video about a company in
Australia mandated to maintain information on various species
of insects and other life. They were over $1 billion a year IIRC,
and a huge data footprint.
 
An interesting presentation.
 
Best regards,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Sep 27 05:19AM -0700

On Tuesday, September 27, 2016 at 6:51:25 AM UTC-4, Rick C. Hodgin wrote:
> of insects and other life. They were over $1 billion a year IIRC,
> and a huge data footprint.
 
> An interesting presentation.
 
Found it:
 
"A Journey to a Holistic Framework for Data-intensive Workflows"
Ian Corner, CSIRO
 
https://www.youtube.com/watch?v=x7Yxf1l3Kx0
 
Best regards,
Rick C. Hodgin
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Sep 27 05:31AM +0200

On 27.09.2016 01:34, Stefan Ram wrote:
 
> int const i = 2;
 
> . I was quoting the Library Design Guidelines
> (Standard Library Guidelines) from isocpp.org.
 
Oh, I understand. Sorry.
 
Well, standard library work has to follow the conventions already
established for the C++ standard. It would be just too much work to
change those conventions now. So that's a very direct rationale.
 
I read "the wrong place" as an acknowledgment that the original choice,
back in the 1990's, was sub-optimal.
 
But, in modern C++ we don't have to cater to the idiosyncracies of the C
declaration syntax.
 
We can just define a `Ptr_` type builder, and a `Ref_`, and so on.
 
• • •
 
At first, years ago, I went all the way and also defined `Const_`.
 
But it's silly to define a new syntax where the current one works.
 
I found it useful to define a `With_const_like_`, in order to transfer
constness from one type to another. But I'm still searching for a
better, shorter name for that.
 
• • •
 
There is also a more radical idea of defining `const` versions of all
the basic types and require use of e.g. `Var_` to make something
mutable. I don't think this idea can be made practically workable: the
confusion would be akin to redefining `+` as `-`. But with this idea
 
Ptr_<Int> p;
 
would not compile, because it would declare an uninitialized `int const*
const`.
 
One would have write e.g.
 
Var_<Ptr_<Int_>> p;
 
to get something mutable.
 
Or
 
Ptr_<Var_<Int>> p = &blah;
 
:)
 
 
Cheers!,
 
- Alf
Gareth Owen <gwowen@gmail.com>: Sep 27 06:51AM +0100


> It was possibly in this newsgroup where the topic
> "const T vs T const" was discussed some months ago.
> (Or it might have been "comp.lang.c".)
 
As an equally vital followup, how many angels can we fit on the head of
a pin?
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: