« first day (919 days earlier)      last day (4023 days later) » 

user1357851
7:00 AM
Twins with different surnames?
 
Never heard of it.
That too.
 
No. That's their first names.
lol
@Telkitty You could also point out that they have the same first names. Hehe.
 
user1357851
I thought that could be their first name, but then I saw your login name, Garcia would be your surname, wouldn't it?
 
And I've just noticed that I've used "John" and not "Paul".
Weird.
@Telkitty Like there's a "Garcia" first name. Never heard of it.
 
user1357851
GHOST IN THIS ROOM, PARANORMAL PHENOMENON! First was Jerry, now this mistype. :p
 
7:05 AM
Woooo.
Scary.
 
I want all to stimulate on my computers. Sounds hot. — hammar 4 mins ago
 
Lol.
Also, jesus fuck.
I'm gonna have to write function_traits for member functions too.
q_q what a cruel world.
 
@Mysticial Ahahahah, what the?
 
user1357851
@Mysticial Sigh, why couldn't you be faster in delivering those posts. I was going to troll, but it is already closed ...
 
@MarkGarcia I think it works as first name Portuguese, and maybe in Spanish too.
 
7:08 AM
@R.MartinhoFernandes did you leave the selection > 0 check out on purpose in that answer?
 
Garcia Roberto.
 
And another one:
-8
Q: Why is processing a sorted array faster than an unsorted array in php?

Gautam MenariyaHere is a piece of C++ code that shows some very peculiar performance. For some strange reason, sorting the data miraculously speeds up the code by almost 6x: int main() { // Generate data const unsigned arraySize = 32768; int data[arraySize]; for (unsigned c = 0; c < arraySize...

 
@R.MartinhoFernandes I've heard of "Gracia" but not "Garcia".
 
@MarkGarcia Grassy Ass.
@R.MartinhoFernandes What did I do wrong? :c
 
7:09 AM
@MarkGarcia Garcia is a valid Spanish first name.
 
@sehe Good point, I should add it.
 
@Rapptz oh
 
@ThePhD Fuck.
@Rapptz What could I say... Now I know. :)
 
@Mysticial I just want to ask... Why? Ahahah
 
7:10 AM
@Mysticial lol
 
@DomagojPandža It seems like the OP couldn't get past the quality filter. So he just copied another question to see if he could get anything through it.
 
@Mysticial Want a javascript flavor?
 
The quality filter is becoming serious business. First the puppy yesterday, now this guy. :D
 
@ThePhD It's the second time in a few hours that I see someone playing with that "function traits" idea. Inspecting callable arguments is silly :(
 
@MarkGarcia I might have seen it already. There's been a number of copy-cats. Only one of them turned out to be good.
 
7:11 AM
@R.MartinhoFernandes But necessary.
 
@R.MartinhoFernandes kbok? :D
 
Imagine you're on a train... — jrok 28 mins ago
 
At least, necessary when I'm trying to apply it to a random something.
 
