« first day (689 days earlier)      last day (4245 days later) » 

6:00 PM
@R.MartinhoFernandes What if the Internet is down but you're horny?
 
@MooingDuck How'd you...
 
@DeadMG What do you need crappy rand() for?
 
@FredOverflow If the internet is down, you have bigger problems than "Where will I get my porn?"
 
@Drise google image search for that image, click the image, then I have about half a second to copy the link address for the "full size image" before the page refreshes to the flickr page.
 
@FredOverflow <random> is really quite overkill for this situaton
 
6:03 PM
Of course, about the only reasonable activity to do if the internet is down is masturbate or sleep...
 
@MooingDuck That's skill right there.
 
@Drise Get the Internet back up again.
 
haha
I just slept for like an hour
 
Today is election day, and I voted. I feel proud.
 
in Belgium, voting is mandatory
no choice but to vote
 
6:11 PM
@TonyTheLion wut?
 
So you go to jail if you don't vote?
 
Guys can somebody please take a look at this and help me out? I am new to C++.
0
Q: C++ File I/O Tab separated data

Antillar MaximusI have a text file with numbers as follows: num1 TAB num2 TAB.... num22 newline . . . I would like to read num1 check to see if it is equal to 3 and if yes copy the entire row to a new file. What is the fastest way to do this? The file is quite big 80Mb+. Also, num 1 is repetitive, i.e it goes f...

 
What's C++
 
@AntillarMaximus Hi. Are you new here? If so, please read this.
 
6:11 PM
Anybody got a intelligent way of comparing two doubles for equality?
 
@Mysticial You're supposed to get a fine.
 
Compulsory voting is a system in which electors are obliged to vote in elections or attend a polling place on voting day. If an eligible voter does not attend a polling place, he or she may be subject to punitive measures such as fines, community service, or perhaps imprisonment if fines are unpaid or community service not performed. History Athenian democracy held that it was every citizen's duty to participate in decision making, but attendance at the assembly was voluntary. Sometimes there was some form of social to those not participating. For example, Aristophanes's comedy Acharnian...
 
@Drise Substract them and check if the result is smaller than some epsilon.
 
@AntillarMaximus Who is C++?
 
supposedly they don't persecute you anymore for not voting, but they used to
 
6:12 PM
@Drise The trick is finding a good epsilon value.
 
Why did @AntillarMaximus get downvoted
 
woah...
 
Next voting day I'll be in Japan. So I have to give somebody else an official permission to vote in my place.
 
sounds about right
 
@Rapptz Out of spite, probably.
 
6:13 PM
@EtiennedeMartel How do I find the good epsilon?
 
@Drise What do you want out of this comparison?
The correct answer is "do what makes sense for what you want", but that doesn't help much :(
 
Xeo
Dang it @Mysticial, you did it again -.-
 
@R.MartinhoFernandes I want to see if point A is equal to point B
 
@Xeo did what?
 
@Xeo I wouldn't really call my answer great either... I really just linked to 3 other questions.
 
6:14 PM
4
Q: c++ comparing two floating point values

Guillaume07I'm wondering what is the difference for comparing two double between this two manner : double a1 = ...; double a2 = ....; fabs(a1-a2) < epsilon (fabs(a1-a2)/a2) < epsilon Is there a prefering way to do that ? thanks

 
@Drise With ancient shaman magic.
 
The frick? Why does this compile:
 
Where do points A and B come from?
 
struct randbetween {
    std::uniform_int_distribution<int> dist;
    std::mt19937 eng;
    randbetween(int min, int max) :dist(min, max), eng(){}
    int operator(){return dist(eng);} //only one ()
};
 
Does "close enough" count as "equal"?
 
6:14 PM
Stackoverflow voting dynamics are wierd...
 
@R.MartinhoFernandes That's the best you can hope for with floating point numbers.
 
@R.MartinhoFernandes one comes from a file, the other comes from a 3-d renderer that took those points from that file, but it may be slightly off.
 
Xeo
@MooingDuck It does?
 
@EtiennedeMartel No, it's not.
 
@Xeo er, wait, no it doesn't
 
Xeo
6:15 PM
4 hours ago, by Xeo
Oh crap, a question for @Mysticial
 
@R.MartinhoFernandes Really? Woa.
 
@R.MartinhoFernandes I don't know. Some of these points can get really close together
 
Absolute difference is wildly inappropriate for a fair number of scenarios by the way.
 
@LucDanton The only problem is that a divisor may be 0 in respect to relative difference
 
I doubt that's the only problem, and I doubt that's a big problem.
 
6:20 PM
Fuckers
Apple sent me the wrong keyboard
 
@DeadMG I usually just cook up my own rng in a couple of lines :)
 
@KonradRudolph Would you like to sign up for iCare? We will replace your product if anything happens to it (at our own discretion).
 
