« first day (699 days earlier)      last day (4253 days later) » 

8:01 AM
Not sure
The only thing I've found so far it's got something to do with Function Level Linking.
 
Xeo
Mornin
 
posted on September 14, 2012 by Anders Schau Knatten

Time for another puzzle! What is the output of this program? Answer: Undefined behaviour! Which means it could output whatever, crash at any point, or format your hard drive. Can you spot the source of the undefined behaviour? Hint: Look for the use of an uninitialized variable. Did you see that the order of foo [...]

 
Xeo
Damn, working with the tcp::resolver doesn't seem to yield only listening ports. :(
 
Are the notifications on SO down?
 
@LuchianGrigore yeah
nothing's updating
not even vote counts
 
NooooooooooooOOOOOOOOOOOO!!!!!!!!!!!!!!!!!!!!!!!!!!1111111oneone
 
8:29 AM
@LuchianGrigore I assume you rely heavily on the updates to get to questions in < 10 secs? :-P
Actually, quick poll. Do most of us find questions off the homepage? Or off the individual tag pages. (such as stackoverflow.com/questions/tagged/c%2b%2b)
I get mine off the homepage.
 
sbi
> Current status. — Anna Lear
 
@Mysticial specific tags
I currently have C and C++ opened
And yes, not all of us have 500+ answers to rely on them for the repcap :P
 
I found that I can't FGITW anymore every since they added the real-time updates.
@LuchianGrigore I didn't have a single 500+ answer before March.
 
sbi
@Mysticial I get most of the questions I deign to answer to here at the chat.
 
I'm still in awe of the guys who have like 20+ Great Answer badges...
 
8:35 AM
In computer science, common subexpression elimination (CSE) is a compiler optimization that searches for instances of identical expressions (i.e., they all evaluate to the same value), and analyses whether it is worthwhile replacing them with a single variable holding the computed value. Example In the following code: a = b * c + g; d = b * c * d; it may be worth transforming the code to: tmp = b * c; a = tmp + g; d = tmp * d; if the time cost of storing and retrieving "tmp" outweighs the cost of calculating "b * c" an extra time. Principle The possibility to perform CSE is b...
 
I should say, I get about half my questions from the tag e-mail subscriptions.
 
Does that work well, those tag e-mail subscriptions
I saw that the other day, and wondered if it was worth signing up for
 
@TonyTheLion They work great for specialized questions that are not FGITW.
 
sbi
@Mysticial I wish I knew what you are talking about. Can you elaborate?
 
You usually get them up to 15 minutes late. But for specialized tags, that's fine.
 
Xeo
8:38 AM
@Mysticial I'm in awe of those that have that tag at all (on a good question) :P
 
17
Q: What is FGITW and SCITE on MSO?

Alex AngasI only read MSO every so often. I'm reading lots of talk about SCITE and FGITW but have no idea what these are. Can someone please define and explain these abbreviations?

 
I don't subscribe to any of the language tags because that'd be pure spam. So I subscribe to stuff like and such.
 
Xeo
@Mysticial /tagged/c++%20or%20c++11
 
@sbi Questions have a small delay before they appear on the homepage. But they appear instantly in the tag pages because of the real-time updates.
 
sbi
@TonyTheLion I hope that wasn't aimed at me. I certainly know what FGITW stands for. But I wondered what "real-time updates" @Mysticial is talking about.
 
8:40 AM
So I'm never the first to see the questions anymore.
 
Xeo
@sbi "1 new question" atop the list
 
sbi
@Mysticial Ah, now it makes sense. I didn't know that.
 
Xeo
@Mysticial They also have a small delay if you're not getting them from the real-time updates but just F5
 
@Xeo or an auto-refresher
I used to spam a 5-second AF on the homepage. That worked pretty well until I basically quit FGITW.
They introduced the real-time updates a month later.
The loop and matrix questions I found because @Xeo linked both of them in chat.
 
Xeo
Glad to be of service. :P
 
8:46 AM
The denormal float question I found on the homepage right when I got out of bed in the morning.
The branch predictor question I also grabbed from the homepage.
@Xeo I still can't figure out a way to pay you back for those... :( Reddit didn't like that 1+2+3+...+1000 question.
 
Xeo
lol, nvm paying back
Usually Reddit also only likes fresh questions, right?
 
@Xeo I've never seen a difference.
I've seen really old stuff do well on reddit.
 
Reddit likes whatever the hive mind likes.
 
Xeo
Well, I only really noticed the new questions being linked, so that may be it.
@LucDanton heh, nice
@LucDanton Btw, missing universal references in the ctor
wait
nvm oO
 
8:51 AM
It's compose, not make_compose!
 
that composes those two lambdas right?
 
Ya.
 
