Re: Retrieving the namespace an expression in compiled in

2014-10-24 Thread Brian Guthrie
Oopsie daisy. Sorry, James––thanks for your hard work. On Fri, Oct 24, 2014 at 12:59 PM, Herwig Hochleitner wrote: > 2014-10-24 10:20 GMT+02:00 Brian Guthrie : > >> Depending on how deep your investment in Compojure is, I've found ... >> > > I'd imagine James' investment with Compojure to be qui

Re: Retrieving the namespace an expression in compiled in

2014-10-24 Thread James Reeves
On 24 October 2014 09:20, Brian Guthrie wrote: > Depending on how deep your investment in Compojure is, I've found Silk's > ability to derive a path once defined (bidirectional routes) to be quite > handy and very clean. I also prefer its general philosophy, though the > library's in its early da

Re: Retrieving the namespace an expression in compiled in

2014-10-24 Thread Herwig Hochleitner
2014-10-24 10:20 GMT+02:00 Brian Guthrie : > Depending on how deep your investment in Compojure is, I've found ... > I'd imagine James' investment with Compojure to be quite substantial, given that he is its primary author ;-) -- You received this message because you are subscribed to the Googl

Re: Retrieving the namespace an expression in compiled in

2014-10-24 Thread Brian Guthrie
Depending on how deep your investment in Compojure is, I've found Silk's ability to derive a path once defined (bidirectional routes) to be quite handy and very clean. I also prefer its general philosophy, though the library's in its early days and I haven't tested it extensively. However, it does

Re: Retrieving the namespace an expression in compiled in

2014-10-23 Thread Herwig Hochleitner
FWIW, I've made macros out of parse and emit in my data.xml rework, for this purpose. cheers 2014-10-24 0:32 GMT+02:00 Stephen Gilardi : > > On Oct 23, 2014, at 5:06 PM, James Reeves wrote: > > Or a macro: > > (defn endpoint [config] > (routes >(GET "/" [] (resource/url (this-ns) "index.h

Re: Retrieving the namespace an expression in compiled in

2014-10-23 Thread Stephen Gilardi
> On Oct 23, 2014, at 5:06 PM, James Reeves wrote: > > Or a macro: > > (defn endpoint [config] > (routes >(GET "/" [] (resource/url (this-ns) "index.html" Perhaps a macro 'ns-path’: (defn endpoint [config] (routes (GET "/" [] (resource/url (ns-path "index.html”) —Steve --

Retrieving the namespace an expression in compiled in

2014-10-23 Thread James Reeves
I have some code that looks like this: (ns foo.bar.endpoint.example (:require [compojure.core :refer [routes GET]] [duct.util.resource :as resource])) (defn endpoint [config] (routes (GET "/" [] (resource/url "foo/bar/endpoint/example/index.html" In this case the reso