Fork me on GitHub
#datomic
<
2017-02-04
>
nottmey15:02:57

Hi, is it intentional, that the first is not working and second is? Is there a better/clearer workaround?

nottmey15:02:39

[:find ?e ?v
 :where [?e :db/ident ?v] [(not (clojure.string/starts-with? (str ?v) ":db”))]]
...Exception: Unable to resolve symbol: ?v in this context

[:find ?e ?v
 :where [?e :db/ident ?v] [(-> ?v str (clojure.string/starts-with? ":db") not)]]

jarppe17:02:54

I'm implementing a "recent changes" view, where I'm supposed to show who did what, starting from most recent change and going back in time. I need to filter out some changes based on users rights and active filters etc. I'm thinking something like this:

(->> (d/tx-range (d/log conn) nil nil)
     (reverse)
     (filter interesting-to-user?)
     (map tx->changes)
     (take enough-to-fill-screen))
I'm worried about the performance of the (reverse). Is this sensible approach, or is there some better way to traverse from now (or some given point of time) to back in time?

amar19:02:21

Trying to run through the getting started guide using datomic-free-0.9.5554. Running ./bin/run -m datomic.peer-server -p 8998 -a myaccesskey,mysecret -d firstdb,datomic: gets me java.io.FileNotFoundException: Could not locate datomic/peer_server__init.class or datomic/peer_server.clj

amar19:02:34

am i missing something?

thegeez19:02:11

the peer server doesn't work with datomic free, see the bottom of: http://www.datomic.com/get-datomic.html

amar21:02:05

@thegeez thanks. Was just following the tutorial on http://datomic.com Is there another tutorial for getting started?