dirac 2016-10-10

@darwin so what do I need for this to work with figwheel? only sidecar on the classpath?

I have a setup with dirac already in place and although I prefer to eval in cider...the lure of having good error messages might be what breaks my habit šŸ˜„

and if this work lambone will include it as option to boot dev

btw lambone aims to be Cursive+cider compatible..

awesome thanks!

btw. I think that emacs + dirac + figwheel setup should be possible, the hard part would be to make nrepl middleware play together (if you use some advanced ones)

I’m assuming that emacs can connect to nREPL clojure session, so then it should be able to :join dirac session from within it

the more difficult part would be to get code completions and others bells and whistles working, I’m assuming that Cider is using various nREPL middleware to do that

@darwin isn't dirac replacing piggieback completely?

piggieback + weasel

but I can imagine you could be running dirac’s ā€œweaselā€ and cider’s own client-side piece of code side-by-side

dirac’s weasel will be used for evals, and cider’s stuff for code completions or whatever they need to do on client-side

ah yeah if you add some kind of similar layer that's possible

I’m not familiar with cider and whole emacs stack, sorry

no problem I can investigate on that and report back, because it would be awesome and boot/`lein` agnostic

yes it has a bunch of middleware for clj

but it also has some middleware for cljs, right?

just the cljs part is trickier, but tbh I am not that familiar with that as well

let's check šŸ˜„

clj-related middleware should not interfere with dirac’s, because dirac's is just rewritten piggieback with some cljs-related stuff added

yep true that, I am skimming in cider

if I were cider, knowing what I know now, I would provide just one middleware and all the stuff would be just inside cofigurable via options

this middleware list looks scary\

ahah

I’m afraid, this does not sound good enough to me, it will give you cljs autocompletions, but not javascript ones, also cljs env can differ from runtime state in the browser

I thought there is something which talks to browser to give you autocompletions

the real ones in the js env

btw. dirac is using sourcemaps machinery to map real existing javascript names back to cljs names

tons of work put into this by devtools devs, I think that is pretty advanced stuff no one else has

utimately this could be exposed to cider or cursive

but that is maybe going too far

yeah I think dirac has more sophisticated ways of fetching stuff

I see there the same util functions I use in replumb for self-host

using the classic compiler environment

so probably dirac already provides more and we just need to find a way to talk back to cider...

if we do this, it is huuge, and it is going to only probably be yet another middleware šŸ˜‰

that would be part of dirac middleware, I think šŸ™‚

so my next question would be, where to start digging ?

so cool ah ah...a cider+`dirac`+`figwheel` setup would be my holy setup indeed

we are almost there, I think cursive + dirac + figwheel already works, but haven’t done any real work with this setup yet

and it is lein/boot agnostic I believe, because figwheel sidecar works with boot just fine

at least what I heard

yes there is boot-fighweel indeed

so what is stopping you to: 1. setup your own nREPL server 2. add dirac middleware 3. add dirac agent 4. add fighweel-sidecar

then connect to it from emacs

and do (dirac! :join)

(dirac :ls) should show you figwheel compiler as well, and you could (dirac! :switch) to it

probably nothing, I have just never tried it, but I will...then I'll need to add cider middleware in there...that's it...I have a deadline soon so I will try probably next weekend

ok, no hurry, I will probably have to test this config on some real work to see if it can fly

great, thanks for the chat, I'll report back!

šŸ‘ 1