@cgrand couldn't see anything in the wiki particularly 🙂 Got a write up anywhere on it?
Yes but the discussion is held in hostage by Slack.
@dominicm the idea would have to have a single repl but use reader conditional to select if you sending code to clojure or to clojurescript.
That seems odd to me, so you'd send #?(:cljs (js/alert "hi"))
?
Seems like a repurposing of the intention of it I guess 🙂
My initial idea would mean that unconditional code would get evaluated twice. Which is not very practical. @bhauman thinks that abusing a top reader conditional would be ok. So uncond -> cljs, cond -> dispatch
I wonder if there's ever a case for having multiple cljs repls? e.g. if you have multiple cljs clients in one jvm.
figwheel supports build-ids for this.
I'm wondering if it should actually be #?(:figwheel/build-id (js/alert "hi"))
and the dispatch happens on (or (namespace k) (name k))
I think you are trying too hard: you tie one cljs|c repl to one cljs env.
Oh, but that pushes management onto client. So it's better to be agnostic in some way. Yeah, this gets complicated fast.
What if you have several Clojures in one jvm?
don't be silly. you can't do that. clojure.lang.RT wouldn't let you! I have literally 0 context for how that would work right now tbh - because I never see it.
Sorry for the aside here - what do people do in order not to statically assign socket repl binding ports?
Classloader isolation. I believe Boot does that all day long with pods.
@ghadi https://github.com/Unrepl/unravel/blob/master/src/unravel/jack_in.cljs#L3
Interesting
@cgrand That works via (boot.pod/with-eval-in X …)
So I guess you're suggesting something similar could work for cljs, with a default or something?