Tuesday, May 24, 2016

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

Juha Nieminen <nospam@thanks.invalid>: May 24 06:09AM

> (unless you count the built-in stuff like integers, arrays and
> references as objects), but I do use objects in a more abstract sense.
> Indeed, something must be stored.
 
I'm suspecting you are using the term "object" with a different meaning
than I undestand it.
 
In normal parlance "object" is simply the instantiation of a class.
For example:
 
std::string s = "Hello";
 
That 's' is an object (and std::string is a class).
 
But maybe you have a difference concept of what "object" means.
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Wouter van Ooijen <wouter@voti.nl>: May 24 08:18AM +0200

Op 24-May-16 om 8:09 AM schreef Juha Nieminen:
> For example:
 
> std::string s = "Hello";
 
> That 's' is an object (and std::string is a class).
 
That is exactly the kind of object that I don't use for my small-systems
compile-type-polymorphism programming style.
 
Wouter "Objects? No thanks!" van Ooijen
jacobnavia <jacob@jacob.remcomp.fr>: May 24 07:49PM +0200

Le 23/05/2016 à 08:08, Juha Nieminen a écrit :
 
> Whenever someone whines about compilation times, I immediately disregard
> the entire thing. It's such a retarded thing to whine about.
 
> --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
 
sure.
 
If you are paid per hour, it is very nice to wait :-)
If you are not it is dammed frustrating waiting 3 minutes at each
change or even more
Juha Nieminen <nospam@thanks.invalid>: May 24 10:40PM

> If you are not it is dammed frustrating waiting 3 minutes at each
> change or even more
 
I don't think I have had *anything* I have ever done take 3 minutes
to compile, even after a clean.
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Juha Nieminen <nospam@thanks.invalid>: May 24 10:41PM


>> That 's' is an object (and std::string is a class).
 
> That is exactly the kind of object that I don't use for my small-systems
> compile-type-polymorphism programming style.
 
Why not? Why make your life more difficult than it needs to be?
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
Jerry Stuckle <jstucklex@attglobal.net>: May 24 06:50PM -0400

On 5/24/2016 6:40 PM, Juha Nieminen wrote:
 
> I don't think I have had *anything* I have ever done take 3 minutes
> to compile, even after a clean.
 
> --- news://freenews.netfront.net/ - complaints: news@netfront.net ---
 
You haven't worked on very big projects, then. I've seen compiles take
overnight on a mainframe.
 
--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: May 24 01:35PM -0700

I saw this video today on the ComputerHistory channel on YouTube. The man
cited, David Cutler, has been a pioneer in several low-level aspects of
computer development while at Microsoft, and before:
 
https://www.youtube.com/watch?v=MN0H4Lb9Lfs
 
I posted a comment immediately after watching the video. However, the more
I thought about it the more I realized there's something larger that needs
to take place here.
 
