« first day (506 days earlier)      last day (4424 days later) » 

10:00 PM
the new wolfram suckz
 
sbi
@RMartinhoFernandes LOL!
 
sbi
Anyway, I gotta go to bed now. See you tomorrow, guys!
 
@RMartinhoFernandes Mmmh, do you think it's silly that invoke(f, arg) substitute void with empty_type but invoke<void>(f, arg) doesn't?
I've been using the latter syntax in generic code to avoid the problem of void returns.
 
hmm, we received an email yesterday that one of our servers was taking forever to back up, and to move all not-required-to-be-backed-up-nightly stuff to the "temp" directory. Apparently the guy across from me has 366GB of "stuff" to be moved. He says it's mostly customers log files.
 
10:07 PM
|o| = pipe laugh
lol = bold laugh
-o- = side-splitting laugh
V8V = double laugh
olo = inverted laugh
/%%%%/ = got the crowd laughing
ld or bl = rushed laugh
kek = Kornesian laugh
= hidden laugh
l©l = protected laugh
XoX = stunned laugh

And

hah = old laugh
 
@MooingDuck So that's what kids call it these days, huh?
 
I thought kekekekekekekeke was korean
 
@Pubby It's orcish.
 
@Xaade kek isn't a Japanese laugh at all. It's an Orcish laugh.
@RMartinhoFernandes Actually, I think that is Korean.
 
Urban dictionary says it's korean
Koreans are undead orc zombies?
 
10:09 PM
I feel like a hero. I had to work on one bit of my code (that invoke) that so much of the rest of the code depends on, to the extent that during my hacking the number of unit tests that GCC managed to compile successfully went from 27 to 20, and now that I've finished my modifications the count is back up to 26.
 
kekekekekeke is about Zerg rushing from Starcraft, and Starcraft's culture is quite Korean natured.
"kek" is "lol" spoken by a Horde player in Orcish as viewed from the Alliance in World of Warcraft
 
Kornesian then
 
And I don't mean 'compile successfully' as in 'the code is well-formed', I mean 'GCC doesn't crash'.
 
probably as a reference to the above kekekekeke
 
@DeadMG Apparently when you speak in a different language, you automatically type wrong as well.
 
10:11 PM
@Xaade No, the game runs a program designed to obfuscate.
 
Quick question.
 
@DeadMG It obfuscated my sarcasm as well.
 
if you're another Horde player, you see the original text, if you're Alliance, you see the output of the algorithm intended to prevent you from being able to understand.
 
When passing an array to a function, do I use square brackets?
someFunction(someArray[]) or someFunction(someArray)?
 
10:12 PM
When being coerced by mad raving professors, which is the correct way?
 
lol
you need someArray
 
Ask them, I can't possibly know.
 
@Moshe no brackets
 
@Moshe C++ doesn't have slicing or anything like that so array[] is never well-formed (as an expression).
 
the only use of [] in expressions is explicit indexing
 
10:12 PM
@RMartinhoFernandes As in..... don't pass an array????
 
Thanks.
@DeadMG What does that mean?
explicit indexing?
 
@Moshe someArray[5]
 
@Moshe someArray[1]
 
well, I mean, you can only use it to index into an array
 
I'm lost. Again. I was going to reply something to someone, but I forgot who or what. Godammit, I'm not old enough for this.
 
10:13 PM
you can't use it for any other purpose
 
@DeadMG you sure about that? isn't char* argv[] valid?
 
@RMartinhoFernandes Me me me and my void=>empty_type mapping!
 
@LucDanton I think it's okay.
 
@MooingDuck That's not an expression.
 
@RMartinhoFernandes In any case is_callable and ResultOf are both consistent with invoke and never lie to you.
 
10:14 PM
@DeadMG right, I overlooked that word in your sentances
 
operator[] is an expression
 
(Because the reason I have invoke in the first place is to implement the latter two, as you may have gathered.)
 
@Pubby No, it's not.
 
@Pubby operator[] has to be a member so it needs to be e.g. &T::operator[].
 
&std::vector<int>::operator[] is.
 
