« first day (1446 days earlier)      last day (3518 days later) » 

11:04 AM
@AlexM. From the URL I was like "lolyeah, sure, systematic error handling in C! I really wanna see this".
Then I got disappointed.
 
user1804599
11:16 AM
@Sofffia dynamic duck typing shit makes everything needlessly difficult.
 
user1804599
And this whole "screw formal specifications" movement. :vomit:
 
@Rapptz I'll have to wait until I get home to watch the video, but is this accurate?
> The idea is that a function returns an Expected, which behaves like a std::future. When you call Expected::get(), it returns the value, or throws the exception that would have been thrown
because if it is, then from what I understand expected::get() can throw
so the only use I see for it is to catch the exception later on
like, you still have to catch whatever get() throws somewhere
 
it's documenting intent
e.g.. 'I'm expecting an int, if I didn't get it then something went horribly wrong here'
 
I thought of it being something more like
expected<int> a = func();
if (a.get())
{
     //do something with a's value
}
else
{
    //do something with a.getexception()
}
 
that's just an optional
 
user1804599
11:25 AM
No, that's bullshit.
 
user1804599
Optional doesn't store exceptions.
 
user1804599
It's more like, Try.
 
@Rapptz yes
I just didn't see much different between
 
Ell
I look like a moron
I have a keyboard poking out of my bag :3
 
try
{
	int a = someFunc();
}
catch (something)
 
user1804599
11:27 AM
Ell, you are a moron.
 
and
expected<int> a = someFunc();
try
{
	//use a.get()
}
catch (something)
if you don't plan to catch the exception later
 
If you know Haskell
 
user1804599
Try is pretty useful.
 
Ell
There is Either also
 
yeah
expected<T> is just Either
 
Ell
11:29 AM
Fuck I forgot my moolah
I hope I don't miss the bus
 
@AlexM. Not sure how to make it click for you.
But consider something like
expected<int> a = parse_int(get_string()) where get_string would return expected<std::string> and parse_int would accept it and return expected<int>
if get_string would have thrown, nothing would have happened and you still would have received your expected<int> with the proper exception object
 
TIL lamb isn't a typical food in the US
 
depends where you are
 
but as a whole country yeah I guess it isn't
quite common here
 
11:36 AM
> "I live in a relatively Turkish area of London, and around here it's really easy to buy things like lamb's testicles and lamb's tongues," he says. "When I have a barbecue at my house I chuck some testicles on the fire, there's some hearts, and they're amazing."
grim
 
@Rapptz parse_int stores get_string's exception then, right?
 
@Rapptz wheres u
 
Michigan
large middle eastern population here so it tends to be more common
 
@LightnessRacesinOrbit New York, LA, and San Francisco all would have lamb on the menu
 
@AlexM. Yeah, it should just propagate it.
 
Ell
11:39 AM
Is having Either is kind of like having checked exceptions ?
 
The same could be done with optional<T> btw, or any monad.
 
@Rapptz yeah boi lamb chops nom nom
 
now I'm doing it :(
 
i had some gorgeous lamb steaks yesterday
 
damn China
that's a metric fuckton of lamb
 
11:41 AM
@Rapptz Either a for which a?
@Ell Depends. Just Either on its own isn’t enough.
 
Ell
Isn't the type of the exception encoded in Either itself?
 
is this Either you're talking about in Haskell?
yeah it seems so
 
@LucDanton Hm? I meant expected<T> -> Either Exception T
@AlexM. Yeah
 
looks something like expected<TValue, TError> to me :D
 
Ell
Man I hope I don't miss my train
 
11:45 AM
no
 
Ell
This bus is taking forever
 
@Ell Did your train break up with you?
 
that'd be std::variant<T, std::exception_ptr> -> expected<T> obv
expected<T> would have been cooler in C++98 I think
 
I WANT TO GO HERE
 
kinda hard to adapt to using it now
 
11:49 AM
@LightnessRacesinOrbit that looks like the inside of a japanese bath house
 
@LightnessRacesinOrbit TOGO considered harmful.
 
@LightnessRacesinOrbit reminds me of the paintings you see on walls in North Career
 
north career <3
 
@FredOverflow now that's just racist, I've met plenty of Togo's that were nice people
 
@Rapptz forgot about std::variant
I guess that achieves what I wanted initially
 
11:54 AM
I don’t know of an std::[experimental::]variant.
 
essentially to store a "correct" value or some other value that describes what went wrong
 
@LucDanton In my dreams.
 
@LucDanton well I read about boost::variant tbh
I can only use C++03 at work
 
Setting expectations straight.
 
so if I hear of something cool that has std:: in it, chances are I'll only find it in boost
 
11:55 AM
Off the top of my head the library fundamentals TS might come with optional, any, function[sic].
 
Hey guys - my colleague came up with a thingy similar to std::enable_shared_from_this with the only difference that it can be used from constructors safely. I didn't think that was possible, so I was wondering whether that is a well known thing or something "new"?
 
