« first day (1473 days earlier)      last day (3492 days later) » 

10:00 PM
so what I'm saying is
 
@LucDanton You can query it with joinable.
 
in my current observation, virtually all move-only types are unique_ptr in disguise but we made it shittier.
and std::thread is an excellent example of that.
and std::function is little more than a specialization of value_ptr.
 
Yeah I don’t want to go down that tangent. Kind of off-topic.
 
fair enough.
all I'm saying is, fuck every type that ever introduced an implicit empty that did not absolutely have to have it.
 
@Rapptz Or get_it() then. I never noticed!
 
10:02 PM
iostreams, function, thread, it's all bad.
 
user1804599
Especially T*.
 
and variant would be even worse because there's no particularly useful conditions under which it needs to be empty.
nothrow move semantics eliminate pretty much all the nasty corner cases that you had in C++03 as far as I'm aware.
 
@LucDanton You mean get_id?
 
Yes.
 
Ell
what is value_ptr again?
 
10:04 PM
deep copy pointer with unique ownership
 
@Puppy What should assignment do for a possibly throwing move?
 
Ell
oh yeah
 
@LucDanton Ban possibly throwing moves. They're unusable in too many situations and too rarely actually useful.
 
That’s also another tangent. How can a variant proposal possibly influence this?
 
because it's one of the primary areas where trying to support possibly-throwing moves directly produces vastly inferior semantics and interface.
 
ultimately, I agree with you that whether or not possibly-throwing moves should be eliminated from support by the Standard library is independent of whether or not variant is Standardised.
 
@Puppy wtf
quote me on what you said
 
Xeo
@Puppy For function it's analogous to function pointers, so not that bad in my book.
 
I see no reason to hate std::thread
 
@Xeo Billion-dollar not so bad?
 
10:07 PM
@Rapptz Haters gonna hate?
 
@LucDanton Bad wording.
 
std::function is pretty useful for storing functions.
 
@Xeo Definitely still bad. Function pointers and all pointers are just as bad in this respect.
 
Do you want a Standard variant as long as there are throwing move ops or not?
 
@LucDanton I want a variant, and I want to eliminate throwing move ops. It's just that for variant in particular, eliminating throwing moves is a pretty important pre-requisite.
 
10:09 PM
I'm really tired. I wonder if I should nap or suck it up
 
Xeo
I'll go to sleep soon-ish
 
@LucDanton I want variant that only works on types that have noexcept move ctors. :P
 
@Puppy It’s not realistic, and I’m not sure why I need to point that out.
@Griwes Now that’s on-topic!
 
well I agree that it's much more likely that the Standard variant will just have shitty semantics.
 
@Griwes How do you feel about optional with respect to the same issue?
 
10:10 PM
what, w.r.t. throwing move ops?
 
@Puppy Okay, so which one should it have?
 
So, there was an Ebola spread threat in the Czech Republic recently. The Police was telling everybody how the terrorists are using sophisticated technology, email on yandex.com site, some FB persona has answered its control question correctly and gained access in 5 minutes, allegedly. I wonder, if the Police of the Czech Republic is that silly they would not figure this out. Or if this was some kind of tactics to make the perpetrator reveal himself.
I have my doubts about it being the latter rather than the former.
 
user1804599
Ebola is healthy.
 
@Puppy Yes, same thing. optional<T> being iso to variant<nullopt_t, T>, so to speak.
 
@LucDanton They should eliminate support for throwing moves. Did you mean should they either not introduce it or accept shitty semantics?
 
10:11 PM
@LucDanton optional doesn't need to do broken tricks like variant for the throwing cases - it can just be set to nullopt on an exception.
 
@Puppy No, which shitty semantics to pick.
 
@LucDanton I don't really mind because the "empty" is an explicit part and intention of the contract.
 
The whole difference boils down to "optional can be empty, variant can't".
 
I'm writing C, yay
 
