Fork me on GitHub
#dirac
<
2017-03-11
>
baptiste-from-paris17:03:20

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

baptiste-from-paris17:03:51

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

darwin17:03:05

reagent for smaller things

darwin17:03:14

would use om.next for something serious

baptiste-from-paris17:03:40

have you done some om.next jobs yet ?

darwin17:03:03

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

darwin17:03:40

that’s why I needed cljs-devtools 🙂

darwin17:03:52

… to build something like

baptiste-from-paris17:03:45

after building devtools ^^

darwin17:03:41

I thought I could do that on top of figwheel

darwin17:03:30

not aware of it, thanks

baptiste-from-paris17:03:35

really new, like few weeks ago

darwin17:03:15

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

darwin17:03:00

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

darwin17:03:08

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

darwin17:03:30

at least the cljs REPL/piggieback story 🙂

baptiste-from-paris17:03:47

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

yalu18:03:16

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.

darwin20:03:12

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

darwin20:03:49

generated javascript is u.toCharCode which is wrong

yalu20:03:59

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!!!

darwin20:03:28

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

darwin20:03:16

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

yalu20:03:06

Thanks I'll use that workaround for now.

darwin20:03:32

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

darwin20:03:59

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

darwin20:03:18

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

yalu20:03:36

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.

darwin20:03:17

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.

darwin20:03:52

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

darwin20:03:03

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

yalu20:03:34

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

darwin20:03:33

ok, what editor/IDE do you use?

darwin20:03:56

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

yalu20:03:33

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

yalu20:03:23

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

darwin20:03:53

I don’t know much about foreign-libs

darwin20:03:54

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

yalu20:03:40

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.