This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-09-03
Channels
- # announcements (11)
- # atom-editor (8)
- # aws (16)
- # babashka (34)
- # beginners (59)
- # calva (32)
- # cider (8)
- # clj-kondo (43)
- # cljs-dev (52)
- # clojure (26)
- # clojure-europe (11)
- # clojure-italy (2)
- # clojure-nl (5)
- # clojure-spec (16)
- # clojure-uk (44)
- # clojurescript (5)
- # core-async (21)
- # cursive (14)
- # datomic (53)
- # figwheel-main (4)
- # fulcro (5)
- # graphql (6)
- # java (3)
- # kaocha (5)
- # leiningen (6)
- # local-first-clojure (1)
- # malli (25)
- # off-topic (40)
- # other-languages (1)
- # pathom (5)
- # pedestal (3)
- # re-frame (4)
- # reitit (2)
- # reveal (8)
- # rum (21)
- # sci (16)
- # shadow-cljs (90)
- # spacemacs (8)
- # tools-deps (10)
- # vrac (6)
- # xtdb (12)
Why does,
(d/q {:query {:find [?d]
:where [[_ :some.test/thing ?d]]}
:args [db]})
Given me a `java.lang.RuntimeException: "Unable to resolve symbol: ?d in this context"`?Docs don’t specify quoting as necessary: https://docs.datomic.com/cloud/query/query-executing.html#querying-a-database
Maybe, or I’m missing some subtlety. @U064X3EF3?
No, I’ve been doing some other stuff for a while (UX, PLing), but I can’t let dev-local just sit there without trying it out. 🙂
I think the necessity of quoting is considered “obvious”--a query is a data structure and the symbols in it are not supposed to be resolved eagerly in clojure but used inside the query engine. This can’t be solved with a macro because queries don’t need to be literals
@U09R86PA4 surely a macro could technically solve this, since it would be able to walk the inputs and quote the symbols.. it would be ugly, so I way prefer the quoting, but doable?
I guess it could rewrite the symbols to function calls that would try resolve in local environment or resolve in actual symbols instead.. it would be such a terrible hack
It’s not that far-fetched, if you consider the find clause a kind of declaration.
It’s semantically not much weirder than naming parameters in a defn
, even though they may not be declared anywhere beforehand.
And yet we don’t have to (defn hello '[person-name] …)
. But hey, it doesn’t matter much. 🙂
(let [qr [:find]] (q qr))
{qr #object[clojure.lang.Compiler$LocalBinding 0x694600ab clojure.lang.Compiler$LocalBinding@694600ab]}
Hi! In my new job we’re using Datomic Pro on-prem. We’re now trying to setup continuous integration (CircleCI), but lein deps
raises an error that it cannot get datomic from http://my.datomic.com (“not authorized”). What is the “idiomatic” way to use Datomic in continuous integration? Both for testing and for generating release builds? Thanks!
do you have a private maven repo that the CI can access? If so you could mirror the dependency there
you do have a private maven repo with your on-prem license
I'm not sure what's supported in circleci wrt setting up access to it
if you login to your http://my.datomic.com dashboard there are instructions for configuring access to the private maven repo
you’ll need to add user/pw to your leiningen config. older versions required gpg-encrypted key files
Ah that’s good to know, I had no idea. I will have to check with the person who set it up originally then. I think given your info we should be able to get it going, thanks!!
CircleCi has a feature to pass secrets as env. vars., you could use that to pass the pw to the build
if you use leiningen you can call clojure code with unquote, to inject the env var:
:repositories {"my repo"
{:url ""
:name "repo name"
:username "usernamr"
:password ~(System/getenv "DATOMIC_PASSWORD")}}
Is there a way to pull an entity by a composite tuple made out of refs?
Hm.. 😕 I hoped I could get away with lookup refs instead of eids…
Thank you anyway
[Datomic Cloud] I've seen several references in the documentation that says the Application Name, in context of a CF template param, "cannot be changed later" - however, that parameter does show up if I attempt a parameter upgrade in CF. Will bad things happen if I change that? ... Also - what if I really really do need to change the application name? Like in the case of scaling up my system, by breaking the main app out into a new compute group, but needing to still deploy tx fns to the primary group from a separate application name?