« first day (654 days earlier)      last day (4293 days later) » 

8:00 PM
If the overload doesn't exist, then you'll get an error.
 
@Quuxplusone Not necessarily still compile. And not necessarily do the wrong thing.
 
Sure.
 
@Quuxplusone true, you can put static_assert in for that. Or just use named types instead of type inference.
 
You're just making shit up.
 
Yeah, but in my line of work I want to make sure that the code does do the right thing.
 
8:00 PM
@TonyTheLion Try writing a Unicode GUI library, with renderer and window abstraction provided externally.
 
@Quuxplusone that's called testing
 
I'm not even talking about auto or decltype; I'm just talking about a 100-line function with the declaration of foo at the top.
 
But there's absolutely no point in template <typename T> void f(T) { static_assert(std::is_same<T, int>::value, ""); }.
 
@Flexo you are kidding
 
@Quuxplusone You do know that C is worse than C++ in that regard, right?
 
8:01 PM
If you want a function that only works with int, don't make it a damn template.
 
@DeadMG are you fucking kidding me?
 
Use the fucking right tool.
 
@Quuxplusone you're writing the wrong code in the first place if you're hitting this problem for real
 
hey
 
@Etienne In the context of printf() versus streams, it's better. :) I can printf("%d", i); and be confident that if i isn't an int, I'll get an error at compile time.
 
8:01 PM
hello jalf
 
@TonyTheLion hehe. A "little project" :P
@jalf hi
 
with -Wall -Werror, of course.
 
@DeadMG that's not little, by any stretch of imagination
 
@Quuxplusone You'll get a warning depending on your compiler.
 
@Quuxplusone not in all compilers
 
8:02 PM
 
Guise, you should PLONK
 
@MooingDuck in all compilers I care about (clang, gcc, several embedded)
 
not in older gcc either
 
guys I am not using compilers from 1998
I know the comp.lang.c arguments
I used to post there
 
@Quuxplusone Please provide a non-vacuous example of a situation where std::cout borks that.
 
8:02 PM
I've moved on
 
@Quuxplusone What if you want to print a non standard type?
 
@Quuxplusone so a language which, in some compilers* will give you a warning, is safer than a language in which the same test failing can be a compilation error?
 
@Quuxplusone printf vs iostream is OT for comp.lang.*c*
 
that's.... uh...
 
8:03 PM
Also, what @R.MartinhoFernandes said.
 
@jalf given the existence of static_assert<is_same<decltype(foo),int>; std::cout << foo; okay, that's better than printf("%d", foo);
(just kidding)
 
woah, I managed to crash Chrome entirely
I'm good :P
 
Because saying that std::cout << a; doesn't print the value of b is just madness.
int x = 42;
int y = 17;
printf("x = %d, y = %d\n", x, x);
// where's you "typesafe" printf now?
 
@Quuxplusone If you want safety, I have to say that yes, it is obviously better
Eep, I have to interview a candidate for a job tomorrow. Never tried that before.
 
Once a wise man said, don't feed the troll
 
8:05 PM
@jalf do you get free choice on the questions?
 
you're feeding the troll by keeping your responses going
 
@TonyTheLion I believe you're a word there...
@Flexo yup
not sure what to ask though. Suggestions? :p
 
@jalf What kind of candidate are youlooking for?
strong C++ skills in general? or specific library knowledge?
 
Two others are interviewing him too, so it's not all down to me
 
@jalf I'd ask something that amounts to "do you know what UB means?" in a sly way
 
8:07 PM
don't ask the cheesy, "What's the difference between a pointer and a reference?"
 
Strong C++ skills, plus personality/"fit on our team" kinda thing
 
been asked too many times, and it's a terrible question
 
and something about templates
 
> Do you fit on our team?
 
well, it's kinda hard for me to tell you the "fit on your team" kind of thing
 
8:07 PM
No?
 
possibly a "what are you most excited about in C++11?"
 