std::function already exists though
 
@LightnessRacesinOrbit in reality, it is probably more like this:
 
Sic I said, sic!
 
just you and five thousand other people ...
 
11:58 AM
@chmod711telkitty :(
 
it's not sick though :p
 
@LucDanton grammatical errors make me [sic]
 
> If of class type, the operand is contextually implicitly converted (Clause 4) to a pointer to object type.
What does that mean?
 
contextual conversion is the if, switch stuff.
 
> An expression e of class type E appearing in such a context is said to be contextually implicitly converted to a specified type T and is well-formed if and only if e can be implicitly converted to a type T that is determined as follows: E is searched for conversion functions whose return type is cv T or reference to cv T such that T is allowed by the context. There shall be exactly one such T.
@Puppy E.g. for boolean stuff it’s contextual conversion to bool. Nothing implicit about it.
 
12:03 PM
they reworked the conversion stuff so that way more stuff is written in terms of it in C++14.
 
I’m figuring out where those contextual implicit conversions are used.
It’s only ever used for class type → integral/enumeration or pointer type. For integral constant expressions, switch, and delete/delete[].
AFAICT the main difference with an implicit conversion is that it requires there is a conversion function, so it allows the wording to reference that function (e.g. function must be constexpr for an ICE context).
 
@AlexM. better than just c++98
 
It may be a clever refactoring of wording. E.g. it mentions that there must be exactly one valid conversion function—before this was likely inside overload resolution rules, or perhaps even spread across use sites.
 
9
Q: SFINAE check for operator+=

MSaltersI'm trying to eliminate an overload from an overload set if operator+= is missing. I know how to check if T+T is legal : template<typename T, typename CheckTplusT = decltype(std::declval<T>() + std::declval<T>())> void foo(T a, T b, ...) { a = a + b; } but this doesn't work for += ...

dupe
 
cppcheck is pretty neat
not exactly coverity scan level, but still
 
12:13 PM
@Rapptz Of what?
I have dupehammer.
 
Dammit, I just wasted time on such a silly bug.
 
actually since I read the answers, I'm not as convinced as I was
 
@sbi Why would I?
 
@R.MartinhoFernandes Originally, this (Xeo's answer) but I'm not sure any more.
 
(And to be honest, those episodes happen so often I tend to forget them :( )
 
12:15 PM
@R.MartinhoFernandes you know how he loves to mock you :)
@R.MartinhoFernandes lol 'episodes'
 
besides no one would be surprised if you got lost again ...
 
@thecoshman Sounds like just ID cards.
 
@R.MartinhoFernandes probably are. I'm sure you can get away with using them to enter UK
 
@LightnessRacesinOrbit in Canada buses apologize?
 
12:18 PM
actually, the flight from Ireland to Stansted didn't even bother with passport control... but we have our own 'special arrangement'
@AlexM. ಠ_ಠ
 
@thecoshman Doesn't count.
 
@thecoshman Well you need photo ID
@thecoshman no passport is required within the Common Travel Area
it's like our own version of Schengen
 
Ell
Shit
Missed my stop
 
@R.MartinhoFernandes what do you mean? count as what?
@LightnessRacesinOrbit well I'm not implying they were just bribing their way... they might have been, I'm just not saying that is what they were doing.
 
@Puppy or @LucDanton (if you guys have time), given a virtual concept like this one:
template<typename T>
virtual concept bool C()
{
    return requires(T x)
    {
        { x.get().foo(); } -> int
    }
}
What should be on the interface? I thought of:
 _Unnamed1 get();
 
12:20 PM
@LightnessRacesinOrbit it's funny how different sides of the borders have very funny ideas about what they are supposed to be checking.
 
Where _Unnamed1 is implicitly generated by the compiler and looks like:
template<typename T>
virtual concept bool _Unnamed1()
{
    return requires(T x)
    {
        { x.foo(); } -> int
    }
}
Does that make sense?
 
@thecoshman I mean that that doesn't affect how travel from outside the British Isles works.
 
@thecoshman aye, you would think US security would at least tell you about prostate cancer after they've gotten done anal probing you
 
This question appears to be off-topic because it was asked 20 years too late. — Hans Passant 2 mins ago
rekt
 
@R.MartinhoFernandes that it does not.
 
12:23 PM
@Borgleader I don't like his style.
 
@AndyProwl Implicit virtual concept
 
@Puppy So pretty much what I wrote, right?
 
This is what my ID card looks like.
(Except it has my information instead)
 
You look nicer in the picture
ah
 
@R.MartinhoFernandes that looks nothing like you.
 
12:24 PM
@AndyProwl 'virtual concept'?
 
@Rapptz I'm working on a proposal
very early stage
 
TIL Robot is a girl
 
@LightnessRacesinOrbit good picture of red tape :P
 
Xeo
@LightnessRacesinOrbit Ah, gotta love 'em 3 interlocked gears!
 
12:26 PM
@Xeo chugga chugga chugga
 
@AndyProwl Would make more sense to have { x.get() } -> NameIt; in the original concept no?
 
Hah, just noticed.
 
@LucDanton Yes. But I need to come up with a general algorithm to turn expression requirements into an interface definition
 
That picture is from the official government page about the ID cards.
And the fictional? person in the card has a name that doesn't fit the rules.
 
@R.MartinhoFernandes you have rules on names?
 
12:28 PM
@thecoshman Full of exceptions, but yes.
 
hmm Windows keeps changing the language settings
 
@R.MartinhoFernandes o_0
 
Why is that surprising?
 
Ell
Hmm I need @lightness for train advice
 
I've travelled on a train too you know
 
12:29 PM
@R.MartinhoFernandes well... what sorts of rules?
@Puppy yeah, but he did say he wanted advice.
 
Ell
To get to Cheltenham Spa do I have to get the Bristol Temple meads train?
 
@thecoshman No Marias on a Tuesday.
 
@Ell you can do
 
@thecoshman AFAIK, number and a whitelist.
 
depends where you are coming from
 
Ell
12:30 PM
I don't understand trains :(
They only say their final destination on them
 
Bristol is south of Cheltenham, so it's not much use if you are coming from further south.
 
Ell
I'm from north
 
Cheltenham should be a named stop.
I often get Portsmouth train.
 
We have maps and route planners
 
use the national rail website.
it will tell you what the best route is.
 
12:32 PM
@Puppy Impressive :P
@Ell Ask me!
 
Ell
I mean you have a ticket telling you where you want to go but not what the train will say on it
I'll just get on a train at the right platform at the right timeb
Yeah I googled it its the Bristol one
Googles travel features are pretty awesome
 
@Ell That's what I usually do.
 
@R.MartinhoFernandes Are you trying to dissuade him? :P
 
What do your tickets look like
 
Ell
I've taken so many trains but I'm always nervous I'm on the wrong one
 
12:35 PM
They should have a train number on them at least
 
Ell
Especially in London
I'm sorted now anyway
But I'm sweating like a pig because I sprinted from two bus stops away needlessly :3
 
Twist: you were a pig all along
 
and he was sweating like a human before?
 
Ell
do pigs even sweat?
I bet they don't.
 
The plot thickens
 
@sehe your attempted answer at my operator-overloading question fell victim to the argument deduction does not consider implicit conversions trap. See my answer.
@R.MartinhoFernandes how can that photo be legal, I thought no smiling was allowed
 
It's a specimen, being not legal is a feature
 
@TemplateRex I notussed. It was good, because I wasn't aware (enough) of said trap
 
@Ell Because there are several routes to most destinations.
if you want to go from Weymouth to Dorchester, there's two lines and two destinations (Bristol and London) that will take you there.
 
Ell
Somebody is in my seat :3
Ah well.
 
12:46 PM
racist Nikons:
 
It would be more awesome if it recognized the same face ~10x
 
I remember seeing that image like 8 years ago.
 
@AndyProwl his style is - usually - to give excellent answers and otherwise keep shut. I like his style (AFAICT, not stalking all his activity though)
 
I like how Nikon is a Japanese brand.
 
@sehe He didn't shut up here. And he sounds arrogant in pretty much every comment.
 
12:51 PM
Should I do template<bool B, typename Description = /* default */> struct boolean; so you can go requires(…) -> boolean<(N < 5), struct fooable_array_bound>; if you want. Otherwise a diagnostic looks like static assertion "Condition was not fulfilled in instantiation of diagnose<boolean<false>, …>".
 
@AndyProwl Oh well. I don't mind arrogance if it's paired with that much helpful attitude
 
I do
 
You're wrong :) (that was the only stalemate breaking move :))
 
that's why I wrote I don't like his style, not that I don't appreciate his skills
 
12:54 PM
@LightnessRacesinOrbit the irony of that is rather amusing
 
What irony
 
@sehe So I'm wrong because I mind arrogance?
You can be skilled and nice, you know
 
@AndyProwl it would be impossible to appreciate his skills if we don't appreciate his style. I've learned - over time - to appreciate grumpiness and curtness as a side-effect of getting a glimpse of experience. But yeah, it's a trade really
hahaha. you took the bait. I tried to make it clear that was a joke :S
I had nothing more to say. Of course, opinions are always "right"
@AndyProwl Yes. Butttt (and that's a big buttt) I've yet to find the one who's not grumpy trying to tutor others. Especially when they try to have many apprentices. It's ok 1:1, or 1:n where n is a plausible number of "disciples".
@Mgetz It would be ironic if everyone had blinked in that particular frame
 
@sehe It is definitely possible, at least for me. I do appreciate and respect the skills of many people who, I believe, regularly behave like dicks
Doesn't mean I like their style
 
@sehe the situational irony of a Japanese company that can't handle Japanese faces is rather amusing to me, but I see your point.
 
12:59 PM
Best style
 

« first day (1446 days earlier)      last day (3518 days later) »