Fork me on GitHub
Daniel Hines00:05:48

For reference, this is what we’re talking about, right?

Daniel Hines00:05:52

Upon closer inspection, it seems like we need both the server and a frontend implementation (which might be clj-3df compiled to browser-compatible cljs)


I have some sketches over at, regarding WASM 3DF + React. But we are currently focusing on the foundations, before exploring more oft that.

👍 1

Apart from integrating the inherently change-based 3DF with the more snapshot-based React, the WASM bundles are quite large still.


The backend is most important, the frontend adds the Datalog syntax. Frontend should already be cljs compatible.


We also support pull queries in the backend now, that still has to be supported in the client. In any case, reactive frontends with just DataScript worked and still works pretty well for us!


Is it correct that Datomic keeps information about attributes as part of the database, using :db/ident, while DataScript uses a separate schema for that? I am looking at vs


Yes @urzds, datascript schema is separate and not queryable afaik

✔️ 1

In datascript, you only add things to the schema when you need special functionality like cardinality many. Otherwise, you don't need to declare attributes in the schema, you can just start using them.


Ah, in Datomic I need to declare everything?

👍 1

Is it correct that I can specify refs as [:unique-key "value"] or {:multiple "val1" :keys "val2"}, and in the former case (`[]`) the referenced element has to exist already, while in the 2nd case (`{}`) it will be automatically created if missing?


(It appears like that in DataScript, but I couldn't find any docs / specifications that seem to enforce this.)


(ds/q '[:find ?tx ?id ?v ?ts
               [?e :entry/value ?v ?tx]
               [?e :entry/id ?id ?tx]
               [?e :entry/ts ?ts ?tx]]
☝️ this query doesn't work under advanced optimizations. any ideas why?


#datascript/DB {:schema nil, :datoms [[1 :entry/id 15 536870914] [1 :entry/ts 1557849697260 536870914] [1 :entry/value {:value 1, :meta nil} 536870914]]}
is the DB for instance


and that query returns #{[nil nil nil nil]}