00:21:56  * cloudshujoined
00:28:17  * jwaldenquit (Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805])
01:05:50  * AtumTquit (Remote host closed the connection)
01:17:13  * keith_mi_joined
02:13:35  <ljharb>not just on stack traces (pygy left tho)
03:14:39  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:44:32  * jmdyckquit (Remote host closed the connection)
06:35:52  * keith_mi_joined
06:44:21  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:00:01  * keith_mi_joined
07:46:42  * keith_mi_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:50:58  * cloudshuquit (Quit: Connection closed for inactivity)
10:25:08  * MylesBorinsquit (Quit: farewell for now)
10:25:38  * mylesborinsjoined
10:36:48  * howdoijoined
10:38:19  * keith_mi_joined
11:38:58  * jmdyckjoined
12:10:42  * shachafquit (Ping timeout: 255 seconds)
12:12:24  * gibson042quit (Quit: Leaving.)
13:02:12  * keith_m__joined
13:07:08  * annevk_joined
13:11:08  * keith_mi_quit (*.net *.split)
13:11:08  * annevkquit (*.net *.split)
13:11:10  * annevk_changed nick to annevk
13:25:03  * howdoiquit (Quit: Connection closed for inactivity)
13:53:38  <JaseW>Would love to hear what people think about this https://github.com/jasonwilliams/proposal-promise-allSettled
13:55:49  <devsnek>apis that eat rejections make me nervous
13:56:04  <devsnek>but i like the general idea
13:57:36  <devsnek>i also like Maybe, i actually have my own js implementation
13:57:58  <devsnek>i don't think it represents the true "js way" though
14:17:26  * AtumTjoined
14:40:26  * keith_m__quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:06:41  * keith_mi_joined
15:08:10  * jwaldenjoined
15:57:49  * howdoijoined
16:32:49  * jdalton_joined
17:31:31  * cloudshujoined
17:58:16  * shachafjoined
18:25:06  * srl295joined
18:36:16  <ljharb>devsnek: what would?
18:36:27  <ljharb>imo a Maybe is like a Promise, just async
18:36:40  <ljharb>(also it's probably pretty similar to WeakRefs in terms of the API)
18:54:06  <devsnek>ljharb: what would what?
18:54:36  <devsnek>you mean what is the true js way?
18:54:58  <devsnek>a variable can already represent an empty value by being undefined
19:02:49  <devsnek>the only reason a promise exists is to provide a form of notification and flow
19:05:13  <TabAtkins>JaseW: +1 to this, I keep thinking about using Promise.all() for some relevant case and forgetting that it bails on the first reject.
19:05:43  <TabAtkins>ljharb: You mean "just sync", right?
19:05:53  <devsnek>i assumed he did
19:06:08  <TabAtkins>devsnek: Unless `undefined` is a valid value for your domain, such as in Map.get().
19:06:33  <TabAtkins>The value of Maybe is giving a single always-valid way to represent a missing value, regardless of the value-space you might be fetching from.
19:06:41  <devsnek>there's obviously some wiggle between the meanings of null and undefined in a project
19:08:30  <devsnek>you might like this https://github.com/devsnek/ivan/blob/master/test/Maybe.js#L26
19:10:02  <TabAtkins>Why that line in particular?
19:10:51  <devsnek>your point about an always-valid way to represent a missing value
19:11:30  <TabAtkins>Right, but why *Line 26* in particular? Or was that just an accidental line highlight?
19:11:54  <devsnek>nah i just thought it was a funny way of implementing that behaviour
19:12:35  <TabAtkins>Oh, of detecting the difference between "called with 1 `undefined` argument" and "called with 0 args", yeah.
19:13:21  <devsnek>thats one thing that makes me sad about default args
19:13:28  <devsnek>but i guess it makes sense if you have multiple arguments
19:13:34  <TabAtkins>Nah mang, we absolutely made the right choice for default args.
19:13:39  <devsnek>lol
19:13:51  <TabAtkins>Otherwise pass-thru is *very* annoying.
19:18:28  <devsnek>whatwg usually does what i would expect with return values
19:18:44  <devsnek>like headers.get('non existent name') returns null
19:24:07  <JaseW>@TabAtkins thanks
19:25:19  <devsnek>do we call a resolved promise resolved or fulfilled, officially
19:26:43  <TabAtkins>Fulfilled.
19:26:59  <TabAtkins>"Resolved" can mean it's still chained to another (unresolved) promise.
19:27:12  <devsnek>hmm
19:27:38  <TabAtkins>The "resolved" state just means that it's closed to updates; calling either of the promise-constructor callback args won't do anything any longer.
19:27:59  <devsnek>but for the promise at the end of the chain then
19:28:13  <devsnek>resolved and fulfilled should be equivalent?
19:28:39  <TabAtkins>No, it might be rejected.
19:29:05  <devsnek>how can it be resolved and rejected
19:29:28  <TabAtkins>A "resolved" promise can be "fulfilled", "rejected", or chained to another promise.
19:29:53  <devsnek>but if its already closed how could it reject
19:30:01  <TabAtkins>The chained promise rejects.
19:30:16  <TabAtkins>Promise.resolve(Promise.reject("lol")) returns a resolved, rejected promise.
19:30:30  <devsnek>lol indeed
19:30:44  <devsnek>i guess i need to update the terminology i use
19:32:59  <TabAtkins>Yeah. ^_^ Promises are either "pending", "fulfilled", or "rejected". Separately, they can be "unresolved" or "resolved". An unresolved promise is always pending, but a resolved one can be any of the three states, depending on what it was resolved to. The two sets of states unrelated.
19:33:50  <devsnek>brb going back to callbacks :P
19:34:42  <TabAtkins>Oh, jumping back a sec, DOM APIs traditionally return `null` from anything, because `undefined` is hard to specify as a return value in WebIDL for legacy reasons (it doesn't exist in Java).
19:38:15  <zkat>do we have a standard template for slides for committee?
19:40:32  <Bakkot>zkat: nope, everyone rolls their own
19:40:47  <TabAtkins>Back to Promises, the states can be somewhat confusing, since we only ever offer the resolved/reject pair of functions (either as Promise statics, or passed to the constructor callback). This is because of the auto-flattening that Promises are specced to do; you're *not allowed* to fulfill a Promise with a Promise (but you are allowed to *reject* with one). Thus, the only promise we can make when giving a Promise a value is
19:40:48  <TabAtkins>that it's "resolved"; if you happen to give it a promise value it can be any of the three states.
19:41:07  <TabAtkins>(I think Domenic called the pending/fulfilled/rejected trio "states" and unresolved/resolved "fates"?)
19:41:13  <Domenic>Indeed
19:41:20  <Domenic>https://github.com/domenic/promises-unwrapping/blob/master/docs/states-and-fates.md
19:43:51  <devsnek>it terrifies me that "something something java" is a reason for behaviour in js
19:44:07  <devsnek>good gist though
19:44:43  <zkat>probably no need to terrify you, per se. Java made its own design choices, is massively widely used, and does, in fact, have some good designers behind it, even if the language style isn't the type I go for :)
19:45:12  <devsnek>to clarify: it imposing a limitation
19:47:55  <TabAtkins>Yeah, pretending that charting a course thru the intersection of syntaxes and capabilities is the terrifying bit, and is the reason so many of our older DOM APIs are terrible.
19:48:14  <TabAtkins>*pretending it's a good idea to chart
19:55:04  <devsnek>we need to have a y2k for js
19:57:03  <devsnek>just get the world to update all the js code
20:06:34  <ljharb>TabAtkins: oh yes, sorry, just sync
20:07:40  <ljharb>the whole issue is that you can certainly pick any sentinel value for the "no" path, but there's no One True Sentinel Value you can pick because needs vary (even if it was a symbol). so you need some kind of wrapper. then the question is, do you have a struct (object), tuple (array), or a type (Maybe/Option/etc)?
20:08:03  <ljharb>a tuple is likely confusing because there's no naming, so struct > tuple imo, but a type seems much cleaner than arbitrary objects.
20:08:20  <ljharb>altho maybe with `protocol`, a struct that implements a well-known protocol would suffice
20:08:35  <TabAtkins>Yup. Tho note that Result is the sync version of Promise, not Maybe. 😀
20:09:20  <ljharb>ok sure, Result
20:09:22  <ljharb>:-p
20:09:42  <ljharb>i just mean more, a synchronous type that holds *any* value in its yes or its no path
20:27:51  <devsnek>what is this capital-r Result you mentioned
20:30:43  <Bakkot>a Result is either a Success with an associated value or an Error with an associated error object
20:34:46  <devsnek>where does it come from though, it's not exactly googlable
20:39:30  <Bakkot>uhhh no idea where it was popularized
20:39:35  <Bakkot>Rust has it in the stdlib
20:40:14  <rkirsling>think that's also gets called an Either
20:40:18  <rkirsling>*that
20:40:40  <Bakkot>yeah, it's just an alias for either which specifies which side is what
20:45:03  * jschoi_joined
20:45:17  * jdalton__joined
20:45:25  * gskachkov_joined
20:45:57  * zkat_joined
20:53:21  * jdalton_quit (*.net *.split)
20:53:25  * jschoiquit (*.net *.split)
20:53:25  * zkatquit (*.net *.split)
20:53:25  * gskachkovquit (*.net *.split)
20:53:26  * jdalton__changed nick to jdalton_
20:53:26  * jschoi_changed nick to jschoi
20:53:29  * gskachkov_changed nick to gskachkov
20:53:48  * zkat_changed nick to zkat
20:55:54  * vikash-afkquit (Ping timeout: 260 seconds)
21:00:47  * vikash-afkjoined