also you don't really have to "juggle" in the same way for optional, I don't really know of any cases where optional has the same problems.
 
10:12 PM
@LucDanton So, I don't believe there's an analogous issue with optional. ;)
 
Just to make sure: that means you can have assert( o ); o = whatevs-not-optional; and then you can have assert( !o ).
The opposite of having o = nullopt; assert( o ); (which can never happen).
 
Well, an exception happened.
During modification of the object.
Setting the object to empty state in this case is absolutely sane.
(Minus the insane "throwing move assignment operator" or "throwing move ctor" part :P)
 
‘Basic exception guarantee’ is too good a name for what it means.
 
@LucDanton I think that depends on the semantics of the throwing move. If it's strongly exception safe, you can't have that.
 
:D
 
10:16 PM
Okay so you don’t want to always set to nullopt on an exception then.
 
@LucDanton No, why would you?
let the stored type exhibit it's semantics.
the only reason variant has a problem that optional doesn't is that optional can always leave the value (if it has one) in place, whereas variant that may not be true.
 
@Griwes Which broken tricks were you referring to anyways?
@Puppy How come?
 
> Make your profile stand out with a custom background
Try an image that represents your school, profession, or cause you care about.
 
@LucDanton Because if the source value is an int, and the dest value is a std::string (for example), you have to move the int out of the way before you can even attempt to put the std::string in it.
 
I think I need food.
 
10:19 PM
erm, why not an image that represents, you know, me
 
you have to mutate your own state before you can attempt the potentially-throwing operation.
 
I'd argue that an image representing me on my profile is more useful than an image representing my school
 
@LucDanton This.
 
whereas with optional you can delegate straight to the move constructor/assignment op because you know that the storage already has the right type/size/whatever.
 
10:20 PM
@SpeedCoder I already answered this in the other answer. Specifically: "as a poor-man's solution add more threads (this simply means that if more requests arrive at the same time than there are threads to handle them, it will still block until the first thread becomes available to pick up the new request)". So, choose the deadline_timer solution already. — sehe 1 min ago
 
@Griwes That’s not in the proposal.
 
@LucDanton Well, I didn't look at the proposal closely :P
 
It annoys the crap out of me when you spell things out ad nauseam, and still people waste other people's time liberally.
It's quite painful to see how much more time was wasted here. I'll tell you this: C++ is not to blame. — sehe 48 secs ago
 
@Griwes How helpful of you.
@Puppy Bringing up that alleged isomorphism was of no help whatsoever.
 
Wait. The proposal wants empty state?
 
10:22 PM
For a defaultable type you can default and then assign, and that’s consistent with optional.
@Griwes Guess what the discussion was about?
 
@LucDanton Not sure what you mean. I think you do indeed need food. With variant, you have to mutate your own state first. With optional, you don't. It's fixing up that initial mutation in the case of exception that's the issue with variant.
 
@AlexM. narcisses
 
If the proposal wants empty state in variant, the proposal is broken and should be rejected on sight.
 
user1804599
Holy shit.
 
user1804599
It crashed.
 
10:23 PM
@rightføld Woot it blew up.
 
@rightføld A plabe?
 
really cool blue flames
 
@Puppy I brought up an isomorphism to justify the need for consistency, but the problematic situations (for which we want to settle on a solution) happen precisely where the (not quite) isomorphism breaks up.
 
oh damn. what launch(?) was that?
 
ah, right.
 
10:24 PM
Which means I’m not super sure what I actually want, beyond an unqueriable not-a-variant.
 
user1804599
We're 4 minutes from launching #Antares to @Space_Station. #Cygnus on internal power. Watch: http://1.usa.gov/AN75 http://t.co/lNvDCcIKaO
 
user1804599
Antares.
 
Oops. Astronauts on board?
 
