« first day (1686 days earlier)      last day (3267 days later) » 

3:00 PM
I dont think so :[
 
@Jefffrey I don't think saying that you know less than me is an insult. It might be viewed as rude, but I don't think it's an insult.
 
Don't make Jeffflon angry
 
Ven
@rightfold hey, can you come to statefold?
 
you know more than me about other things vOv and I didn't insult myself by saying that.
 
user1804599
@Ven no.
 
Ven
3:00 PM
@rightfold why not?
 
Ell
@BartekBanachewicz you're worse than me at programming
 
user1804599
I'm going home in 30 minutes and I have no IRC client on my work PC.
 
Ell
vOv
 
@BartekBanachewicz I'm not trying to be mean. I really hope that day will come. And it will make your life a whole lot better.
 
Ell
3:00 PM
Idk how you can not think that is an insult
 
@CatPlusPlus :9
 
You're horse than me at programming
 
@Ell it's bragging
 
Ven
@rightfold oke
 
I really didn't feel like offended by it
 
3:01 PM
@LucDanton I don't know how to do that on Coliru, sorry. But what do you expect to happen when I just remove the extern declaration? Fail to link? [temp.explicit]/10 seems to back my assumption, i.e. that explicit instantiation declarations simply prevent implicit instantiations.
 
@AndyProwl Well I tried it and GCC balked at it but I don’t want you to just take my word for it.
 
Yeah, I understand. Let me see if I can get it to work on Coliru
 
@BartekBanachewicz That's so not the point of why I'm angry. You saying that you might or are better than me has no meaning whatsoever to me. I just ignored that part. I thought it was a little bit condescending, but nothing more.
 
@AndyProwl For one, you can’t just remove the instantiation outright in the header. From main.cpp the definition is simply out of reach.
 
@Jefffrey well, what did annoy you so much then?
 
Ven
3:03 PM
@rightfold ...she seems to have taken a liking to (talking to) you, at least :P
that's amazing
 
user1804599
Screw you, guys. I'm going home.
 
And if you remove just the extern then the question is: what is being instantiated, since the primary template is only defined in hello.cpp?
 
Ven
@rightfold do you have green hair?
 
i hate cmake
 
user1804599
No.
 
3:03 PM
@LucDanton Why not? There's the implicit instantitation in hello.cpp. Maybe I have a wrong mental model caused by working with VC12 - assuming VC12 is not conforming
 
user1804599
I have brown hair.
 
i know kitware makes its money from its docs
 
Ven
Then you're not kaiba
 
@rightfold why not tho
 
c.geta() is not guaranteed to be called before c.getb(). P.S: getters that call cin are a sin. — Borgleader 50 secs ago
 
3:04 PM
but is the worst documented widely used project that i know
 
@Ted I felt punny today
 
user1804599
@ScarletAmaranth because nothing dyed it.
 
@BartekBanachewicz For example those "precisely" and "exactly" aimed at trying to make it look like I just made your point, while I was commenting how terrible your examples were.
 
and other kitware projects are similar..
 
3:04 PM
but I don't care: they're delicious
 
CMake is shit
 
Also I missed this:
27 mins ago, by Bartek Banachewicz
People pay me to explain things to them. I just wanted to do that to you because I consider you a friend.
Just wow.
 
Ven
I think that was pretty bad, yes.
 
@rightfold is that something you'd like to have done in the future (near of distant?!) :D
 
user1804599
haha XD
 
user1804599
3:04 PM
@ScarletAmaranth no
 
user1804599
I hate green.
 
Ven
that's pretty condescending
 
@Jefffrey wow indeed
 
that's pitty
 
@AndyProwl Because the definition is not here. There’s nothing to instantiate.
 
3:04 PM
@CatPlusPlus CMake is not shit, its syntax is pure poetry. It reads like a poem, it flows like a symphony
 
user1804599
Purple ftw.
 
How you doing up there on your high horse bartek?
 
it is consistent and logical beyond immagination
 
Ven
@MarcoA. ${JUst_No}
 
It reads like a poopem
 
Ell
3:05 PM
@Ven s/condescendent/condescending/
 
user1804599
horse-hung bartek
 
Ell
lol
 
Ven
@Ell thanks! (when in doubt, use the french word)
 
did I miss a Bartek vs X ??
 
Ell
@Ven No problem :)
 
3:05 PM
yup
round #41
 