I want to begin to educate our technology sector away from that which is
their focus today (money), to instead begin thinking of that which should
be their focus (God, and all of God's people world-wide).
 
I have expanded my comment here, and I will continue to polish and edit
it as I give it more thought:
 
-----
 
May.24.2016
 
It's hard for me to appreciate any success for Microsoft, or for any of
the people at Microsoft. They have money-driven goals and make choices
based on money-ends, rather than right-ends -- which are (to be clear)
people-ends.
 
As a result of Windows 3.1 sales, for example, OS/2 (an all ways a
superior operating system) was abandoned by Microsoft after years of
development so they could pursue Windows NT (because they could make
more money selling Windows than pursuing the better product).
 
https://www.youtube.com/watch?v=-DAojx2Hgec&t=38m50s
 
Money drove Microsoft's decision, and later drove them to also move in
anti-competitive ways for which they were found guilty in courts of law
around the world, ultimately ordered to pay record fines. And even upon
receiving the multiple legal findings, they still professed innocence
and did not believe they were doing anything wrong, or had done anything
wrong.
 
No apologies. No voluntary changes.
 
-----
People will say Microsoft's behavior was "just business," and they're
right. It was just business. But business goals are focused predomin-
ately around money factors, and these goals ultimately harm real and
creative people world-wide. Business goals seek to lock in solutions
which isolate and segregate us into the channels required by their
goals, so that we do not have free room to move, but are able to move
within a confined arena only. While we might receive products which
allow us to move, it's akin to being in a type of prison where we can
harvest trees, build homes, raise animals and families to our heart's
content, but we're still in the prison. If we want to move to another
place it's not possible because we're locked in.
 
This inevitably results in us receiving wholly inferior products because
there is no equal footing given to competition, such that even in 2016
we still don't have the capabilities OS/2 had back in the 1990s in
released products, nor do we have many of the alternative products that
we could've had were Microsoft's anti-competitive practices not in play,
such that money was not the driving goal (office suites, business
software, browsers, and other models, for example).
 
Microsoft has harmed people with their releases. And while the people
who have contributed to Microsoft's "success" are no doubt talented
people, their goals and loyalties have been to Microsoft and its money
ends, rather than "in serving people" ends, and that needs to change.
 
And Microsoft is not alone in this. Business in this world today is
geared toward maximizing profit. You rarely hear, for example, of a
company willing to sacrifice half of its net increase in sales to hire
more people, or give them better health care, or increase their family
time, etc. You typically hear it going the other way because money is
the goal, not people.
 
And to be clear: having money-based goals makes all of the effort
involved just flatly wrong because those goals ultimately harm people.
People's needs and "rightness needs" are always sacrificed in cases
where an additional dollar can be gained by sacrificing them, and
that needs to change.
 
-----
Each of us is part of a purpose here on this planet. We are part of a
system that was created by God with right ends (honoring Him, and loving
one another in the world He gave us). That purpose has been usurped by
sin, and that sin at work in men. It has given us this world we live in
where people everywhere are rising up and hating and fighting other
people. People who, had they been born in a different place, could've
grown up in your community, been raised with your children, gone to
school and social functions with your family, so that you would've been
neighbors, rather than enemies.
 
Everything that's wrong with this world stems from the same single
source: sin, and all that accompanies it.
 
Sin is the problem.
Jesus Christ is the cure ... because He literally takes sin away.
 
-----
The truth is we were created to honor God with our lives. We were made
in His very image and likeness, and He made us different than all of the
rest of creation. Even apart from the angels, for not one of them will
be forgiven for their sin against God, but all of us have the opportunity
to be forgiven if we will accept Jesus Christ, allowing Him to become
the Lord of our life, the One who guides us and leads us. He will take
away our sin and restore us to that which mankind had before the fall:
eternal life, a spirit that's alive, and real hope and a future.
 
-----
The goals of this world's business models, philosophy models, and
economic models at large, all need to change. And that change needs
to be center-focused around each of us developing a close, personal
relationship with Jesus Christ, and then walking under His guidance.
 
Jesus advocates loving one another. It's actually a new command He
gave us (John 13:34).
 
Jesus advocates peace, and says that peacemakers will be called the
children of God.
 
Jesus advocates sharing your excess with the one who does not have.
 
Jesus advocates seeking after righteousness as food and water.
 
You can read about all of these yourself:
 
http://biblehub.com/kjv/matthew/5.htm
http://biblehub.com/kjv/matthew/6.htm
http://biblehub.com/kjv/matthew/7.htm
 
And you can see the love of God manifest in the gospel of John (put
yourself in the position of John, recognizing that as He loved John,
so He also loves you):
 
http://biblehub.com/kjv/john/1.htm
https://www.youtube.com/watch?v=5hexhw3wWmE
 
-----
This world teaches us incorrectly about who Jesus Christ is, what He
expects from us, and how we must come to Him. Jesus is looking for
those who are broken, flawed, who know they are sinners and yet don't
want to be. He knows you can't do it on your own, and He promises
those who seek Him that you don't have to do it on your own, but to
simply come to Him as you are (broken, flawed, in sin), and ask Him
to forgive you, and to help you, and He will.
 
He receives all who come to Him, and will never turn any who come to
Him away. No matter your past. No matter you sin. No matter those
worst things you've ever done. Jesus knows all about it, and He loves
you anyway and will save you despite those things:
 
http://www.libsf.org/misc/love.html
 
-----
Our goals on this planet are to better one another's lives, beginning
in all things with a trust and reliance upon God. And whether we are
willing to admit it to ourselves or not, He has been with us every day
of our lives here upon this Earth. We have ignored Him, but He has
remained. We have sinned against Him, but He has been there watching
over us. We have turned our back on Him and blasphemed everything
about Him and His due Glory, and yet He continues to love us, just as
a parent would love their child even if that child had done truly
heinous things.
 
The only solution to this world's ills is for each of us to embrace
that close and personal relationship with Jesus Christ, to bring Him
into our hearts making Him the centerpiece of our lives, so that He
is then able to operate through us into this world. We become His
hands and feet. We become His voice in this world. We let those
around us see the salvation He's given us at work in us, as we look
up to Him and teach others those things He first taught us.
 
-----
We must each refocus the goals of our industry to move with a purpose
focused upon that larger realization and goal, that which brings both
God and improving other people's lives always into the forefront of our
consideration, knowing that He will bring us to success in achieving
all of the goals we have, or to replace our goals with right goals to
which He will then bring us to success within.
 
Right service in this world:
 
God first*
People second*
 
* And because we put God first, and God Himself puts us ahead
of nearly all other considerations, then by putting God first
we automatically also put people first.
 
-----
Our talents and abilities are gifts given to us by God. As are the
opportunities we've had, and the positions we're now in.
 
It is time to stand up for what's right in this world, to seek that
close personal relationship with Jesus Christ, with the One who can
focus your life upon God, and upon people simultaneously, so that we
are not alone in this world, we are not seeking our own goals in this
world, but we are consistently looking out for the other guy, and even
for all the other guys, so that our lives are contributory to each
other in grand and focused ways as by the sum total of our plans, our
interests, our wants, wishes, needs even.
 
We need to start considering the long-term effects of the things we do,
remembering God first, and letting Him be the consistent cue which is
the lead role in our lives here in this world, but also in the world to
come.
 
-----
Jesus Christ is my King. And His ways are right and true. I challenge
each of you to pick up a Bible for yourself, and read it for yourself,
and come to see for yourself that which I am talking about. If you
have your eyes set on truth and rightness, you will find treasure there
beyond your wildest dreams.
 
I love you. But Jesus loves you more. Come to Him and receive His
free gift of salvation, and learn of Him. Ask Him to guide you in
your life so that you'll never go astray again. He will do this,
both because of who He is, and because of who you are to Him.
 
-----
 
Each of us is part of the community God has place us in. He has given us
this planet, everything on it, our lives, our selves, and He's given us
the inspiration we've had for ideas, the knowledge we possess has come
from the opportunities He's given us, and so much more.
 
He occupies the place of God in our lives, whether we acknowledge Him or
not. And I encourage each of you to look deeply at everything around you
and see His hand at work.
 
He stands at the door of your soul and He knocks. He invites you to come
in and sup with Him, and He with you. He knocks because He desires for
you to be part of His life (eternal life), and to be someone who is His
here in this grand universe He's created. He has plans for you that would
bring you to tears because of their beauty were you to know the full extent
of them.
 
Don't let the enemy bind you up with the distractions from this world.
Step up and see for yourself who God is. You'll find He's nothing like
this world has taught, and everything that true-seeking, right-seeking
part of you has ever longed for ... and more.
 
Jesus Christ. His name literally means, "God who saves [from judgment]."
 
Best regards,
Rick C. Hodgin
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: May 24 10:22PM +0100

On 24/05/2016 21:35, Rick C. Hodgin wrote:
 
> Jesus Christ. His name literally means, "God who saves [from judgment]."
 
> Best regards,
> Rick C. Hodgin
 
Mate, fuck off you tedious, annoying cunt. Oh and BTW if Jesus really
did exist back in the day then he was a bastard because his whore mother
obviously got knocked up and blamed it on divine intervention (this
repeated lie would probably have had the side effect of making Jesus
mentally ill which also explains his outlandish claims).
 
/Flibble
jacobnavia <jacob@jacob.remcomp.fr>: May 24 11:57PM +0200

Le 24/05/2016 à 23:22, Mr Flibble a écrit :
> he was a bastard because his whore mother obviously got knocked up and
> blamed it on divine intervention
 
Wasn't that guy gabriel that came to her?
 
It was on march 25th, when gabriel came and said to joseph:
 
"Just one time pal... I promise I won't come again"
 
Nine month later she gave birth.
Juha Nieminen <nospam@thanks.invalid>: May 24 10:48PM

> Jesus Christ. His name literally means, "God who saves [from judgment]."
 
What does your religion say about lying?
 
--- news://freenews.netfront.net/ - complaints: news@netfront.net ---
scott@slp53.sl.home (Scott Lurndal): May 24 12:40PM


>How could I dirct the compiler to simplify:
 
> float128_t a = 123.567F128 + 234.5678F128;
 
>to do the addition at compile time?
 
Use gcc's builtin __uint128_t or __int128_t types :-)
jacobnavia <jacob@jacob.remcomp.fr>: May 23 11:26PM +0200

Le 23/05/2016 à 20:17, Paavo Helde a écrit :
> compile-time expressions. This is exactly what constexpr does.
 
> Cheers
> Paavo
 
This is completely impossible. To add two float128_t I need at least
50-60% of the library to extract the components, adjust the decimal
point, do a 256 bit mantissa addition, build the result and a long etc!
 
I thought the compiler would just call a function in a dll/so or similar.
jacobnavia <jacob@jacob.remcomp.fr>: May 25 12:47AM +0200

Le 24/05/2016 à 14:40, Scott Lurndal a écrit :
 
>> float128_t a = 123.567F128 + 234.5678F128;
 
>> to do the addition at compile time?
 
> Use gcc's builtin __uint128_t or __int128_t types :-)
 
Excuse but I do not understand your point. I am speaking of a full
implementation of IEEE 128 bit floating point format, not integers...
 
???
woodbrian77@gmail.com: May 23 05:33PM -0700

On Monday, May 23, 2016 at 3:39:43 PM UTC-5, David Brown wrote:
 
> Freedom of speech is a great thing (and freedom /after/ speech is even
> better!). It is a shame to waste it on something so counter-productive
> as your nagging.
 
I don't buy your counter-productive argument. I hope things
will get better. I don't know how long it will take.
 
 
Brian
Ebenezer Enterprises
http://webEbenezer.net
Ian Collins <ian-news@hotmail.com>: May 24 04:43PM +1200


> I don't buy your counter-productive argument. I hope things
> will get better. I don't know how long it will take.
 
Maybe you and Flibble could reach a compromise: you stop proselytising
and stops swearing (as much...)? I'm sure I'm not the only reader who
finds the former more annoying than the latter.
 
--
Ian Collins
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: May 24 07:27AM +0200

On 24.05.2016 05:17, Stefan Ram wrote:
 
> (The second has been defined independently of the meter and
> the speed of light by a multiple of the inverse of an
> observable natural frequency.)
 
Are you sure that the frequency doesn't depend on the size of the
something oscillating?
 
I think I read something about pendulums in my youth. ;-)
 
 
> Otherwise, »big rip« would be meaningless.
 
