Re: Can (genclass) be changed to operate when not compiling?

2009-07-23 Thread Laurent PETIT
I see in clojure.core that you have gen-and-load-class . This may be what you are after ? HTH, -- Laurent 2009/7/22 Howard Lewis Ship hls...@gmail.com I'm using (:gen-class) to create javax.servlet.Filter, then creating a Jetty instance around the filter. Alas, for this to work, I have

Re: Can (genclass) be changed to operate when not compiling?

2009-07-22 Thread Stuart Sierra
On Jul 21, 6:55 pm, Howard Lewis Ship hls...@gmail.com wrote: It would be nice if (gen-class), when not in compile mode, would still create a class in memory that could be referenced by class name elsewhere in Clojure. The gen-class function does nothing unless the *compile-files* var is

Re: Can (genclass) be changed to operate when not compiling?

2009-07-22 Thread Howard Lewis Ship
On Wed, Jul 22, 2009 at 8:16 AM, Stuart Sierrathe.stuart.sie...@gmail.com wrote: On Jul 21, 6:55 pm, Howard Lewis Ship hls...@gmail.com wrote: It would be nice if (gen-class), when not in compile mode, would still create a class in memory that could be referenced by class name elsewhere in

Re: Can (genclass) be changed to operate when not compiling?

2009-07-22 Thread Dragan Djuric
Howard, Is there a chance that you consider making Cascade servlet- independent? It would be great if Cascade application could be also run, for example, directly as a grizzlet (or some other yet-to-be- created technology). Is there an absolute need to depend on servlets now when we have

Can (genclass) be changed to operate when not compiling?

2009-07-21 Thread Howard Lewis Ship
I'm using (:gen-class) to create javax.servlet.Filter, then creating a Jetty instance around the filter. Alas, for this to work, I have to go through my compile build to create the filter class so that I can let Jetty instantiate the filter. It would be nice if (gen-class), when not in compile

Re: Can (genclass) be changed to operate when not compiling?

2009-07-21 Thread Chris Dean
Howard Lewis Ship hls...@gmail.com writes: It would be nice if (gen-class), when not in compile mode, would still create a class in memory that could be referenced by class name elsewhere in Clojure. +1 I would find this useful as well. Cheers, Chris Dean

Re: Can (genclass) be changed to operate when not compiling?

2009-07-21 Thread Chouser
On Tue, Jul 21, 2009 at 8:04 PM, Howard Lewis Shiphls...@gmail.com wrote: Basically, what I want is for AOT to be an optional optimization, not a requirement.  Currently if your code relies on gen-class, AOT becomes necessary for operation, period. This is how gen-class used to behave.

Re: Can (genclass) be changed to operate when not compiling?

2009-07-21 Thread Adrian Cuthbertson
I get around this for servlets by combining gen-class and proxy in my servlet file; (ns my-servlets.MyServlet (:import (javax.servlet.http HttpServlet HttpServletRequest HttpServletResponse)) (:gen-class :extends HttpServlet) ) (defn req-do [#^HttpServlet svlt #^HttpServletRequest