This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-03-28
Channels
- # aws (1)
- # beginners (30)
- # boot (7)
- # cider (52)
- # clara (91)
- # cljs-dev (33)
- # cljsjs (1)
- # clojure (447)
- # clojure-brasil (3)
- # clojure-dev (16)
- # clojure-dusseldorf (5)
- # clojure-filipino (1)
- # clojure-italy (29)
- # clojure-sanfrancisco (5)
- # clojure-spec (62)
- # clojure-uk (37)
- # clojurescript (145)
- # clojurewerkz (1)
- # code-reviews (12)
- # community-development (157)
- # cursive (5)
- # datascript (1)
- # datomic (27)
- # editors (42)
- # emacs (5)
- # fulcro (31)
- # hoplon (2)
- # jobs (2)
- # keechma (1)
- # lumo (31)
- # off-topic (2)
- # om (1)
- # onyx (13)
- # parinfer (8)
- # re-frame (13)
- # reagent (32)
- # remote-jobs (4)
- # shadow-cljs (103)
- # spacemacs (15)
- # specter (10)
- # sql (1)
- # tools-deps (35)
- # unrepl (13)
@seancorfield I think there’s a small bug in the core.cache
README example:
https://github.com/clojure/core.cache#example-usage
This line:
(cache/get C1 :c)
should as far as I can see return nil
not 42
.
I think the if
above should be wrapped in a (def C2 ,,,)
and that get call changed to (cache/get C2 :c)
.
If you make that change though you should probably also change the C2
further down to be C3
.Interesting I just noticed:
(= (clojure.lang.PersistentHashSet/create [(clojure.lang.PersistentHashSet/create [1])]) (java.util.HashSet. [(java.util.HashSet. [1])]))
false
why is that? looking through the implementation of PersistentHashSet
I can't see an obvious reason why two versions of #{#{1}}
should not be treated as equal.
b/c they hash differently
@rickmoynihan Good catch!
@seancorfield: n/p 🙂 I see there was patch in JIRA to fix this… but I don’t think what was merged actually fixed it
Hmm, which issue was that?
Oh yeah, I found it. My fault, the patch was correct but not a broad enough example, so I added more code (and got it wrong!).
I think it was this: https://dev.clojure.org/jira/browse/CCACHE-20
yeah… easily done 🙂
the examples are duplicated somewhat with a better explanation in the wiki… might it be worth just having one copy of them?
I understand it’s also useful to have something in the repo/README itself though
It would also help if it said cache/lookup
instead of cache/get
since the latter doesn't actually exist...
README fixed. The wiki needs a more thorough going over since it really should show examples based on atom
wrappers, not the raw immutable caches.
:thumbsup: