Fork me on GitHub
#datomic
<
2015-07-01
>
mitchelkuijpers13:07:06

I have small question, I have a hard time getting a schema in clojure. I keep getting

java.lang.RuntimeException: No reader function for tag db/id

mitchelkuijpers13:07:19

This is my schema

[
 {
  :db/id #db/id[:db.part/user]
  :db/ident :company/name
  :db/valueType :db.type/string
  :db/cardinality :db.cardinality/one
  :db/unique :db.index/value
  :db/doc "The name of the company"
  :db.install/_attribute :db.part/db
  }
 ]

mitchelkuijpers13:07:57

And I try to load it with:

(read-string (slurp "resources/schemas/company.edn"))

mitchelkuijpers13:07:52

I get the error but I don't know how to fix it 😞

a.espolov13:07:14

Guys tell me I understand correctly that the rest datomic only works in dev mode?

mitchelkuijpers13:07:21

Fixed it by using

(d/tempid :db.part/user)
instead of
#db/id[:db.part/user]

tcrayford13:07:31

@mitchelkuijpers: have you already required the datomic namespace?

tcrayford13:07:47

@a.espolov: nope, rest datomic works against any transactor

tcrayford13:07:02

@mitchelkuijpers: I mean, I don't use the tag thing, so not sure I can help 😞

mitchelkuijpers13:07:19

I fixed it already 😉

a.espolov13:07:27

@tcrayford: Unfortunately I did not once its run when datomic is running in sql view

bkamphaus13:07:58

@mitchelkuijpers: the tag is for raw data - i.e., edn. The general recommendation is to do what you’ve done - use d/tempid in code to generate temp ids, use #db/id in edn and read the edn. It might be helpful to see this topic on the mailing list: https://groups.google.com/d/msg/datomic/Fi7iXps2npw/ywEVFKZjJKQJ

mitchelkuijpers13:07:53

Ok awesome thnx @bkamphaus now I get it

bkamphaus13:07:43

@a.espolov: By “sql view” you mean it does not work when using SQL as your Datomic storage? Can you show how you’re invoking the REST launch command? (feel free to obscure any details in URIs, ports, credentials, etc.) As well as the error you’re seeing?

ericfode17:07:05

is there an equivalent to order-by in datomic?

tcrayford17:07:12

@ericfode: in datalog? Not that I'm aware of 😞

tcrayford17:07:26

it's set oriented, so it's distinctly not ordered as far as I remember

marshall17:07:31

@tcrayford: That’s correct, Datomic query returns sets, which are inherently not ordered

ericfode17:07:02

So what do you do when want to page

marshall18:07:06

@ericfode: You have a couple options. You can use direct index access for lazy traversal

marshall18:07:05

You could also include an order attribute and restrict queries based on that

marshall18:07:36

you could also use index-range or datoms to pass a section of an index at a time to query

ericfode18:07:39

I have a at attribute

ericfode18:07:16

(time the entity was made)

spiralganglion19:07:08

Hi @stuarthalloway! Happy to have you here.

spiralganglion19:07:00

Out of curiosity — how large is the Datomic team at Cognitect? I couldn't find a list of devs anywhere on the site.

bhagany19:07:21

@bkamphaus: Just checking in - do you have enough info about the potential bug we discussed last week?

bkamphaus19:07:39

@bhagany: using your db, I’ve been able to reproduce it independently (thanks for passing it along). Nothing additional to report at this time.

bhagany19:07:58

Okay, thanks!

spiralganglion19:07:16

Is there a particular subset who work primarily on Datomic? Again, just curious, no sweat if this isn't public info.

ghadi19:07:09

ivanreese: probably a scarily small team considering how sophisticated datomic is

spiralganglion20:07:47

@ghadi: It's something I wish they were a bit more open about. The lack of info about how Datomic is maintained — and especially, how committed they are to it — makes me reluctant to commit myself (and my company) to it.

Alex Miller (Clojure team)21:07:19

Cognitect is very committed to growing Datomic and there is a solid team behind it

ghadi21:07:25

@ivanreese: anecdotally from what I see on the mailing list, the few bugs that crop up are squashed with a speed I've never seen

spiralganglion22:07:18

@alex Thanks. In all my dealings with them, through all channels, the Cognitect staff have been amazingly responsive. I've just had a hard time figuring out, based on the public signalling, how significant the focus is on Datomic as compared to, say, CLJ or CLJS (which are open source, so it's easier to see who is active and how active they are). After FoundationDB disappeared, I'm a little shy about building my future on top of opaque foundations (pun intended). Your comments here are reassuring, and perhaps my comments might help inform future iterations of your marketing material.