@ThePhD No :(
 
@R.MartinhoFernandes Yessss.
I'll show you
when I'm done
why I'm doing it
 
7:14 AM
Btw, @sehe why is it amazing that I was the first to post a no-nonsense answer?
 
Uh.
Hm.
 
-5
Q: Write a number as sum of 4 natural numbers

faridzsCan you please help me on finding an algorithm to find the number of ways that we can write a number as sum of 4 natural numbers? I don't want repetitive numbers. I mean for instance 9=1+2+5+1, 9=5+2+1+1 or 9=5+1+2+1 are all the same.

^^ -5 in 1 min...
 
Btw, is there a way I can force all cpp-std related stuff to search with en.cppreference for Firefox?
 
@ThePhD Go to cppreference.com, right-click the search box, "Add keyword for this search".
 
I just type "en" then tab
 
7:16 AM
I meant like, uh.
 
noobs.
 
I love these guys on TBP who uploaded ISO files of VS Update 2.
 
Xeo
@R.MartinhoFernandes Oh gawd, that question...
 
When I search it in my bar
My firefox bar
For google
And shit. I want it to automatically (when it sees std::) to search en.cppreference
So I can stop getting cplusplus.com as a search result. =[
 
@Xeo Wow that answer.. very.. um.. boilerplate?
 
7:18 AM
@Xeo I wasn't going to answer, but the crap kept piling up on answers, so I had to. I tried to not call the OP an idiot, but I really wanted to.
And apparently I got a downvote now.
 
@R.MartinhoFernandes Which question? The reply chain drops dead after a few messages.
nvm found it
 
LWS is so fickle.
 
I'll +1.
 
Jesus christ. =[
 
@thephd "search keyword"
 
7:20 AM
@MarkGarcia The one with the blue theme?
 
cppreference.com has opensearch
 
@R.MartinhoFernandes What "theme"?
 
@ThePhD yeah, you are right, but std::terminate will kill your whole program. You have to catch the exception, join your threads and rethrow afterwards, async does that all for you. To catch the exceptions which are thrown from the functions you pass to your taskpool, I recommend to use packaged_task together with its future mechanism.
 
@R.MartinhoFernandes Ah you mean the update. Yes. Update 2.
 
7:22 AM
@Rapptz 🍌
 
@MarkGarcia TBP, isn't it TPB?
 
The Birate Pay.
 
@bamboon Oh. I didn't see that.
@DomagojPandža Seems like it.
 
Xeo
@DomagojPandža It's for the drunk pirates
 
@R.MartinhoFernandes What's that character? Banana?
 
7:23 AM
@MarkGarcia nvm, was just wondering.
 
@R.MartinhoFernandes I am immune to your bananas. (Try to guess how I searched this character)
 
Bananas.
 
Also you might find it interesting: en.wikipedia.org/wiki/%F0%9F%8D%8C
 
For the love of fuck
 
Oh, I knew that.
 
7:24 AM
@Rapptz The fuck.
 
What is this function type? >_<
 
@Rapptz What the fuck.
 
lol
@R.MartinhoFernandes I went to "list of unicode characters" and did a ctrl + f
 
Wikipedia has image-character recognition! Hurray!
 
It worked, surprisingly.
Despite it being a box, it picked the right one!
 
7:26 AM
=[
I want it to pick a member function.
a member function !
FINALLY
FINAL FUCKING LEEEEE
 
Congratulations.
 
This is a list of Unicode characters. C0 Controls and Basic Latin {| class="wikitable sortable collapsible" !Code !Result !Description !Abbreviation |- | U+0000 | | Null character | NUL |- | U+0001 | | Start of Heading | SOH |- | U+0002 | | Start of Text | STX |- | U+0003 | | End-of-text character | ETX |- | U+0004 | | End-of-transmission character | EOT |- | U+0005 | | Enquiry character | ENQ |- | U+0006 | | Acknowledge character | ACK |- | U+0007 | | Bell character | BEL |- | U+0008 | | Backspace | BS |- | U+0009 | | Horizontal tab | HT |- | U+000A | | Line feed | LF |-...
 
🎷
 
Not even constexpr and or UDLs can save you here. The only thing that would come close here is (eeeeeeeeeeeeeeeeeeek!) #define make_bitset(N) (std::bitset<N>())sehe 10 secs ago
 
I found a 🐜 in my code.
 
7:30 AM
@R.MartinhoFernandes It's mainly amazing that nobody else did so. And that several people posted rubbish. The "you" factor is indeed irrelevant to the amazement...
@MarkGarcia Mark as NSFW?
 
@MarkGarcia LOL
 
@sehe Nooooooooooooo!!!
 
Why? It's not SFW where I work. It's your option.
 
@sehe Ok. I enjoyed it! Hahaha!
 
At least he didn't one-box it.
 
7:32 AM
Wokay...
 
@Mysticial And at least, the character has been hidden. :)
 
@MarkGarcia Oh, that was a special character. I can't see that :|
 
@sehe That was my first.
 
Conflatulations :)
 
@sehe Haven't you hovered it?
I mean, of course you have. Just didn't see it.
 
7:33 AM
haha Zoidberg has been trying to SQL inject coliru or something.
 
@R.MartinhoFernandes T'was I.
 
Someone also tried to rickroll..
 
Damned data sanitation and prepared statements stuff.
 
WTB variadic templates for VC++'s function pointers.
Will pay big dollas.
 
Mmm. Actually: it does get shorter: template <size_t N> using bs = std::bitset<N>; http://ideone.com/Q89e6Asehe 14 secs ago
 
7:36 AM
:(
 
Guise
 
No riddles
 
Hee, no, I'm not litb-level yet.
 
We know. Well in the trolling department you are getting close. This is partly due to the volumes deposited.
 
if you had a using/typedef for the return of a function, what would you call it? Right now I'm thinking either return_type or result_type.
Partially biased to return_type.
 
7:37 AM
You mean std::result_of?
 
@ThePhD TR or RV
 
@sehe =[[[ I don't troll peopplee. ;~;
 
std::function does result_type.
 
@R.MartinhoFernandes Yeah, but that one just does ::type
 
@ThePhD Whatever suits you.
 
7:38 AM
Since it's like any other type_trait
 
He's asking what to name his typedef
 
@R.MartinhoFernandes Well, I don't just have a single type. I have a bunch of types and I want to name all fo them, specifically for the result of a function in function_traits.
 
lol funtion_traits
 
@Rapptz Brings up a good point that result seems to be what the standard library prefers...
I guess I should go with that?
 
7:39 AM
No, you should go with nothing :(
 
q_q
Y u hate function introspection so much? D:
It's necessary for variadic stufflfelfelfelesss.
 
The more I think of it, the point about cache locality is probably gonna win here. We are talking 100*short strings, this would likely fit in ~800 bytes. Linear search might beat a hash table there... — sehe 16 secs ago
^ @Mysticial opinions?
 
@ThePhD No, it's not necessary.
 
@sehe lemme take a look
 
@R.MartinhoFernandes It totally is!
Now, I just need a function_traits for all types T such that it tries to get the operator() on it.
 
7:42 AM
"FINALLY" two compile errors?
 
Did you just reinvent std::function<void()>?
@ThePhD :'(
 
That would be a new record
 
I can see it right there.
 
@R.MartinhoFernandes Nooo. :c
 
@R.MartinhoFernandes :(
 
7:43 AM
Maybe? I don't know. I think I reinvented both std::function<void()> and std::bind.
 
And std::bind too, it seems.
 
q_q But waait
I need to keep those values for later. =[
 
You don't need that function traits crap, and you don't any other code in that snippet.
 
7:44 AM
At last. Just a couple of hours update 2's complete.
 
It's all pointless.
 
=[
 
This is amazingly ugly.
What's with the commented out code?
 
And yes, you should be ashamed that you reinvented std::function<void()> because your use case seems to be the appropriate use case for it.
 
=[
 
7:46 AM
And worse, you reinvented std::function<void()>+bind by wrapping std::function.
 
Welcome to whose code is it anyway, where snippets make no sense and we reimplement std.
 
@R.MartinhoFernandes But at some point I'm going to also need to retrieve the return value from inside of that std::function<void()> + bind, and I don't know how to do that if I type erase everything using bind and friends and passing it to a std::thread. =[
 
@ThePhD Did I mention this thing called std::result_of?
 
Isn't the return value of std::function<void()> void?
 
(There used to be a reason to reinvent std::result_of, but not anymore, except maybe MSVC)
Anyway, what are you going to do with the return type then? AFAICS the code just discards it.
 
7:50 AM
At the moment, it discards it.
 
GCC's result_of uses decltype lol apparently
 
Did you guys see the overview of what was decided at Bristol CPP meeting?
 
@Rapptz That's the sane way to do it; not with a bunch of specializations that only work in some cases.
 
Note to self: if the browser starts to fail displaying new pages and instead displays the graphics from other tabs it’s time to restart – it’s gonna blow within a minute
 
7:51 AM
@R.MartinhoFernandes I've always just used decltype instead of result_of anyway.
 
@TonyTheLion IIRC it's "moar type deduction, better lambdas, crap"
 
@R.MartinhoFernandes lol
for you to say crap, it must be bad??
 
Dynamic arrays. The hell.
 
Hm, didn’t we have this question before in some form or other?
5
Q: Is it right way to create sinlgeton class by weak_ptr

Mark GuoI create a parent class to handle singleton pattern with smart pointer: .h file: template<class singleType> class Singleton { public: static std::shared_ptr<singleType> GetInstance(); private: static std::weak_ptr<singleType> m_singleObject; }; .cpp file: template<class singleType> ...

 
(I've never had a use case for result_of yet)
 
7:52 AM
@MarkGarcia I know, I was wondering about those
 
So is the basic idea that once all pointers to the singleton are out of scope then the singleton gets deleted. Then later when you need a pointer to the singleton once again you create a new singleton? If that is the case it looks good. Haven't tried it, but everything looks right. — Danny 2 hours ago
It's.. weird to see someone with my name still. Even after all these years :(
 
@Rapptz That used to be better, because decltype directly does SFINAE, but result_of implementations used not to and was annoying. It's fixed now, both in the standard and the compilers (fuck MSVC).
 
But this is the base for what I'm going to be massaging and working out in my ThreadPool implementation: I have exposed a way to store the values for when I need them, and I get the ability to assign either the return type or an exception to a std::promise<return_type>.
 
At least, there's make_unique.
 
yea that's good
 
7:53 AM
@ThePhD So you need std::function<void()> and std::result_of. Get to real work now.
 
So they've decided to use version 3 of filesystem. Last time it was version 2.
 
filesystem is in C++14?
O_o
 
Most exited for networking, however.
 
@TonyTheLion There are a couple of things that I really don't want to see around.
 
@R.MartinhoFernandes namely?
 
7:56 AM
Template variables, and dynamic arrays, mainly.
 
@Mysticial Cheers.
@JamesKanze looking at the sample strings form the OP, I'd trust SSO before doing any premature manual optimization. — sehe 1 min ago
 
I need to have a closer look at concepts lite, but I don't like it.
 
@R.MartinhoFernandes oh yea, template variables, that even made me go, WTF?!
 
^ Why is there no "canonical web article/SO answer" to link to for SSO?
 
Draft C++14 now has fixed- but runtime-sized arrays of two kinds: in the language, and as a dynarray<T> library.
whaaaaat
 
7:57 AM
Does my search fu suck today?
 
@sehe because no one has made one yet
 
Whyyyyyy
 
@TonyTheLion There is nothing I could not do before that I can do now, and it saves me a whole two keystrokes. In return we get more syntax.
 
template variables looks interesting, probably they can replace template<..> struct ... { ... value = ...; }; metafunctions
 
@TonyTheLion ....
 
7:57 AM
@sehe That's interesting... Never heard of SSO, but I can see how it makes sense.
 
@sehe meaning, if you find one, perhaps you can tag it c++-faq
 
@TonyTheLion Nah I looked. And I remember looking for it before. So, I hoped one of the loungers would know where one is hidden
 

« first day (919 days earlier)      last day (4023 days later) »