clojure-dev

seancorfield 2022-10-18T17:31:19.375419Z

According to https://clojure.org/dev/contrib_libs core.async is actively maintained by Rich but it feels like it's not getting much "love" and there are numerous patches that have been sat in the queue there for years. Is that a Contrib library that could reasonably be maintained more actively by one or more community members, or is it considered too close to "core" usage by various projects to be maintained outside of the Clojure core team?

👀 1
seancorfield 2022-10-18T17:32:30.601019Z

(I ask because we've just switched at work to our own fork so we can get some of the patches applied and use that updated version in our production code)

Alex Miller (Clojure team) 2022-10-18T17:51:23.313499Z

We are going to continue managing that one

Alex Miller (Clojure team) 2022-10-18T17:52:06.362269Z

I'd be happy to hear more about what patches you're applying or finding to be important outstanding issues for you

Alex Miller (Clojure team) 2022-10-18T17:52:54.804229Z

I do spend time on it, just in periodic slices

seancorfield 2022-10-18T17:55:57.770369Z

@hiredman Do you want to talk about ASYNC-234 which we've applied in the fork we're using at work now, and some of the other patches you submitted ages ago that you'd like reviewed/applied?

Alex Miller (Clojure team) 2022-10-18T18:01:42.287939Z

I think it's unlikely that async-234's nack patches is something we're going to do

Ben Sless 2022-10-18T18:02:09.091679Z

I was also forced to apply that patch to keep a service operational (only part 1, though)

2022-10-18T18:02:27.285969Z

our fork is just the 0001 patch

Alex Miller (Clojure team) 2022-10-18T18:02:52.879269Z

ok, good to know

Alex Miller (Clojure team) 2022-10-18T18:03:15.738169Z

if that's causing a lot of pain, I'm happy to raise it up the priority list and try to look at it in the near future

👍 1
2022-10-18T18:04:09.393259Z

the 0001 patch is very conservative, but should help, but I still think core.async needs some kind of general resource cleanup mechanism (the nack stuff)

Alex Miller (Clojure team) 2022-10-18T18:04:24.269299Z

I'm curious if anyone has thought about alternate timer impls

Alex Miller (Clojure team) 2022-10-18T18:05:15.089659Z

I'm late for a meeting but if there are other things of similar priority, happy to hear about it

2022-10-18T18:05:53.154819Z

well, the nack patches include an alternative timeout impl, and I think I have a patch on another ticket in the jira that changes timeout to just return a ReadPort instead of a full channel

2022-10-18T18:06:55.966599Z

I have a toy alternative to core.async (that incudes a nack mechanism and follows the concurrent ml model more) that includes a timeout implementation (all the clean up of which is handled by the built in nack mechanism)

2022-10-18T20:05:06.684339Z

https://gist.github.com/hiredman/19e01f112b52e3a967af597262de3a81 is the toy for the curious, everything up to around line 430 is pretty good, the pubsub stuff is off the rails

2022-10-18T20:06:22.930739Z

usage looks very much like core.async or another kind of csp, just this Event protocol at the bottom instead of channels

2022-10-18T20:07:00.574469Z

there is no thread creationg/go macro stuff, just registering callbacks

2022-10-18T18:07:08.656429Z

so I have thought a little bit about timeouts

2022-10-18T18:08:12.395279Z

but I think the focus on "timeouts" is incorrect, the 0001 patch for example doesn't touch timeouts at all

2022-10-18T18:09:54.153859Z

the issue alts attaches callbacks to whatever, and then has no way to notify whatever it attached callbacks to that the callbacks are no good any more, so the callbacks can hang around until whatever goes through all backs and checks the flag on them

2022-10-18T18:11:40.611439Z

outside of async-234 there is https://clojure.atlassian.net/browse/ASYNC-247 which you asked for a hand with

2022-10-18T18:12:03.471429Z

and there is also https://clojure.atlassian.net/browse/ASYNC-90

2022-10-18T18:14:17.724029Z

https://clojure.atlassian.net/browse/ASYNC-109 is the change to make timeout return a readport

2022-10-18T18:33:25.578059Z

If you care about these things, your change to the docstrings have "afterwads" instead of "afterwards"

2022-10-18T18:34:46.249959Z

my care about is I guess relative to what I consider the chances are of getting it merged

👍 1
2022-10-18T18:35:32.549289Z

right, that's what I expected

2022-10-18T18:22:34.502899Z

for the nack stuff, some more precise feedback would be nice, like is some kind of nacking mechanism at all a non-starter, or is it a problem with the implementation

2022-10-18T18:24:11.438919Z

for my toy library I've got some stuff with watches on atoms, which might be a good basis for a lighter version of nacks (if I recall the handler for alts has an atom in it somewhere)

Alex Miller (Clojure team) 2022-10-18T18:25:40.713279Z

just from prior conversations with Rich, I suspect that's not a solution he's going to like very much

Alex Miller (Clojure team) 2022-10-18T18:25:59.607539Z

so the idea of nacks, not the impl

2022-10-18T18:26:53.695959Z

that is unfortunate

seancorfield 2022-10-18T18:52:15.279689Z

Well, we'll just have to continue with our fork of core.async then -- and perhaps we'll look at alternative implementations, at least for the JVM which is really all we care about. I'd love to see a near drop-in replacement for core.async based on virtual threads for example (and we're about to go from JDK 18 to JDK 19 at work so that's a realistic possibility in some ways).

niwinz 2022-10-19T07:43:34.338669Z

I'm personally started working on it, an experimental version on it in funcool/promesa only for JVM

👍 1
niwinz 2022-10-19T07:45:55.356159Z

and properly test it on penpot

1
Alex Miller (Clojure team) 2022-10-18T19:01:30.761729Z

Rich is definitely interested in that (which at some point makes some of these issues a moot point)

seancorfield 2022-10-18T19:02:44.859859Z

But not interested in someone outside of core building it and then contributing it, I assume?

Alex Miller (Clojure team) 2022-10-18T19:04:10.045969Z

it's not a matter of interest but rather that it's hard to come backwards from a big giant solution to the problems being addressed

Alex Miller (Clojure team) 2022-10-18T19:05:56.382459Z

like if someone rewrote most of next.jdbc and offered it to you, I think you would be reticent to just merge that, even if it was a change you were already considering

seancorfield 2022-10-18T19:07:01.084379Z

Are there any design docs around that would provide insight into what a vthread-powered core.async should look like? Or is this just an idea in Rich's head at the moment? Yeah, we don't want to do the work and then get it turned down, only to have Rich build something similar within core/Contrib.

seancorfield 2022-10-18T19:07:22.256979Z

Would love to talk with Rich about this...

Alex Miller (Clojure team) 2022-10-18T19:07:38.813739Z

just idle water cooler level chatter

seancorfield 2022-10-18T19:08:18.949079Z

OK, well, let him know that we're seriously interested in it -- if he is interested and has bandwidth to discuss in more detail.

Alex Miller (Clojure team) 2022-10-18T19:08:40.816549Z

noted

Alex Miller (Clojure team) 2022-10-18T19:10:36.018719Z

something I have been working on in async (really this dates back a couple years to work from Ghadi) is https://clojure.atlassian.net/browse/ASYNC-248 which I'm hoping to get merged this week pending review from Rich

Alex Miller (Clojure team) 2022-10-18T19:17:05.177869Z

@seancorfield @hiredman I think you should be able to see this filter https://clojure.atlassian.net/issues/?filter=10035 which is a prioritized list of open core.async issues that I work from

seancorfield 2022-10-18T19:18:01.495399Z

Yeah, with four assigned to @hiredman 🙂

Alex Miller (Clojure team) 2022-10-18T19:18:14.752699Z

everything you mentioned above is near the top of that already

Alex Miller (Clojure team) 2022-10-18T19:18:29.938049Z

well I don't really look at that :)

Alex Miller (Clojure team) 2022-10-18T19:19:13.686669Z

I mean I don't look at assignments, I do use this report :)

seancorfield 2022-10-18T19:19:45.512969Z

I know, just pointing out that a lot of past activism on some of those top issues has come from my colleague 🙂

Alex Miller (Clojure team) 2022-10-18T19:19:58.364979Z

I am aware :) and I appreciate the help