Ell
Bartek vs The World
 
@rlemon ?- vs(bartek, X)
 
Ven
? I have nothing against Bartek
 
X = jefffrey.
true.
 
link to beginning?
 
3:06 PM
@Jefffrey Y U prolog :-\?
 
no flags, so I missed it
:P
 
Ven
@ScarletAmaranth prolog is cool :)
 
@Jefffrey Orite, that was the moment when you called my examples retarded I think and I might have lost it just a tiny bit.
@rlemon I didn't say anything flag-worthy this time
 
You mean your map<Object*, Object> example?
Are you serious?
 
@Ven since when? it's impossible to write anything longer than 300 lines in it
 
3:07 PM
It was just made to illustrate that the map is equivalent to a pointer.
 
You're both ridiculous nerds
5
 
Even if that was a vector, it doesn't change a thing
 
@BartekBanachewicz It really is not.
 
Ven
@ScarletAmaranth Windows NT's host thing used prolog, iirc
 
@LucDanton GCC accepts it too on Coliru, unless I've done something wrong: coliru.stacked-crooked.com/a/afb5baac2f42cd7a (this is the modified header)
 
user1804599
3:07 PM
Mercury > Prolog.
 
@Jefffrey you crafted a very specific solution that worked in a very specific context, but to which DI is a generalization.
 
@Ven Prolog is fine, but writing bigger programs is a PITA.
 
I mean, come on, RAM is a static map.
 
I was working with the example you crafted ad-hoc.
 
Prolog should be embedded.
 
3:08 PM
Remember?
 
Ven
@milleniumbug I wasn't arguing for that :P
 
Or do I have to quote you saying that?
 
1 min ago, by ScarletAmaranth
@Ven since when? it's impossible to write anything longer than 300 lines in it
 
This is going to our bot's commands definitely
 
@Jefffrey Yes. And you approached it from the wrong angle, which was I was trying to steer back.
 
user1804599
3:09 PM
@BartekBanachewicz RAM is a function from void* to char!
 
@ScarletAmaranth So what
 
@CatPlusPlus show them how nerdness is done
 
@ScarletAmaranth Prolog should be embedded
 
@rightfold you said before that map is a function
 
@BenjaminGruenbaum ??
 
Ven
3:09 PM
okay, the drama here is boring
see you later, alligator!
 
allocator
 
@AndyProwl Thanks, I’ll take a deeper look when I find the time.
 
user1804599
dramatic
 
@Jefffrey you made an implementation that was very specific and while solved the particular problem, didn't tackle the general one. I just made an example, but that one, specific example wasn't what was to be solved there.
 
Ok, let's try again. But this time, show me the simplest example of how, in Haskell, you can use a monad to express exceptions in a way that is not possible with something equivalent in C++ (assuming it had proper exception specifications).
 
3:10 PM
I miss lori
 
Then I'll reply.
 
red lorry yellow lorry
 
@Jefffrey Not trying again in this form, sorry. I am afraid it will work badly again. Instead, I'm writing an article.
 
(we never tried it like this).
3
 
help I agree with all the comments in a hackernews article
 
user1804599
3:11 PM
I'm also writing an article: the.
 
I'll try to get lori here
 
Fuck lori.
 
@LightnessRacesinOrbit OH MY GOD WHAT IS THAT THERE A HOT ROMANIAN SINGER?!
 
He'll come back soon enough.
 
user1804599
@AlexM. Michael Bolton is.
 
3:11 PM
should I... should I create a hackernews account
 
@Jefffrey this is p much what you suggested. I'll form my thoughts in a proper way, and you'll have an option to respond.
 
@Jefffrey well, it depends on what you mean by expressing an exception. The point of monads is that they abstract computation itself - so you can build something like exception handling (which haskell also supports) inside Haskell - that's very hard to do in C++, especially in a safe way.
 
fuck cmake
 
user1804599
cdestroy
 
i find in a stack overflow comment that targets like install and all are not available
 
3:12 PM
@BenjaminGruenbaum what I was trying to show is that monads are strictly more powerful than exceptions and that they can do more.
 
Who was I arguing with about Material Design being shit again?
 
to cmake scripts, so you cannot depend on them
 
