This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-14
Channels
- # aws (1)
- # bangalore-clj (1)
- # beginners (48)
- # boot (65)
- # braveandtrue (1)
- # cider (1)
- # clara (15)
- # cljs-dev (7)
- # clojure (179)
- # clojure-austin (1)
- # clojure-denmark (2)
- # clojure-greece (68)
- # clojure-italy (7)
- # clojure-russia (41)
- # clojure-serbia (9)
- # clojure-spec (44)
- # clojure-uk (27)
- # clojured (15)
- # clojureremote (20)
- # clojurescript (70)
- # community-development (2)
- # core-async (10)
- # cursive (14)
- # datomic (36)
- # defnpodcast (3)
- # emacs (13)
- # events (13)
- # hoplon (33)
- # immutant (18)
- # instaparse (2)
- # jobs (29)
- # jobs-discuss (71)
- # klipse (38)
- # lein-figwheel (4)
- # leiningen (1)
- # mount (34)
- # off-topic (36)
- # om (3)
- # onyx (51)
- # pedestal (5)
- # perun (8)
- # proton (2)
- # rdf (8)
- # re-frame (33)
- # reagent (24)
- # remote-jobs (1)
- # rum (6)
- # spacemacs (2)
- # specter (14)
- # sql (5)
- # testing (6)
- # untangled (1)
- # vim (10)
- # yada (3)
i see https://github.com/lbradstreet/cljs-uuid-utils – is this compatible with datomic.api/squuid
?
There is an implementation in datascript
@chrisblom (datomic.api/next-t db)
Well I assume that's what it does.
@chrisblom yeah, probably
why do you need this though ?
for syncing with datascript, i want to store the t of latest transaction so i can use it to generate diffs
but is that not what d/basis-t gives you?
yes, normally it would, but only some of my transactions are relevant for the diffing
i have transaction that update some data model, and transactions that update metrics
yeah storing derived data is currently a bit hacky in Datomic IMHO
I don't think there's a performance penalty, but there may be an expressivity penalty, especially when using Datalog rules, and not / not-join / or / or-join clauses
Having said that, you may be able able to circumvent those limitations using db functions in query
yeah, sounds good, i will try that, i don't need complicated queries for my use case
Well there may be an performance penalty too, you may need to go through 2 scalar indexes instead of 1 ref index at some point.
If you run into the expressivity penalties, don't forget that you can use the secondary db as a dumb key-value store using db functions (a dumb key-value store with awesome local caching and time-travel features 😉 )
@curtosis: we use conformity with mount, but we just load all norms when we initialize the datomic connection
I think your idea is mildly crazy, but if you want to do it, the result of running conformity does give you a list of the norms that were transacted, and conceivably you could stash those somewhere and hook them into the component lifecycle
For my use case it's much easier just to load everything all at once so as to ensure the latest code runs against the latest schema. I could see needing to mess around with it in a more finicky manner if you have more complex deployments though
@timgilbert thanks, that’s helpful. Realistically, the codebase isn’t likely to be that disjoint from the schema. The main use case I’m working toward is “build this version using these 4 of 7 available schema chunks”, but I should probably resist the temptation to overabstractify it.
Anyone know of a lib for visualizing datomic schema. Something reminiscent to a generated ERD of sorts, even if the relationships themselves were missing? ED instead of ERD, heh.