do you suck dick?
 
but for strong C++ skills, you can open even with a simple "Hello, World!"
C++ hello, world is special because new people using namespace std; and more experienced people don't.
 
yeah that gives you "\n" vs endl as a talking point
 
Or maybe "typesafe" printf vs std::cout. ;)
 
8:09 PM
ask him to implement string reverse
on paper
 
but in general, I'd ramp up from "Hello, World" to "Implement your own std::unordered_map, give or take" and see how long he can keep up before he falls.
 
@TonyTheLion in place string reverse, of course
 
see how his algorithm/problem solving skill is
yes, naturally
 
or ask him what parts of C++ he dislikes the most
 
Well, a fair bit of the C++'ey stuff has already been covered in that he filled out an online C++ quiz my boss made, and wrote a small sample program.
 
8:09 PM
what C++11 features he's most excited about
 
string reverse is such an interview cliche now
 
@DeadMG that was in the quiz/questionnaire thing he was given, actually ;)
 
perhaps it's odd, but I actually have no idea how to implement a string reverse in-place.
 
> Write a function that reverses a range of forward iterators and then suffles it.
 
just swap first and last, then go forward/backwards one and keep going?
 
8:10 PM
yes, swap first and last
 
can you get them to write real code on a machine somewhere?
 
then increment first and decrement last
 
give them something pre-existing to extend/add a new feature on
 
swap again, etc
 
@jalf What was the response?
 
8:10 PM
@DeadMG Start from both ends and swap until you reach the center, yeah.
 
until (first < last)
 
@DeadMG Lambdas and move semantics
 
that "reach the center bit" got me really confused on my last job interview
I couldn't think what the ending condition would be
 
@TonyTheLion You mean while.
 
8:12 PM
@jalf I gotta agree on that.
 
@R.MartinhoFernandes yea, I just wanted to invent a new keyword, for giggles :P
 
@DeadMG It's clearly wrong. Everyone knows alias templates are the bestest feature.
 
nah
 
for a template wanker, yes
 
I think that unique_ptr is the best thing in C++11, hands down.
 
8:13 PM
WANK ALL THE TEMPLATES
 
unique_ptr isn't even complete!
 
huh?
 
It's missing make_unique.
 
at least it's unique
 
oh, yeah, make_unique
 
8:15 PM
That's a triviality.
It's annoying that it's missing though.
 
no, it's actually quite important
 
But yeah, it's one of the most influential things.
 
exception safety, and all that jazz
 
@TonyTheLion It's relatively trivial to replace.
even though it's quite crucial to have.
 
yes that is true
 
8:16 PM
Is std::unique_ptr<T>(new T(...)) any less safe than make_unique<T>(...)?
 
@StackedCrooked Yes.
 
Best thing about unique_ptr is that now hopefully we can get the "smart pointers == shared_ptr" crowd to use a saner smart pointer by default
 
@DeadMG How so?
 
@jalf It's a battle we still need to fight.
 
@StackedCrooked GOTW 102
 
Xeo
8:17 PM
@StackedCrooked exception safety at function calls
 
consider f(std::unique_ptr<T>(new T(...)), std::unique_ptr<T2>(new T2(...));
 
@StackedCrooked Not really, but it is if you have two of them: foo(std::unique_ptr<T>(new ...), std::unique_ptr<T>(new ...))
 
the compiler can legally do both new first.
 
@jalf Either today or yesterday I had to suggest to someone to not suggest shared_ptr.
 
Oh, that one.
 
8:17 PM
@jalf Not necessarily two of them.
f(std::unique_ptr<T>(new ...), g()) is bad enough.
 
true
 
for any g() that might throw.
 
but yeah, I think the whole "it's unsafe" business is a bit overrated. It's safe enough to use unique_ptr if you do it, well, sensibly ;)
 
suck a unique_ptr
 
Or even f(std::unique_ptr<T>(new ...), std::make_unique<T>(...)) for extra confusion.
Extra confusion is always good.
 
8:18 PM
@jalf make_unique is plain better, IMO, and should have been included. But I agree that it's hardly a death knell to not have it.
 
@jalf judging from the kind of folk (not the regulars) that come into this room, "sensibility" can never be assumed or even relied on
@R.MartinhoFernandes fuck that
 
fuuuuuck
 
problem is, people seem to "learn" C++ or any other language but not really understand it. It's weird.
 
implemented new transformation, gain: 0 bits.
 
You're amazing.
 
8:20 PM
@TonyTheLion very true. :)
 