@Jefffrey the nice thing about doing handling with algebraic data types (this isn't special in Haskell, it's also true in Rust and Swift and a bunch of other languages) is that you get to list out the alternatives - basically, think really powerful enums you can switch/case on easily and every enum value can be different. Want an example?
@BartekBanachewicz just because something is more powerful than something else doesn't mean much. That's like saying "a vector<T> is more powerful than T" - so what?
 
@BartekBanachewicz it's kinda like saying that newtonion physics is useless because it breaks when the speed is close to c
 
3:14 PM
@BenjaminGruenbaum If you have an example that can't be rewrote with equivalent functionality with exceptions (for example in C++ with proper exception specifications), yes please.
 
user1804599
Newton was wrong.
 
@rightfold but it's a useful special case
 
@BenjaminGruenbaum Maybe, but Jefffrey, I think doesn't agree with that. The whole "monads are more powerful" I mean, not what you can get out of it.
 
user1804599
Your physics are bad and you should feel bad!
 
they are :-\
 
3:15 PM
@BartekBanachewicz doesn't agree with what?
 
and I do :-\
 
user1804599
 
Bifurcate Killing Horizon of the Ads-Schwarzschild solution
:-\
 
@BartekBanachewicz Any Wrapper<T> is more powerful than T if you can access T through it - that's a pretty meaningless statement on its own.
 
I don't think monads are more powerful than exceptions at expressing error/exceptional cases in imperative languages.
 
3:16 PM
@Jefffrey Sure, let's take a classic, let's say you're making a web request - what are the possible return values of that? Let's say a Get /foo where it returns a json.
 
@BenjaminGruenbaum ^^
 
Ell
@rightfold he wa'n't that wrong
 
user1804599
@BenjaminGruenbaum response or error
 
@BenjaminGruenbaum Response Any JSON object I guess?
 
@Jefffrey right, response is parametrised, let's do Response<T> (where T is the decoded data), now how might a web request error?
 
user1804599
3:17 PM
@Jefffrey no.
 
@BenjaminGruenbaum Response is parameterize on what?
 
user1804599
A function for doing requests should not deal with JSON.
 
@rightfold One at a time.
 
user1804599
It should return response objects.
 
@Jefffrey it's a response object, the parameter is the return type - like a Response<YourObject> or Response<Json> or whatever.
But, what if the request fails? How can a web request fail?
 
user1804599
3:17 PM
It's called separation of concerns and is one of the fundamentals of software development.
 
Do you mean like Response<Text> as opposed to Response<JSON>?
@BenjaminGruenbaum With an exception.
At what level of abstraction are we in here?
 
Maybe, it's a response of some form of data, doesn't matter which in particular, personally I'd not parametrize the transport since that's part of the HTTP protocol. I'd parametrize what it can serialize as as Response<MyObject>
@Jefffrey right, what kinds of exceptional cases can occur?
 
user1804599
network connection lost, hostname not found, response is not a valid HTTP message, I/O error
 
@BenjaminGruenbaum Anything. Page not found, application error. Literally anything.
Depends on the application.
 
user1804599
404 Not Found and 500 Internal Server Error are valid HTTP responses.
 
3:19 PM
User not logged in.
 
@Jefffrey well, not anything, rightfold has a nice list, but basically your request format can be wrong, or the network failed or so on.
 
Temporary server error.
@BenjaminGruenbaum Ok, so what?
 
Now, forget monads, let's talk about enums when you make a request what do you want the return type to be?
 
At what level of abstraction?
 
Return type, as in int :D
 
user1804599
3:20 PM
optional<error> request(in request, out response); :3
 
Personally, it would be really great to be able to say it's either a web error (with how the network failed), or a request error (what did I specify wrong), or if it's a result I want to access its type.
 
Yes, in what level of abstraction?
 
The sixth one
 
It could be really nice to be able to say that a request method returns a Response T or a NetworkError Code or a FormatError reason and so on.
 
3:21 PM
@BenjaminGruenbaum Ok, then you can have two exception types for those two erroneous cases and a simple Response type.
 
It would be really nice to be able to return an enumeration of the possible outcomes - since we agree there is no single outcome.
 
Ok, then say you have your function action, you can specify it with: response action(...) except (format_error, network_error) or something along those lines.
 
Now, in C++ and other languages - you'd use exceptions or sentinal return values - but wouldn't it be nice if C++ let you return a type that allows you to specify that it fails with one of those scenarios?
I'm not saying exceptions are bad by the way.
 
user1804599
It does.
 
user1804599
boost::variant.
 
