« first day (1306 days earlier)      last day (3636 days later) » 

12:16 AM
Is it a longshot to call this a dupe? My dupe vote is binding. — Mysticial 47 secs ago
 
there's some nice stuff to find if you take top X guitarists of all times articles and go through the comments instead
to find out who people think should have taken the first places lol
 
 
2 hours later…
user3010322
1:59 AM
@AlexM. \o/ Woo!
 
2:34 AM
aw man
I need 33 answers with ~6 upvotes each.
:(
 
2:47 AM
I need 130 answers for the badge.
How the hell am I gonna do that?
 
I barely have motivation for 1 answer. Let alone 33+!
 
3:34 AM
@Mysticial A frontal lobotomy would probably be a good start.
 
aha
 
@Mysticial but as the old line goes, I'd rather have a bottle in front of me than a frontal lobotomy.
 
4:04 AM
It's great to speak to a bunch of people, all of whom got paid but none wants responsibility
 
> marked as duplicate by Mysticial just now
^^ Since when did they add the gold badge icon?
 
?
 
Aw man. I wanna join in the fun. :(
 
@Rapptz You're missing out much. The close vote review queue has already been emptied of C and C++ dupes.
Partially my fault.
 
4:20 AM
Morning!
 
evening
 
Please check if it’s OK to post your code publicly _before_ asking on SO, rather than begging us to delete it when your client finds out.
 
lolfail
 
4:58 AM
Client shouldn't be bothered by a snippet of code on SO.
Unless he posted the entire source code :)
 
@StackedCrooked This user requested 2 times to delete my answer code
 
I find it funny that he comes back after more than a year and whine again
So that's the speed of development in his company? Not very fast IMO
but thanks to the meta post, it seems I got some sympathetic upvotes :P
 
5:19 AM
He should file a patent with that source code, make sure nobody steals it.
 
wut? I hope I won't receive any email these days about this
 
Just kidding. :P
 
@Nican hehehehe ofc I'm in the lounge :D
 
So. I got into a bit of argument with a friend: We are using Eigen, a matrix library, and part of our code deals with large matrices (80x80 doubles) that live on the stack. I have reason to believe that Eigen unrolls the loops (with some templating dark magic), and causes to generate a 120mb .lib file. Would making the objects live on the heap, and prevent the loops from being unrolled, could cause any speed improvements?
I am hoping to make a test tomorrow at work.
 
1
Q: A long list of possible duplicates — C memory allocation and overrunning bounds

Jonathan LefflerThe question Why does invalid memset() after malloc() lead to free() invalid next size (fast) error has just been closed as a duplicate of: free char*: invalid next size (fast) But there are multiple other bugs in the related lists of the various questions that should probably also be closed ...

 
5:36 AM
I'm impressed that relaxed constexpr allows you to make compile-time strings easier.
 
Reading a 1GB file and adding all bytes takes how much time?
Just found this post on reddit :)
 
Depends on computer, file is cached in memory, file read speed, how you are reading the file, cpu scheduler. There are just too many factors. :o
@StackedCrooked Link?
 
6:16 AM
> Computers are ridiculously fast. The most depressing thing about computers for me is how terrible we are at using their speed.
 
@TonyTheLion Yep. When a computer can compute a billion digits of Pi faster than it can open iTunes, you know something is seriously wrong.
 
6:31 AM
@Mysticial well, to be fair, you can't even begin to compare the speed of accessing HDD (or an SSD in a better case) - needed to start iTunes and the speed with which a CPU can do arithmetic
 
user1804599
7:10 AM
@Mysticial does that include storing all those digits on disk and loading them back into memory again?
 
user1804599
Hey, maybe iTunes needs a very good approximation of pi for rendering visualizations. :P
 
process startup time is not mostly CPU
I suspect the cost is mostly due to dynamic linking and reading config data.
 
it's really just external storage access time kicking in
 
@Nican Are you sure the data in the matrices really lives on the stack? (I.e. is sizeof(matrix) a large number?)
 
Yes.
 
