This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-11-09
Channels
- # aws (3)
- # bangalore-clj (3)
- # beginners (40)
- # boot (53)
- # cider (1)
- # cljs-dev (124)
- # cljsrn (22)
- # clojure (105)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-russia (35)
- # clojure-spec (9)
- # clojure-uk (30)
- # clojurebridge (25)
- # clojurescript (107)
- # datomic (18)
- # dirac (21)
- # events (6)
- # hoplon (29)
- # leiningen (5)
- # off-topic (40)
- # om (17)
- # onyx (25)
- # parinfer (2)
- # pedestal (4)
- # perun (2)
- # planck (1)
- # protorepl (6)
- # re-frame (18)
- # reagent (15)
- # ring-swagger (4)
- # specter (2)
- # test-check (7)
- # testing (3)
- # untangled (45)
- # vim (2)
@jaret and @marshall — hi 🙂 is there any chance that Datomic’s backup/restore tooling, when using the s3:// destination, can use the AWS credential profile facility .. e.g. AWS_PROFILE=<my-profile-name> $DATOMIC_PATH/runtime/bin/datomic restore-db “$DATOMIC_PRODUCTION_BACKUPS_S3_BUCKET/<database>" $DATOMIC_URI/<database>
with no AWS_ACCESS_KEY or secret set will currently error: com.amazonaws.AmazonClientException: Unable to load AWS credentials from any provider in the chain
however AWS_PROFILE=<my-profile-name> aws s3 ls
lists the bucket just fine
if it’s not supported, i humbly request that it be added. if it is supported, i humbly request guidance on how to use it correctly. thank you 🙂
guys, need a pointer. has anyone some nice way to work with datomic style identifiers in javascript? what do you do? const name = product[':part/name’];
is unnaceptable in long run. just trying to get some opinions.
i can map all keys using heuristics so :part/name
becomes partName
, or write DTO’s (sigh..) by hand.. or?
fishing for opinions! 😛
I donno if its a good approach but here we change / for _ when this data goes to our response.
@karol.adamiec maybe look at how datascript does it (it has a JS api)
@robert-stuttaford: I agree this is annoying. FWIW, I've worked around it by having a script that sets AWS_ACCESS_KEY_ID=$(aws configure get aws_access_key_id)
so at least I just have to manage the key in one place
Though I guess that's not exactly the same use-case you've got
@lellis: I solved that by using EDN as a transport layer and ClojureScript as a consumer 😛
...but when I was consuming datomic output with plain JS, I tended to use a JSON translation layer on the server (Clojure) side which converted the EDN to JSON, generally by dropping the namespaces from the keys.
Oh,, sorry, that response was for @karol.adamiec
IMHO it depends on what you're using on the server side. One option might be using [transit](https://github.com/cognitect/transit-format) which is a performant serialization layer for EDN, but I've never tried using its JS API.
I have a completely unrelated question. I'm doing a bunch of queries where I start from one object and then navigate fairly far away from it traversing ref
s, and I'm wondering if I can get the pull syntax or something else to just retrieve some data at the end instead of needing to reach deep into a nested tree.
So for example, I have a project, which has an ID and a floorplan, and the floorplan has an area which has an ID. I've got the area ID and I want the project ID. What I have now is the following but it doesn't seem very elegant:
(let [p (d/pull
db
[{:area/floorplan [{:floorplan/project [:project/id]}]}]
[:area/id my-area-id])]
(get-in p [:area/floorplan :floorplan/project :project/id]))
I mean, I can wrap it up in a function, but I'd like to not need to have to specify the key sequence twice
Anyways, looking for any more pleasant ways to express this