« first day (918 days earlier)      last day (4039 days later) » 

6:00 PM
Short circuit operators short circuit in templates too right?
 
Not sure what you mean.
Dead code must compile.
 
well, the Standard says is_arithmetic<T>::value && T(0) < T(-1) but that's not real code.
I'll need an enable_if methinks
 
4 ppl are still on version 2 of my app and I've released 5 updates since then ;-(
Y U NO UPDATE MY APP?
 
fuck Clang
why do you have to generate such unnecessarily confusing IR
 
user142019
@DeadMG optimizations lol!
 
6:10 PM
nope
all opts off.
 
user142019
Ohai.
 
Lets say I build boost with VS2012, if I later switch my project to Nov CTP do I have to rebuild my libraries?
 
Xeo
Yay, finally got around to posting a thread on std-proposals~
 
gratz
 
i love how easily you can install stuff with pip
pip install django
it just works! :)
 
6:20 PM
@ScottW hmm...
 
You can do the same thing with npm.
 
rpm?
@ScottW /jealous
I haven't even played the original SC2 yet ;-(
 
@ScottW I really am jealous of that.
Going to get it soon
after this ruddy semester is over
 
@ScottW tell me you finished the campaign
 
@ScottW This HOTS? =p
 
6:22 PM
@ScottW Is the campaign long?
 
@Code-Guru npmjs.org
C++ needs better package management.
 
Don't let the zoid hear you
 
lol yeah
 
@sehe ZoidBrony?
 
Y U NO SFINAE HERE? template<typename T> struct is_signed : enable_if<is_arithmetic<T>::value, integral_constant<bool, T(-1) < T(0)>> {};
is_signed<void> errors out.
 
6:26 PM
 
lol
 
@rubenvb Function template signatures and class templates specialization only.
Don't sprinkle enable_if everywhere, won't work.
 
I realized when I got up this morning that yesterday was 4/20 ;-(
 
Why are you inheriting enable_if?
 
what's special about 4/20?
 
6:27 PM
@Code-Guru I realized when I got up this morning that 4/20 was over :)
 
@Code-Guru /ˈʃɝli/ you mean 20/4.
 
@sehe link
 
@rubenvb That's not SFINAE.
 
note my enable_if is an alias template
 
6:28 PM
@rubenvb Even worse: can't inherit from void.
 
Oh aha. 4/20 was special for me/us too:
yesterday, by sehe
Peeps, I'mma sleep. Like. The fuck, now. 3:27am. I have a concert day tomorrow.
 
You sure made a mess :D
 
@rubenvb You can't SFINAE in every bloody place.
 
@rubenvb Is the title what you want to do?
 
@Rapptz no, but optionally inheriting would be something I'd want to do.
 
6:29 PM
Optional inheritance? o.o
 
Between two types or between one?
 
@rubenvb You can't do it directly. When you do class T : XYZ then you must inherit from something.
 
Conditional inheritance: struct foo: Conditional<Cond, Then, Else> {};
 
with metafunctions you can make XYZ evaluate to some funky type you define as "nothing" like struct nil {}; but you can't make it not inherit.
 
@LucDanton yeah I was going to suggest that
 
6:30 PM
@R.MartinhoFernandes No, I mean 4/20...or with the year in ISO format 2013/4/20 =p
 
@LucDanton ah that what that one's for.
 
err...does ISO format for date have slashes or dots or no delimiters?
 
Using enable_if is similar, but it's not so much conditional inheritance as it is 'conditional member type' -- and as you've seen, you need the non-alias form.
 
oh...dashes: 2013-4-20
at least according to wikipedia ;-)
 
C++ is only 20% cooler?
 
user142019
6:36 PM
@DeadMG how about Conditional<Cond, Then>...?
 
user142019
Or at least, something like that.
 
@Zoidberg Then you will inherit from Conditional<Cond, Then>..., whatever type(s) that turns out to be.
 
user142019
What if it's empty pack?
 
user142019
Oh wait.
 
user142019
That's impossibru FUCK.
 
6:37 PM
Dammit
 
actually, if the pack was empty, you might make that work.
but you'd have to take Then... or Cond... as a parameter pack, I think.
 
user142019
Yes but can you return a pack from a metafunction? :)
 
no.
you would have to accept at least one as argument (and it would have to be consequently empty)
 