7:22 AM
Assuming a double is 64-bit then a 80x80 matrix takes 409600 bytes. That's way too big for the stack.
You should put those on the heap.
But there is no reason why this would prevent the loop unrolling.
 
@Nican are you saying you want to put them on the heap to prevent unrolling (and to get a smaller .lib file)?
 
Odd. I wonder why that size:
std::cout << sizeof(Eigen::Matrix<double,80,80>) << "\n";
= 51200
@jalf Yes. I am just wondering that if having one small repetitive SIMD operation on the CPU is better than having a really long list of SIMD operations.
 
@Nican oh, my mistake
I mistakenly used ((80*8)^2)
Which is wrong of course.
 
@Mysticial since gold tag badge owners can now close dupes single-handedly.
 
Well, it is going to be an interesting test tomorrow.
 
7:32 AM
@rightfold I'm exaggerating. It takes my machine almost 5 minutes to compute Pi to 1 billion digits. iTunes will open in a few seconds. But booting my machine easily takes several minutes.
 
user1804599
Booting my machine at work takes five seconds.
 
@Mysticial liar
 
@rubenvb That I knew. They added the gold badge icon very recently.
 
user1804599
Longest is DHCP thingy.
 
user1804599
I wonder if I could run init script in parallel and whether that is a good idea at all.
 
7:34 AM
@Mysticial Oh, I thought I just didn't notice earlier.
@rightfold init script? For what? An OS? Use systemd ;-)
 
user1804599
Gentoo.
 
@rubenvb Here's my first unilateral close: stackoverflow.com/questions/23636783/…
That was before they added the icon.
 
@StackedCrooked That reminds me, although it does not live in the stack, the sizeof(RobotIK) instance is 2MB.
 
@Mysticial lol it's not retroactive :-P
 
@rubenvb :)
 
user1804599
7:36 AM
It uses OpenRC.
 
user1804599
wiki.gentoo.org/wiki/Talk:Comparison_of_init_systems lol the first entry in the legend.
 
@StackedCrooked Which part are you accusing me of lying? :)
 
@rightfold that's an interesting table :-)
 
I meant exaggeration is lying.
 
@StackedCrooked oh :)
 
7:39 AM
I need to lookup spelling for "exaggeration". Never written this word before.
I did not expect a double g but a double r.
 
@Nican I see no reason why putting it on the heap would in any way limit unrolling (you could try twiddling compiler flags to achieve that though. What about simply optimizing for size with -Os?)
 
@jalf Unless it introduces aliasing that the compiler can't prove will never happen.
 
Another approach would be to make as many functions as possible static, so the compiler won't have to export them from the .lib. It might be able to eliminate a lot of code then. Or you could turn the .lib into a dll, which would allow the linker to eliminate a lot of code
@Mysticial true
 
@Mysticial Why is that pinned
 
@Rapptz I did not pin that.
 
7:47 AM
History says Fred did. Hm.
 
@jalf Well, what we can not explain why the library is 120mb (Compiled with -Os), since it is rather simple (Some 30k lines). My guess is that Eigen has literally inlined millions of the SIMD instructions for all the math operations. I guess I could call this doing too much unrolling on the loops.
 
That's a pretty horrible question.
 
user1804599
The problem is not the link and it is not the "urgent" or whatever.
 
7:55 AM
@Nican sure, but that doesn't mean it will executed 120mb of code. A .lib file is basically just a collection of .obj files. The vast majority of that code will likely go unused in the final executable, but when the .lib is generated, it has to export basically everything (except for free static functions). The linker doesn't run at all.
I'm willing to bet that when you link the .lib into an executable, the executable will not be 120mb ;)
 
Hm. Did not think of that.
 
user1804599
It is that OP didn't get banned for this.
 
stupid firefox
-1
Q: std::array ... has incomplete type and cannot be defined (gcc)

user1767754Hi i try to create an array of int vectors, but i get an error message. I am new to gcc by the way. std::array<std::vector<int>, 3> myContainer; error: aggregate ‘std::array, 3ul> myContainer’ has incomplete type and cannot be defined

 
@Rapptz Everything SO is borked in my Firefox at home, for some reason. Looks like it has cached bad versions of a .css and .js file or something. Most JS stuff doesn't work, and the chat is completely unstyled. Oh, and clearing browser cache and reloading doesn't work. So yeah, stupid Firefox
 