>> Logic, which I'm fond of. :)
 
> It might be logic, it's not physics.
 
If you require of physics that it should be consistent with today's
cosmology, which is inconsistent with itself, our times' version of
astrology, then I'm afraid you'll be in Religion-land in no time.
 
That's not to say that even a large self-contradiction can't be
tolerated, as e.g. the physics versus relativity contradiction is
tolerated today, or e.g. as the information paradox is tolerated today.
 
But when the contradictions are due to just über-silly religious-like
beliefs, with all theory and supposed facts devised and repeatedly
revised to fit (a very large number of times), then the contradictions
are not signs of the limits of applicability of current theory, but
rather of a mess of arbitrary mutually contradictory silly suppositions.
 
 
Cheers!,
 
- Alf
scott@slp53.sl.home (Scott Lurndal): May 24 12:43PM

>On Monday, May 23, 2016 at 3:01:11 AM UTC-5, David Brown wrote:
 
>Sorry if my freedom of speech bothers you. I'm free to
>nag about it and you are free to nag me for nagging about it. :)
 
Freedom of speech doesn't allow you to yell 'Fire' in a
crowded theatre, nor does it preclude you from the common courtesy
of following the charter of this usenet newsgroup which is
intended to be discussions of the computer programming language C++.
 
I'll echo Leigh here, albeit more kindly: Go away.
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: May 23 11:31PM +0200

