This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-23
Channels
- # bangalore-clj (5)
- # beginners (136)
- # boot (1)
- # bristol-clojurians (6)
- # cider (46)
- # cljs-dev (172)
- # cljsrn (35)
- # clojure (82)
- # clojure-china (2)
- # clojure-dev (9)
- # clojure-dusseldorf (1)
- # clojure-finland (15)
- # clojure-italy (54)
- # clojure-norway (4)
- # clojure-russia (6)
- # clojure-spec (19)
- # clojure-uk (61)
- # clojurebridge (1)
- # clojurescript (55)
- # community-development (23)
- # cursive (7)
- # datomic (19)
- # emacs (10)
- # events (4)
- # fulcro (108)
- # graphql (7)
- # hoplon (1)
- # leiningen (7)
- # lumo (14)
- # off-topic (68)
- # onyx (23)
- # parinfer (8)
- # portkey (40)
- # precept (11)
- # re-frame (5)
- # reagent (40)
- # ring-swagger (5)
- # shadow-cljs (58)
- # specter (5)
- # tools-deps (37)
- # unrepl (13)
- # vim (9)
- # yada (12)
In particular this is the error im having: Error: Var clojure.test.check.generators/simple-type-printable does not exist, clojure.test.check.generators never required
@pablore I’d first check to see if you have [org.clojure/test.check "0.9.0"]
as a dependency. If you are using the cljs.spec.test.alpha
namespace it will attempt to dynamically load test.check
@pablore I wonder if Figwheel is just showing the error, but if it is still possible to take a look at *e
in the REPL. If so, the stacktrace might give a clue.
You are definitely seeing a dynamic loading failure related to spec and test check. (This code is triggering https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/spec/gen/alpha.cljc#L29)
basic question: how do I do
(js/console.log (slurp "fmd.json"))
properly in cljs?
Basically I want to read json data from a URL. Do I need to formally make a GET request of some form?
Got that part working. In Clojure, I can read json via: [clojure.data.json :as json] json/read-str however, clojure.data.json does not appear to exist in cljs How do I do "str -> json" in cljs ?
@thheller: got it; thanks random aside: apparently clojure.data.json/read-str is OKAY with trailing commas, whereas JSON/parse is not
I don't know what the editor has to do with it
thanks, that’s what I was looking for. well spacemacs usually resolves the dependencies and it suggests the imports when u start typing at the top
How would one do the equivalent of (extend-type java.util.Map ...)
for clojurescript? I've just discovered that (extend-type cljs.core/IMap ...)
does not work.
So these days can we just use npm-deps for cljs instead of prepacked cljsjs projects? I'm trying but running into some errors, but it may be that I'm doing it wrong.
I'm trying naively, but getting: Uncaught Error: Undefined nameToPath for react_syntax_highlighter
can anyone point me to some alternative approaches to styling components in cljs? I know there’s garden
and cljss
and stylefy
, but am I missing some other approaches?
[:style "target {rule: val}"]
is sometimes handy, for pseudo selectors for example that are strange to type with clj keywords.
@pmooser Have you heard of the other approaches for this issue? ‘Double bundle’ and shadow-cljs?
@jmckitrick No, I will try to do a search and see what I can find. Thank you.
@pmooser This is my current thinking on how to do this. https://gist.github.com/jmlsf/f41b46c43a31224f46a41b361356f04d In particular, the :npm-deps
feature is really experimental as of cljs 1.9 and doesn’t work in many situations, so I’ve explored other options.
@U8ES68TGX Thank you very much for the writeup. I'm not really a JS guy, so when this stuff breaks, I find it very difficult to even understand what is failing to work, etc. I will read the link you provided, and yeah, I'm having absolutely 0 luck with npm-deps so far for every project I've tried.
Yes, I'm a little worried about that, but it sounds like I just move to that for my main interface to compiling all of my cljs code and then it has the ability to work better with this stuff, if I understand correctly.
but yea, working with javascript libraries when you don’t know javascript is going have a learning curve 🙂
Well, it's funny, because it's not like the semantics or syntax of the underlying language is what is getting me - it's all ecosystem stuff, like how do you solve conflicting dependency versions or what do you do if there's some precompilation step required, etc ...
Ok well thank you very much, I may shift gears to try to get my build (without this npm stuff) working with shadow-cljs, and then maybe revisit this issue once I have that working.
Of course, for me, coming in the reverse direction, it’s the same difficulty I have with cljs
Sure. The cljs folks seem allergic to providing any sort of out-of-the-box experience for anything though, which definitely makes it worse for everyone.
I've been using closure for about a decade now and the cljs stuff is just horribly unclear about even features they are supposed to support, like the bootstrapped repl for example.
Anyway, I love working in clj/cljs but this part is definitely the least fun. Thank you again for your insight!
Does anyone have reccomendation for a bit of sugar around clojurescript profiling? Ideally a lib with a couple of macros in it
So I've got the beginnings of a chrome extension that allows you to inject cljs repl client js file that will connect out to a locally running repl server

i see lots of libs that do something like src/clj and src/cljs
for their file tree, but I’ve also read elsewhere that this isn’t necessary and makes .cljc
harder. which is more idiomatic?
I think what matters there is what directories are being watched by which compilers. Sometimes you may want to watch different directories differently
But unless you need to watch the directories separately, you can use a common directory. The clojurescript source directory on master is pretty intermingled with clj, cljs and cljc files