« first day (1039 days earlier)      last day (3903 days later) » 

10:00 PM
funny discussion in std-discussion :D
 
@StackedCrooked Using proxy objects returned by the first level operator[]?
 
Another quiz question that I might ask my buddies: Someone refactored this: if (p) return p; else return q; into return p || q;. Well done, or not?
 
@StackedCrooked Depends. What are the types involved, and what are the semantics :/
 
10:03 PM
@sehe Everyone seems to fall for it.
p || q returns a type bool.
 
@StackedCrooked The point is, what is q and what is p
 
@StackedCrooked If they're both bools then that works.
 
@StackedCrooked if q is not convertible to bool, it fails
 
@sehe For example: T* getFirstNonNullPointer();
 
@JohannesSchaub-litb loooool
 
10:04 PM
@JohannesSchaub-litb p and q are pointers.
@JohannesSchaub-litb Nice :D
 
@StackedCrooked We need types buddy. You're asking us about C++ code.
 
I didn't catch it at first.
@sehe int* if you must have a type.
 
@StackedCrooked The point is if p or q are UDT types with overloaded operator|| it will not shortcut evaluated
 
@StackedCrooked i needed to read the code more than once too. never be too fast
 
Now I need to find an example program where this situation might make sense.
And then I got a nice quiz question to add to the repertoire :)
 
10:06 PM
@sehe Also, if the function returns decltype(p) or decltype(q), the transformation isn't legal since || returns a bool (unless overloaded to do otherwise which is silly).
 
@StackedCrooked Why do you need those? Are you trying to become the local Schaub in Belgium?
 
@StackedCrooked Nice trick. However. I would miss the possible assert() checking the index in at least debug builds.
 
"If you make a championship and you are passing the current second best driver, at what place are you then?"
 
ooooh speaking of which, I need to implement x || y as (bool)x || (bool)y.
 
@DeadMG Well, that would be spotted by the compiler. Also
3 mins ago, by StackedCrooked
p || q returns a type bool.
 
10:07 PM
@sehe I like to post quiz questions at work. It establishes me as being superior.
 
yeah.
 
@StackedCrooked Really. I like to help people out. Has the same effect.
 
Yeah, that's what I say to them.
 
...
 
@JohannesSchaub-litb Does "passing" mean that both are tied at 2nd and 3rd place?
 
10:08 PM
@sehe (i'm kidding)
 
@wilx you are faster and leave him/her beyond
 
@StackedCrooked (okay!)
 
@JohannesSchaub-litb 2nd
 
@JohannesSchaub-litb I don't know. (The second best driver is not always in second position.)
 
good :) i went for the 1st. wrong ofc :D
 
10:09 PM
@JohannesSchaub-litb Ok, I assume this is a trick question and I will bite anyway. You have just moved from 3rd to 2nd place?
Hmm...
 
@wilx of course. i thought "oh you are faster than the 2nd one. so you must be the 1st" :D
 
Could you be the 1st one so fast that you have gained a whole lap and you are passing the 2nd best driver again? :)
 
yes.
 
@JohannesSchaub-litb that's house-wife (uhoh cannot be sexist) children's naivety. Everyone is guilty of that. Read 'Predictably Irrational' etc.
 
10:11 PM
@wilx Not under the definition of "current 2nd best driver". Zeno's paradox much?
 
Why?
Zeno's paradox?
 
well, not best. but the one who has the lowest position
of course you can have the last position but you are the best if your qualifying was shit
best isn't always fair :D
 
@wilx it's infinitesimal calculus: there will always be smaller delta-τ (ταυ) smaller, that would reveal the moment after just overtaking the 2nd best.
 
@wilx I looked them up on Wikipedia and they summarize as "Zeno did not fully understand infinity", which is no surprise.
many so-called "paradoxes" sum up that way.
 
> void KillTimeUntilNextStockDataReleaseOnWeb() - here
Oh god, kill-me-now
> What I don't understand, is that after a period of time, usually about 18 or 19 hours, it crashes returning a sigsegv error. I have no idea why, as it isn't writing to any memory - although I don't know much about the systemtime type, so maybe that's it?
The guy is using busy-waits to wait several hours. Spin locks for the win o.O
 
10:25 PM
o.O sigh...
 
why doesn't his debugger just tell him where the code crashes?
 
maybe he just didn't debug it
 
I bet you he doesn't know how to use a debugger
OMG Breaking Bad
Can't wait for the next episode
 
