unrepl

discussing specification of an edn-based repl and its implementations.
dominicm 2018-03-18T18:58:30.000098Z

@cgrand couldn't see anything in the wiki particularly 🙂 Got a write up anywhere on it?

cgrand 2018-03-18T20:19:48.000118Z

Yes but the discussion is held in hostage by Slack.

cgrand 2018-03-18T20:21:15.000094Z

@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.

dominicm 2018-03-18T20:23:20.000056Z

That seems odd to me, so you'd send #?(:cljs (js/alert "hi"))?

dominicm 2018-03-18T20:23:34.000063Z

Seems like a repurposing of the intention of it I guess 🙂

cgrand 2018-03-18T20:23:35.000118Z

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

dominicm 2018-03-18T20:29:06.000068Z

I wonder if there's ever a case for having multiple cljs repls? e.g. if you have multiple cljs clients in one jvm.

dominicm 2018-03-18T20:29:23.000106Z

figwheel supports build-ids for this.

dominicm 2018-03-18T20:30:16.000012Z

I'm wondering if it should actually be #?(:figwheel/build-id (js/alert "hi")) and the dispatch happens on (or (namespace k) (name k))

cgrand 2018-03-18T20:31:47.000107Z

I think you are trying too hard: you tie one cljs|c repl to one cljs env.

dominicm 2018-03-18T20:31:53.000035Z

Oh, but that pushes management onto client. So it's better to be agnostic in some way. Yeah, this gets complicated fast.

cgrand 2018-03-18T20:35:12.000056Z

What if you have several Clojures in one jvm?

dominicm 2018-03-18T20:36:13.000067Z

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.

ghadi 2018-03-18T20:38:27.000024Z

Sorry for the aside here - what do people do in order not to statically assign socket repl binding ports?

cgrand 2018-03-18T20:38:29.000074Z

Classloader isolation. I believe Boot does that all day long with pods.

ghadi 2018-03-18T20:40:02.000120Z

Interesting

dominicm 2018-03-18T20:40:28.000011Z

@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?