Xeo
@rightføld I missed that
:(
 
user1804599
I hope not.
 
user1804599
10:25 PM
 
@LucDanton With non-throwing moves guaranteed beforehand, they can have isomorphic semantics (strong exception safety, or lower if T doesn't support it). Without it, not so much.
 
Xeo
holy
 
is that place on fire
 
Alright, time to cook.
 
I missed it
the streaming stopped so I closed the tab
 
10:26 PM
It didn't stop
 
it did not stop
 
it stopped for me
as in, it would continuously buffer
with no signs of stopping
 
user1804599
DoS
 
Xeo
@sehe Resupply mission, so hopefully not
 
Oh good, I suppose
 
10:28 PM
pretty sure it was an automated mission
 
@AlexM. now, did it stop, or give no signs of stopping :)
 
Xeo
Okay, they're talking about propert / vehicle damage, so unmanned mission
 
user1804599
> unmanned
 
okay
 
@sehe the streaming stopped, the buffering process gave no signs of stopping :P
 
10:28 PM
@Xeo I'm guessing the vehicle damage could be summed up as "All of it".
 
Xeo
@Puppy heh
 
I suppose the real surprise was that the (full) problem didn’t really arise for optional. A happy happenstance of sorts.
 
user1804599
Goes ~$500000000.
 
@AlexM. lol
 
@Puppy Ah, that’s the KSP paying off right here.
 
10:29 PM
@rightføld 500'000'000_usd
 
user1804599
Dan vind ik die naheffing toch een stuk erger.
 
mmm
 
wow, I had no idea bool became a thing in C in C99 only
that's kinda... late
 
it's _Bool
 
@rightføld I don't know what to think about that. Since no one seems to know what was actually arranged
 
10:30 PM
@Puppy bool expands to _Bool from what I've read
 
user1804599
lots of money lost to shit
 
but yeah, the real thing seems to be _Bool
 
user1804599
They could've given it to me instead.
 
@AlexM. Only if you include the header that offers that macro.
 
Which is also part of C99
 
10:31 PM
yep
 
Xeo
Damn, I want a video of that boom. I missed it in the stream :<
 
There'll be 100 on YouTube in 10 minutes
 
Xeo
prolly
 
it will be more challenging to find out which one of them is the rickroll
shit, now I gotta listen to the song
 
@AlexM. or, which ones are not
 
Xeo
10:33 PM
ow, apparently that launch was also for asteroid mining stuff
 
oh dear.
I want the asteroid mining stuff.
 
I wonder how scientists feel after a crash like that
or worse, much more important missions that fail
 
they're not the ones paying for it
 
like, the work of a lifetime
 
why does netflix work on chrome on ubuntu, but not amazon instant video?
 
10:34 PM
gone, just like that
 
user1804599
 
that was pretty impressive
it's a good image of how far we've come (reaching space) and at the same time how easy it is for us to fail
 
user1804599
Now the astronauts will have no food. R.I.P.
 
Xeo
Looks like the engine fucked up or something
 
@rightføld I bet they plan for this
@Xeo gravity took over
 
Xeo
10:36 PM
@sehe After the engine fuck-up, ye
 
:) chicken or egg
 
the engine's a lot stronger than gravity, so the engine had to fail first.
 
we're really imperfect, huh
I wonder if there's some sort of ceiling that we'll hit because of our imperfection
 
@FilipRoséen-refp I used your implementation + the spec to make the above ^
 
10:37 PM
nope.
 
and stop advancing further because we can't stop failing
 
Xeo
@nightcracker And now do it so it reuses the instantiations of one half for the other with odd N
 
@Xeo that would still create extra instantiations of Combine for no netto gain, no?
 
@Rapptz is it guaranteed that std::numeric_limits<std::size_t>::max() >= std::numeric_limits<ANY_OTHER_INTEGRAL>::max()?
 
10:42 PM
no but it's also irrelevant
 
IIRC there were some platforms with 16 bit std::size_t
 
even 16 bits is enough
 
although you probably won't ever need more than 16
if you ignore the static_cast<T> you use vs my direct usage of T I guess our implementations are pretty much identical
 
