Fork me on GitHub
#datomic
<
2017-11-30
>
Oliver George00:11:32

Hello. I have a quick "getting started" question.

Oliver George00:11:56

I have a datomic-free transactor running locally but I can't work out how to access it with the datomic.client library

Oliver George00:11:34

Should that be possible? Perhaps I should be using the datomic.api peer library.

Oliver George00:11:51

I think the problem is guessing what parameters I should be passing to datomic.client/connect

Oliver George00:11:15

I haven't found documentation which makes it clear. Based on the db-uri I tried (<!! (client/connect {:db-name "hello" :endpoint "localhost:4334"})) which reports "Incomplete or invalid connection string".

Oliver George01:11:12

Okay, still not working but new error (can't put nil on channel) when I add in more params.

{:db-name "hello"
 :endpoint "localhost:4334"
 :region "none"
 :service "peer-server"
 :account-id datomic.client/PRO_ACCOUNT
 :access-key ""
 :secret ""}

Oliver George01:11:23

API Docs say "alpha, subject to change" so perhaps I should not be using the client api. I'll use the peer api instead.

Oliver George05:11:03

I think I can answer my own question now. On the "Get Datomic" page is says that Free "does not support Datomic Clients".

Oliver George05:11:52

FWIW my main interest in Free was a hassle free dev setup. It can be annoying to have registration things to consider while developing (or experimenting with new tech).

uwo07:11:39

I have a columnar query that I’m using (d/datoms db :aevt …) to make. A large number of the results have to be removed (remove (fn [datom] (:legacy (d/entity db (:e datom))))). Is there a way to filter the db to exclude these legacy entities that would be faster than the approach I’m taking? The legacy entities are the majority of of the results. I’ve also used this:

(defn not-legacy?
  [db ^Datom {:keys [e]}]
  (not (:legacy (d/entity db e))))

(defn without-legacy
  [db]
  (d/filter db not-legacy?))

uwo07:11:56

I realize that that filter has to run for each datom, so I’m not surprised than its slightly slower than just calling remove/filter on the result seq

itaied08:11:29

I would like to develop an open source web app using clojure on top of datomic. I have started by using postgres and the development and deployment options are amazing (free open source support on heroku, openshift etc...). Are there any paas services that provide free datomic connections?

Empperi08:11:24

datomic cloud is coming I think

jaret19:12:50

Yep, we’re still working on it and targeting Q4 this year.

laujensen11:11:14

Whats the correct way to update a datomic installation?

souenzzo19:11:52

{:db/ident :catalog/products :db/valueType :db.type/ref} {:db/ident :product/name :db/valueType :db.type/string} How do I find (in datalog, without clojure) all entities dat has :product/name but dosent "contains" :catalog/_products

marshall19:12:27

You can likely do this with a not clause combined with missing?

marshall19:12:15

oh, actually probably just missing

marshall19:12:23

since you do want things that are missing 🙂

souenzzo19:12:47

It's not missing once reverse reference is just a sugar for pull/entity