This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-23
Channels
- # aws-lambda (1)
- # bangalore-clj (3)
- # beginners (80)
- # boot (8)
- # clojars (1)
- # clojure (200)
- # clojure-dev (37)
- # clojure-greece (26)
- # clojure-italy (11)
- # clojure-norway (3)
- # clojure-russia (14)
- # clojure-spec (21)
- # clojure-uk (30)
- # clojurescript (50)
- # core-logic (10)
- # core-matrix (1)
- # cursive (15)
- # data-science (21)
- # datomic (45)
- # devcards (2)
- # emacs (4)
- # fulcro (12)
- # garden (2)
- # jobs (5)
- # juxt (1)
- # lambdaisland (1)
- # leiningen (4)
- # luminus (20)
- # lumo (26)
- # off-topic (33)
- # onyx (27)
- # parinfer (1)
- # pedestal (3)
- # perun (5)
- # re-frame (20)
- # reagent (27)
- # ring (1)
- # ring-swagger (21)
- # shadow-cljs (259)
- # spacemacs (14)
- # yada (3)
Can someone teach me how to use cljs.analyzer.api
, when I do this:
(require '[cljs.analyzer.api])
(cljs.analyzer.api/all-ns)
I'm getting Error: No protocol method IDeref.-deref defined for type null
what am I doing wrong?@ag I think you need to ensure that the compiler environment is set up. This works:
(cljs.analyzer.api/with-state (cljs.analyzer.api/empty-state) [(cljs.analyzer.api/all-ns)])
(I find it odd that the body argument of with-state
needs to be a sequence; perhaps the signature of with-state
is missing an &
.)I’m having a fair amount of trouble using :npm-deps . From bad babel output on https://www.npmjs.com/package/u2f-api (making it unusable) to having to do a lein clean
instead of page refreshes (or else I get a “Undefined nameToPath”). What’s the appropriate place to file bugs for that kind of thing?
Hello, has any one used "mori" library in pure javascript projects? I've installed mori via npm install and it mostly works, but misses the mori.zipper function. I've looked into mori sources at github and it exports zipper(), so it should be there. I wander what I did incorrectly.
@maximgb those changes (https://github.com/swannodette/mori/commit/df9a69655282d4fa1a0c6036d9ccb7b4efdf9ce0) were never released — the last release is 0.3.2 in january 2015, but they were added in april.
@di so build from source is my only option, isn't it? Why has @dnolen decided against 0.3.3 release? Is mori still an active project and supported?
asking here as well
update: I’ve looked at the externs file and there is only one var
and it’s called ReactDraggable.
i’ve tried using that as well, and still get the same error.
hmm trying to use most of the packages from cljsjs and they don’t seem to work. using this https://github.com/cljsjs/packages/wiki/Using-Packages as the guide
@dhruv1 hey i'm pretty new to clojurescript aswell, but ill try to help. You may have to recompile your project after you add the packages from http://cljsjs.github.io/ .
@brown.joshua49 thank you. i’ve been restarting my repl for a while now
ya that tripped me up for awhile the other day, other thing i thought was a little weird was the namespaces you access the javascript through are not always what they say
i’ve been trying it with lowercase and uppercase. tried following this guide (for a different package) https://www.opensourcery.co.za/2017/02/12/using-semantic-ui-react-with-re-frame/
hey so i haven't gotten it exactly working, but i think it's importing to my project. did you try js/ReactDrag as the ns
@brown.joshua49 i can require it my ns no problem. it’s when i try to use it i get the error
@mahinshaw how do imports work for javascript libraries?
how can i import
same syntax as clojure. https://github.com/omcljs/om/blob/ee4c7ac33934fcd9b3ea663045ced1408dd7df24/examples/mixins/src/core.cljs#L4
hmm.
usign this extern i tried
(:import [react-draggable DraggableCore])
(:import [react-draggable Draggable])
get this error:
---- Could not Analyze ----
No such namespace: react-draggable.DraggableCore, could not locate react_draggable/DraggableCore.cljs, react_draggable/DraggableCore.cljc, or JavaScript source providing "react-draggable.DraggableCore" in file <cljs repl>
---- Analysis Error ----
looks like a problem with my environment. trying the example from the https://github.com/cljsjs/packages/wiki/Using-Packages and usign their examples, i still get the same error i’ve been getting
#object[ReferenceError ReferenceError: showdown is not defined]
#object[ReferenceError ReferenceError: showdown is not defined]
cljs.user>
thanks @mahinshaw and @brown.joshua49 i’ll try to clean up my env and have a look
@dhruv1 hey sorry i didn't realize there are two different react-drag/gable packages available. I still think your issue is with the dependencies if you are getting a reference error. Make sure you're including [cljsjs/react-draggable "3.0.3-0"]. Then to use the component you have to adapt the class
On a side note http://cljsjs.github.io/ is out of date and doesn
Hi everbody! Regarding imports in CLJS, what are the general recommendations around using :as
vs :refer
in :require
? I typically use :as
as I find (some-ns/some-fn ...
to be less ambiguous than (some-fn ...
. However, a co-worker mentioned that my CLJS code will be more easily optimized by the Google Closure compiler if I use :refer
. Thoughts?
@stephenmhopper :refer
has absolutely no effect on the closure compiler
@brown.joshua49 thanks. I'll give that a try in a bit
@thheller thank you