Fork me on GitHub
#datomic
<
2016-11-24
>
karol.adamiec09:11:29

hi, have a question about UUID types. Docs recommend 'Squuids are valid UUIDs, but unlike purely random UUIDs, they include both a random component and a time component.’ Q1: Is there a way to ask Peer over REST for a Squuid? Q2: I can generate v1 (time based) or v4 (RNG based). Is there a preference in case i am unable to use Squuids ?

rauh09:11:37

@karol.adamiec The way they're created is no secret. It's a few lines of code. There is implemenation in java, javascript/cljs and lua and possibly more.

karol.adamiec09:11:48

absolutely right. my google fu got weak in the morning πŸ˜„

karol.adamiec10:11:54

so basically it is replacing the first part of uuid v4 with a timestamp. πŸ‘

seantempesta10:11:33

How could I get the minimum diff (in datoms) between two databases? (same database, different points in time)

karol.adamiec10:11:55

Javascript ES6 impl of Squuids, if anyone fancies πŸ™‚ Thanks for hints @rauh

const [_,_,_,_,_,_,_,_, ...rest] = uuid();
Math.round((new Date()).getTime() / 1000).toString(16) + rest.join('’);

karol.adamiec12:11:26

do lookup refs nest? it would be nice to be able to use that as navigation on identities. IE i have uniqe identity :user/email. i can always grab the user entity using [:user/email β€œβ€]. But then i have a linked entity that has a ref type that is also marked as uniqe identity that is binding to user entity. I would like to grab that entity by saying [:entity/owner [:user/email β€œβ€]]

karol.adamiec12:11:09

i can upsert the :entity/, but i need its id to issue [:db.fn/retractEntity id-of-janes-basket]

karol.adamiec12:11:26

it goes agaist the grain a bit though. I would never need that if not in the REST land ;/

karol.adamiec13:11:21

how does one retrieve a SCALAR value over REST?? [:find ?eid . :in $ :where [?eid :basket/owner 17592186045429]] is not working. Same Q on clojure repl returns scalar value.

karol.adamiec13:11:31

works without the dot .

karol.adamiec13:11:42

over rest, but i want scalar 😞

karol.adamiec15:11:14

"At present, find specifications other than relations (and also pull specifications) are not supported via Datomic's provided REST API. "

karol.adamiec15:11:26

guys seriously PLEASE PLEASE PLEASE!!! make a fix for REST API to return FULL errors instead of 500 status blackbox. This is a timesink of immense proportions and a hair pulling , head bashing ocean of frustration 😱

bhagany16:11:50

@karol.adamiec fwiw, I do [?eid] and then unpack the result in cases like this

karol.adamiec16:11:37

for me it throws

bhagany16:11:52

hrm, I’m a few versions back, maybe they changed it

karol.adamiec16:11:56

[:find [?eid] …

bhagany16:11:58

that’s unfortunate

karol.adamiec16:11:21

basically i can make basic one, but the response is [[234123412]]

karol.adamiec16:11:30

so i unpack it ;(

karol.adamiec16:11:13

@bhagany would you say +1 to having errors from REST endpoint? or is it only me that gets constantly frustrated?

bhagany16:11:27

oh, I’m definitely with you there. endlessly frustrating.

leov17:11:22

hi. quick question - datomic-free says " No matching ctor found for class clj_logging_config.log4j.proxy$org.apache.log4j.WriterAppender$ff19274a"

leov17:11:26

do I miss a library?