00:00:35  * mattijsquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:18:24  * mattijsjoined
00:45:03  * mattijsquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:02:07  * caridyjoined
01:22:19  * caridyquit (Remote host closed the connection)
01:24:07  <TabAtkins>jschoi: Wonderful reply in the pipelines thread. Very adroit handling, and good reasoning.
01:24:57  <TabAtkins>(I opened a similar issue against the proposal in GH, but your response is more eloquent than mine. ^_^)
01:26:00  * AtumTquit (Remote host closed the connection)
03:01:42  * mattijsjoined
03:30:06  * mattijsquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:11:31  * howdoijoined
04:35:47  * jmdyckquit (Remote host closed the connection)
04:38:14  * leobalterjoined
04:44:13  <jschoi>TabAtkins: Thanks! My other reply was posted before I saw either of your replies, but thank you for adding on in that thread!
04:47:15  <jschoi>I appreciated it very much.
04:52:41  <jschoi>I see your issue now. That’s an interesting coincidence…though I suppose it’s not coincidental, since it really is an issue. Your ideas of pipeline operators for functor mapping and [monadic?] binding and chaining are very interesting.
04:53:03  <jschoi>In https://github.com/TheNavigateur/proposal-pipeline-operator-for-function-composition/issues/9#issuecomment-372467776, that is.
05:21:54  <jschoi>…Also, for some reason, ESDiscuss.org’s formatting engine keeps turning my “Warm regards” valediction into “Warm”. It’s pretty funny. I tried hyphenating it to “Warm re-gards”, and *that* didn’t get affected. How funny.
05:25:05  <Domenic>It tries to remove all redundant salutations and sign-offs
05:25:49  <jschoi>Hah, so it’s intentional. Nice.
05:39:57  * jwaldenquit (Quit: ChatZilla 0.9.92-rdmsoft [XULRunner 35.0.1/20150122214805])
07:09:37  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:17:45  * srl295quit (Quit: Connection closed for inactivity)
09:16:32  * keith_millerjoined
10:13:58  * not-an-aardvarkquit (Quit: Connection closed for inactivity)
10:25:10  * mylesborinsquit (Quit: farewell for now)
10:25:41  * mylesborinsjoined
10:46:03  * AtumTjoined
12:36:06  * jmdyckjoined
12:45:12  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:27:23  * atticoos_joined
14:01:43  * caridyjoined
14:03:20  * caridyquit (Remote host closed the connection)
14:03:35  * caridyjoined
14:06:17  <TabAtkins>jschoi: Yeah, ultimately mapping/chaining after just alternate ways of calling a function on a value, and pipeline just happens to be the first function-call operator we have.
14:06:58  <TabAtkins>But also it would incidentally basically give us Haskell's do-notation, which is interesting.
14:08:04  <TabAtkins>Would have to give some thought to whether mixing in arrow functions would give you the "bind a value for later in the chain" functionality; I think it will.
14:21:49  * gibson0421quit (Ping timeout: 260 seconds)
14:37:18  * gibson042joined
15:00:57  * leobalte_joined
15:03:38  * keith_millerjoined
15:21:27  * atticoos_quit (Ping timeout: 240 seconds)
15:22:38  * mattijsjoined
15:29:17  * atticoos_joined
15:32:33  * howdoiquit (Quit: Connection closed for inactivity)
15:51:59  <jschoi>It’d be cool if it could be generalized to Kleisli composition with arrows. There are powerful concepts a developer can use, such as foldables, transversables, and lenses, to get things like Clojure transducer–like functionality. Those in turn could abstract the processing of plural items (mapping, filtering, taking, partitioning, reducing, deduplicating) from many kinds of plural structures…perhaps even for both
15:52:00  <jschoi>push and pull async plural structures like WHATWG Streams and Observables. But it’s a broad problem, and it’s one that’s way out of the current scope that we’re trying to address with singular-value pipelines, which have clear use cases today…but maybe someday.
15:52:20  * jwaldenjoined
15:53:34  <jschoi>Looks like some people already floated the idea for Kleisli composition such as in https://github.com/TheNavigateur/proposal-pipeline-operator-for-function-composition/issues/3#issuecomment-334079726.
16:14:07  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:18:37  * keith_millerjoined
16:19:05  * caridyquit (Remote host closed the connection)
16:19:39  * caridyjoined
16:26:55  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:27:05  * leobalte_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:28:37  * mattijs_joined
16:29:41  * mattijs__joined
16:29:50  * mattijsquit (Ping timeout: 276 seconds)
16:32:27  * mattijs__quit (Client Quit)
16:32:46  * mattijs_quit (Ping timeout: 246 seconds)
16:36:05  * mattijsjoined
16:39:17  * cloudshujoined
16:52:16  * mattijsquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:58:23  * mattijsjoined
16:59:17  * mattijsquit (Client Quit)
17:03:13  * mattijsjoined
17:10:04  * keith_millerjoined
17:15:14  * mattijschanged nick to mattijs[away]
17:16:15  * mattijs[away]quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:26:19  * mattijsjoined
18:03:15  <devsnek>we should just implement `'use closure'`, its pretty clear that's where the future is anyway :D
18:14:58  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:16:59  * atticoos_quit (Ping timeout: 256 seconds)
18:39:42  <TabAtkins>jschoi: Strongly agree! Kleisli composition is *so useful*, and with a pipeline operator in place, it can be done very easily in userland, as that post demonstrates - with your syntax ,it's `x |> #.then(func)`. It's probably good to make this cleaner in the future with some blessed kleisli promotions, as I mentioned - I don't think we need a new pipeline form, but rather a keyword operator. Like, `x |> map func` could
18:39:43  <TabAtkins>desugar to `x |> #[Symbol.map](func)`, or similar.
19:01:28  <ystartsev>hello everyone
19:01:43  <ystartsev>i made a survey for developers not involved in the tc39 to better understand how people see our resources
19:01:44  <ystartsev>https://tinyurl.com/tc39-dev-survey
19:02:17  <ystartsev>its really basic -- but its a starting point, please share if you see fit
19:02:21  <ystartsev>or fill it out even!
19:03:34  * keith_millerjoined
19:37:31  * leobalterchanged nick to leobalter_znc
19:59:24  * mattijschanged nick to mattijs[away]
20:03:15  * mattijs[away]quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:08:04  * mattijsjoined
20:09:19  * not-an-aardvarkjoined
20:18:18  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:20:37  * keith_millerjoined
20:21:28  <TabAtkins>jschoi: Ooof, reading thru that thread is somewhat painful, as there's a lot of confusion about how piping/containers/mapping works.
20:22:38  <TabAtkins>Best idea really is to just rely on Kleisli arrows, which use normal function-call semantics. With, as I said, maybe some keyword operators to help with the common promotions of map/then and chain/bind.
20:23:38  <jschoi>Yeah, that’s a really promising idea.
20:25:47  <jschoi>TabAtkins: I would be really interested in hearing the use cases you have in mind. Let me know.
20:26:01  <jschoi>Sometime, that is.
20:27:55  <TabAtkins>Well there's the obvious of chaining promises or iterators. Promises have the cheat of using "await", but iterators don't.
20:28:36  <TabAtkins>Or Maybes, or Results, or Streams...
20:29:24  <devsnek>surveys you opt into aren't statistically sound :D
20:29:35  <TabAtkins>But topic-form at least means we don't *need* any syntax for now anyway; any chaining we want to do can be done manually without too much difficulty.
20:30:01  <TabAtkins>Iterators will require us to finally define .map() on iterators, or else require the users to spread into an array, but still.
20:32:20  <devsnek>ystartsev: i filled it out :)
20:32:34  <devsnek>sending to people
20:32:43  <TabAtkins>`range(5) |> [...#].map(times3)` would yield `[0, 3, 6, 9, 12]`. If iterators had map, `range(5) |> #.map(times3)` gives an iterator that does the same.
20:33:56  <TabAtkins>`mightFail() |> #.then(moreStuff)`, same for options.
20:34:13  <TabAtkins>Any of the various options for mapping/chaining streams work the same.
20:34:30  <devsnek>i would post the survey on the discord reactiflux server but i'd probably get banned for advertising
20:34:49  * leobalterjoined
20:35:02  <TabAtkins>`eventStream(el, "mousemove") |> #.map(+> console.log)`
20:35:31  <jschoi>TabAtkins: The problem is general: the problem of so many “plural” structures having different ways to process their items in similar ways. Arrays, Sets, Maps, promises, iterators, async iterators, observables, streams, and whatever else from https://github.com/kriskowal/gtor—and even other abstractions—all need similar functionality of mapping, filtering, partitioning, reducing, deduplicating,
20:35:31  <jschoi>taking/leaving/slicing, and so forth.
20:36:07  * leobalter_zncquit (Disconnected by services)
20:36:09  <jschoi>Clojure’s transducers approach it in one way: being basically the Kleisli category of the Haskell type `[]`, except they isolate themselves into stateful functions that transform reducer functions. They’re pretty elegant. I had been planning on prototyping ways to reconcile them with both push and pull async plural (and therefore reducible) structures.
20:36:33  * leobalter_fancy_joined
20:37:18  <jschoi>Now lately I’ve been working on pipelining, but your ideas of extending pipelines to more abstract compositions make those old plans more relevant…
20:38:07  <TabAtkins>Given the ease with which topic-form allows invoking whatever kleisli-upgrade you want, I don't think we need to worry about it right now. Wait and see what the community figures out.
20:38:11  <jschoi>Things are both simpler and more complicated due to JavaScript’s being impure and able to close over state, of course.
20:38:26  <devsnek>it would be if you could pipe the yielded values of an iterator
20:38:27  <TabAtkins>*Maybe* worthwhile to standardize map/ap/chain, but probably not.
20:38:28  <jschoi>Yeah. I want to wait more for the cowpaths to happen.
20:38:34  <devsnek>i guess +> could be used for that?
20:38:59  <Bakkot>we should get first-class protocols and then standardize map/ap/chain
20:39:00  <jschoi>`+>` can be used as a callback for processing singular values, but you still need a higher-order function.
20:39:03  <TabAtkins>devsnek: Nah, until we add a map method to iterators, you can't easily pipeline into iterators.
20:39:18  <TabAtkins>You can write a trivial function that does so, of course, and then use +> to make it easy.
20:39:26  <jschoi>Transducers are also nice because they prevent unnecessary allocation.
20:39:32  <TabAtkins>`iterRange(5) |> iterMap(#, cb)`
20:39:38  <jschoi>Because what they create are new reducer functions.
20:39:53  <jschoi>So those reducer functions pull only as much as they need, and only at the end is a new structure created.
20:40:13  <TabAtkins>where iterMap is just `*(it, cb) => { for(val of it) yield cb(val); }`
20:40:15  <jschoi>That is, they solve the problem of `bigArray.map(f).filter(g)` creating large unnecessary arrays.
20:40:54  <jschoi>I would want a general solution to be able to deal on a folding/reducing level. Lenses, arrows, transducers, whatever; they’re pretty similar, and it’s easier in many ways in an impure imperative language like JavaScript.
20:41:10  <devsnek>iterator.foreach?
20:41:55  <jschoi>There’s no Iterator global object or iterator prototype.
20:41:59  <TabAtkins>foreach probably *also* useful, but we need map for this case. ^_^
20:42:16  <jschoi>First-class protocols with well-known symbols, perhaps. Or built-in modules if those ever become a thing.
20:42:40  <jschoi>But I would want it to be done on the right level of abstraction.
20:42:52  <devsnek>official javascript fp iterator utils confirmed ;)
20:43:00  <TabAtkins>Yup. So let's just keep it in mind, and not try to address it right now - topic-form is good enough. ^_^
20:43:04  <jschoi>Wait for the cowpaths, I guess.
20:43:48  <jschoi>In the meantime, each structure can offer its own bespoke API, and that’s okay for now.
20:44:08  <jschoi>Smart pipelines will help them either way.
20:44:11  <jschoi>Or whatever pipelines.
21:30:25  * mylesborinsquit (Excess Flood)
21:30:46  * mylesborinsjoined
21:39:06  * cloudshuquit (Quit: Connection closed for inactivity)
21:52:51  * atticoos_joined
21:54:48  * keith_millerquit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:57:23  * keith_millerjoined
22:02:36  * mattijs_joined
22:04:13  * mattijsquit (Ping timeout: 240 seconds)
22:16:16  * cloudshujoined
22:33:21  * mattijs_quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:37:48  * mattijsjoined
22:48:55  * not-an-aardvarkquit (Quit: Connection closed for inactivity)
23:37:27  * caridy_joined
23:39:12  * howdoijoined
23:40:48  * caridyquit (Ping timeout: 246 seconds)
23:56:14  * mattijsquit (Quit: My MacBook has gone to sleep. ZZZzzz…)