dirac 2017-03-11

baptiste-from-paris 2017-03-11T17:16:05.367876Z

hey @darwin , how are you ?

baptiste-from-paris 2017-03-11T17:16:20.369085Z

Front-end question for you if you have some time to answer ^^

baptiste-from-paris 2017-03-11T17:16:51.371456Z

do you use cljs and react, if yes, what cljs lib do you use

reagent for smaller things

would use om.next for something serious

baptiste-from-paris 2017-03-11T17:17:24.373764Z

ok

baptiste-from-paris 2017-03-11T17:17:40.374972Z

have you done some om.next jobs yet ?

not yet, just a mid-size om project a few years back

baptiste-from-paris 2017-03-11T17:18:21.377849Z

ok

baptiste-from-paris 2017-03-11T17:19:07.381167Z

nice !

that’s why I needed cljs-devtools 🙂

… to build something like

baptiste-from-paris 2017-03-11T17:20:38.388524Z

and dirac story ?

baptiste-from-paris 2017-03-11T17:20:45.388952Z

after building devtools ^^

baptiste-from-paris 2017-03-11T17:20:46.389015Z

?

I thought I could do that on top of figwheel

baptiste-from-paris 2017-03-11T17:22:07.394771Z

by the way, have you checked this => https://github.com/cgrand/unrepl

not aware of it, thanks

baptiste-from-paris 2017-03-11T17:23:35.401084Z

really new, like few weeks ago

not sure what problem that unrepl project is exactly trying to solve, will watch it

also it looks like the guy is focused clojure, not on cljs at all

part of the problem with complexity of cljs tooling is that it stems from clojure tools, often as hacks on top of clojure-way IMO

at least the cljs REPL/piggieback story 🙂

baptiste-from-paris 2017-03-11T17:49:47.518061Z

I am not at home but I'll send you the link which explains the reasons

✅ 1

in my namespace I have required [goog.i18n.uChar :as u]. In Dirac repl if I do (u/toCharCode "a") I get ReferenceError: u is not defined. am I missing something? I am sure I am in my namespace in the repl. Other than that everywhere in my source file where I have used u/toCharCode is working as expected.

@yalu you are correct, this broke - I have just tested it in the dirac-sample project

generated javascript is u.toCharCode which is wrong

Thanks @darwin I'm in no hurry I can live with it for now and wait for it to be resolved later. I'm barely getting into Clojure(Script) and must admit I enjoy Dirac very much. Thanks!!!

cool, this is not a blocking issue, just a nuisance I guess

goog.i18n.uChar/toCharCode works as expected, this is just a problem that the alias is for some reason not respected

Thanks I'll use that workaround for now.

@yalu ah, found the reason, it is not a bug, but feature

you have to first (require ‘your.ns) in the REPL

otherwise repl environment doesn’t know anything about your ns form and your aliases

Oh, I got it.. makes sense. Come to think of it that it probably is the same with in other repls as well. I'll go through that sample. Thanks for explaining.

This is traditional REPL behaviour. Dirac does not try to be smart here and try to require the files for you. REPL environment is a separate environment from your runtime. It lives in nREPL server and starts empty.

Figwheel is a bit smarter here and you get access to compiler state which is the result of compiling your cljs project + all incremental builds

that is why you don’t have to do it with Figwheel REPL (AFAIK)

Ah! got it. I'm using boot - that's without Figwheel. I do reload stuff with boot-reload.

ok, what editor/IDE do you use?

ok, so I won’t help you here, but IDEs which have support for nREPL have usually commands for loading files in repl, in-ns and other things as keyboard shortcuts

I have now run into another problem. My foreign-libs require in my namespace is not loading when i do (require 'my.nammespace).

I see, I'll study the integration doc. Seems like a little bit more tweaks are in order when not using leiningen and figwheel.

I don’t know much about foreign-libs

but if you spend time to setup a repro case in dirac-sample project, I would look into it

Thanks for an amazing support. I'll come around to setting up a repo to replicate the type of error, and file an issue with explanations. Support on Boot side of things may improve with things like this.

👌 1