10:16 PM
What if it's in a member function?
 
Same deal, it's not about scope but about pointer to members.
 
I hate Netbeans. Every few seconds it's like "THIS CLASS IS ALL ERRORS BECAUSE I DON"T SEE WHERE YOU IMPLEMENTED X FUNCTION" Then I wait a moment and Netbeans goes "oh there it is <3 nevermind."
 
@MooingDuck it apologizes?!?! Man, Microsoft has never been that nice.
 
I.e. operator++ can be a valid expression when operator++ is declared as freestanding (i.e. not a member), but given struct foo { void bar(); }; then bar is not a valid expression.
 
@Xaade the red squigglies under everything go away
 
10:17 PM
@MooingDuck Why do you use Netbeans? Isn't that a Java IDE?
 
@Pubby Actually you may have a point. I'm going to take a look at the Standard.
 
@RMartinhoFernandes because the code I've been told to fix doesn't compile with anything else (Yes, it is java code)
 
Someone's a little flag-happy today...
 
firefox rede squiggleze nevar gow awaey, soe ey jiust ignoer dem.
3
 
user868935
10:19 PM
anyone taking the challenge to crack google chrome for $1,000,000?
 
@チョコレート人 define crack?
 
they only pay out $60,000 to each individual exploit, even the worst
 
Woah.... I just spoke Japanese.
 
the $1,000,000 is a marketing figure
you could never earn that unless you have like 15 full computer compromise exploits ready to go
 
user868935
@Xaade google is looking for hackers to find holes in chrome
 
10:21 PM
@DeadMG In other words, work for Google, insert exploit. Have friend. Friend finds exploit. Profit.
 
lol
 
get found out by colleagues, get fired and sued, go to jail and lose all money. Loss.
 
@Xaade ... get fired for writing bad code
 
@Xaade Google bosses check commit logs. Google bosses find friend. Friend gets sued. Do not pass Go, do not collect 200 dollars.
 
10:22 PM
@RMartinhoFernandes Did I say friend...... I meant.... Nigerian prince.
 
hahaha
 
@Pubby The Standard says that an id-expresion (i.e. the bit of grammar that matches operator[]) that denotes a non-static member function can only be used as part of e.g. forming a pointer to member. In other words it does mean that operator[] is always invalid standalone (which we knew), but I get the impression that philosophically speaking the question of whether the operator[] bit of e.g. return &operator[]; is a subexpression of &operator[] is left unanswered.
 
@LucDanton Ok. Thanks for looking.
 
> sorry, unimplemented: use of 'type_pack_expansion' in template
 
What is "type_pack_expansion"?
 
10:33 PM
template<typename Functor, typename... Args>
struct result_type_impl<Functor(Args...), true>
Second line is the one that is problematic.
 
Needless to say some variation of my code has worked with that bit before. The difference is that I'm now moving some SFINAE from the return type to a default parameter and apparently GCC finds that problematic.
I think I lied when I said that is_callable and ResultOf never lie to you.
 
10:50 PM
Ok, WTF is the Len parameter of aligned_union for?
 
@RMartinhoFernandes: Requests a minimal size. Consider a protocol that requires word alignment and an union that you want to send over it, you can request aligned_union<4,char,short>::type and that will ensure that the union has at least 4 bytes
 
@DavidRodríguezdribeas That won't give you word (assuming 32-bit) alignment.
 
With the first argument being 1 aligned_union<1,char,short>::type might be a 2 byte type
 
Only the types are considered for alignment.
 
10:54 PM
I wasn't clear... the Len ensures size
 
Yes, but what is that for?
 
In the example above you can do aligned_union<4,char,short>::type to hold the datum, and know that the type holds enough padding to write 1 word
 
Ah, I see. You could always ask for aligned_union<char[N], blah blah>.
 
true, but if that is a common pattern (or expected to be, I have not used that ever and would not know) then N is simpler than forcing you to write char[N]
 
And they couldn't default it because variadic pack at the end.
 
10:59 PM
Well, my AlignedUnion alias will go with 1 for that.
 