Xeo
I was a bit confused since you use F and G without unreferencing them
 
@Xeo C++11 style perfect storing/restoring. Or whatever. I don't have a good name for it.
 
Xeo
Anyways, time to get going again. :)
@LucDanton Yeah, noticed it after the confusion, hence the "nvm"
 
8:53 AM
huh
I got two emails from recruiters this morning asking for my full CV
 
Xeo
lol
 
that thing I put up on the job seeking website was my full CV
 
yea recruiters are dumb like that
 
@DeadMG They just ask stuff like that to see if you will get insecure
 
I had my CV in several places, and they would still email me asking for my CV, though they had come from that website
I just sent them my CV again.
 
8:55 AM
lol
 
@sehe it's all a test
 
Xeo
@Luc though you may want to provide an option that always makes a copy
 
@Xeo Why, the user can just do compose(val(foo))/compose(move_val(foo)).
Well there needs to be a second argument but still.
 
Xeo
well, I didn't know those functions
 
C++03-style storing requires ref, too.
 
Xeo
8:57 AM
Though I find it interesting that you go the "reference by default" route as opposed to the stdlib/Boost which go "copy by default" and provide ref to have references.
 
I got that from writing a C++11 lazy-eval EDSL. You still need to provide policies; or at least I haven't found another way.
 
Xeo
What exactly does move_val do? Move on conversion?
 
move_val(foo) is the same as val(std::move(foo)). Another thing that needs a better name.
I used to call that emplace but that name conflicts with something different (optional<foo> o(emplace(bar, baz))).
enval/emval just looks silly so I don't know.
 
 
Xeo
naming is hard
Anyways, gotta go
 
9:02 AM
Hi
 
gotta go back to the government people today
and then rush back for Google talk
wish me luck
 
well... good luck
 
9:40 AM
0
Q: Performace of constant references over non constant reference

HellBoyIs there any difference in performance when using a constant reference and a non constant reference in C++ ? If yes than which is better and why ? There is a statement in systemc manual that passing objects by non-const reference is fast solution. any ideas ?

is this a silly question or is it me?
 
@TonyTheLion It's been asked before.
Not quite the same way though.
Not in the mood to find the dupe.
It's not completely silly if you think about aliasing and such. But if you dig a bit deeper, it's easy to see that being const still doesn't help.
 
hmmm
right
 
Let's just say there are much bigger offenders of "silly performance questions".
 
9:56 AM
In the actual production code of the HotSpot JVM written in "C++" the use of templates seems overestimated, instead macros is teh shit.. #define define_generic_array(array_name,element_type, base_class)
 
argh fucking hell
government people: Spend three fucking hours travelling to see us twelve hours after your previous appointment
train people: Only one ticket station is enough, there could never be any way in which you get held up unpredictably by some guys who have no idea wtf to do and not be able to buy a ticket before the train comes
and, of course, there's no way in which anyone could be blocked by the other fucking train that comes and there's no overbridge
and, finally, when you're not moving and someone pushes the Open button, there's absolutely no way that some unlucky fuck wants to get on the train, so just fucking pull away and ignore them
 
woooooof?
 
fuckin woof
 
+1 for awesome 3D graphics but give up this madness and embrace proper data structures. — Konrad Rudolph 20 secs ago
Good morning :)
The auto does help … but I’d go one step further and actually write a wrapper to represent 3d (or n-ary) matrices
 
10:13 AM
well
at least now I can eat some fucking breakfast before talking to the Google recruiter?
 
hehe
enjoy the breakfasts
 
@DeadMG i think that'd be a good idea. I suggest you suppress some of the swearing during the interview
 
> unused member functions which are never called are by default considered as inlined functions by the compiler
wut?
 
@KonradRudolph So would I- if he was actually coding in C++.
 
Don't talk about how Google sucks donkey cock :P
 
10:15 AM
@TonyTheLion that sounds misguided
 
@TonyTheLion just imply it
 
@TonyTheLion arrrgh
 
@TonyTheLion I would really like to know where the OP got that idea from.
 
10:18 AM
Robot help I don't know how to debug this Android shit. :< Can you trace flow across activities or something?
 
@Insilico that's what I've been wondering
 
It's called link time optimization. Yes unused symbols and even objects can be discarded in some circumstances. But I don't think any standard mandates anything in this regard. All of this has zarroo to do with inlining — sehe 2 mins ago
 
I really don't see the link between inlining and function elison.
 
@Tony somebody is arguing with me, it is his words not mine ... — gpuguy 2 mins ago
lol
 
What do you answer to someone that thinks R-value references are an abomination and cause hard-to-read code ?
 
10:20 AM
they probably haven't understood the point of them
 
"You're an idiot"
 
