« first day (1601 days earlier)      last day (3347 days later) » 

11:00 PM
Oh yeah. I guess the locking queue is deemed "too simple". Many people have asked for it before
There's not a lot to invent: pop returns /or/ waits for a condition variable.
I have numerous examples involving a (badly named) thread_pool on SO
 
Yeah, that's true, but still
 
It's really ~20 lines - and that includes the worker thread pool (which you might want to strip)
 
ugh
 
yes? we're all waiting for the punchline
 
the excitement is killing me
 
11:04 PM
drum roll
 
interesting, I posted github.com/orlp/pdqsort on /r/programming, /r/compsci and hacker news
it got like 4 total upvotes from /r/programming and hacker news combined, 0 comments
 
lol
 
"interesting, I spammed"*
 
30 upvotes on /r/compsci
 
this python thing is annoying
no punchline, just frustration
 
11:05 PM
@LightnessRacesinOrbit self-promotion, yes, spamming, no
 
user3010322
@Rapptz u.u; I'm sorry. :c
 
don't do that to us. It doesn't work in a chat room (actually, I hate when people draw attention to their frustration in real life too)
 
pdqsort looks interesting, but sorting's been done to death so I can't help but intuitively expect your algorithm to be broken in some subtle but fundamental way, explaining why it isn't already used.
 
@orlp Sorting Deemed Too Sexy - ISP SmartFilter now silently dropping articles from results
 
11:06 PM
@ThePhD I don't really care about that comment.
 
people said the same when I found out that libc++ has quadratic performance in the worst case
 
in worst case
 
that I was just doing things wrong
 
similarly std::sort in gcc has a small performance bug
 
11:09 PM
@orlp Please do tell you fuzzy troll.
 
It's been months man.
 
@CaptainGiraffe After partitioning std::sort in stdlibc++ keeps the pivot in the leftmost position, and includes it in the recursion of the left partition, rather than putting it in its (known) correct location and exluding it from the recursive calls
it doesn't change the correctness of the sort, but it does cost a bit of performance
 
@orlp That is not a small bug. That is a first attempt kinda bug.
 
@sehe People speak of their frustrations in this chat every day. Even you do it when you post about the OP of a question doing something.
 
Yes? That's a little different though.
 
11:13 PM
I don't see how one type of frustration is different than the other.
 
I don't come here and just say "sigh"
 
I was going to elaborate on it but I alt-tabbed.
 
See. That's why the suspense was entirely natural
Problem solved.
 
@Rapptz what has?
 
His sorting thing.
 
11:16 PM
Is that my sorting thing?
 
Nope
 
It's actually been longer than I thought.
September 2014.
 
IGO?
 
@Rapptz "is going on"?
 
11:17 PM
good guess
Sep 2 '14 at 16:04, by nightcracker
NOW I'VE FOUND THAT libc++ HAS A QUADRACTIC WORST TIME std::sort LOL
 
I have a fairly elegant template solution for int16 and int 32. A simple radix beats quicksort.
 
ITT "QUADRACTIC"
 
quadracticic
 
LINEAARRRRR!!!!!
 
user3010322
Well.
 
user3010322
11:19 PM
Invoke is hard @Xeo. :(
 
quadarctic ~= kwaadaardig
== §Dutch == Wikipedia nl === §Etymology === kwaad +‎ -aardig === §Pronunciation === === §Adjective === kwaadaardig (comparative kwaadaardiger, superlative kwaadaardigst) (of a tumour) malignant malicious ==== §Declension ==== ==== §Related terms ==== kwaadaardigheid kwaad ==== §Antonyms ==== goedaardig...
 
@Rapptz well, that bug was during the development of my sorting algorithm, which I only finished just recently
 
user3010322
@Rapptz I'm gonna pretend that won't break VC++'s back.
 
11:21 PM
I -1-ed because all the crucial bits are missing/commented out or couldn't possibly compile when not commented out. — sehe 7 secs ago
 
gl
 
@Rapptz C++ is p good
 
user3010322
std::result_of is supposed to have INVOKE semantics.
 
user3010322
And that's what's smashing VC++'s back in my case.
 
std::result_of is for pansies.
 
user3010322
11:22 PM
Maybe I can just get away with decltype(auto) and VC++ won't care. >_>
 
I got implicit help from robot
when it broke for some reason
which was odd
 
What do you mean?
 
I looked at how you did it to see why mine was broken
 
@ThePhD it is supposed to have INVOKE semantics?
Is that new?
 
I think so?
 
11:25 PM
Suppose we have two ranges. RangeTwo is a subset of RangeOne, and they are both sorted the same way. What do we call an algorithm that performs Func1 (unary) on all elements of RangeOne, and also performs Func2 (binary) on all elements in both ranges?
 
user3010322
@R.MartinhoFernandes It had working INVOKE semantics before. Whatever change they made in the compiler broke it for CTP 5.
 
I remember it changing in C++14 or was that just for SFINAE?
 
user3010322
But yeah, std::result_of always had INVOKE semantics.
 
No, it didn't.
VS sucks but not like that.
 
@caps a regular or a linear.
 
user3010322
11:26 PM
@Rapptz It was just for SFINAE.
 
user3010322
So you can SFINAE on std::result_of.
 
user3010322
But the INVOKE semantics apparently had been there since it was added.
 
user3010322
Really?
 
> If the expression INVOKE(declval<Fn>(), declval<ArgTypes>()...) is well formed when treated as an unevaluated operand (Clause 5), the member typedef type shall name the type decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...)); otherwise, there shall be no member type. Access checking is performed as if in a context unrelated to Fn and ArgTypes. Only the validity of the immediate context of the expression is considered.
seems so
 
