This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-21
Channels
- # announcements (13)
- # babashka (29)
- # beginners (52)
- # calva (95)
- # cider (18)
- # clj-commons (7)
- # cljs-dev (42)
- # clojure (121)
- # clojure-australia (1)
- # clojure-dev (39)
- # clojure-europe (36)
- # clojure-france (4)
- # clojure-greece (1)
- # clojure-italy (20)
- # clojure-nl (3)
- # clojure-portugal (1)
- # clojure-uk (7)
- # clojurescript (47)
- # conjure (2)
- # cursive (9)
- # datalevin (5)
- # datascript (8)
- # datomic (68)
- # defnpodcast (2)
- # deps-new (5)
- # fulcro (18)
- # graalvm (21)
- # gratitude (9)
- # jobs (6)
- # jobs-discuss (17)
- # leiningen (3)
- # lsp (80)
- # lumo (1)
- # malli (9)
- # mount (2)
- # off-topic (16)
- # other-languages (8)
- # podcasts-discuss (19)
- # reitit (5)
- # remote-jobs (5)
- # shadow-cljs (29)
- # sql (5)
- # tools-deps (13)
- # vim (11)
- # xtdb (19)
I am looking at some datoms made by Datascript inside Athens. I'd like some help decoding them: [1,"^:",2,536870913]], ["^@",[1,"^:",3,536870913]], ["^@",[1,"^:",5,536870913]], ["^@",[1,"^:",44,536870913]], ["^@",[1,"^3","0",536870913]], ["^@",[1,"^6","Welcome",536870913]], ["^@",[1,"~:page/sidebar",999,536870913]], ["^@",[2,"~:block/open",true,536870913]], ["^@",[2,"~:block/order",0,536870913]], ["^@",[2,"~:block/string","Welcome to Athens, Open-Source Networked Thought!",536870913]], ["^@",[2,"^3","ee770c334",536870913]], I gather that the last number is the transaction timestamp. What is curious is the emergence of the list element "^@"; the rest seem to be E, A, and V, though the "^3" and others like that don't make sense on the A value. I'm guessing that the ^@ is the added? marker?
I don’t have an answer for you here, but I bet the folks in the Athens Discord would gladly help you out with this.
Looks like it might be transit, but I'm not 100% sure https://github.com/cognitect/transit-clj
@U0288B00494 you can use datascript.transit/read-transit-str
to get back an EDN structure; alternatively sometimes https://github.com/borkdude/jet is useful to jump between edn/json/transit
Athens stores its Datascript DB in storage as transit: https://github.com/athensresearch/athens/blob/e2c953b5c2bc9257939784499b0755c81b89c89b/src/cljs/athens/electron.cljs#L80-L81
and you may also be interested in this: https://github.com/tonsky/datascript-transit/blob/master/src/datascript/transit.cljs#L23-L25 - the library stores data as [e a v tx (optional added?)]