That's quite an achievement.
:P
 
I just meant that it's not something I'd worry about accidentally doing myself
 
lol
 
I think that's partly due to the shitty education system, which teach people that they should learn verbatim, but doesn't stress understanding enough
 
the whole "use new in function arguments" thing is just something I know to avoid, and as long as you avoid that, you're safe :)
 
8:21 PM
@jalf yes, well you're an experienced and knowledgeable programmer
 
Besides, how often do functions take unique_ptrs?
 
rarely
 
36.5% of the time
 
It's more likely a return type.
 
@R.MartinhoFernandes Shuddup.
 
8:22 PM
nailed it!
 
It was a compliment.
Nah, it wasn't.
 
your mum
 
She's hot.
 
@StackedCrooked Why would you return it? Polymorphism?
 
@StackedCrooked Because she collapsed into a star due to her mass.
 
8:23 PM
@RadekSlupik What the FUCK does polymorphism come in there for?
 
@RadekSlupik Indeed, factory methods that return a pointer to a polymorphic base class.
 
value_ptr ftw
 
not everything that uses a std::unique_ptr<T> has to be polymorphic
 
Or to some other resource with a custom deleter?
 
@RadekSlupik or just for returning noncopyable objects easily
 
8:24 PM
Also.
 
I always think "FTW" means Fuck The World
instead of "For The Win"
meh, I'm so negative
 
@TonyTheLion I didn’t say that.
 
Maybe something like auto scoped_lock = lock(mutex);
Wait, that wouldn't need unique_ptr.
 
fuck the what?
 
Never mind.
 
8:25 PM
std::unique_ptr<void, void(*)(HANDLE)> get_some_winapi_shit() {
    return std::unique_ptr<void, void(*)(HANDLE)> { win32::GetSomeWinAPIShit(), &CloseHandle };
}
 
lol returning a lock
@R.MartinhoFernandes I like the way you name your functions.
 
I just got my Nth millionth spam email today
meh
 
I never get any spam.
 
you want some?
 
I eat spam for breakfast.
 
8:26 PM
@RadekSlupik we can fix that. What's your email?
 
I get some spam in my mailinator box. But that's all.
 
I have a separate email address which I use for services that I suspect to send spam.
 
Supamu.
 
I never use the email address for anything else, nor have I set it up in Mail.
 
8:27 PM
I have like 8 email addresses for the very purpose of avoiding spam, and yet... I get spam
 
You need at least 16.
 
I only have one.
 
I need at least 2 ^ n
 
Also when I would get an email and it would get filed as spam automatically, even though it isn’t spam, I don’t care.
Not my problem.
 
how do you live with one email address?
 
8:28 PM
Erm.
Normally?
 
@RadekSlupik I've had that happen to me with very important mail, and that's not funny
 
Why would I want more e-mail addresses?
 
I have a gmail account and a very old hotmail account that I never check anymore.
 
I don’t do important things over email; email is unreliable.
Email is also unsafe; no encryption.
 
really, that means you go out and see people?
 
8:30 PM
Well, often.
 
@RadekSlupik That's what PGP is for.
 
yea I know it's unsafe
 
@RadekSlupik You must be so fucking important.
 
@StackedCrooked He's 17.
 
And otherwise I use Dropbox.
 
8:30 PM
Does not compute.
 
@R.MartinhoFernandes Ah.
 