11:28 PM
That's new, right?
 
lemme see if it's in C++11
> The member typedef type shall name the type decltype(INVOKE(declval<Fn>(), declval<ArgTypes>()...))
for C++11
 
Hmm. Maybe having those semantics is what annoyed me, then.
 
user3010322
If it wasn't, then the VS 2013 (vanilla) was doing it without asking, because it worked for me when I was doing std::bind with MEM_FUNC_PTR, std::ref(*this), and arg.
 
The only thing that bugged me about result_of was the SFINAE
 
Because then you need tricks to get things working.
The result is worthless without a way to INVOKE.
 
user3010322
11:30 PM
(e.g. std::bind)
 
user3010322
I might drop the ability to invoke and just assume decltype( fx(args...) )
 
user3010322
But when I was doing that earlier @Xeo told me I was being a badlet...
 
You can just use ref wrappers.
 
How come the stdlib doesn't use conditional noexcept more?
 
user3010322
Something something context-sensitive uncomfortable unsure
 
11:33 PM
huh
 
user3010322
I remember STL talking about it during an "Ask the std::" panel.
 
user3010322
He just said that he didn't see too much gain in it for the whole library (I'm trying to quote from memory, so don't really take what I'm saying as true).
 
user3010322
He wasn't necessarily against it, but nobody was really for it either.
 
user3010322
Just "yeah sure we'll get to it".
 
It's cheap.
Not doing it severely undermines noexcept's usefulness.
I guess no one really cares for noexcept. I used to say that half-joking but it really seems the truth.
 
11:36 PM
I've created a pull request with the fix github.com/davidsd/sdpb/pull/2sehe 6 secs ago
 
user3010322
I might be wrong and that could have been Herb saying that with STL in the background going "Yeah we can do it!"
 
yeah it's a shame tbh
 
How's that for customer service ^
 
user3010322
I need to just find the video.
 
I ask because I noticed std::invoke is not conditional noexcept.
 
11:37 PM
@ThePhD "Let's keep an eye on it"
 
Seems like an oversight to me
 
What would the noexcept condition need to include? Does it include the copy/move/convert construction of any arguments?
 
Why what?
 
