Fork me on GitHub
#dirac
<
2017-03-02
>
qqq00:03:05

@darwin: after doing a (dirac! :join) are there special commands I can send via the repl to do things like: (1) turn on pause on exception (2) turn off pause on exception (3) force-reload ?

qqq01:03:17

Is this a 'no, because it's fundamentally against principles of dirac' or 'not high priority, but could be done as contracting work' ?

darwin01:03:02

it could be done, I didn’t think about automating devtools ui via repl connection

qqq01:03:29

I guess if you're using cursive/dirac, there isn't a need

darwin01:03:29

you can try to take a stab at it

qqq01:03:55

before I could tackle this, I'd have to be able to install dirac from source right?

qqq01:03:02

since I'd have to hack on the actual dirac cljs files itself

darwin01:03:00

you could introduce a new nrepl message and implement support in your nrepl client, or you could abuse the eval :op

darwin01:03:53

for example here you could have a special case detecting a special form and handle it inside devtools fork context (e.g. switching some devtools UI or talking via debugger protocol to chrome debugger): https://github.com/binaryage/dirac/blob/master/src/implant/dirac/implant/intercom.cljs#L412

qqq01:03:27

C-c C-c sent via the repl is a special :op right?

darwin01:03:31

“implant” is cljs code injected (or implanted) into devtools app which is mostly javascript

qqq01:03:36

I recall those msgs going through even when the repl "hangs"

darwin01:03:56

have no idea what C-c C-c is

qqq01:03:13

C-c C-c sends a single C-c when in emacs

qqq01:03:32

it causes devtools dirac to print a msg saying "requested to cancel job XYZ"

darwin01:03:13

this is something your nrepl client prints or some of your nrepl middlewares print, not related to dirac

darwin01:03:11

if your nrepl client inside emacs prints something to screen it does not necessary mean that it sent something over the wire to nrepl server

darwin01:03:33

I assume that was just a feedback that you as a user attempted to cancel a running job

darwin01:03:47

dirac does not support that

qqq14:03:48

@darwin: I have a setup where: boot runs on REMOTE server chrome canary runs on LOCAL laptop REMOTE server doesn't export any ports; so I can only access ports to it via SSH port forwarding on LOCAL laptop, I do ssh [remote] -L 8230:localhost:8230 -L 8231:localhost:8231 but dirac is still not working yet are there more ports that I need to open / forward to make this work? thanks!

qqq14:03:22

in partiular, my probelm is that it hangs on

qqq14:03:29

"unable to bootstrap clojurescript REPL due to a timeout"

qqq14:03:36

so clearly there is some point I'm not forarding

darwin14:03:23

@qqq just got back

darwin14:03:46

try to export ports 8232-8242 as well

darwin14:03:59

those are default ports for weasel connections

qqq23:03:11

@darwin: https://github.com/binaryage/cljs-devtools/issues/35 means it's fixed right? (on github, I see it's closed, but not if it's "will not fix" or "fixed")

darwin23:03:15

@qqq it is fixed

darwin23:03:29

and you can see relevant links to commits in the issue

darwin23:03:51

if you clicked through, you would see in which released versions is the fix included: https://github.com/binaryage/cljs-devtools/commit/ae982dc058f8d4236a77d72e6d992a6ee54ed36f

darwin23:03:09

you see there “master” and v0.9.2

qqq23:03:47

lol, the 'fix' was 4 lines of code and 40 lines of test?:-)

qqq23:03:07

actually, the entire fix looks like a (fn [] ...) wrapper

darwin23:03:23

yes, that is what makes it evaluate lazily

darwin23:03:45

the magic was already implemented in <reference-surrogate> for some other reasons