@KonradRudolph iMsorry
2
Do you think Apple will sue Microsoft someday for the IFooBar interface naming convention? :)
 
Xeo
Nah, that's a capital i
 
@FredOverflow What, because they patented the letter i?
 
6:23 PM
@Drise Well, you have to decide what "equal" means before you can test points for equality.
 
@R.MartinhoFernandes That's what finding an epsilon means, right?
0.0606865 0.0327834 0.0969947
0.0725063 0.0643007 0.0969947
0.0724584 0.0976577 0.0969947
0.060462 0.129291 0.0969947
0.0386075 0.154908 0.0969947
0.00890381 0.172729 0.0969947
0.0281954 0.180741 0.0969947
0.069323 0.019009 0.0188195
0.0694085 0.0183704 0.0164403
0.0696157 0.0168055 0.0526646
0.00686049 0.0129493 0.066374
7.56302e-09 2.41686e-09 1.95236e-09
That's one example of it "finding" the point
 
@FredOverflow There’s always hope
 
C++17 and C++22? That's quite optimistic :)
 
@KonradRudolph Sue them.
 
@KonradRudolph Who came up with that idea, anyway?
 
6:27 PM
@FredOverflow The same as CArray and CFuckPleaseKillMe
 
@DeadMG CArray sounds like "C style array" :)
 
@DeadMG The same who came up with MTriBool?
 
@R.MartinhoFernandes I declined the offer.
 
Not implemented, not implemented, false, true, not implemented, -1?
 
@Drise What does the M prefix stand for?
 
6:29 PM
@FredOverflow Idk. It was on some MSDN thingy someone linked to here
MsoTriState
 
> The nhn_ prefix is used for names that don't follow any Hungarian notation (No Hungarian Notation).
 
Xeo
@FredOverflow That was their plan from the beginning. Ok, the same applies for C++0x but...
 
I don't like hungarian notation.
 
Xeo
@FredOverflow what the
 
$6.90
 
6:31 PM
@Xeo Don't worry, I only just made that up for the lulz ;)
 
Oh thanks bank account. It's nice to know I have only 6.90$ to my name
 
Xeo
okay
 
Time to go spend it on a cheeseburger
 
A cheeseburger is that expensive?
 
Well, the meal in general is
So soda, fries, and a burger are around 5-7$
or more
 
6:33 PM
You can buy meals at McDonalds? I thought they only served crap :)
 
depends on where you go.
@FredOverflow We have places like... Wendy's... and BurgerKing
 
McDonalds is ok if you have nothing else to eat.
 
 
@Rapptz And BASIC would be a great programming language if there was no alternative.
 
My stomach is not enjoying the 12 things of ramen I ate this weekend...
 
6:34 PM
Tell your stomach he's a pussy.
 
@FredOverflow He nearly exploded this morning. Thank god Anus came in and exploded for him.
 
sbi
@R.MartinhoFernandes I knew it! You're a robot!
 
The worst part is that I was constipated, so I felt like a champagne bottle popping a cork and spewing champagne everywhere.
 
sbi
@FredOverflow They might sue us Germans one day for using an iMer.
 
6:38 PM
Going for food, see y'all
 
@Drise "How can a single hole point at so many different directions at once?" :)
 
sbi
@Drise What a wonderful image you provide us with.
 
Because I know PILE OF POO's codepoint?
2
 
sbi
@R.MartinhoFernandes Only robots will know Unicode characters by their hexadecimal code point numbers.
 
6:38 PM
Robots are probably POO jealous.
 
@R.MartinhoFernandes Probably the best out of context moment
@sbi It's less about the imagery, and more about the aroma.
 
@sbi Against all sanity, I've been messing with Unicode directly for about a month and I use PILE OF POO as a test case often.
 
Is PILE OF POO some official name or something? :)
 
sbi
@FredOverflow No, the official name is POO, PILE OF.
@Drise I see plainly through your subterfuge.
 
@sbi Actually, it's really PILE OF POO.
@FredOverflow Yes. And it can never change.
 
sbi
6:44 PM
@R.MartinhoFernandes Are you trying to correct me, you rattly pile of metal?
 
Bite his shiny metal ass.
 
@sbi No, I'm enlightening you!
 
@Neil That should be obvious. They become standard input and output.
 
7:07 PM
BBC, you disgust me
shitty soap opera: position #1, awesome science thing: not even on the list
 
That's just democracy.
Or should I say capitalism :P
 
Plethoracratia
 
The Evil BBCâ„¢.
 
5 hours ago, by Chimera
I LOVE TITS!
^ @Chimera You've said worse things in the past :)
By the way, it was me asking about Accelerated C++
Did you finish it?
 
@EtiennedeMartel You interrupted @sehe so he had to delete his message.
 
7:13 PM
Not a problem. I fixed that
 
Just analyzing the situation.
 