user3010322
INVOKE is co-variant (I think that's the word?), so type signatures don't have to be exact (for obvious reasons).
 
11:40 PM
It's easier to do noexcept(noexcept(std::invoke(...)) to check for noexcept than checking through the other ways.
I don't see a reason not to do it.
 
user3010322
That works too I guess.
 
user3010322
(I don't know really how noexcept works.)
 
user3010322
OH MAN
 
user3010322
THE PROFESSOR IS STARTING TO EXPLAIN OBJECTS
 
user3010322
"The planet company is giving us an object called Earth."
 
user3010322
11:42 PM
"The galaxy compnany is giving us things called Milkyway."
 
@R.MartinhoFernandes It's like Java's checked exceptions- too much manual labour for even a good idea to prosper.
 
user3010322
It's getting REAL interesting in here.
 
user3010322
Yep. By throwing out INVOKE I can just wrap lambdas and use them.
 
@ThePhD why are you there? :D
 
I keep making stupid mistakes.
 
user3010322
11:43 PM
Downside: I can't naturally pass MFP plus *this anymore.
 
@Rapptz Okay, that's a good reason. Thank you.
 
lol MFP
std::bind at least plix, if not lambda.
 
@ThePhD Are you Lounging in class?
 
user3010322
@LightnessRacesinOrbit Yes. :D
 
-.-
Why are you in class at 11.44pm
 
user3010322
11:44 PM
@Puppy I use std::bind internally.
 
make the user do it and fuck MFPs.
 
@LightnessRacesinOrbit 12.44pm
 
@LightnessRacesinOrbit Way to make me check my clock.
 
user3010322
Yeah, buuut...
 
It's 6:44 PM there
 
11:44 PM
@ThePhD huh. companies are factories now? And what would we need factories for if the objects are actually rare examples of true singletons...
 
user3010322
@sehe BUT WHAT ABOUT ANDROMEDA.
 
@ThePhD Wait, what. Companies?
 
@ThePhD Yeah, what about "her"
 
@EtiennedeMartel never heard of the Company pattern? it's full of managers :)
14
 
user3010322
@EtiennedeMartel It's getting better. Planet object has Species, which has Cat, and something about inheritance that has a Dying subclass...
 
11:46 PM
lol, "company". Are we phasing out of factories for the more convenient companies now?
 
user3010322
Now it's time for Lab and everyone's going to be like "well shit I don't get it."
 
@melak47 lol
 
Make a program that classifies everything on the known universe.
 
@ThePhD are you a TA, or are you actually taking that class? :/
 
user3010322
@Puppy So, my ThreadPool should just take a std::function()?
 
11:47 PM
@Jefffrey Presumably you mean 12.44am.
 
user3010322
@melak47 Taking it.
 
of course
what else would it take?
 
@ThePhD all this INVOKE stuff for a threadpool? what for?
 
user3010322
@Puppy A std::function<void()>, but since it returns a future I need the return type too..
 
user3010322
11:49 PM
@melak47 I was doing invoke because it was a natural extension of "if you call all this, what's the result type?" and then getting the std::future<return_type>.
 
@ThePhD Make the user handle it. That's way outside the bounds of a threadpool.
 
and you can't just result_of why? :/
 
does catch not work in libc++?
uncaught_exception not yet implemented
Aborted
I get this..
 
whatup all. I have a function call that posts an event to another thread, and blocks the calling thread until the posted event is returned. If the calling thread happens to post to itself, deadlock results. Do you think I should just allow the deadlock and file it under 'caveat utilitor', or check for the pathological case and avoid it? I'd potentially be calling std::this_thread::get_id really often.
 
alright then.
 printf("uncaught_exception not yet implemented\n");
::abort();
thanks..
 
11:52 PM
ties are weird
if you were losing, you won X - X
if you were winning, you lost X - X
or so you feel
 
Damn. Every time I dive into astronomy a bit more my mind is completely and utterly blown. Without fail. How could I have ... "missed" this rather epic subject for so many years
 
@Rapptz Is that in the latest libc++
 
it's astronomy, of course it's epic, it's practically the definition of epic
 
@Puppy that +1000 /cc @ThePhD
 
@Pris Well I build from trunk.
 
11:55 PM
@Puppy Yeah. I didn't realize so much interesting stuff was known, charted, imaged about it :(
 
@Rapptz That's std::uncaught_exception, not exceptions itself, I believe. Also, libc++abi handles such matters, not libc++, I believe.
 
In my defense, it seems that the really awesome stuff is all <15 years old
 
although from memory it's far from complete.
you may need something like libsupc++ to use libc++
 
@Puppy isn't it std::uncaught_exception*s* now?
 
11:56 PM
@Puppy Catch as in the testing lib.
 
@melak47 Probably.
 
@Pris That feels really weird. Qt seems to have a similar problem, and just cause a dead-lock under Blocking Queued Connection: qt-project.org/doc/qt-4.8/…
 
@Rapptz Orite.
then no idea.
 
@Pris why not prevent blocking? Post back to the original thread when ready. I believe you had opinions about Asio earlier, so you should be familiar with the ideas of posting work to (different) queue(s)
 
@Nican Right, I'm actually basing my lib off of Qt's signals and slots design. I don't know why they don't detect the deadlock and avoid it though. I was going to, but then I know the Qt guys don't and thought there might be some underlying reason that isn't purely technical
 
11:57 PM
@Nooble that would breed massive new fetishes
 
@LightnessRacesinOrbit no?
it's one hour past 11.57pm
 
user3010322
std::function<T()>
 
user3010322
I don't think that works...
 
user3010322
Since it can't automatically deduce the return type.
 
user3010322
So I think I'll do template <typename TFx>
 
user3010322
11:58 PM
And then deduce the return type with fx()
 
@Pris The default behavior does not block. Look at the Auto Connection.
 
user3010322
The user can handle binding and shit.
 
oops...was I supposed to uninstall the preview before installing the ctp?
 
58 mins ago, by sehe
I have numerous examples involving a (badly named) thread_pool on SO
Use packaged tasks and let the caller hold the futures from the promises that they tasks will fulfil. Done.
 

« first day (1601 days earlier)      last day (3347 days later) »