I know right
Skyler totally surprised me
I was expecting her to tell Hank everything
or at least betray Walter, instead of sticking by him.
 
10:29 PM
Yea
 
I get the unfortunate feeling that Jesse is gonna roll on him though
 
@DeadMG inb4 it doesn't crash if debugged - could totally be overheating :/
 
@DeadMG Jesse can't deal with the things he's been doing very well.
 
yeah
he was doing fine before, but ever since Drew Sharp was shot, he's really been cracking.
 
yea well, I think that would crack most human beings
 
10:31 PM
I agree.
 
that was a terrible thing
Reddit's front page content is really gone to shit
Its just memes and crappy pictures, mostly
 
i wonder if the tarantula will ever turn up again..
 
Reddit was ever anything else?
 
@EtiennedeMartel excellent stuff
 
@DeadMG There was a time when there was better content, imho
but now its got too popular and just the stupidest things get to the front page first
 
10:40 PM
Yeah. Remember those times... When reddit was only just for the masses
 
I see
 
Just unsubscribe from the default subreddits
 
so that's why we see you a lot more around here, huh?
 
you talking to me?
@Rapptz I haven't been logged in for a long time
 
yeah
 
10:43 PM
@DeadMG Actually there was a time when I'd sit and watch TV shows every night, so then I wouldn't be in the Lounge
 
oic
 
I haven't been doing that much either lately, so that's why you see me here more often
 
I virtually never watch any British TV.
 
Me neither
 
only American TV and then, only for a couple hours a day in the morning max.
 
10:43 PM
they're all 'murican shows I've been watching
@DeadMG I have to work in the morning
 
yeah
whereas I'm still here at 3am when the previous day's US TV becomes available for torrenting
 
I'm watching this "Orange is the new Black" show at the moment on Netflix
 
but, man
 
oh you torrent, whereas I pay for Netflix
 
I don't know what happened to me yesterday
but I woke up and I actually didn't feel too bad
and I spent all day working on Wide.
 
10:46 PM
I saw that
 
man, sometimes I wish I'd left myself a couple more comments in some places.
 
like right now I'm looking at this overload set code and I know what it does, but it's just confusing me right now.
 
I know that feeling
 
well
lemme tell you, it's a hell of a lot easier to use a type system than to implement a type system.
 
10:48 PM
oh I'm sure
I was reading up on grammars earlier today
 
the problem with writing comments is that it makes the source file hash no longer match the version it was last compiled with.. so you have to rebuild the code for no good reason before debugging
 
and damn, that shit can be confusing
 
that's my excuse
 
grammars are trivial.
 
I don't like too much comments either
 
10:49 PM
it's semantic analysis which is the kicker.
 
@DeadMG that's when comments come in handy ;)
there's no way to understand an implementation of template argument deduction without more comments than code..
 
templates that are beyond the basic stuff, confuse me
the stuff that Xeo or Robot write, I get lost in
 
honestly?
that stuff isn't that useful.
I used to be like that as well
it's fun to toy around with in your spare time, or to write super-generic libraries.
but when it comes to "Make me a fuckin' compiler", you won't need it.
 
yea I have never found a use for it in production code
beyond the basic template stuff
 
well
that really depends on how you define "production".
 
10:51 PM
and a lot of C++ devs shy away from anything beyond basic templates
 
if you were Robot and you wanted to ship ogonek as Boost.Unicode or a Standard library
you would certainly be putting that stuff into production.
it's just that many application domains don't really call for that.
 
If you're a library writer it is certainly more useful than just an app developer
 
ohhhhhh, it creates a completely pointless temporary at run-time.
 
like I'm sure that in my new job, I won't be needing templates that much to make some financial algo's work
 
heh, no.
well, let's hope that I did not just totally break this code.
 
10:54 PM
they said the first job they'll be giving me is to optimize some of their existing stuff
should be fun
 
I like optimizing things.
 
I might call on Mystical's knowledge
 
that guy knows quite a bit about hardware
 
you know
 
10:55 PM
Templates are fun.
 
I think he probably learned a lot when he did his Pie cruncher
 
I use them a lot in libraries and toolboxes.
 
having said that grammars are trivial, I'm actually fixing bugs in and cleaning up the analyzer right now, and trying to avoid having to change the parser.
although to put things in perspective
lexer: 439 loc, parser: 1550 loc, sema: 4500 loc
 

« first day (1039 days earlier)      last day (3903 days later) »