To be honest I messed up that first link, which took the pace out
 
I finished Accelerated C++ in 2005. Took me a bit longer than expected.
 
Aanleg voor sport verslaggever?
 
@EtiennedeMartel Replace "Evil" with "Wastin mah tax monies"
 
7:14 PM
@StackedCrooked Hoezo, was je in 2001 (fixed)begonnen?
 
but at least the Govt is giving me some tax back
 
@sehe Not really, I sound too boring.
 
@DeadMG With that kind of language, you hardly seem to have a point
 
@sehe Took me a few months IIRC.
 
@sehe They're a wastin mah tax monies!
 
7:15 PM
@StackedCrooked I took all day.
 
@DeadMG Do you even pay taxes?
 
@DeadMG And you're not even from Texas!
@EtiennedeMartel Ouch
 
You whiny brat.
 
@EtiennedeMartel Yep.
 
7:16 PM
The most interesting part in Accelerated C++ were the generic algorithms and the accompanying exercises. It was my introduction to generic programming and I liked it.
 
@DeadMG Wait, you mean you actually have some income? Woa.
 
I thought copy-on-write was really cool then.
 
@StackedCrooked Everyone thought so. But then multiprogramming came along and shattered that.
 
@EtiennedeMartel Not really. Sales tax and shit, y'know.
 
@DeadMG Aah. Yeah. But that's not the biggest source of government income.
 
7:17 PM
@EtiennedeMartel COW and multithreading can work, I think. Just not with an STL-style interface- just like every other concurrent operation and an STL-style interface.
@EtiennedeMartel Actually, over here, it's quite a big contributor.
 
COW is sometimes considered to be thread-safe because if write results in copy then you can't have multiple threads writing to the same object.
 
@StackedCrooked Oh. I must have missed something there. The good part is, there is very little misinformation. In other words, there is mostly solid information. In a way it is written both crisp and dense: much information, in no-nonsense language.
 
@StackedCrooked the problem wasn't thread safety so much as certain reads ([]) being required to make fork a copy AFAIK.
 
@StackedCrooked Ahem. That at least requires the refcount to be thread safe. This will make it prohibitively slow for starters
I fell out of love with COW back in... 2002 or so. When I encountered freaking BUGS in the dinkumware (read: MS VS6) STL library - in a piece of production software for Shell Europe. You know, that is not lovely.
I had to manually patch the standard headers to disable the COW feature. Go. Figure.
 
Humph, it was probably a bug in your code :p
 
7:22 PM
It was. It was caused somewhere, though :p
It was a confirmed bug report and the fix was taken from the official bug tracker
 
I'll never doubt you again :)
 
Please don't. It'll be bad for my blood pressure :)
 
downvoted
1
A: Addresses and lifetime of rvalue references (or of xvalues in general)

Bo PerssonClause 12.2, paragraphs 4-5, says that the lifetime is extended in the second example There are two contexts in which temporaries are destroyed at a different point than the end of the full-expression. ... The second context is when a reference is bound to a temporary. The temporary to w...

 
@sbi Ironic, how starring your meta post seems like... self-promotion if look at it hard enough
 
Propaganda!
 
@JohannesSchaub-litb Erm... Re: your answer: "if you mix rvalue references in between, the compiler has no way to know at compile time". How is the rvalue-ness of an expression not a compile-time known property? I mean, C++ is strongtyped, so types are known at compiletime?
 
@sehe the second code blurb clearly shows the problem, mainly, when you have an rvalue to a local variable.
 
@sehe the rvalue-ness is. but it is not anymore necessarily known that what it refers to is a temporary object
 
@JohannesSchaub-litb Ok, there was my brain-warble. Thanks
Also, am I doing it right: ideone.com/NXzQB
This seems to suggest that the lifetime got extended anyway. Hmmm. Another brain-warble? Or just: UB, so ok?
 
@sehe too old gcc?
i thought it should just yield an xvalue without introducing temporaries/prvalues
 
7:48 PM
You know, I think it has something to do with your avalue and dvalue. Might want to check those pesky tvalues too.
but then again, it could simply be a hvalue problem.
 
you suck
dvalues are where it's at
 
sbi
@sehe Ha. You made me look at that again, and by now @Shog gave an answer that I consider extremely well put, because he puts Ira's actions into context.
 
or maybe some pvalues, but I think that puppy-values are out of your price range
 
pubby values smell
 
sbi
@JohannesSchaub-litb You mean pubic values, Shirley?
 
7:54 PM
@sbi ohh that'S a good technical comment
 
sbi
@JohannesSchaub-litb Is it? Really? If I wouldn't know you better than to believe you, I'd delete it now.
 
@sbi is the the cleanliness value of said region as to determine whether eating someone out is a good idea?
 
@sbi Wow, that is indeed excellent.
 

« first day (689 days earlier)      last day (4245 days later) »