dirac

Dirac v1.7.2 is out: https://github.com/binaryage/dirac/releases/tag/v1.7.2
frank 2016-03-17T15:01:42.000104Z

ooh I tried dirac on regular chrome today and it worked 😄

grav 2016-03-17T15:19:56.000105Z

nice!

2016-03-17T15:39:33.000107Z

cool!

frank 2016-03-17T17:04:51.000108Z

I'm starting to get curious about starting figwheel from the repl

frank 2016-03-17T17:05:14.000109Z

but it's much more of a pain to lein repl and wait for it to start and then type something in

frank 2016-03-17T17:05:27.000110Z

and then there's the issue of it not merging in my dirac lein profile 😞

2016-03-17T17:06:05.000111Z

could be possible to automate it with :repl-options {:init …}

frank 2016-03-17T17:06:24.000112Z

😮 didn't know that was a thing

frank 2016-03-17T17:06:37.000113Z

wait of course it's at hing

2016-03-17T17:06:41.000114Z

see dirac docs: https://github.com/binaryage/dirac#start-dirac-agent

frank 2016-03-17T17:06:41.000115Z

herp derp

2016-03-17T17:07:08.000117Z

also figwheel has pretty heavy documentation about booting figwheel from within nREPL

2016-03-17T17:07:17.000118Z

didn’t try it myself

2016-03-17T17:08:53.000121Z

see this: https://github.com/binaryage/dirac/blob/master/src/agent/dirac/agent_impl.clj#L132-L133 you might need to wrap your figwheel init code in future and execute it later

2016-03-17T17:09:37.000123Z

you would need to do the same trick with figwheel I guess

frank 2016-03-17T19:02:48.000124Z

hmm

frank 2016-03-17T19:03:37.000125Z

do you know how I might be able to go about putting this in a script?

frank 2016-03-17T19:03:49.000126Z

sorry if these are more leiningen questions

frank 2016-03-17T19:04:37.000127Z

I tried putting this stuff in a project namespace and requiring it in the init, but I don't think the project namespaces are available in the init stage

2016-03-17T19:05:09.000128Z

you have to put them into :dev or :repl profile, I think

2016-03-17T19:05:20.000129Z

lein repl has different deps than your project

2016-03-17T19:06:17.000130Z

not sure how this works exactly, still open problem with dirac as well: https://github.com/binaryage/dirac/issues/8

2016-03-17T19:06:41.000132Z

you are ProjectFrank at github?

frank 2016-03-17T19:10:49.000133Z

yes

frank 2016-03-17T19:11:08.000134Z

it's not a dependency problem i'm worried about

frank 2016-03-17T19:11:34.000135Z

I'm trying to put the commands to start figwheel in a project namespace, but I can't seem to require the project namespace in the :init

2016-03-17T19:14:12.000136Z

are you sure that your project namespace is on the classpath of the repl process?

frank 2016-03-17T19:14:31.000137Z

so if I try to put (require myapp.core) in the init, it will error

frank 2016-03-17T19:14:35.000138Z

hm

2016-03-17T19:15:48.000139Z

there are two processes, repl process and your app process, both can have different sets of deps (classpaths), if I understand it correctly

2016-03-17T19:16:04.000140Z

:init runs in the repl process

2016-03-17T19:16:35.000141Z

try to debug print classpath inside the :init

2016-03-17T19:17:58.000142Z

btw. what is the error? complaining about missing class or something else?

frank 2016-03-17T19:18:32.000143Z

ah wait

frank 2016-03-17T19:18:41.000144Z

I think I may have done something silly

frank 2016-03-17T19:21:44.000145Z

I got it working!

frank 2016-03-17T19:22:00.000146Z

my ide was out of sync with the filesystem

frank 2016-03-17T19:22:04.000147Z

so I was editing the wrong file

frank 2016-03-17T19:22:15.000148Z

so my ns declaration was weird

2016-03-17T19:22:22.000149Z

hmm

frank 2016-03-17T20:45:55.000150Z

thanks for the tip with the future btw

frank 2016-03-17T20:46:08.000151Z

was definitely necessary to get the repl working with figwheel

👍 1
😡 1