hey @darwin , how are you ?
Front-end question for you if you have some time to answer ^^
do you use cljs and react, if yes, what cljs lib do you use
yep
reagent for smaller things
would use om.next for something serious
ok
have you done some om.next
jobs yet ?
not yet, just a mid-size om project a few years back
ok
nice !
that’s why I needed cljs-devtools 🙂
… to build something like
and dirac story ?
after building devtools ^^
?
https://github.com/binaryage/dirac/blob/master/docs/motivation.md
started with this figwheel PR: https://github.com/bhauman/lein-figwheel/pull/309
I thought I could do that on top of figwheel
by the way, have you checked this => https://github.com/cgrand/unrepl
not aware of it, thanks
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 🙂
I am not at home but I'll send you the link which explains the reasons
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
go through this section: https://github.com/binaryage/dirac-sample#hello-world
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?
Emacs
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
this can be done with Dirac as well: https://github.com/binaryage/dirac/blob/master/docs/integration.md
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
something similar to https://github.com/binaryage/dirac-sample/commit/8323379949015f7add6e46ee5b7292e74cc11767
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.