Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread Isaac Tsang
That because you REPL had set `*ns*`, when Clojure bootstrap from clojure.main, the *ns* bound to clojure.core On Friday, October 13, 2017 at 9:27:06 AM UTC+8, lawrence...@gmail.com wrote: > > At the REPL, this works perfectly: > > > (defn get-users [] [:susan :kwan]) > > > > (defn

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread Gary Verhaegen
>From the description of your problem, it's not really clear to me why you insist on using strings. Why not use the functions directly? Functions can serve as keys in maps. Granted, it's a bit ugly to print. You could also build a map of string to function yourself. Not sure what the performance

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread lawrence . krubner
Is there a way I can avoid hard-coding " "denormalize.pull-from-mysql"" ? I guess it doesn't matter, but it does seem a little inelegant. On Thursday, October 12, 2017 at 9:54:36 PM UTC-4, Justin Smith wrote: > > you can use (symbol "denormalize.pull-from-mysql" "f") instead > > On Thu, Oct 12,

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-12 Thread Justin Smith
you can use (symbol "denormalize.pull-from-mysql" "f") instead On Thu, Oct 12, 2017 at 6:34 PM wrote: > Nevermind. I found that this works, though I think it is ugly and > inelegant: > > resolved-f (resolve (symbol (str "denormalize.pull-from-mysql/" > f)))

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-12 Thread lawrence . krubner
Nevermind. I found that this works, though I think it is ugly and inelegant: resolved-f (resolve (symbol (str "denormalize.pull-from-mysql/" f))) On Thursday, October 12, 2017 at 9:27:06 PM UTC-4, lawrence...@gmail.com wrote: > > At the REPL, this works perfectly: > > > (defn

(resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-12 Thread lawrence . krubner
At the REPL, this works perfectly: > (defn get-users [] [:susan :kwan]) > > (defn what-is-this-function [f] ((resolve (symbol f > (what-is-this-function "get-users") >[:susan :kwan] In an uberjar this does not work. I read somewhere that the runtime name-space is different than the