Fork me on GitHub
#datomic
<
2018-05-21
>
Andreas Liljeqvist06:05:22

I would wait for the debate to settle before doing anything. At the moment much is unclear, a simple retract might be enough.

joshkh09:05:56

hi @marshall - i was wondering if any progress was made investigating multiple datomic cloud clients not fetching the latest version of the database using d/db without first "updating" the connection with a bogus call to d/q? https://stackoverflow.com/questions/50347307/how-do-i-keep-two-datomic-cloud-clients-in-sync

joshkh09:05:09

maybe there's an issue we can track? 🙂 we've had to build a phantom query into our API library that gets called every time before a pull is performed (with the other option being to reconnect before each query).

jdkealy16:05:35

Hi i just accidentally called retractEntity on half my development database without making a backup. Is it possible to undo all that ? I can ditch all transactions that happened since that transaction.

marshall16:05:40

you can take the set of datoms from that last transaction (use the log API to get the last transaction)

marshall16:05:43

and then “reverse” them

marshall16:05:56

i.e. change all assertions to retractions and retractions to assertions

jdkealy16:05:04

sweet 🙂

jdkealy16:05:40

wow holy shit that was easy 🙂

dottedmag21:05:43

What's the most natural way to store an array of entities in Datomic? I'm trying to come up with a way to model a manually sorted list of items. First I thought giving every item a "sort id" integer that can be adjusted when a user drags and drops it, but I can't see how to painlessly deal with "no more integers between two items you're trying to drop your item between".

Alex Miller (Clojure team)21:05:03

You can either do ordinals for indexing or a linked list approach

Alex Miller (Clojure team)21:05:29

Both have pros and cons

dottedmag21:05:55

Seems to be a FAQ 🙂

steveb8n22:05:57

@dottedmag https://github.com/vvvvalvalval/datofu supports ordinals and https://github.com/dwhjames/datomic-linklist does linked list. I have been using linked-list but it makes datalog queries tricky so I’ll probably switch to ordinals soon

Dustin Getz23:05:08

Is there a secret Javascript datomic client that it is possible to get access to?

👍 4
souenzzo01:05:59

"No" Datomic client use HTTP https://mvnrepository.com/artifact/com.datomic/clj-client You can inspect some jars, find the clj files, checkout the http calls and reimplement in cljs Remember: There is no stable/public api yet, it may change/break on any update.

Dustin Getz12:05:29

Yeah, I have been through those, it seems super apparent that an internal/unreleased javascript client exists

souenzzo12:05:25

Now you know more then me 👀

madstap13:05:47

I think David Nolen said as much in one of his talks