@jalf I was getting that intermittently too, (FF V 29.0.1). I put it down to the server 'cos it's working-ish now.
 
8:02 AM
@Rapptz mine does that too, so irritating
 
Yeah I wish I knew how to fix it.
Thanks for your edit!
This edit will be visible only to you until it is peer reviewed.
 
meh me too
 
Oh yeah =[
I forgot I have to go through that on other sites.
 
SO main site also vey slow here, other sites OK.
 
8
Q: Does C++ compiler remove/optimize useless parentheses?

SergeWill the code int a = ((1 + 2) + 3); // Easy to read run slower than int a = 1 + 2 + 3; // (Barely) Not quite so easy to read or are modern compilers clever enough to remove/optimize "useless" parentheses. It might seems like a very tiny optimization concern, but choosing C++ over C#/Java...

 
8:08 AM
@Rapptz Oh fuck, not that shit again. Downvotes coming...
OH - hang on, it's got 8 ups??? WTF??
 
Stupid people everywhere
 
user1804599
But parentheses are so slow at runtime!
 
I don't see how (1 + 2) + 3 is easier to read than 1 + 2 + 3 :v
I know it's an example, but I think it's a poor one
 
user1804599
Fuck you Bootstrap.
 
user1804599
How can radio buttons be so fucking broken.
 
user1804599
8:11 AM
It's the simplest UI element ever.
 
@ratchetfreak, you're right yet I also know how to comment my code. int a = 6; // = (1 + 2) + 3 — Serge yesterday
:laffo:
Also stupid broken regex oneboxing
 
@MartinJames You need a break
 
There are enough 'operator precedence' bugs about as it is, without devs being afraid to use extra brackets 'cos purrformance.
 
Does C++ optimise long variables to be as fast as short????
 
Loaded question
 
8:14 AM
@CatPlusPlus Well, I always try to use medium ones.
 
Woah I just ate breakfast at breakfast-ish time
 
Xeo
noway
 
@manu Why/how would you use SomeStruct**? How would you allocate this? I'd say it's either wasteful and useless or a very bad idea. (Possibly both). — sehe 2 hours ago
Come on people. Read the newbie hints before flagging. Please.
1 message moved to bin
You're welcome to stir up a fight anywhere else.
 
@sehe Heh, just a heads up.
 
Me too. Beat it.
 
8:18 AM
@sehe Chill.
The one stirring up a fight is you, not me.
 
I hope you can too. This is not a pretty way to introduce yourself to a new chatroom
 
@sehe I'm not trying to "introduce myself" nor this is a "new chatroom".
 
You can review the message in the bin, if you forgot
@SecondRikudo It is for you.
 
@sehe Not really, it isn't.
I may not be a regular, but this isn't the first time I'm here.
 
:cripes: with that idiotic flagging
 
8:21 AM
You're Madara Uchiha right?
Just guessing based on your Sage of Six Paths avatar and rep.
 
@Rapptz I am.
@Rapptz (You can also see my nickname was not changed in most other sites)
 
@SecondRikudo Oh. Ahah, welcome back, I suppose. I might have assumed you were the one flagging (going against accepted room policy), sorry if that was not the case. Regardless, coming into the room throwing dirt at a regular is not likely to be appreciated in many places.
 
He was just joking.
 
Let's call it a misunderstanding and move on, shall we? :P
 
You stepped out of your bed with the wrong leg.
Fixed :P
> How to read from standard in?
^ Coliru question.
 
8:28 AM
Popular request. :v
 
I'm inclined to answer "use std::cin".
@sehe uses it all the time
 
Xeo
Btw, did you approach the codepad guys because of the coliru.com redirect?
 
I didn't.
 
Xeo
mh
welp, time to get my ass to the doc
 
erm silly
 
8:33 AM
Wow, when did I gain these godlike dup closing powers? stackoverflow.com/q/23649392/153285
 
I should be more careful when making the decision to refactor legacy code.
It ends up being more work than anticipated.
 
@Potatoswatter There was some meta about giving 10K+ users more weight re. closing dups. Maybe they did something about it?
 
Ah, apparently granted by a gold badge in a relevant tag.
(So, you need 10k worth of rep from answers in the question's language.)
 
@Potatoswatter There was a recent meta question with almost exactly the same title.
 
8:37 AM
Forgive me for not following meta :P
 
197
Q: When did I get close-vote superpowers?

John CondeI just marked this question as a duplicate all by myself. I am not a moderator and I don't think this should be possible. Did I miss something?

 
Sure it's not 10k upvotes though?
or rather 10k abs score
 
@LightnessRacesinOrbit No, that would be 100k rep and I don't have that.
@StackedCrooked Kewl
 
@StackedCrooked yeah. Do you have stats? Do I use 60% of total CPU time?
 
I don't have stats. (Apart from log files.)
I could deduce lots of stats from the logs though.
 
8:45 AM
o/
 
user1804599
Bash what the fuck
 
user1804599
> bash: -c: option requires an argument
 
user1804599
This makes no sense. T_T
 
don't bash bash
 
Don't bash bashman bash. (Postfix notation.) Doing that, did you expect -c alone to implement a no-op?
 
user1804599
8:52 AM
Uh, no.
 
user1804599
I am not an idiot. My code is bash -c "...".
 
Dunno, seems to work on OS X
 
user1804599
Well, funny thing is.
 
user1804599
It actually works.
 
user1804599
8:57 AM
I get the error but everything works as expected. vOv
 
Quick favor, whenever I answer a question that involves regex - someone physically punch me. Thx.
 
Agreed.
@Potato Okay good point
 
user1804599
@BenjaminGruenbaum Why?
 
@rightfold I answered a question about how to parse an expression with nested {}s with a simple parser, all other answers - regex, got a ton of downvotes from people I downvoted since their answers are wrong, then one guy asked OP to say they only need one level of nested {}s and OP did :/
Next thing, ton of downvotes on old questions - I hate this drama :/
 
user1804599
That's not a problem with regular expressions.
 
user1804599
9:00 AM
It's a problem with Stack Overflow.
 
lol, even got a delete vote for an answer.
 
You got 3 downvotes on java/javascript questions.
(I have too much time on my hands today, apparently.)
 
user1804599
 
@Potatoswatter yeah, the old Java one is not even me, it's a friend who opened my account initially. I never actually did use Java serialization :P I don't mind the downvotes, I just don't like the idea of someone abusing the system like that.
Then again, I mostly don't like the drama, I don't really care that much about the rest of the stuff.
 
9:19 AM
 
user1804599
@ArneMertz fuck you
 
'Validation for order 37 failed because the client pool was empty' WFT? I have no idea how this ancient app works, yet I'm supposed to update it. Which moron wrote this shit?
(Yes, it was I).
 
user1804599
@ArneMertz HANDS
 
@BenjaminGruenbaum I can oblige, you know.
It'll just take me a little while to get to you though :P
 
9:24 AM
link?
 
@R.MartinhoFernandes So, did it end bad?
 
user1804599
I think I am going to eat squid soon.
 
user1804599
Is it tasty?
 
@rightfold why? :-)
 
user1804599
CANNOT UNSEE
 
9:33 AM
xD
@rightfold the sauce makes the squid :-)
 
