This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-09
Channels
- # admin-announcements (6)
- # arachne (3)
- # beginners (66)
- # boot (84)
- # braveandtrue (1)
- # cider (84)
- # cljs-site (1)
- # cljsjs (3)
- # cljsrn (2)
- # clojure (138)
- # clojure-austin (2)
- # clojure-czech (1)
- # clojure-gamedev (6)
- # clojure-germany (15)
- # clojure-italy (2)
- # clojure-russia (26)
- # clojure-uk (51)
- # clojurescript (97)
- # css (1)
- # cursive (1)
- # datascript (13)
- # datomic (6)
- # devcards (2)
- # docker (1)
- # emacs (5)
- # hoplon (9)
- # immutant (5)
- # jobs (4)
- # leiningen (6)
- # luminus (27)
- # mount (4)
- # om (16)
- # om-next (4)
- # onyx (15)
- # other-languages (36)
- # overtone (1)
- # proton (3)
- # quil (1)
- # re-frame (11)
- # reagent (24)
- # rum (4)
- # spacemacs (3)
@thedavidmeister: it’s just a half of JS unboxed int range
@fasiha: yes, I’d recommend starting with basic datomic concepts first, because there’s little to none DS tutorials
@fasiha: check out this list https://github.com/tonsky/datascript/wiki/Getting-started
@fasiha: I am working on a series as I learn, not exhaustive or complete yet, but pragmatic. http://udayv.com/clojurescript/clojure/2016/04/28/datascript101/
@tonsky: thanks for weighing in (and thanks for datascript 😄). Because I'm a big baby and didn't want to set up datomic and figure out these schemas etc., I've managed to cobble together enough of a mental picture via your articles, @verma's posts, and http://learndatalogtoday.org to become comfortable referencing the Datomic docs.
If I can ask a question about data layout. Suppose I'm writing a crowdsourced translation site like http://tatoeba.org, which has several phrases in various languages, and people can add translations for them, and vote for which translations are the best. I'm envisioning storing something like this in datascript:
{:original/text "Bonjour"
:original/language :fr
:original/translations [{:translation/text "Hello"
:translation/language :en
:translation/author {:user/username "user1"
:user/email ""}
:translation/upvotes [{:user/username "user10"
:user/email ""}
{:user/username "user11"
:user/email ""}
; ... other users
]}
; another translation
]}
My question is, does it make sense to use a schema with :original/translations
, :translation/author
, and :translation/upvotes
as refs? And with :original/translations
& :translation/upvotes
having cardinality many, while :translation/author
having cardinality of only one?I'm trying to get a handle on when I should use refs versus just a list, and if three levels of nested refs is too much (i.e., will lead to overly complicated queries)
I would keep the data pretty flat and use refs to refer around stuff, this could become a nightmare when querying stuff