Actually I wonder (I have not played with variadic templates) if you could not offer two versions of the template, one with the first argument being a size_t and the other without it, just with the parameter pack
 
Can't overload classes.
That would work for function templates, though.
 
right... and it cannot be a specialization (that is what I was actually not thinking of) because of the first argument being a complete different beast (size_t/class)
 
To be more clear the problem is the difference in kind between a non-type parameter and a type parameter. You could ask users to do aligned_union<std::integral_constant<std::size_t, 4>, foo, bar> if they wanted the minimal size feature but then you run into the problem that someone might use aligned_union<foo, bar> where foo has a value static data member...
It's not the style of the Standard to use this kind of stuff though.
 
There ideone.com/8g57x. aligned_union for GCC 4.7.
 
11:04 PM
@RMartinhoFernandes Had tons of problems when I briefly tried to roll my own but hard to tell if that's GCC being moody or something with my code.
 
@LucDanton You can partially specialize for std::integral_constant
 
@DeadMG But that won't work for other traits that derive from it.
I guess I could define alignas in terms of aligned_union now.
 
@DeadMG Yeah, but it's not forbidden to do std::integral_constant<int, 42> foo; return foo;. And I think it wouldn't be in the style of the Standard to require users to do aligned_union<foo, std::integral_constant<int, 42>> if they really wanted that.
 
true true
 
@LucDanton That exact code I posted works.
 
11:07 PM
@RMartinhoFernandes Mmmh does getting rid of that static member do anything?
 
@LucDanton What static member? alignment_value? It's required.
 
I means besides besides fidelity to std::aligned_union.
 
@LucDanton No, it doesn't hurt.
 
Ah well, nevermind me. I don't want to diagnose what makes GCC go completely bonkers some of the time.
 
lol
Hmm, alignof doesn't work with expressions.
 
11:11 PM
> warning: ISO C++ does not allow 'alignof' with a non-type [-pedantic]
 
Going home now, see you
 
Hmmm, I don't see the point of alignment_value either.
It's going to be equal to alignof(aligned_union<...>::type) anyway.
 
Convenience I suppose.
static constexpr auto alignment_value = alignof(type);
 
Yes, let's say I noticed that and... something happened and I wrote it silly.
 
I wonder if I can and should specialise std::is_void<empty_type>.
 
11:16 PM
Can't.
Only thing in <type_traits> that you can specialise is common_type.
 
> A program may add a template specialization for any standard library template to namespace std only if the declaration depends on a user-defined type and the specialization meets the standard library requirements for the original template and is not explicitly prohibited.
I couldn't have lied anyway.
 
@DeadMG About what we went on debating earlier. I thought of something funny. Do not offer "services" publicly. You wouldn't want to be blamed of discriminating :P
 
When you say "services" in quotes, it sounds like you mean prostitution.
 
No it doesn't.
 
@RMartinhoFernandes ... Captain Obvious.
 
11:23 PM
Now I've went back on my word and invoke<void> really returns void. This is so frustrating.
 
@Xaade Wait, you actually meant that?
    template <typename... T>
    struct storage_for : aligned_union<1, T...> {};
    template <typename T>
    struct storage_for : aligned_storage<sizeof(T), alignof(T)> {};

    template <typename... T>
    using StorageFor = typename storage_for<T...>::type;
 