user1804599
Ah, right.
 
user1804599
Everything tastes good with ketchup.
 
yuck
 
ugh, day 3 of chasing a weird bug
 
my chicken sometimes chases weird bugs too :p
 
9:37 AM
dont chase. let it come to you... build a trap.
 
@ArneMertz yes, I've spent two of the three days trying to do that. :p
finding a few other bugs along the way, but nothing that can explain the issue I'm actually trying to figure out
 
9:53 AM
What bug
Also why is that crappy deleted question pinned
 
@CatPlusPlus Probably because how beautifully crappy it is.
 
No, it's just crappy
Or: it's fairly standard
 
user1804599
It's one of the best questions on Stack Overflow.
 
10:15 AM
Oh shit, my app-from-the-past uses XML/SOAP.
I'm dead...
 
@rightfold great link thanks
 
user1804599
I like to link to Stack Overflow.
 
@MartinJames lounge ghost stories
 
user1804599
@MartinJames Why are you dead?
 
user1804599
Use a SOAP library.
 
10:33 AM
starred for maximal embarassment
 
10:47 AM
@VáclavZeman Not so bad, actually.
 
Xeo
10:59 AM
Wokay, trip to the doc took a slightly different turn than what I anticipated
 
Xeo
nah, right. As in, right toe. Operated.
I thought we would just talk about possibly operating it
 
