Fork me on GitHub
#cider
<
2017-08-07
>
v3ga04:08:56

can someone tell me why my cider repl fails when dealing with clojurescript? https://gist.github.com/anonymous/9d635eeda53d1bac1de2f592e636a4a0

ghadi15:08:36

is there a room for inf-clojure?

dpsutton15:08:03

go for it here

dpsutton15:08:14

@ghadi you'll basically be asking questions to @richiardiandrea

dpsutton15:08:24

in whatever room he's in 🙂

richiardiandrea15:08:51

Lol you can ask here but I will be back in front of my pc in about 24 hours, traveling now :)

ghadi16:08:39

no worries. I am trying to go all in on Socket REPL. I'm using inf-clojure but had a couple questions: how can I prevent inf-clojure from sending forms to the REPL except ones I explicitly send? I think there is some sort of background trickery going on that blows away the vars *1

michaelwfogleman16:08:03

@ghadi If you figure out a good workflow for that, would love to see a blog post about it

dpsutton16:08:43

can it? i know cider gets around this by maintaining two sessions to nrepl to prevent exactly this. there's your primary session and a tooling session

dpsutton16:08:49

so you never see autocomplete results in *1

ghadi16:08:21

i guess you could also have two socket connections

ghadi16:08:37

personally I don't really care about autocomplete

ghadi17:08:54

@michaelwfogleman

(s/start-server {:name "repl"    ;; s is clojure.core.server
                   :port 5555
                   :accept 'clojure.core.server/repl
                   :server-daemon false})

ghadi17:08:36

I put that in some sort of init namespace, then I run clojure with java -cp $(cat cp.txt) clojure.main -m my-init-ns

ghadi17:08:06

then I connect emacs to it using inf-clojure-connect

ghadi17:08:31

So much faster than lein or boot

ghadi17:08:20

Alternatively, you can start a socket repl using a java property with that map above embedded inside it

ghadi17:08:11

I don't care for debugging, autocompletion, etc. Or at least I haven't missed them yet.

richiardiandrea17:08:32

@ghadi there is way more to discover on #unrepl but yes, we send some form for autocomletion and autodoc

richiardiandrea17:08:35

There we were thinking of better tooling and multiplexing/multiple connection

richiardiandrea17:08:36

Also Thomas Hellers' shadow-cljs already provides that, and I am working (slowly) on a mode for that. Shadow-cljs is the closest you can get to have a no-magic repl

richiardiandrea17:08:39

About inf-clojure, if you setq the defcustoms for completion and eldoc (sorry don't remember by heart), you won't send the form under the hood.

richiardiandrea17:08:44

I would open an issue for '*1' because it is a bug

dominicm18:08:35

@ghadi just an fyi, that's not quite how cider works. Evaluations go through a different channel to completions. But it's still one nrepl session. Only evaluations blow away *1

ghadi20:08:38

installing inf-clojure from git and not melpa stable has helped

michaelwfogleman20:08:14

@ghadi Thanks for the explanation ghadi!