This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-09-01
Channels
- # aleph (7)
- # bangalore-clj (1)
- # beginners (89)
- # boot (5)
- # clara (21)
- # cljs-dev (2)
- # cljsrn (57)
- # clojure (58)
- # clojure-austin (1)
- # clojure-conj (1)
- # clojure-italy (5)
- # clojure-losangeles (3)
- # clojure-russia (4)
- # clojure-sanfrancisco (4)
- # clojure-spec (31)
- # clojure-uk (67)
- # clojurebridge (4)
- # clojurescript (56)
- # cursive (92)
- # data-science (4)
- # datomic (15)
- # emacs (23)
- # events (1)
- # fulcro (121)
- # gorilla (2)
- # jobs-discuss (1)
- # juxt (1)
- # lambdaisland (6)
- # lumo (13)
- # off-topic (11)
- # om (1)
- # onyx (17)
- # overtone (5)
- # parinfer (9)
- # planck (3)
- # re-frame (21)
- # reagent (95)
- # ring-swagger (7)
- # spacemacs (58)
- # vim (13)
- # yada (2)
I have some items going into a queue, each items goes through a function that needs almost full cpu-load and memory to complete, so only one can go at a time. What idiomatic tools do we have?
@laujensen core.async
Sorry I meant to post that in #clojure, fortunately Marshell jumps to the rescue 🙂 Thanks I'll have a look
When we need to page a query against a large number of records, and assuming we’re not using a ranged query from the domain, is the next option using d/datoms
?
uwo: yeah, or just do take/drop
good point, that only works after you apply some domain sort
(let [conn @config/conn
schema [{:db/ident :ref/to-many
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/many
:db/isComponent true
;; ^
:db/id (d/tempid :db.part/db)}
{:db/ident :any/thing
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity
:db/id (d/tempid :db.part/db)}]
{db :db-after} (d/with (d/db conn) schema)
tx-data [{:db/id "user"
:any/thing "My User"}
{:db/id "foo"
:any/thing "001"
:ref/to-many ["user"]}
{:db/id "bar"
:any/thing "002"
:ref/to-many ["user"]}]
{:keys [db-after tempids]} (d/with db tx-data)
user (d/entity db-after (d/resolve-tempid db-after tempids "user"))]
(d/touch (:ref/_to-many user)))
There is some way to know if this touch will be on 001 or 002?