This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-07
Channels
- # beginners (41)
- # boot (38)
- # cider (17)
- # cljs-dev (52)
- # cljsjs (3)
- # clojure (200)
- # clojure-italy (8)
- # clojure-russia (50)
- # clojure-spec (28)
- # clojure-uk (45)
- # clojurescript (28)
- # core-async (9)
- # core-matrix (2)
- # cursive (16)
- # datascript (15)
- # datomic (50)
- # dirac (5)
- # emacs (20)
- # figwheel (8)
- # flambo (2)
- # hoplon (10)
- # incanter (1)
- # jobs (1)
- # leiningen (2)
- # lumo (26)
- # mount (171)
- # off-topic (22)
- # om (54)
- # onyx (2)
- # pedestal (27)
- # re-frame (10)
- # reagent (12)
- # ring (27)
- # ring-swagger (3)
- # rum (2)
- # slack-help (1)
- # spacemacs (134)
- # specter (6)
- # sql (15)
- # testing (20)
- # uncomplicate (5)
- # unrepl (49)
- # untangled (9)
- # yada (29)
@dnolen about externs inference: what if every .
function on a js
tagged variable (defn foo [^js/foreign x] (.render x))
automatically inferred the return value as ^js/foreign
also? your stuff currently infers Object
instead. Just like we have not-native
or number
we could have foreign
:tag
that just auto propagates for all .
calls.
sure it doesn't work with type checking enabled ... but no one writes correct types for JS anyway
(defn x [^foreign x] (.. x (foo) (bar) (baz)))
then works and given that Closure stops renaming properties on any property defined in externs anyway
doesn't matter if you define A.prop1
and B.prop2
, prop1
and prop2
will never be renamed on any object
@anmonteiro finally got around to reviewing the patch on http://dev.clojure.org/jira/browse/CLJS-1497
@dnolen did you review patch CLJS-1497-2
?
so what’s not additive in that patch?
I didn’t even see that
so weird, I thought I had done that at some point
we probably even have slack logs of you saying the method should be called -find
my bad
@anmonteiro I think we talked about it a long while ago, but probably got lost in your enthuasism for :npm-deps
😉
fixes a problem where calls to atom
deref
and the others are never fn-var
and never properly called
@dnolen OK renamed the function to -find
http://dev.clojure.org/jira/browse/CLJS-1497
@anmonteiro the test in find
seems a bit strange to me
sorry I don’t follow
I just replaced associative?
with ifind?
remember we don’t want to mess with collections we didn’t write and we don’t know about
ah custom collections
gotcha
does this look better?
(if (ifind? coll)
(-find ...)
(whatever-was-there-before))
cool, changing now
@dnolen OK attached CLJS-1497-4.patch
addressing that comment too 🙂
@anmonteiro isn't find supposed to return nil on not-found?
@favila yeah, are we not doing that?
I’ll look into it during the weekend
we could probably tweak it to look more like Clojure https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/RT.java#L832