it all becomes clear, right?
 
When Postduif is done, I’ll use Postduif.
All problems solved.
 
WTF is postduif?
you're going back to Pigeons delivering your mail?
 
Chat server and client I’m writing. xD
 
8:31 PM
Magic problem solution. And unicorns.
 
It's a bird that delivers messages.
 
And protocol.
 
Skype messaging is encrypted
though the Feds are getting access to it soon
 
@RadekSlupik I like spek.
 
@TonyTheLion Sending files over Skype is like putting them on a floppy, putting the floppy in an envelope and bringing it to the recipient.
@StackedCrooked Me too.
 
8:32 PM
So, when was the last time that, when asked "How have you been?", you didn't say you were fine?
 
dropbox FTW
 
I never do that.
 
@StackedCrooked Protocol baconification.
 
@R.MartinhoFernandes you always say "I'm fine", no matter what?
 
@R.MartinhoFernandes As I understand it, it's basically a cultural thing. In English you're just supposed to say "good", or something like that, because it's basically just used as a greeting. In other languages, you're generally supposed to give an honest answer to that one
 
8:33 PM
I like potato chips with bacon flavor.
 
Me too.
 
@jalf fuck "you're supposed to" bullshit. If I'm feeling shit, I'm gonna say so
 
A friend let me try a bacon bean. Delicious.
 
I like anything with bacon flavor
 
well, my code randomly stopped compiling because it can't find a header. Turns out, neither can I. I just randomly lost some prerequisite header I've never heard of before.
 
8:34 PM
@TonyTheLion Ei oe ist nog me joen? Hooeeet!
 
slecht
 
@MooingDuck can't have been important then ;)
 
@TonyTheLion Think @jalf may have meant in Merkin English.
 
@jalf Hmm, that might make sense.
 
8:35 PM
@SamDeHaan doesn't matter, I'm still doing the same
 
There's actually a C# compiler in the C# .NET standard library. How awesome is that.
 
Microsoft.CSharp.
@R.MartinhoFernandes Well, it might be useful.
 
I never know how to reply to the question "How are you?". It causes me to introspect deeply and it takes way too much time.
 
8:36 PM
C# makes me rage. Stupid WCF is stupid.
 
@EtiennedeMartel Roslyn will be awesomer, because it's actually usable.
@ApprenticeHacker In fact, there's two.
 
@R.MartinhoFernandes In Danish, when people ask that question, it's because they actually want to know how you've been. In English (especially American, I believe), people just go "how are you" "fine, thanks, and you?" as a kind of greeting reflex. Completely on autopilot. ;)
 
@StackedCrooked There was a time where I answered "better than you".
 
I can finally say good-bye to all the god damn scripting language C APIs which I had to use with C++. I think I'm going over to the dark (and garbage-collected) side.
 
@EtiennedeMartel I settled with "good". (Disappointing, I know..)
 
8:37 PM
I hate this code. I really do. Each header pulls in hundreds of other headers, and too many of them require me to link with some library or other. It's just an error code! Why do I have to link a library for editing the windows registry?
 
I noticed it a lot when I was in Canada this winter :)
 
@MooingDuck 100^n headers, wow!
 
Being a Merkin, I can speak for this as truthfact. "How are you?" is not a question, it's equivalent to "hello", and the response "good/fine/great" is equivalent to responding to that "hello" with "oh, hello".
 
Also always amuses me how people call you "sir" in England. Like you're a knight or something :D
 
@StackedCrooked they include eachother, so it's not exponential.
@SamDeHaan and people look at you funny if you say anything else and it gets awkward
 
8:39 PM
@MooingDuck They include each other?
 
@SamDeHaan so what happens if you say something other than "good"? I've done that more than a few times, because I thought of it as an actual question
 
#include <each_other>
 
@StackedCrooked That immediately jumps from 100^n to infinity.
 
@StackedCrooked eventually you reach a point where all 300+ headers are included and it compiles.
 