Xeo
@rightføld And now with sound! youtube.com/watch?v=5EAuTfKFdtg
 
I had to use the int = (N == 0 || N == 1) ? N : 2 trick because you can't specialize on <class T, T N> struct S<T, N, T(0)>
 
Xeo
10:44 PM
Though there's not much to hear - they get very quiet when the rocket starts going the wrong direction
 
user1804599
> 256 views
 
user1804599
nice round number
 
user1804599
They should stop playing KSP.
 
@Rapptz did you build your implementation yourself or took it from somewhere?
 
it's the most commonly used implementation in this room
or one of them anyway
 
10:47 PM
I asked a couple hours earlier and no one responded with an implementation, except Filip offered to write one (he did an O(n)) one
 
Xeo
18
A: C++11: Compile-time Array with Logarithmic Evaluation Depth

XeoIf what you're using in the code is a weird form of the indices trick, here's an implementation that has O(log N) instantiations: // using aliases for cleaner syntax template<class T> using Invoke = typename T::type; template<unsigned...> struct seq{ using type = seq; }; template<class S1, cla...

\o/
 
chat must have been quiet
 
user1804599
The implementation I use is from the standard library.
 
I know Xeo would have spammed his answer
 
Xeo
@Rapptz shush
 
10:48 PM
:p
 
@rightføld I don't feel comfortable with relying on -std=c++14 yet
 
no point until gcc plays catch up
 
hell sometimes I even feel uncomfortable with -std=c++11 when it's not for a 100% personal project
 
lol
 
a lot of environments are still stuck pre C++11 :(
 
Ell
10:49 PM
has anyone here implemented pattern matching in c++?
 
no environment that I can control of course
 
Ell
hmm did I ask this before?
 
@Ell pattern matching?
 
Xeo
@Ell Bjarne did!
in his paper
kinda
anyways
more like multi-methods
 
Yeah Bjarne did.
 
Xeo
10:50 PM
But you can get pattern matching from there (kinda)
 
user1804599
switch is very primitive pattern matching.
 
I was actually reading it today.
 
Ell
@Xeo yeah I implemented multi methods also, it made me wonder how to implement pattern matching
 
user1804599
And you can do compile-time pattern matching with specialisation!
 
Xeo
@Ell Make the patterns subclasses.
 
Ell
10:51 PM
but my multi methods don't work with template arguments. I guess because the possible types aren't fixed at compile time
 
That’s not pattern matching though.
 
user1804599
Type switch? throw/try/catch!
 
@Rapptz what the fuck is up with the font in that pdf
 
erm, today I passed a & parameter as a call to a function returning a value of that type, and Clang (most likely set to use C++11) complained; someone in the team told me about this so I never saw the actual error message
I wanna read more about what I did wrong, but I've no idea what to search for lol
 
Ell
10:52 PM
@LucDanton Yeah, you need to be able to match on the values too (this is what you mean?)
 
looks fine to me
 
maybe it's linux chrome that's fucking it up
 
Ell
works on ff for me
 
Xeo
Chrome fucking up something from Adobe? I never heard of such things! (Did I mention "fuck Pepperflash" yet?)
 
@Ell Kinda. But something like foo (A (B x y) z) = … is more damning, I think.
 
Ell
10:54 PM
multi methods could do that, I think?
 
It’s a pattern match, I should clarify.
 
seems GCC complains too
MSVC doesn't though
setting the parameter as const ref works
 
always been a C++ thing
can't bind temporaries to non const l-value references
 
this is the first time I noticed it
 
user1804599
@OrbitalSciences You are a master of understatement.
 
user1804599
10:58 PM
lol
 
in C++11 you can use an r value ref
 
probably because I try to const everything when I pass as parameter
 
lol
GCC - internal compiler error
 
^found it back by searching for ‘c++ ref to const binding’, if that’s any help.
 

« first day (1473 days earlier)      last day (3492 days later) »