This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-21
Channels
- # aatree (5)
- # admin-announcements (3)
- # beginners (13)
- # boot (25)
- # cider (4)
- # cljs-dev (2)
- # clojure (107)
- # clojure-austria (2)
- # clojure-japan (12)
- # clojure-russia (128)
- # clojurebridge (2)
- # clojurecup (32)
- # clojurescript (68)
- # css (4)
- # cursive (3)
- # datascript (4)
- # datomic (8)
- # devcards (25)
- # hoplon (19)
- # immutant (2)
- # ldnclj (4)
- # liberator (2)
- # luminus (5)
- # off-topic (184)
- # om (78)
- # onyx (2)
- # portland-or (11)
- # re-frame (27)
- # reagent (11)
- # yada (3)
(list 'proc '(q) (list '(* q 2)) atom-env)
is there a way to express this without the list
keyword, where atom-env
is a variable?
You mean something like this:
(let [atom-env {:a 1}] `(proc (q) (* q 2) ~atom-env))
That uses a backtick quote so you can escape values into it
Be warned that proc
etc will be expanded in the context of the current namespace which may not be what you want?
(I'm not sure what you're trying to do)
or maybe (let [atom-env {:a 1}] (concat '(proc (q) (* q 2)) [atom-env]))
?
i.e., programmatically constructing the list
Anyone around?
Yeah, sort of (late to the convo but...)
Hey, not sure if this is the best place to ask this, but I’m running into an issue where whenever I run lein uberjar to try and compile my app, it is trying to connect to datomic (but since I’m using a different host for datomic in production, it can’t reach that url while it is being compiled), should I just be using a (try … catch …) block for creating the db and connecting to it?
It’s a configuration issue. I’ve simply ‘given up’ and just assign environment variables that can be read through environ (https://github.com/weavejester/environ). I know others prefer reading from profiles.clj
or from some kind of configuration file but, eh, I’m fine with environment variables.