was never really sure how people coped with that ;)
 
8:39 PM
@jalf They shoot you.
 
@jalf you get deported, back where you belong! Unless you say it to a robot, then you get shot.
 
damn
 
@jalf At least they don't call you "madam". That would be insulting (well, for you anyway. It would be perfectly normal for @Xeo).
 
@MooingDuck Ah, I'm glad things worked out for you.
:P
 
(Damn, that was tortuous)
 
8:40 PM
@StackedCrooked well, it would, but one header has gone missing. Its not in my source folder anywhere
 
Xeo
@EtiennedeMartel You just won't stop with that, eh?
 
@MooingDuck Did you find it?
 
@StackedCrooked no :(
 
@MooingDuck VCS?
 
8:41 PM
@Xeo As long as you acknowledge that it happened, it can never get old.
 
@MooingDuck Want me to help?
 
@R.MartinhoFernandes not familiar with that acronym
 
@MooingDuck Version Control System.
ClearCase or whatever abomination it is you're doomed to.
 
@R.MartinhoFernandes I'm looking there now, but there's been no changelists since I last compiled this
@R.MartinhoFernandes perforce :(
 
8:42 PM
Ah, that one.
 
Is perforce really that bad? I used it at my first job many years ago and it seemed alright to me.
 
@StackedCrooked worse
 
Xeo
Anyways, off to sleep
 
Perforce is supposed to be good at large binary files
 
Xeo
having a scheduled day really hurts my game time :(
 
8:43 PM
0
Q: Telescoping constructor

blackbeltFrom Effective Java 2ed Item 2: telescoping constructor pattern, in which you provide a constructor with only the required parameters, another with a single optional parameter, a third with two optional parameters, and so on, culminating in a constructor with all the optional parameter...

lol, great pattern name.
 
@jalf it keeps a full copy of binary files for each and every version instead of a changelist. That's the opposite of good.
 
@jalf That's not a really big selling point :p
 
Xeo
@R.MartinhoFernandes dupe
 
@MooingDuck Hmm, that's like, normal.
 
@MooingDuck Compare that to all those VCSes which just crash if you try to store a file that's greater than a few hundred MB ;)
 
8:44 PM
@R.MartinhoFernandes version control doesn't have the file either, but there's a project by the same name. I'll compile that project and see what happens
 
@Xeo Of what?
 
@MooingDuck So does Git
 
@R.MartinhoFernandes I deal with 67MB wave files, each checkin is a minescule change. Many of these files
 
Xeo
@R.MartinhoFernandes T(){ T(); } questions, there are tons of em
 
@Xeo Oh. I should have looked at the code. :S
 
Xeo
8:47 PM
Anyways, see ya tomorrow
 
Ok. I slept like two hours last night, so I'm leaving early tonight.
Good night.
 
Good night.
 
night man
 
I can't believe this is 2012 and we still have no way of making portable UIs that look good.
 
@Cicada ajax?
 
8:53 PM
@Cicada HTML is the best we have in that regard :/ Pretty sad
 
SPIDER FUCK FUCK FCUK AAAAAAAAAAHS
6
 
ask the cat
 
@Cicada Why can't you just kill it?
 
it moved so fast now it's under my bed ;_;
wai wait i have to kill it. somehow.
 
8:54 PM
It will definitely kill you.
 
high pitched screeching noises, I bet they'll do the trick. Just need to hit its resonating frequency
 
@Cicada or move out
@SamDeHaan I tried googling that, but apperently a "spider" is a speaker thing, so I got useless results.
Radek is a spider
 
@MooingDuck wolfram alpha couldn't help either.
 
omg it's in my blankets nowwww
FUCK YOU DARWIN
 
8:58 PM
@Cicada never sleep again
 
Swat it.
Oh yeah of course.
Spiders eat moths. Now I know why you’re scared.
 

« first day (654 days earlier)      last day (4293 days later) »