This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-11
Channels
- # aws (6)
- # beginners (105)
- # boot (6)
- # cider (50)
- # cljsrn (10)
- # clojure (41)
- # clojure-brasil (6)
- # clojure-italy (25)
- # clojure-nl (17)
- # clojure-russia (4)
- # clojure-serbia (1)
- # clojure-spec (8)
- # clojure-uk (242)
- # clojurescript (27)
- # core-async (10)
- # cursive (5)
- # data-science (9)
- # datomic (43)
- # emacs (6)
- # fulcro (6)
- # graphql (1)
- # javascript (3)
- # juxt (4)
- # lein-figwheel (1)
- # mount (1)
- # onyx (19)
- # parinfer (2)
- # portkey (15)
- # protorepl (1)
- # re-frame (30)
- # reagent (3)
- # ring-swagger (1)
- # shadow-cljs (22)
- # sql (6)
- # tools-deps (23)
- # vim (13)
@pat839 where are you trying to access it from? I tried to run Datomic on Kubernetes a while ago. If I recall correctly I configured host=0.0.0.0 and I had to configure alt-host as well
Tips for using Datomic with an SPA? At the moment using re-frame.
Alright, so it seems in Datomic, you can use arbitrarily nested Clojure expressions, so long as any variables are used at the top-level. e.g., you can't do [(first (.split ?foo)) ?bar]
, but you can do [((fn [^String s] (first (.split s))) ?foo) ?bar]
.
how do i restart a peer after doing a restore-db
without stopping the jvm? is datomic.api/shutdown
sufficient?
did anyone try to "reify" datom?
say, I need to save a fact that an entity e1
relies on [e2 :foo/bar :baz]
, what do I do?
if you can make it match along tx boundaries, you can reuse the TX itself as the reified object
if you need to be more granular, you need to explode the assertion into its own entity
up to you whether the value of :attr
is an actual datomic attribute or other ordinary entities
yeah, the second option fits better, but "explode" describes pretty well how I feel about it, since such dependencies are maybe ~5% out of all the data I expect, and impose this explosion on everything else – is daunting
I need very diverse graph, where such dependencies are not predefined, but rather indicated by user
datomic is not as flexible as RDF (if that is where you are coming from). the only reification datomic has is transactions
I think I need transactions for something else, and "overloading" those with this use case is kinda shooting future myself in a foot
if they are user-created, exploding is probably a better idea--represent the types as data rather than schema
i.e. source of truth is is a higher-order db, but you can derive another one where user types are lowered into datomic attributes and the reification goes away
ah. the nature of user types would likely be volatile enough to make dynamically creating schema and DB - not an option
the purpose would only be to remove the awkwardness of working with higher-order expressions
`[(usermatch ?e ?a ?v) [?e :user/attr ?a] [?a :user.attr/type ?real-a] [?e ?real-a ?v]]`