Re: java interop question

2011-02-04 Thread clwham...@gmail.com
Yes, Ken's original suggestion was correct -- the clojure code had to look like a real java bean. It works perfectly now, so thanks! On Feb 3, 3:55 pm, Stuart Sierra wrote: > I don't know what "select * from StockTick(symbol=..." is doing, but it > looks like the error is coming from the library

Re: java interop question

2011-02-03 Thread clwham...@gmail.com
Thanks for the tip on how to express a java bean -- that appears to only be part of the problem; I still have the error I posted above. But I'm going to keep flailing at it. On Feb 2, 10:11 am, Ken Wesson wrote: > On Wed, Feb 2, 2011 at 11:15 AM, clwham...@gmail.com > > wrote:

java interop question

2011-02-02 Thread clwham...@gmail.com
I am doing some prototyping with the event processing framework Esper (http://esper.codehaus.org/) and I'm running up against my ignorance of clojure/java interop. I would like to create a java bean in clojure that is visible to the Esper runtime; I found some sample Java code that I clojurized as

Re: generator in Clojure

2010-10-17 Thread clwham...@gmail.com
11:56 pm, Konrad Hinsen wrote: > On 14 Oct 2010, at 21:52, clwham...@gmail.com wrote: > > > I need a function that produces the 'next' value from a lazy-seq -- > > something like a Python generator. I imagine it would have to be some > > sort of cl

Re: generator in Clojure

2010-10-14 Thread clwham...@gmail.com
t; the caller as an integer and just use get or nth on the lazy seq. > If you want to stick to your impure function, please mark it with a ! > at the end: next-sine! > > On Thu, Oct 14, 2010 at 9:52 PM, clwham...@gmail.com > > > > > > > > > > wrote: > &g

generator in Clojure

2010-10-14 Thread clwham...@gmail.com
I need a function that produces the 'next' value from a lazy-seq -- something like a Python generator. I imagine it would have to be some sort of closure like: (def next-sine (let [sines (atom (cycle (map sin (range 0 6.28 0.01] #(swap! sines rest))) Is there a more idomatic way o