This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-15
Channels
- # admin-announcements (3)
- # aws (1)
- # beginners (1)
- # boot (73)
- # cider (1)
- # clojure (146)
- # clojure-japan (4)
- # clojure-nl (3)
- # clojure-russia (90)
- # clojurescript (72)
- # community-development (17)
- # core-async (10)
- # cursive (60)
- # datomic (15)
- # devcards (7)
- # emacs (5)
- # events (5)
- # hoplon (3)
- # instaparse (3)
- # ldnclj (48)
- # leiningen (5)
- # off-topic (27)
- # om (120)
- # onyx (31)
- # re-frame (7)
- # reagent (7)
- # ring-swagger (17)
- # yada (3)
@dnolen: any particular reason you're doing keyword indexing instead of using cljs.js-deps/-provides
/ cljs.js-deps/-requires
in places like https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L538 or https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/js_deps.cljc#L130? Is it just to avoid having to do a (when sth ...)
around it to avoid a NPE when it's nil
or is there more to it? It tripped me up where my IJavaScript
implementation didn't have the required field but calculated the deps in the protocol method. Would it make sense to change that to use protocol methods with a when
guard (since I guess getting nil
s there is expected)?
Does anybody know - is there anything to calculate test coverage?
@artemyarulin: cloverage
it’s good for eyeballing, but i wouldn’t break the build over it’s output
Does it support ClojureScript?
don’t think so
yeah, I meant coverage for ClojureScript
@dnolen: thoughts on whether ReactDOM should just be part of cljsjs/react or separately? Don’t see any downsides packaging it separately
@martinklepsch: yeah I think no issues at all packaging it separately
@jaen there’s really no reason to rely on the protocol, all the protocol / defrecord stuff is a bit gratuitous and creates more complications than it’s worth.
@jaen but I’ve been loathe to refactor that stuff. I think there’s a couple cases where IJavaScript might legitimately be a map.
@artemyarulin: Customers? (sorry - couldn’t resist :-))
@colin.yates: Yep, I’ll continue testing in production
@dnolen: updated https://github.com/cljsjs/packages/issues/263 — looks like @juhoteperi already packaged it 5 days ago
@martinklepsch: thanks! sorry I missed that.
np, wasn’t aware either
@dnolen: so if I understood you right you'd rather want a plain map with right keys assoc'd in on creation rather than implementing IJavaScript
on a new record that does things inside its methods, right?
the defrecord and protocols just encourage writing more complicated code than is necessary
the main reason I’ve avoided gratuitous refactoring is that inevitably introduces more bugs
Right, then I'll just keep it a map with provides, requires and preprocessed source assoc'd in on creation.
@dnolen: Ooh. I've missed this. The rapid pace of releases when you get your teeth stuck into something. Hold tight everybody!
also means it’s trivial to overlay local state over the pure remote state (Relay does not have this feature)
(defui Person
static om/Ident
(ident [this {:keys [name]}]
[:person/by-name name])
static om/IQuery
(query [this]
'[:name :points]))
(defui RootView
static om/IQuery
(query [this]
(let [subquery (om/get-query Person)]
`[{:list/one ~subquery} {:list/two ~subquery}])))
What does the ` do?In case someone needs to extend some Closure classes with ClojureScript here's an example which should work with advanced compilation: https://gist.github.com/Deraen/8fede09ce77859004537
and just released Om 1.0.0-alpha3, thanks to @thomasdeutsch for pointing out some query bugs
@thheller if you get the light lightbulb to appear when on top of the form there is an indentation option
@jakemcc I know that .. but it still won't indent (render [] ...)
or any other methods correctly
@thheller: ahh, ok. I didn’t both trying before saying. Many people don’t know about that way changing indentation
@thheller: I just 2 space indent always in Cursive - I find any other rule frustrating
@bensu seems to work if you set it only indent globally but then manually set -> ->> to 0
@dnolen minor "improvement" for https://github.com/omcljs/om/wiki/Components%2C-Identity-%26-Normalization
@dnolen: quick question re: this map
in cljs.closure/add-dependencies
- https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/closure.clj#L661-L667
If I understand correctly you map required-js
to wrap them into the JavaScriptFile
record which is basically a convenience to have cljs.js-deps/-source
implementation read the source from a file pointed by url
, yes? So if I want my file to not be represented on disk (since I don't think it makes sense to spit the preprocessed file to the disk immediately when it's preprocessed) I would have to cond
it and output a different record that does not do this, right? (at least that's how I did spiking it and it seemed to work) Or do you think I should do something else?
@jaen sorry my head space is not closure.clj
today and won’t be until next at week at the soonest
Then I'll do it as I did in the spike and if you have something against that when you can look at it, then it could be refactored, I suppose.
hello guys, a newbie question, how to create from cljs a #error js object?
ah ok found, it's
(ex-info "Bla" {:empty "map"})