&& Y U NO SHORTCIRCUIT IN TEMPLATE DEDUCTION
 
user142019
It doesn't?
 
6:38 PM
nope
 
Xeo
@rubenvb It does, actually
 
not in the way I want it
 
user142019
Of course it does.
 
Xeo
Well, what's the way you want?
 
6:39 PM
template<typename T> struct is_signed : integral_constant<bool, is_arithmetic<T>() && T(-1) < T(0)> {}; fails for void
it should get false for the condition once is_arithmetic<T>() returns false.
 
is_airthmetic<T>()?
 
@Rapptz constexpr operator bool()
returns integral_constant's value
 
huh, didn't know it had that.
 
Mine does
 
To be honest, I find the source download from there (modelimport.zip) some of the worst "C"-with classes I've encountered in a long time. — sehe 7 secs ago
 
6:41 PM
The standard one does too.
40 mins ago, by R. Martinho Fernandes
Dead code must compile.
 
Xeo
@rubenvb Ah - less<T(-1), T(0)>() is what you need, then :)
 
@rubenvb You'd need SFINAE for that to work.
 
Xeo
@LucDanton A bit of lazyness should do
 
@R.MartinhoFernandes I heard you the first time. It's the others that didn't agree
 
6:41 PM
9 secs ago, by R. Martinho Fernandes
@Xeo No.
 
Xeo
What, am I misremembering things?
 
@rubenvb Show me someone disagree with that quote.
 
@LucDanton people were disagreeing with the && shortcircuiting
@Rapptz I'm remaking type traits
and all the rest
 
Is it possible to check if a number is signed? I hadn't considered.
 
6:43 PM
Gotcha.
 
@Xeo You're right that laziness would work, yes. But since you'd need a zero<T> and minus_one<T> on hand, not an actual option.
 
Why?
 
@rubenvb The other branch of the && still has to make sense. It can't be unintelligible.
 
@Rapptz learning purposes
 
@rubenvb It short circuits and dead code must compile.
 
6:43 PM
lol
 
template <typename T>
struct is_signed : Conditional<std::arithmetic<T>, minus_one_less_than_zero<T>, std::false_type> {};
 
Oh okay.
 
Everything's right.
SFINAE for type traits is very hard to get right the first time :s More often than not I end up computing whatever I need once for SFINAE, and a second time for the actual result. Because TMP is not verbose enough.
 
that's why I decided to do lots of them myself :)
and bother you guys
@R.MartinhoFernandes you're fucking with history man
 
@R.MartinhoFernandes I suppose that's clever but not too clever.
 
@R.MartinhoFernandes You must really like Error: Success
 
And it doesn't even set errno! Awesome!
 
Xeo
@R.MartinhoFernandes "void is void, nana nanana"
 
lol newline forgotten @StackedCrooked
not that that would make it any less funny
 
@rubenvb where?
 
6:51 PM
@StackedCrooked error: success. Maybe a newline before you print "success" in Coliru would be nice.
maybe not
 
@rubenvb That's from perror.
 
@R.MartinhoFernandes I know.
A newline wouldn't hurt niceness
 
What newline?
WTF you talking about?
 
And that's my job?
 
I think he means after the command line?
 
6:52 PM
A newline would be wrong.
 
You should write your own libc
 
Try perror on your own.
 
Obviously
 
Xeo
@StackedCrooked Obviously it's your job to format the output to the taste of the viewer.
What were you even thinking!
 
:(
i'll never do it again
 
Xeo
6:54 PM
What, think?
 
One more snide remark and I'll submit a feature request...
 
Xeo
haha
 
lol
 
@rubenvb Point is, the output of perror("Error"), when no errors occurred, is Error: Success. Success is not added by Coliru, it's part of the program's output.
 
What flag would you expect it to set though?
I always thought you did it for the novelty.
Not to check if errno is set :(
 
6:56 PM
Yes, I do it for kicks.
 
@R.MartinhoFernandes ah
I never would have guessed
stupid C
OK, now I get errors of invalid argument types to an expression.
 
Hehe. I just fixed it up so it compiles on GCC 4.7, 3 files changed, 1174 insertions(+), 1172 deletions(-). (I suggest you might be able to find better samples to learn from?) https://gist.github.com/sehe/0f8f711f44d48b9ecbbfsehe 11 secs ago
 
Better, but still wrong.
 

« first day (918 days earlier)      last day (4039 days later) »