dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
danielsz 2016-06-19T11:20:11.000050Z

Hi! I'm trying to get Dirac working. Hitting Unable to resolve backend-url for Dirac DevTools. target-url=<http://localhost:9222>, tab-url=<http://localhost:3001/>.

danielsz 2016-06-19T11:20:42.000051Z

Using Chrome Version 51.0.2704.84 (64-bit) (not Canary)

danielsz 2016-06-19T11:22:54.000052Z

Is this good enough or am I missing something?

danielsz 2016-06-19T11:36:32.000053Z

OK, I've launched chrome with google-chrome --remote-debugging-port=9222 and now the Dirac devtools doesn't complain.

danielsz 2016-06-19T11:37:16.000054Z

However, when I type (dirac! :join) in the REPL, it says `Your session joined Dirac (ClojureScript). The specific target Dirac session will be determined dynamically according to current matching strategy. No connected Dirac session is "most recent Dirac session".`

2016-06-19T11:39:46.000055Z

@danielsz: yes, that works as expected, please read (dirac! :help) and (dirac! :help :join)

2016-06-19T11:40:13.000056Z

your session will join dirac session, after there will be one available

2016-06-19T11:42:27.000057Z

are you aware of this page? https://github.com/binaryage/dirac/blob/master/docs/integration.md

danielsz 2016-06-19T11:43:52.000059Z

@darwin: Yes, I'm translating this to my Emacs Cider setup 🙂

2016-06-19T11:44:18.000060Z

let me know how it goes 🙂 nobody probably tried this before...

danielsz 2016-06-19T11:44:41.000061Z

BTW, I'm using Boot and boot-cljs-devtools.

2016-06-19T11:45:22.000062Z

cool, but I can’t help much with those, because I’m still using lein

2016-06-19T11:45:28.000063Z

because of figwheel

2016-06-19T11:45:59.000064Z

boot is great tough

danielsz 2016-06-19T11:46:17.000065Z

no problem. What is the keyboard shortcut to open the Dirac Devtools in Chrome?

2016-06-19T11:47:16.000066Z

depends on your system I guess, go to <chrome://extensions>, and see “keyboard shortcuts” in bottom right

2016-06-19T11:47:36.000067Z

there you can setup also a hot key for instant repl focus

danielsz 2016-06-19T11:50:02.000070Z

Cool. Thank you.

danielsz 2016-06-19T11:50:28.000071Z

My next problem is that (dirac! :ls) tells me: No Dirac sessions are currently available. Connect with at least one Dirac REPL to your nREPL server.

2016-06-19T11:51:30.000072Z

do you have dirac agent running? do you have Dirac DevTools open, switched to console, switched to dirac prompt and connected to the agent?

danielsz 2016-06-19T11:51:48.000073Z

Dirac agent is running.

danielsz 2016-06-19T11:52:40.000074Z

How do I switch to dirac prompt?

2016-06-19T11:52:58.000075Z

you should see a welcome message in your DevTools console, explaining it

2016-06-19T11:53:11.000076Z

assuming you have the latest dirac version 0.6.0

2016-06-19T11:53:58.000077Z

CTRL+. and CTRL+,

danielsz 2016-06-19T11:54:04.000078Z

I have the latest dirac version, but the welcome message doesn't appear. Should I restart the browser?

danielsz 2016-06-19T11:54:26.000079Z

Only these messages: Installing Dirac Runtime v0.6.0 and enabling features :repl util.js:206 Installing CLJS DevTools 0.7.0 and enabling features :custom-formatters :sanity-hints

2016-06-19T11:54:40.000080Z

no, you must be looking at something else I guess

2016-06-19T11:55:06.000081Z

do you see “Dirac v0.6.0” in the title of the window you are looking at?

danielsz 2016-06-19T11:55:28.000082Z

Yes, I see that.

2016-06-19T11:55:54.000083Z

hmm

2016-06-19T11:56:20.000084Z

then try to switch the prompt, dunno why you don’t see the welcome message

2016-06-19T11:56:31.000085Z

CTRL+.

2016-06-19T12:07:04.000086Z

Also I would recommend using the Canary, I don’t test Dirac with older Chrome versions, and chances are it simply breaks with older chrome

danielsz 2016-06-19T12:37:11.000089Z

Okay, thanks for the tip. I'm doing some progress with my current version of Chrome but I'll switch if I can't get the full experience.

2016-06-19T12:41:11.000090Z

btw. you can open internal DevTools to debug Dirac DevTools, simply use standard keyboard shortcut for opening devtools while your Dirac DevTools window is focused. You might spot there some errors.

danielsz 2016-06-19T12:44:38.000091Z

Cool. I managed to join the dirac session. Evaluation of simple forms works. However, in-ns my.namespace results in an infinite loop :face_with_rolling_eyes:

2016-06-19T12:45:15.000092Z

might be some conflict between nREPL middleware

danielsz 2016-06-19T12:45:24.000093Z

I guess.

2016-06-19T12:45:37.000094Z

try to remove all non-essential CIDER middleware

danielsz 2016-06-19T12:45:55.000095Z

How do I interrupt evaluation?

2016-06-19T12:46:03.000098Z

no support for that

danielsz 2016-06-19T12:46:12.000099Z

OK.

2016-06-19T12:46:44.000101Z

I assume that infinite loop is in your REPL process, right?

danielsz 2016-06-19T12:48:12.000102Z

No, in the Dirac prompt in the Dirac Devtools.

danielsz 2016-06-19T12:48:40.000103Z

REPL is stuck, doesn't return to prompt.

2016-06-19T12:50:19.000104Z

hm, I don’t think Dirac prompt is waiting for the result synchronously

2016-06-19T12:50:43.000105Z

do you see any errors in the internal console? (for Dirac DevTools window)

danielsz 2016-06-19T12:51:24.000106Z

I've restarted everything, but this time I switched to my namespace with (ns my.namespace) and this did the trick.

danielsz 2016-06-19T12:51:34.000107Z

Cool!

danielsz 2016-06-19T12:53:06.000108Z

With the Canary channel, do you also need to launch chrome with remote-debugging or is it on by default?

2016-06-19T12:53:25.000109Z

it is not on by default

2016-06-19T12:53:39.000110Z

(security reasons)

danielsz 2016-06-19T12:53:41.000111Z

So you always launch Chrome from the command line with that switch?

2016-06-19T12:53:50.000112Z

yes

danielsz 2016-06-19T12:53:59.000113Z

OK, cool.

danielsz 2016-06-19T12:54:37.000114Z

Thanks for your help. It seems to be working now. I'll play with it.

2016-06-19T12:54:52.000115Z

np, have fun!

danielsz 2016-06-19T12:56:35.000116Z

And by the way, the awesome thing with boot-cljs-devtools is that most configuration is done behind the scenes.

danielsz 2016-06-19T12:56:41.000117Z

Thanks @jupl !

danielsz 2016-06-19T13:12:17.000119Z

@darwin You're not using Clojure to write the binaryage mac apps, are you?

2016-06-19T13:16:29.000120Z

no 🙂

2016-06-19T13:16:51.000121Z

I don’t use Clojure for anything serious 😉

danielsz 2016-06-19T17:12:41.000122Z

@darwin: Haha. Well, in that case, you're doing a great service for mankind.