This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-11
Channels
- # aleph (3)
- # beginners (42)
- # cider (219)
- # cljs-dev (39)
- # cljsjs (19)
- # cljsrn (3)
- # clojure (97)
- # clojure-canada (12)
- # clojure-dev (14)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (3)
- # clojure-uk (140)
- # clojurescript (52)
- # clojutre (2)
- # cursive (2)
- # datomic (29)
- # docs (1)
- # duct (13)
- # emacs (19)
- # fulcro (8)
- # funcool (2)
- # graphql (26)
- # hyperfiddle (1)
- # luminus (9)
- # nyc (7)
- # off-topic (26)
- # om (21)
- # onyx (19)
- # overtone (1)
- # pedestal (4)
- # re-frame (10)
- # reagent (109)
- # ring (5)
- # rum (15)
- # shadow-cljs (120)
- # spacemacs (22)
- # specter (7)
- # vim (10)
Does anyone know how to make datomic-free use more memory? I'd like to try -Xms4g -Xmx4g
.
I can't find anything that says what the max memory amount is for the free version, so I'm not sure it's even possible...
what are the advantages of using entities with :db/ident, as opposed to keywords, for enumerations? is it only that you can assign other attributes to those entities?
I think that's about it. Since datomic isn't really a good fit for huge breaking changes to its schema, those advantages are really nice though.
Probably a performance advantage as well
Disadvantage is representation, :mykey
vs 12312454123
I'm trying to rewrite some sql in datalog. Does anyone see what I'm doing wrong here?
;; SELECT sub_type, AVG(duration) AS "Average Duration"
;; FROM trips
;; GROUP BY sub_type;
(d/q '[:find [?st (avg ?d)]
:with ?st
:where
[?e :trip/sub-type ?st]
[?e :trip/duration ?d]]
(d/db conn))
I get ArrayIndexOutOfBoundsException [trace missing]
That gives a result, but the sub-types get coalesced
(d/q '[:find [?st (avg ?d)]
:where
[?e :trip/sub-type ?st]
[?e :trip/duration ?d]]
(d/db conn))
["Casual" 3283.31254089422]
Other sub-types do exist:
(d/q '[:find [?st (avg ?d)]
:where
[?e :trip/sub-type ?st]
[(= ?st "Registered")]
[?e :trip/duration ?d]]
(d/db conn))
["Registered" 1145.4663382594417]
ah ok, you only get the first result now because in :find
you wrap ?st (avg ?d)
with []
(d/q '[:find ?st (avg ?d)
:where
[?e :trip/sub-type ?st]
[?e :trip/duration ?d]]
(d/db conn))
Ah! So I only need :with
if the relvar I'm grouping on isn't included in the :find
clause I bet! That totally fixed it!
Yeah. I tend to get bewildered by find-specifications also, so I think that contributed.
Awesome! Minor issue: in the metrics section (https://docs.datomic.com/cloud/ions/ions-monitoring.html#metrics) the list of required keys includes "type", but in the example code it uses "units" instead.
also the whole monitoring document is repeated twice (it starts over at https://docs.datomic.com/cloud/ions/ions-monitoring.html#sec-9)