3:23 PM
@rightfold pfft, I'm getting there.
 
I think you might be missing the point that Bartek was trying to make
 
are you really taking that long to explain that sum types are useful @BenjaminGruenbaum ^^?
 
He was claiming that you can express certain things with monads that you can't express with exceptions.
 
@ScarletAmaranth yes, I was trying to avoid calling them sum types or mention boost::variant but you guys are ruining it :v
 
Ell
@Jefffrey I think he's getting there
he is starting from first principals
 
user1804599
3:24 PM
One thing that's hideous with exceptions is signalling multiple errors at once.
 
@Jefffrey well, let's skip there if you want.
 
@BenjaminGruenbaum Personally, no. I think that return values are for successful results.
@BenjaminGruenbaum Just make an example.
Like on coliru or something.
 
an example of what? Using monads in C++ to do something exceptions can't? That's easy.
What about asynchronous actions? Let's say your web request isn't blocking.
 
Using monads in Haskell, to do something exceptions can't in a language like C++ with proper exception specifications.
 
Exceptions can't be burritos
 
3:26 PM
@BenjaminGruenbaum I’m honestly more fond of open exceptions in general. For things like system-programming, then sure close the world.
 
user1804599
Use Boost.Coroutine and exceptions.
 
You want to make a non-blocking web requests - where would the exceptions even be thrown?
 
@Jefffrey Exception specifications in C++ don't work
 
@Jefffrey haskell has exceptions.... just for the record.
@rightfold what are you yielding in boost::coroutine?
 
P sure they're deprecated now
 
3:26 PM
@BenjaminGruenbaum Haskell exceptions are terrible and we all agree about that.
 
Except for noexcept
 
@Jefffrey I'm not saying they're good. People don't use them because they suck :D
 
Ell
@LucDanton why close for system programming?
 
@BenjaminGruenbaum We are not comparing exceptions vs monads in Haskell.
 
@Ell Verifiability
 
3:27 PM
But, back to an asynchronous error case @Jefffrey , let's say you have a function that needs to make an async web request.
 
@milleniumbug Sure they can. In fact, now that you mention it, I think I might eat an exception or two for lunch today.
 
We are comparing the exception model vs the monad model for error handling.
 
@Ell It’s already what we do anyway.
 
@BenjaminGruenbaum I'm not too familiar with asynchronous stuff. But ok.
 
@Jefffrey What would the return value be? It needs to signal an error some how asynchronously.
 
3:27 PM
exceptions are painful to express with indirect denotational semantics :-\
 
@Jefffrey well, you asked for a simple example of where exceptions don't work - if you need to throw in another context and do it asynchronously they don't work.
 
From what I know you can throw the exceptions in any asynchronous function and it will be rethrown when you join.
 
You'll be throwing in some event loop - in platform code.
 
Or when you try to get the future value of something.
 
@Jefffrey not talking about threads.
Talking about non-blocking operations in general.
 
3:28 PM
That's not really specific to threads
 
No idea what those are.
 
Ell
@Jefffrey remember asynchronous != running in a different thread
 
Typically, you want some form of future or promise.
 
@Jefffrey well, what most languages do is include a type that represents a future value like Task in C# or Future in Scala.
 
3:29 PM
yes, everybody typically wants some form of future, or at least a promise of future!
 
Those types are often monads, when they're not they're typically monadic. (As in, have a monadic bind operations).
 
Ok, go on.
 
that's why you don't throw in a Promise, but you call fail?
 
Now, assuming this doesn't sound like mumbu jumbu - coroutines hook on that and "pump" a generator to allow you try/catch syntax.
 
I see a monad in your future
 
3:30 PM
@BartekBanachewicz in JS you can throw in a promise - but type-system wise it's a clusterfuck.
 
@BenjaminGruenbaum I see.
 
May 26 at 10:28, by Xeo
$ rm -rf /
<error about recursive operations on root>
$ fuck
rm -rf --no-preserve-root /
<ded>
 
@Jefffrey well, since they're async, they require an abstraction on calculation itself - a monad if you will.
 
@BenjaminGruenbaum That’s oxymoronic.
 
@LucDanton why?
 
Ell
3:31 PM
I thought monads were necessarily monadic
 
@BenjaminGruenbaum Yeah, you lost me there.
 
Ell
I thought monadic just mean "is a monad"
 
