This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-17
Channels
- # admin-announcements (3)
- # announcements (1)
- # aws (3)
- # beginners (41)
- # boot (109)
- # braid-chat (2)
- # braveandtrue (5)
- # cider (11)
- # cljs-dev (38)
- # cljsjs (15)
- # cljsrn (5)
- # clojure (87)
- # clojure-berlin (16)
- # clojure-ireland (1)
- # clojure-japan (10)
- # clojure-madison (3)
- # clojure-nl (3)
- # clojure-poland (6)
- # clojure-russia (115)
- # clojure-sg (1)
- # clojurebridge (35)
- # clojured (8)
- # clojurescript (36)
- # core-async (24)
- # cursive (18)
- # datavis (1)
- # datomic (27)
- # dirac (22)
- # editors (1)
- # emacs (3)
- # events (19)
- # hoplon (149)
- # ldnclj (7)
- # lein-figwheel (1)
- # luminus (1)
- # off-topic (70)
- # om (196)
- # onyx (63)
- # parinfer (155)
- # proton (36)
- # re-frame (69)
- # reagent (2)
- # ring (2)
- # ring-swagger (1)
- # slack-help (4)
- # spacemacs (9)
- # testing (11)
Hi, I am trying write a parametrized query that returns n random elements. The following query works:
(d/q '[:find [(rand 10 ?m) ...]
:in $
:where [?m :cliente/name]]
db )
but this not:
(d/q '[:find [(rand ?n ?m) ...]
:in $ ?n
:where [?m :cliente/name]]
db 10)
ClassCastException clojure.lang.Symbol cannot be cast to java.lang.Number clojure.lang.Numbers.isPos (Numbers.java:96)
Can somebody please point me what I am doing wrong?
ty.@lboliveira: my guess is that Datalog is not dynamic about this
you'll probably want to build the query data structure programatically as a workaround
@nxqd: I think so. I am using without any issues.
@lboliveira: thanks for letting me know, I use datomic-schema, it does seem to have problem with component. I might just use plain datomic schema in the future then
@nxqd: i am using datomic-schema too:
(s/schema foo
(s/fields
[type :enum [:type-a :type-b] :component]
[ref1 :ref]
[ref2 :ref]))])
and this works
what is happening?
@lboliveira: cool, thanks. my mistake
can someone shed some light on how to interpret the MemoryIndexMB metric in Datomic?
@kschrader: MemoryIndexMB is the size of the ‘memory index’ - that is the part of the index with novelty that has not yet been incorporated into the disk index.
@kschrader: I would expect that pattern. As the memory index size approaches the MemoryIndexThreshold, a background indexing job will incorporate that data into the disk index
@kschrader: docs on the memory index are here: http://docs.datomic.com/caching.html#memory-index
perhaps the metrics table on the monitoring page could link out to the longer definitions in the docs
@kschrader: noted, I can take a look at adding more links to the relevant sections that explain what the metrics correspond to.