On 23.05.2016 13:21, David Brown wrote:
>> individuals, or on groups of individuals; in their view that's impossible.
 
> The usual view of evolution is that it acts on species or groups, /not/
> on individuals.
 
I think you failed to understand what I wrote here.
 
You can get on a start on the topic, also called the evolutionary «unit
of selection» (what evolution acts on), here:
 
https://en.wikipedia.org/wiki/Unit_of_selection
 
However, the Wikipedia article, as usual, neatly avoids getting into the
issues or the raging conflicts. It yields the impression, to the casual
reader, that there is none. So I suspect that its list of examples is
also, as usual, lacking some crucial ones (I write "as usual" because,
for example, if you read Wikipedia's article on apartheid in Israel and
its section about support for the apartheid view (which the article
calls the apartheid "analogy"), you won't find a reference to the UN
resolution that equated zionism with apartheid – and it's that way all
over Wikipedia, but this is my main example).
 
[snip]
 
 
> effect at intergalactic distances, so it is best known and studied
> there. But it applies down to the space between atomic nuclei and their
> electrons.
 
You can convince yourself that a completly /uniform/ expansion is not
present, simply by considering how to measure things.
 
When everything expands at the same rate, then your ruler expands
exactly as much as everything else. So you then have no non-expanding
thing to measure the expansion against.
 