@Jefffrey You need a way to say "when a future is ready - execute the next chain of actions"
 
@milleniumbug lol, I just spotted it in the list of recently updated Arch packages.
 
@BenjaminGruenbaum They’re monads or not. If they aren’t, no need to make excuses. Pick the right notion to describe what they, in fact, are.
 
3:32 PM
@rubenvb Thankfully not enabled by default (the rm -rf fixup)
 
@BenjaminGruenbaum By "chain of actions" you mean the rest of statements after your get the future?
 
@LucDanton has a property monads have. As in - it has a bind but the type signature is a little bit different, or abides all monad laws but with a little adjustments. For example in JS the bind of promises (called then) flat-maps or maps based on the return value so they're not a monad really - but if you only pass it the type it'd expect as a monad it's work like you expect.
@Jefffrey yes, you typically want to perform more than one asynchronous action - like "get a handle for the db, execute query, make web request based on query, return response"
 
@Ell a monad is an interface. when you don't have bind, you can hardly call something monadic.
 
So you need a way to chain actions, and you want to handle failures. A monad bind is exactly that - it's "unwrap the value (when it is ready), process it, and then wrap it again in another one".
 
@BenjaminGruenbaum Do you by any chance have an example that do not involve coroutines and asynchronous stuff? If you don't I can try to keep up, but in general it sounds like a waste of time, because I probably don't have enough knowledge in the field to respond appropriately.
 
3:34 PM
@BenjaminGruenbaum You can call it bind if you want but don’t call the type (or type constructor) a monad. It doesn’t help understand.
 
@Jefffrey forget about coroutines, let's ignore that. Let's just stick to futures. Are you familiar with callbacks?
 
'int is floating-pointic in that it has floating-point operations except not.'
 
@BenjaminGruenbaum Ok, then you can wrap all of that in a try block and then handle the case in which any of those throw an exception.
 
@LucDanton I'm not, I'm saying it has some properties of a monad.
 
I give that Luc has half of a point.
Benji has the other half.
 
Ell
3:35 PM
@BartekBanachewicz I don't see your point
 
30 secs ago, by Benjamin Gruenbaum
@LucDanton I'm not, I'm saying it has some properties of a monad.
 
@Jefffrey right, except your callback code doesn't run inside the try, it's executed later at some point on another call-stack.
 
@BenjaminGruenbaum My point exactly. int has some properties of a floating-point type <- entirely unhelpful.
 
for something to be a monad, it needs to fulfill the whole interface
 
Ell
3:35 PM
@BartekBanachewicz right that's what I thought
 
Now that is stupid.
 
Ell
4 mins ago, by Ell
I thought monadic just mean "is a monad"
 
@BenjaminGruenbaum Ok, when do you need the value of that asynchronous task?
 
@LucDanton right, in that example it's entirely unhelpful.
@Jefffrey when it is done, at which point a callback (passed function argument) will execute.
 
3:36 PM
@Ell what he meant I think is that the thing we're talking about could be given a monadic interface, but, well, isn't.
 
@BenjaminGruenbaum I thought you had a future.
Now we have callbacks?
 
.done(cb)
 
Ell
@BartekBanachewicz I think so too
 
@Jefffrey I thought you didn't understand what futures are, but let's say you have a future and your way to gets its value is to bind to it and access the value.
 
Can you please make a quick example on coliru?
 
3:37 PM
This is similar to io in haskell.
 
@Jefffrey Next thing you are married.
 
@BenjaminGruenbaum don't go there
 
I don't thing std::packaged_task does this sort of chaining yet.
I can make a quick example in JavaScript if you want :P
 
@StackedCrooked He he
@BenjaminGruenbaum Not familiar with Javascript, but go ahead.
 
@BenjaminGruenbaum do it, I'll steal it for my article :3
I'm writing an impl of Exception monad
 
3:38 PM
in brainfuck
 
jumping between JS and Haskell
 
@Jefffrey can you read this real quick? stackoverflow.com/questions/14220321/…
 
How long before Google just becomes the internet
 
not long, then
 
Ven
3:42 PM
androidpolice.com/2015/05/28/… thanks CLion, I guess.
 
@BenjaminGruenbaum you should be a teacher for special kids; if you were to explain derivatives, you would start with the way addition works :P
 
Ell
why didn't CLion just use clangggggg
 