@RMartinhoFernandes I mean, if he made an effort to entertain a few women for fun, that would be kinda public.... so I mean... he can't discriminate against another guy for being a guy. Can't trample on their rights.... (all in jest.... I don't mean to make an argument out of this).
 
Hey, why not code markup?
 
@RMartinhoFernandes That's smart.
 
Damn you Markdown, would you just work?
 
11:25 PM
@RMartinhoFernandes It's Monday....
And Monday ends in Y.
So, Markdown won't work....
 
Dammit, I still want invoke<void> to return void, time to change some things.
 
@LucDanton I used a specialisation because it "felt right", but there is no difference between aligned_storage<sizeof(T), alignof(T)>::type and aligned_union<1, T>::type, right?
 
@RMartinhoFernandes I don't know. I'm not really knowledgeable on issues of alignment.
Would it be okay to make empty_type implicitly constructible from any type, and wouldn't that make it a top type? Not that I need it, but philosophically speaking.
 
@LucDanton No. A top type can hold all possible values.
 
Oh right.
 
11:34 PM
It'd still be a unit type, but with implicit bangs.
 
That good or not?
 
("bang" is what I call const () )
@LucDanton I don't think so.
 
The fact that return foo(); doesn't work when the return type is void and foo() is e.g. int is a oft-lamented state of affairs.
 
Hmm, I was thinking about possible trouble with overloads.
 
Atm I don't need it because I made sure that return invoke<Ret>(...blah...); and return invoke(...blah...); are always valid when the return types are respectively Ret and ResultOf<...blahblah...>.
 
user868935
11:36 PM
anyone developing (or have developed) a win32 windows application?
 
Which is really what this is about: generic code that can reliably call stuff.
With added benefit that ResultOf SFINAEs for you and the version with <Ret> has access to potentially finely-grained SFINAE with is_callable.
That's beautifully generic, isn't it?
 
Anyway, before today I would have suggested that given the choice between implementing a 'simple' result_of that uses decltype + std::declval and a more elaborate one that replicates std::result_of but with SFINAE you should pursue the second option. Having done just that however, the first option is not without merits...
 
I'm running with the first one for now.
 
In any case ditching std::result_of is probably a big priority. It introduces really bizarre failures.
 
11:45 PM
It means my code won't work with pointers to member functions though.
 
@RMartinhoFernandes The only thing that I 'gained' is that any time I write a generic feature in terms of invoke (or recursively in terms of a feature that is in terms of invoke) I get std::mem_fn for free.
I didn't really want that as I have a handy mem_fn...
 
Those should have been callable from the start anyway, especially since they're C++ features, not C baggage.
 
What about auto delegate = foo.member;? One of the reason I have my own mem_fn is to have that i.e. auto member = mem_fn(&Foo::member, foo);.
(And no std::bind can't replicate that.)
 
user868935
だれでもはウエン32のウエンドのコンピューター・プログラムした?
 
Why can't std::bind replicate that?
 
11:48 PM
Have to specify arity.
 
@LucDanton Well, yeah, that would have been nice too. But sometimes you want unbound delegates.
 
@RMartinhoFernandes Sorry, I was asking regarding that feature in addition to make auto member = &Foo::member; member(foo, arg); just work.
 
Yes, that's exactly what I meant.
C# has the first form, but you have to open guts and do surgery to get the second.
 
Do you have opinions regarding overloading?
 
That sounds too broad, but for now I can answer with a simple "Yes" :)
 
11:53 PM
Well, what if &Foo::member was overloaded?
 
Can't you cast your way around that?
 
Nothing more painful than mem_fn((Ret (Foo::*)(Arg))&Foo::member), especially considering that's a reinterpret_cast.
 
Note to self: evaluate possibility of mem_fn<Ret(Arg)>(&Foo::member).
 
@LucDanton Yes, one of the things I intended to support in Wide, and equivalent functionality for free functions
 
11:54 PM
@LucDanton But it's an identity reinterpret_cast, right?
 
@RMartinhoFernandes decltype(foo)::member?
 
What's decltype for?
 
@RMartinhoFernandes As long as you don't typo something else in, yeah.
 
to produce an unbound delegate for member?
 
11:55 PM
Oh, right, foo is not a type.
I think you need Alias<decltype(foo)>::member though. But I could be confused by some GCC quirk.
 
You could have foo::member and foo.member both be correct and do their respective things, but that sounds wrong. Not to mention the parsing aspect.
 
@RMartinhoFernandes Well what would foo.member do then?
 
@RMartinhoFernandes Standard change. decltype(foo)::member wasn't grammatically correct at one draft, forcing the identity<decltype(foo)>::type::member stuff, but it was changed
 
I'm going to sleep soon, don't assume I'm putting much thought into my interventions.
@DeadMG Ah, right, that's it.
 

« first day (506 days earlier)      last day (4424 days later) »