Clojurians
#dirac
<
2016-10-10
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

richiardiandrea21:10:14

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

richiardiandrea21:10:39

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 :smile:

richiardiandrea21:10:16

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

richiardiandrea21:10:32

btw lambone aims to be Cursive+cider compatible..

darwin22:10:40

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)

darwin22:10:51

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

darwin22:10:54

like Cursive

darwin22:10:52

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

richiardiandrea22:10:12

@darwin isn't dirac replacing piggieback completely?

darwin22:10:34

piggieback + weasel

darwin22:10:18

but I can imagine you could be running dirac’s “weasel” and cider’s own client-side piece of code side-by-side

darwin22:10:43

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

richiardiandrea22:10:48

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

darwin22:10:00

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

richiardiandrea22:10:34

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

richiardiandrea22:10:05

yes it has a bunch of middleware for clj

darwin22:10:32

but it also has some middleware for cljs, right?

darwin22:10:34

which one?

richiardiandrea22:10:36

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

richiardiandrea22:10:46

let's check :smile:

darwin22:10:33

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

richiardiandrea22:10:54

yep true that, I am skimming in cider

darwin22:10:46

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

darwin22:10:57

this middleware list looks scary\

darwin22:10:34

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

darwin22:10:55

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

darwin22:10:10

the real ones in the js env

darwin22:10:49

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

darwin22:10:30

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

darwin22:10:41

utimately this could be exposed to cider or cursive

darwin22:10:51

but that is maybe going too far

richiardiandrea22:10:01

yeah I think dirac has more sophisticated ways of fetching stuff

richiardiandrea22:10:20

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

richiardiandrea22:10:29

using the classic compiler environment

richiardiandrea23:10:52

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

richiardiandrea23:10:35

if we do this, it is huuge, and it is going to only probably be yet another middleware :wink:

darwin23:10:03

that would be part of dirac middleware, I think :slightly_smiling_face:

richiardiandrea23:10:35

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

richiardiandrea23:10:38

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

darwin23:10:11

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

darwin23:10:40

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

darwin23:10:52

at least what I heard

richiardiandrea23:10:33

yes there is boot-fighweel indeed

darwin23:10:39

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

darwin23:10:51

then connect to it from emacs

darwin23:10:05

and do (dirac! :join)

darwin23:10:44

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

richiardiandrea23:10:00

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

darwin23:10:54

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

richiardiandrea23:10:17

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