Describing a type (or type constructor yadda yadda) as 'monadic' or 'it has a bind' is not that helpful. There are very few operations on monads anyway, and sooner or latter what matters are the semantics of the bind.
 
Did clang implement exceptions on Windows yet
 
@ScarletAmaranth I don't think Jefffrey is being hard or slow here. I think explaining something poorly to someone and then being angry that they don't understand it is stupid. Probably everyone in this room could teach me tons about a field I know less than them about. I have no illusion of being better than Jefffrey.
 
3:45 PM
@BenjaminGruenbaum oh, it wasn't meant to be offensive to either you or @Jefffrey
 
The real solution is to not explain anything to anyone
 
I am just "making fun of" your way of going about things
I actually think it's a pretty good way
 
@Ell What does it use?
 
Ell
@Prismatic its own thing
 
3:46 PM
@LucDanton I disagree, I've found that showing promises as monads is extremely helpful to people who know what monads are. Promises are monads if you change one simple thing. I call them monadic because they abstract the notion of chaining operations - that's the point of monads. Whether they have the same type signature or for example also allow you to return a plain value instead of doing return everywhere doesn't take that from them.
 
Ell
I thought monads only had 2 operations
 
What are we talking about here? What did you want CLion to use clang for?
 
@BenjaminGruenbaum I know what monads are.
 
@BenjaminGruenbaum (after having read the answer you posted and having seen your round-about-ing to sum types :P)
 
Ell
3:46 PM
bind, return and 3rd one?
 
@LucDanton I know you know what monads are. I was making a point for saying stuff is monadic even if it's not monads.
 
@BenjaminGruenbaum FTR I wasn't angry at anyone.
 
Bind/join, unit, and the type itself
 
@Ell well, there is technically no bind; there is join, return and fmap
 
@BartekBanachewicz I didn't say you were.
 
3:48 PM
Bind and join formulations are equivalent
 
@ScarletAmaranth Hey I'd love to have such a teacher!
 
Ell
well I'm gonna get back to physics
have fun
 
@CatPlusPlus they are isomorphic, but far from equivalent; you need fmap and join to get a bind
 
@ScarletAmaranth It’s customary for the definition to start with a functor.
 
@LucDanton yeah - quite ironic that they "forgot" originally and now we're stuck with broken code because they fix shit retroactively
 
3:49 PM
Haskell's not really relevant
 
says who?
 
@ScarletAmaranth CatPlusPlus, keep up.
 
@LucDanton silly me
 
The monad discussion started from 'promises are monad(ic)', no point bringing Haskell in
 
3:51 PM
my little your pony
 
Back
 
Did you read it?
 
@BenjaminGruenbaum Ok
@ScarletAmaranth lol
 
I have to go in like 2 minutes.
 
so do i!
we're like twinsies
 
3:52 PM
@BenjaminGruenbaum Well, then let's make it another time.
 
@Jefffrey sure, feel free to ping me, I do think chaining futures is a convincing use case for monadic error handling since standard exceptions are impossible to do in that scenario.
 
@BenjaminGruenbaum Do you have the code anyway?
Like the example.
Or is it in the question?
 
@Jefffrey sure, anything that chains 3 asynchronous calls. Lemme make one quick one:
 
Oh I see. then calls the callback whenever the response is ready, which can be anywhere.
Is that it?
 
Yes, exactly
 
3:55 PM
And you are claiming that that would mean that the exception could throw anywhere, is that right?
 
 fetch("/api").then(function(body){ // make async request
     return body.json();// async read the body as json
 }).then(function(json){
     if(!json.foo) throw Error("bar");
     return fetch("/someOtherApi?foo=" + json.foo);
 }).then(function(resp2){
     return resp2.body();
 }).then(function(final){
    console.log(final);
 });
 
.catch(function(err) {

});
 
.jabba
 
@BenjaminGruenbaum Hey, that's the thing
 
@BenjaminGruenbaum Ok, and what's the behaviour if the Error is thrown?
 
3:59 PM
That was so simple after all
 
@Jefffrey you can .catch it at the end of the chain and handle it globally - just like in exceptions:
 
@Jefffrey he omitted the .catch, iirc the latter .then()'s will not hit and you jump to the catch
 
Ok, so what's your point then?
 
.catch(function(err){
    // handle error in any step here
})
That you got exception - like error handling that wasn't possible with exceptions by using promises.
 

« first day (1686 days earlier)      last day (3267 days later) »