This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-24
Channels
- # arachne (1)
- # bangalore-clj (11)
- # beginners (177)
- # boot (63)
- # business (1)
- # cljsjs (21)
- # cljsrn (3)
- # clojars (4)
- # clojure (116)
- # clojure-art (4)
- # clojure-belgium (3)
- # clojure-india (1)
- # clojure-italy (6)
- # clojure-russia (14)
- # clojure-spec (8)
- # clojure-uk (67)
- # clojurescript (51)
- # community-development (5)
- # cursive (13)
- # datascript (14)
- # datomic (29)
- # devcards (3)
- # emacs (3)
- # events (3)
- # funcool (4)
- # hoplon (29)
- # mount (6)
- # om (34)
- # om-next (5)
- # onyx (16)
- # perun (8)
- # planck (22)
- # re-frame (13)
- # reagent (5)
- # ring-swagger (21)
- # rum (3)
- # spacemacs (3)
- # specter (1)
- # untangled (39)
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 ?
@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.
absolutely right. my google fu got weak in the morning π
so basically it is replacing the first part of uuid v4 with a timestamp. π
@karol.adamiec I did lua for openresty: https://gist.github.com/rauhs/b93bcf0d676f0335fd483d7c7c77303d
How could I get the minimum diff (in datoms) between two databases? (same database, different points in time)
ah, never mind. I found this article. https://blog.jayway.com/2012/06/27/finding-out-who-changed-what-with-datomic/
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('β);
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 β
i can upsert the :entity/, but i need its id to issue [:db.fn/retractEntity id-of-janes-basket]
it goes agaist the grain a bit though. I would never need that if not in the REST land ;/
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.
works without the dot .
over rest, but i want scalar π
"At present, find specifications other than relations (and also pull specifications) are not supported via Datomic's provided REST API. "
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 π±
@karol.adamiec fwiw, I do [?eid]
and then unpack the result in cases like this
@bhagany over REST?
for me it throws
[:find [?eid] β¦
basically i can make basic one, but the response is [[234123412]]
so i unpack it ;(
@bhagany would you say +1 to having errors from REST endpoint? or is it only me that gets constantly frustrated?