dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
stuartmitchell 2016-05-24T04:04:12.000279Z

Hi is there any alternative to the pgUp pgDown shortcut?

stuartmitchell 2016-05-24T04:04:25.000280Z

also I can't seem to find it mentioned in the docs

danielcompton 2016-05-24T08:31:14.000281Z

@stuartmitchell: https://github.com/binaryage/dirac/issues/9

richiardiandrea 2016-05-24T18:49:32.000284Z

hello 😄

richiardiandrea 2016-05-24T18:49:48.000285Z

I am finally trying to get a working dirac env 😄

richiardiandrea 2016-05-24T18:50:03.000286Z

of course using boot and boot-cljs-devtools

richiardiandrea 2016-05-24T18:50:36.000287Z

thanks Darwin, everything is very well documented!

👏 2
richiardiandrea 2016-05-24T19:19:43.000288Z

sooo one thing, I am clicking on the extension icon but nothing happens, what can it be?

2016-05-24T19:20:34.000289Z

the extension icon should display some exclamation symbol or question mark symbol, hovering over the icon should display some reason

2016-05-24T19:20:53.000290Z

also some message should be present in javascript console

richiardiandrea 2016-05-24T19:22:43.000291Z

Nothing of that, the agent is hooked I think and everything seems OK, let me try again

2016-05-24T19:24:27.000292Z

in case dirac devtools window is already opened for given page, clicking on the icon just focuses it and does nothing else

richiardiandrea 2016-05-24T19:24:49.000293Z

oh ok then

richiardiandrea 2016-05-24T19:26:37.000294Z

I am also adding a patch to boot-cljs-devtools so I might be doing something wrong there too

richiardiandrea 2016-05-24T19:31:40.000295Z

yeah VM859:1 Unable to resolve backend-url for Dirac DevTools. target-url=<http://localhost:8000>, tab-url=<http://localhost:8000/>

richiardiandrea 2016-05-24T19:31:58.000296Z

it looks like I am missing something

2016-05-24T19:32:20.000297Z

likely you are not running your chrome with enabled debugging port or wrong debugging port

2016-05-24T19:34:14.000298Z

target-url is wrong, it should be something like http://localhost:9222, I guess you were messing with dirac extension options and changed that default

richiardiandrea 2016-05-24T19:34:55.000299Z

yes that was it, now can I call (dirac.runtime/install!) from anywhere?

2016-05-24T19:35:39.000300Z

“target url for debugger” is url for DevTools to connect to, at this URL your chrome remote debugger protocol should be available, I should probably explain more on the options screen

2016-05-24T19:36:24.000301Z

you should call runtime/install! in your app, preferably as early as possible

2016-05-24T19:36:31.000302Z

ideally before any of your own code runs

👍 1
richiardiandrea 2016-05-24T19:41:33.000303Z

I see Installing Dirac Runtime v0.2.0 and enabling features :repl

richiardiandrea 2016-05-24T19:41:42.000304Z

but (+ 1 3) fails

richiardiandrea 2016-05-24T19:41:51.000305Z

Uncaught SyntaxError: Unexpected number(…)

richiardiandrea 2016-05-24T19:48:48.000306Z

ah so so sorry, I copied the dep from a place but it was very old, I apologize for the noise

2016-05-24T19:49:11.000307Z

you are probably not entering the command into cljs REPL but in plain javascript consolel

2016-05-24T19:49:26.000308Z

use PAGEUP to switch prompt types

richiardiandrea 2016-05-24T19:50:57.000309Z

ah wow didn't know that

richiardiandrea 2016-05-24T19:51:23.000310Z

perfect now it does work!

2016-05-24T19:51:24.000311Z

the documentation is not that good after all 🙂

2016-05-24T19:51:41.000312Z

I have to improve this, you are not the first one hitting this problem

richiardiandrea 2016-05-24T19:53:03.000313Z

maybe just add a "baby steps" section...the rest was very clear

richiardiandrea 2016-05-24T19:53:57.000314Z

patch is working than: https://github.com/jupl/boot-cljs-devtools/pull/3

2016-05-24T19:58:11.000316Z

I don’t think it is a good idea to repeat those defaults, when I decide to change them for some reason you will be stuck with previous

👍 1
richiardiandrea 2016-05-24T19:59:34.000317Z

yeah true I can actually just refer to your var

2016-05-24T20:00:16.000318Z

just refer to this file: https://github.com/binaryage/dirac/blob/master/src/agent/dirac/agent/config.clj and fill only config options which are explicitly specified by the user

richiardiandrea 2016-05-24T20:07:10.000320Z

done neat!

2016-05-24T20:09:36.000321Z

hmm, shouldn’t you call get-effective-config instead of default-config?

2016-05-24T20:09:56.000322Z

you want to test effective dirac agent port against your nrepl port

2016-05-24T20:12:06.000324Z

there are two problems with current version: a) you should not be using default-config at all, just specify only options you want to override, dirac will fall back to defaults for others

2016-05-24T20:13:08.000325Z

b) in that assert you want to merge get-effective-config with your dirac-opts overrides and check the port

2016-05-24T20:13:29.000326Z

because some settings could come from ENV properties and override defaults

richiardiandrea 2016-05-24T20:13:49.000327Z

oh, good that you checked

richiardiandrea 2016-05-24T20:14:18.000328Z

I did not even know that you could configure it from ENV var

richiardiandrea 2016-05-24T20:15:47.000331Z

ok ,so no defaults at all in there and I will use get-effective-config for the assert only

2016-05-24T20:16:12.000332Z

ping me with updated code and I will check

richiardiandrea 2016-05-24T20:16:17.000333Z

tnx

richiardiandrea 2016-05-24T20:26:32.000336Z

not yet ready 😄

richiardiandrea 2016-05-24T20:27:22.000338Z

@darwin basically get-effective-config is not "right" until I pass my config to boot!

richiardiandrea 2016-05-24T20:28:02.000340Z

therefore I cannot assert there with it right?

richiardiandrea 2016-05-24T20:28:45.000341Z

the assert is more on my side I guess

2016-05-24T20:29:13.000342Z

assuming envrionment is constant, it will be right if you pass in your dirac-opts as parameter, it will merge defaults, environ and your config

richiardiandrea 2016-05-24T21:00:01.000347Z

ok the patch should be ok, the assert is just to check that we have not bugs and the user does not include inconsistent option to repl and dirac

2016-05-24T21:02:44.000348Z

as it is written currently the assert should never fail

richiardiandrea 2016-05-24T21:30:28.000349Z

yeah

richiardiandrea 2016-05-24T21:30:50.000350Z

over-engineering and against bugs I guess

richiardiandrea 2016-05-24T21:30:59.000351Z

but i'll leave it there

richiardiandrea 2016-05-24T22:35:52.000352Z

The task works like a charm now! I will include it (optionally) in https://github.com/Lambda-X/lambone

2016-05-24T22:56:46.000354Z

@richiardiandrea: cool! thanks for your care