This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-28
Channels
- # aws (7)
- # beginners (69)
- # boot (67)
- # cider (9)
- # cljs-dev (159)
- # cljsrn (2)
- # clojars (25)
- # clojure (345)
- # clojure-austin (9)
- # clojure-berlin (1)
- # clojure-dusseldorf (10)
- # clojure-italy (3)
- # clojure-nl (1)
- # clojure-portugal (1)
- # clojure-spec (73)
- # clojure-uk (59)
- # clojurescript (163)
- # clojurewerkz (1)
- # component (26)
- # core-matrix (2)
- # cursive (20)
- # datascript (32)
- # datomic (15)
- # dirac (16)
- # emacs (3)
- # hoplon (35)
- # jobs-discuss (87)
- # jobs-rus (95)
- # luminus (15)
- # om (135)
- # om-next (3)
- # onyx (47)
- # pedestal (67)
- # perun (74)
- # play-clj (4)
- # portland-or (1)
- # proton (4)
- # re-frame (13)
- # reagent (18)
- # remote-jobs (17)
- # rum (20)
- # specter (11)
- # untangled (101)
- # yada (18)
in datascript, when using d/q, is there a way to get the first result instead of a hash set ?
hmm, I geuss it's at:
find-spec = ':find' (find-rel | find-coll | find-tuple | find-scalar)
find-rel = find-elem+
find-coll = [find-elem '...']
find-scalar = find-elem '.
part of my struggle was: (1) datascript says "we're similar to datomic" (2) datascript doesn't fully detail how the query langauges differ (3) so when reading datomic query syntax, it's never clear whether it also applies to datascript
@qqq main differences are listed here https://github.com/tonsky/datascript#project-status
- not, not-join, or and or-join not supported - Custom aggregate functions are called via aggregate keyword - custom query functions and aggregates should be passed as source instead of being referenced by symbol
does this mean datomic/query syntax and datascript/query syntax are identical (minus the features datascript does not support) ?
while you're here; are you aware of any tutorial for datascript + webgl for gui? I've tried google but not found anything yet
how do I pull out entire entities (with the entity id, and all attribute/value pairs as a map) instead of variables?
one more dumb question: how do I convert an entity to a map? (assoc (ds/entity ...) :kw ... ) ^^ this fails due to "NO protoco method IAssociative .-assoc deined for type datascript.impl.entity/Entity ...)
so how do I convert ehse Entity to a map so I can assocaite to update them to insert them via d/transact! ?
I don't use entities at all (might be missing out on laziness, but oh well), but this question is asked a lot in #datomic as well.
I'm looking at http://docs.datomic.com/transactions.html . Suppose I want to add an entity with 3 attributes. Instead of doing
[db/add e a1 v1]
[db/add e a2 v2]
[db/add e a3 v3]
I there a way to add
e, {a1 v1, a2 v2, a3 v3}
?