This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-25
Channels
- # aleph (2)
- # aws (2)
- # beginners (37)
- # boot (23)
- # cider (29)
- # clara (34)
- # cljs-dev (2)
- # cljsrn (17)
- # clojure (230)
- # clojure-dev (47)
- # clojure-italy (11)
- # clojure-nl (2)
- # clojure-poland (5)
- # clojure-russia (52)
- # clojure-sg (1)
- # clojure-spec (70)
- # clojure-uk (73)
- # clojurescript (31)
- # core-async (9)
- # cursive (15)
- # datomic (39)
- # events (1)
- # graphql (1)
- # lein-figwheel (2)
- # luminus (13)
- # off-topic (2)
- # onyx (29)
- # other-lisps (1)
- # parinfer (15)
- # pedestal (14)
- # re-frame (41)
- # reagent (24)
- # ring (4)
- # ring-swagger (12)
- # rum (1)
- # spacemacs (3)
- # specter (1)
- # test-check (13)
- # timbre (9)
- # unrepl (29)
- # vim (5)
Stupid question: So, with the new Node package interop, do I add the NPM deps to the Project.clj or just the Build.clj?
Into your cljs compiler options. If you use cljsbuild then in project.clj otherwise build.clj.
Has anyone seen this warning before? WARNING: Use of undeclared Var cljs.js/lib at line 450 …/.boot/cache/tmp/…/app/cm9/pref5e/public/js/app.out/cljs/js.cljs
@borkdude Yes. It is fairly innocuous and an (if anything) affects self-host: https://dev.clojure.org/jira/browse/CLJS-2141
Why is the AST for ((fn [a b] (+ a b)) 5 7)
almost 3000 lines long? For proof, see http://tiny.cc/cljs-ast
Real question, that site’s just a place to see for yourself
it's got the environment expanded at every node... most of the bulk is under :env
keys
because AST is very verbose
looks like there's a lot of :js-globals
that are repeated in various nodes
most of those are actually the same identical object referred to from multiple locations
is there a way to get a brief version?
Like an existing AST-cleaner lib
oh, sweet. I’ll check that out.
@bronsa I can’t seem to require that namespace in figwheel. (require '[cljs.analyzer])
works but (require '[cljs.analyzer.utils])
doesn’t.
@chalcidfly That code is Clojure (it is in a file ending with *.clj
; you’ll need to essentially copy the relevant code you desire to a ClojureScript file (`*.cljs` or *.cljc
)
oh, thank you.
Is there a tool that people here use to detect things like unused namespaces in .cljs files?
@rgdelato find ./src -type f -name "*.cljs" | xargs -n 1 joker --lintcljs
worked quite nicely!
how would you make a function like keyword
that takes a string and makes it a fully qualified keyword in the current namespace?
I found that apparently you can't get the namespace at runtime in cljs, so I got the namespace in a macro via (get-in &env [:ns :name])
instead
if i'm writing code to manage state in a SPA / re-frame app that has to interface with a remote API, does it make sense to use core.async? or should i just go with something simpler like a promise library?
@yedi just use promise/deferred if all you have is request/response cycle
core.async would make more sense if you would have complex data flow in the app, like many dependent requests for example
also a bigger dependency to take on