This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-05-15
Channels
- # announcements (2)
- # aws (52)
- # beginners (326)
- # cider (24)
- # clara (7)
- # clj-kondo (14)
- # cljs-dev (175)
- # clojure (183)
- # clojure-ecuador (2)
- # clojure-europe (4)
- # clojure-italy (11)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojure-spec (5)
- # clojure-sweden (5)
- # clojure-uk (103)
- # clojurescript (49)
- # cursive (29)
- # data-science (9)
- # datascript (17)
- # datomic (23)
- # emacs (6)
- # events (4)
- # fulcro (19)
- # graalvm (8)
- # graphql (2)
- # hoplon (36)
- # jobs (1)
- # jobs-discuss (92)
- # juxt (3)
- # luminus (10)
- # off-topic (4)
- # pedestal (8)
- # planck (1)
- # re-frame (59)
- # reagent (1)
- # reitit (22)
- # rewrite-clj (8)
- # ring-swagger (3)
- # shadow-cljs (101)
- # spacemacs (15)
- # tools-deps (36)
- # vim (68)
Hi!
When serializing a DataScript conn
with pr-str
I see that all :datoms
tuples have a fourth value 536870913
e.g. [3 :tag/name \"Clojure\" 536870913]
Since DataScript doesn't maintain a transaction log, is this just a placeholder value that has no use whatsoever?
It's still queryable, and you can maintain your own transaction log.
I'm sure it has more utility, but can't think atm
@danielstockton thanks!
Also https://github.com/tonsky/datascript/wiki/Tips-&-tricks#preserving-order
I have another question regarding serialization:
When I pr-str
an empty db it gives me a nice format:
(pr-str (d/empty-db))
; => "#datascript/DB {:schema {} :datoms[]}"
But when I serialize a conn
I get this format:
(pr-str conn)
; => "#object[cljs.core.Atom {:val #datascript/DB {:schema {...} :datoms [...]}}"
How can I serialize this Atom object with the first format?(pr-str @conn)
The conn is just an atom holding the db value
I was actually wondering yesterday, since it maintains the txid, how hard it would be to create an as-of
function if you maintained timestamps of transactions
hey, just discovered datascript.. do people consider it a viable open source alternative to datomic?
Or, rather, lacks durability.