Logic, which I'm fond of. :)
 
 
[snip]
 
 
 
> Well, scientists are human too - we should not forget that. The point
> of scientific methods is to reduce the effect of personal ideas or
> convictions as we gradually enhance the body of human knowledge.
 
Yes. :)
 
 
Cheers!,
 
- Alf
Chris Vine <chris@cvine--nospam--.freeserve.co.uk>: May 24 08:56PM +0100

On Tue, 24 May 2016 12:43:46 GMT
> of following the charter of this usenet newsgroup which is
> intended to be discussions of the computer programming language C++.
 
> I'll echo Leigh here, albeit more kindly: Go away.
 
The point you are missing is that people of faith like Brian have God on
their side and therefore the ordinary rules of common courtesy to
others don't apply to them.
 
There is no contradiction in Brian repeatedly posting off topic
messages about his faith (and off topic messages about other things
as well) which annoy people on the one hand, and raising pathetic
points about bad language which no one else objects to on the other.
That is because Brian has been told by God that it is right to do so.
Further discussion is unnecessary.
Ramine <ramine@1.1>: May 24 09:05AM -0700

Hello...
 
One last touch..
 
My Scalable Parallel C++ Conjugate Gradient Linear System Solver Library
was updated, i have just hidden a data member in my classes.
 
You can download my new updated Scalable Parallel C++ Conjugate Gradient
Linear System Solver Library from:
 