Well, the guy understood but keep saying that you can always use smart pointers
 
What.
 
and that the new syntax overhead is compensated by a clearer syntax.
 
No, he didn't understand it.
At all.
 
10:21 AM
Well, he understood the syntax, the cause but said no other language had it
 
What the hell do r-value references have anything to do with smart pointers?
 
And that it wasn't needed.
 
@ereOn What new syntax overhead? There’s a syntax overhead when dereferencing! Also, it’s just something completely different.
 
I demonstrated an exemple with a class handling a socket that could be moved
 
@ereOn No other language has prolific value semantics
 
10:22 AM
but not copied
 
@Insilico smartpointers abused to avoid value semantics
 
and which would have to be newed to be "moved" around without R-value references.
 
@ereOn That's such a crappy argument. The fact that language X is the only language with feature Y doesn't make feature Y useless.
 
So that:

Socket* createSomeSpecificSocket();

Would become:

Socket createSomeSpecificSocket();
@Insilico: I told him that.
 
@ereOn We get it :)
C++ is useless
 
10:24 AM
@sehe: I'm sure you do ;) I was just making my example explicit.
 
I stand by my initial assessment. Might even upgrade it to "you're a moron".
 
Also he says Qt has it right and that the STL sucks.
 
Yup.
Moron.
 
Well, that doesn't help me make my point :p
 
Case closed.
 
10:25 AM
I'm also pretty sure it would make things worse.
 
Stop talking to him.
 
"Hello Boss, X is wrong because he is a moron"
Well, he is in this company for longer than I, so has more power about which "features" to use or reject.
 
@ereOn Probably a former Java programmer. :-P
 
Change companies. Morons in charge is not a good thing.
 
As it stands, he doesn't want to use the STL, because Qt does it better.
 
10:26 AM
ok, am I stupid or can you allocate a 2D array in C with only one call to malloc?
 
So I have to deal with a lot of new everywhere
 
@TonyTheLion Yes. int* array = malloc(width*height*sizeof(int));
 
malloc(w * h * sizeof(whatever))
 
@CatPlusPlus: He is not in charge.
 
Then don't listen to him.
Geez.
 
10:27 AM
I just can't jump in and say "you should do THAT"
 
Why not? He doesn't know C++.
 
That why I'm looking for some arguments
 
@ereOn Write two pieces of code
Both do the exact same thing
 
You can't argue with people like that.
 
But one uses Qt, one uses STL
Show that the code using STL is not a piece of shit.
 
10:28 AM
You can just outrank and shut them up.
 
I just did that. He says pointers make it more explicit that you can change pointee.
 
@ereOn w.t.f.?
 
@ereOn vot ze fuck? You can obviously change any value unless it's labelled as const.
 
I'm replying that not knowing how a language works is not an excuse.
 
10:29 AM
man
I need 6 more rep
then I can have 66,666
 
He says : foo(&a, &b) makes more explicit the fact that a or b will be changed than foo(a, b) (with references)
 
@DeadMG here, have 66
 
No, it doesn't.
 
@ereOn Yes. And using assembly makes the fact that I'm using the eax register explicit.
 
Out parameters are bad design either way.
So what I'm saying is he's a moron.
 
10:30 AM
@CatPlusPlus Agreed
 
And possibly involved in Google style guide.
 
@DeadMG Now, just un-downvote one of your billion downvotes that have since been edited (or stealth edit it yourself)
 
oh man
 
@Insilico Thanks a lot :) That will help
 
@Insilico but that's a 2D array as a int* and I'm talking int**
 
10:30 AM
if I went to work for Google, I'd have to code under that guide
 
@CatPlusPlus: My point exactly.
Well, I will try with the PDF :)
 
@DeadMG how depressing :P
 
Thanks you all for the support ;)
 
@TonyTheLion int** is painful to use. :-)
 
Time to eat :)
 
10:31 AM
foo(&a, &b) doesn't say anything, because the pointers might be const.
 
@Insilico Strangest use of smiley of the day
 
It's only heavy syntax used for stupidest reason ever.
Also possible bug when something changes and you accidentally pass nullptr, which is much easier to do with stupid pointers than references.
 
@Insilico a bit of a masochist are we :P
 
@TonyTheLion That's not a prerequisite for programming in C++?
 
Qt is not a good design, and nobody who seriously knows C++ will tell you that Qt is a good design
Because it isn't.
I'm really at loss at explaining obvious concepts to people in stone age mindset, really.
 
10:33 AM
@Insilico might be. :P
 
Several reasons why Qt is not a good design: 1) Uses way too many damn macros 2) Not exception safe 3) Uses way too many pointers everywhere
 
ugh pointers
 

« first day (699 days earlier)      last day (4253 days later) »