funcool

mccraigmccraig 2023-01-18T19:53:37.281709Z

been working with promesa to make a cross-platform manifold-kinda lib aimed at cold event-sources... it's coming together: https://github.com/yapsterapp/promisespromises

niwinz 2023-01-23T09:27:41.060439Z

you can check the promesa CSP impl, core.async alternative as manifold streams/ core.async replacement :D

mccraigmccraig 2023-01-23T09:32:25.842509Z

oh, nice @niwinz - i hadn't seen that - i used manifold as the underlying error-free transport on clj, but that might make better sense instead

niwinz 2023-01-23T09:33:19.190249Z

it is experimental, but I would be very grateful for feedback

mccraigmccraig 2023-01-23T09:34:45.214319Z

i find the manifold code quite hard to grok, so i'd be happy to get rid of that dependency

niwinz 2023-01-23T09:35:18.450119Z

it still only CLJ, but the underlying impl is crossplatform 90% aprox, so if there are interest, almost all api probably can be reimplemented in CLJS (only the operators that requires true go blocks will can not be reimplemented but I thik they are pretty rare)

niwinz 2023-01-23T09:36:10.760909Z

yep, the same here, manifold and core.async go macros are so complex, and pretty heavy dependency in terms of number of classes and increased load time

niwinz 2023-01-23T09:36:33.135539Z

this is reason of existence of csp on promesa (also vthreads on JVM hehe)

niwinz 2023-01-23T09:38:27.066569Z

I don't use core.async on frontend because I do not find it useful when you have promises and rx streams, but on JVM, they are pretty usefull, and If I can get rid of all macro stuff, and replace it with runtime that already does that lifting for me (JVM vthreads), the go macro machinary becomes completly unnecesary

mccraigmccraig 2023-01-23T09:39:56.558279Z

nice - well ill have a go at a promesa/CSP transport for promisespromises - i've got a lot of function built on top of the basic error-free streaming API (incl. the manifold.stream seq-like ops, a re-frame port, sorted stream joins), so i think my tests should give it a good workout

mccraigmccraig 2023-01-23T09:40:36.744519Z

i think the only thing i used the go machinery for in my core.async adapter was alts! for stream op timeouts

niwinz 2023-01-23T09:41:32.733919Z

nice, if you miss something feel free to comment it here or on github. I'm on my paternity leave, so I don't have much time but I pick some random slots for doing stuff, just FYI

mccraigmccraig 2023-01-23T09:42:36.857859Z

will do - and congratulations on the baby 😀

niwinz 2023-01-23T09:42:48.012929Z

thanks 😄

niwinz 2023-01-23T09:44:00.837929Z

I have looked on alts! and it does not uses at all any go stuff, so it in an hipotetical case we expose csp as CLJC, alts can be used with basic promise API because internally it does not uses "threads" or "go blocks"

mccraigmccraig 2023-01-23T09:48:08.596109Z

cool - well getting rid of complex macros is always a worthy cause 🙂 . i'll report back when i've had a go with promesa/CSP on clj...

niwinz 2023-01-23T09:54:36.402649Z

👍🏽