user1804599
Yum.
 
user1804599
Cookies and Coca-Cola.
 
@Xeo You mean, past?
 
Xeo
11:01 AM
Wut?
 
Did it operate on you already?
 
Xeo
Hai
Cut a good portion of my right toenail out. That looked funny.
And now to take some drugs, because this shit will hurt like hell as soon as the anaesthesia wears off
 
@Xeo He operated with a shark?
 
Xeo
of course
 
@Xeo Lounge<Junkies>
 
Xeo
11:06 AM
Did you visit your doc yet? :P
 
Xeo
... your morning sickness?
 
Oh.
Not yet.
Now that I'm genuinely worried, it'll take a few weeks to convince myself to do it.
 
Xeo
Just fucking do it
 
seriously man visit the fucking doctor
he might eventually heal you
 
Xeo
11:09 AM
13
Q: How can I generate as many parameters as is the arity of a function?

mrmSuppose I have the following function, that takes a function as a parameter. template <typename F> void test_func(F f) { // typedef typename function_traits<F>::return_type T; typedef int T; std::mt19937 rng(std::time(0)); std::uniform_int_distribution<T> uint_dist10(0, std::num...

HAJPKGH:PAHGH
Oh look, and Nawaz answer has unspecified evaluation order
And he even tests with a random number generator. Oh the irony.
 
@AndreyPro WinAPI wide functions are nearly UTF-16, because UTF-16 is NOT fixed length. Check out this: utf8everywhere.orgcubuspl42 1 min ago
CAN WE KILL THIS SPAM
"Write your own answer" comes to mind.
 
Xeo
@Xeo: Yes. :-). It is same as in the question. — Nawaz 1 min ago
What a great reason!
Super useful for a generic piece of code
C++ on SO has gone down the drain :(
not even C++11 is safe anymore.
@Xeo: Because in the question, the OP is using "random" generator. Does it really matter the order in which you're calling it? — Nawaz 16 secs ago
. . .
 
@cubuspl42 you know what's more ridiculous? If you had actually read the page on the other side of that link you people keep spamming everywhere like mad men, you would have already known that Windows uses UTF-16, because it is written there. — R. Martinho Fernandes 6 secs ago
Stupid fucking zealots.
 
Xeo
11:25 AM
fuuck, my toe hurts
 
that said, UTF-8 is a nicer encoding, and it would be nice if we could just use that all over. But there is such a thing as at least using correct/valid arguments for it :p
 
Xeo
drugs, work, plx
 
@jalf Yes, I agree.
 
Xeo
it's this ibuprophen stuff again, which didn't do much last time for my back :(
 
It's the blind preaching that pisses the hell out of me.
 
11:26 AM
yeah
 
UTF-32 seems neat. Shame about the space though.
 
Xeo
Okay, this toe is going to bug me all day today
I don't think the drugs are going to do anything
 
I never buy the space arguments.
If you worry so much about that use a scheme like Python or just zip the damn thing.
The Unicode encodings don't add any entropy and they compress to the same.
 
11:41 AM
@R.MartinhoFernandes It'll use up more of the cpu's data cache though (when doing string processing or otherwise iterating over the string data).
I'm not saying that is prohibitively expensive though. It typically won't be :)
 
@jalf Actually, if your text is in Japanese, UTF-16 encoding is shorter than UTF-8.
IIRC, from long time ago.
 

« first day (1306 days earlier)      last day (3636 days later) »