https://sites.google.com/site/aminer68/scalable-parallel-c-conjugate-gradient-linear-system-solver-library
 
 
Thank you,
Amine Moulay Ramdane.
ram@zedat.fu-berlin.de (Stefan Ram): May 24 03:17AM

>When everything expands at the same rate, then your ruler expands
>exactly as much as everything else. So you then have no non-expanding
>thing to measure the expansion against.
 
The meter today is defined by the distance the light travels
within "1/299792458" seconds.
 
So, it is possible to meaningfully explain what it would
mean for all meter bars to have doubled their length tomorrow.
 
It means that the light tomorrow would need "2/299792458"
seconds to travel their length.
 
(The second has been defined independently of the meter and
the speed of light by a multiple of the inverse of an
observable natural frequency.)
 
Otherwise, »big rip« would be meaningless.
 
>Logic, which I'm fond of. :)
 
It might be logic, it's not physics.
ram@zedat.fu-berlin.de (Stefan Ram): May 24 11:15AM

>Are you sure that the frequency doesn't depend on the size of the
>something oscillating?
 
No, I am not sure.
 
A second consists of 9'192'631'770 periods of a certain
frequency of radiation from the caesium atom, this is a
frequency which is defined as a result of a quantum process
(a "quantum leap"), which has no »internal mechanism« than
be analyzed further, it's an "elementary process".
 
This frequency does not depend on a size in an obvious way,
but even if it would depend one a size, the definition can
still be used to measure a meter. It is possible that then
transformations of some kind might indeed not be observable
(which is the same as to say that physically these
transformations do not exist). For example, when the meter
/and/ the second is doubled at the same time.
 
But for a pendulum T ~ 2 pi sqrt( L / g ), so the time
changes with the /square root/ of the length L. Thus when
times and lengths are both rescaled /linearly/ an effect
should be visible with a pendulum but not with light
travelling a meter, but when time and lengths are rescaled
so that no effect is visible with a pendulum, it should
become visible with light travelling a meter bar.
 
The apostrophes in the first paragraph are the C++ content
in this post. Reportedly that topic took the committee for
C++14 more time in discussions than any other topic.
bleachbot <bleachbot@httrack.com>: May 24 03:04PM +0200

sjsung8790@gmail.com: May 23 11:50PM -0700

hello
 
asking one question about simple overloading function matching
 
let me show some code snippet
--------------------------------------------------------------
#include <iostream>
#include <string>
using namespace std;
string f(int n)
{
cout<<"int function called : "<<n<<endl;
return "done";
}
string f(unsigned int n)
{
cout<<"unsigned int called : "<<n<<endl;
return f(3);
}
int main(void)
{
f(12);
f(12U);

return 0;
}
 
this code results as follow
---------------------------------------------------
int function called : 12
unsigned int called : 12
int function called : 3
 
yeah this is simple
f(12) called f(int), and f(12U) called f(unsigned int) which again called f(int) inside of it
 
these was plain..
 
but if i change the function definition code for two f function like this
 
#include <iostream>
 
using namespace std;
 
string f(unsigned int n) //function definition place was changed
{
cout<<"unsigned int called : "<<n<<endl;
return f(3);
}
 
string f(int n) //function definition place was changed
{
cout<<"int function called : "<<n<<endl;
return "done";
}
 
int main(void)
{
f(12);
f(12U);

return 0;
}
 
and if i run those codes.. it result stack overflow : it was infinite recursive calling
 
very strange : in main f(12U) called unsigned int version of f
but when that unsigned int version function called f(3)
it called unsigned int version of f instead of int version of f
 
I searched overloading function matching rule.. ( 1. exact matching, 2. promotion, 3. standard conversion..) but can't understand that results
Christian Gollwitzer <auriocus@gmx.de>: May 24 09:10AM +0200

> #include <iostream>
 
> using namespace std;
 
string f(int n);
 
> {
> cout<<"unsigned int called : "<<n<<endl;
> return f(3);
// here the compiler does not know that there is an f(int) function.
// Unless you have the forward declaration shown above.
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: