Re: Programmatic reification

2015-04-24 Thread Timothy Baldridge
Correction on my original response: "The call to eval will be slow..." Reify doesn't take up permgen space with each invocation, but eval will (at least on < JVM 8). Timothy On Fri, Apr 24, 2015 at 2:14 PM, Brian Guthrie wrote: > Thanks for the advice, Timothy. I think this is probably much cl

Re: Programmatic reification

2015-04-24 Thread Brian Guthrie
Thanks for the advice, Timothy. I think this is probably much cleaner than where I ended up, and good advice. I'll let you know how it goes. On Fri, Apr 24, 2015 at 10:45 AM, Timothy Baldridge wrote: > This is a situation where I reach for eval. Construct your reify call as > if you were inside

Re: Programmatic reification

2015-04-24 Thread Brian Guthrie
On Fri, Apr 24, 2015 at 3:51 PM, Timothy Baldridge wrote: > This is why I like component (https://github.com/stuartsierra/component). > The nice thing about using this library is that it encourages you to break > your application into self-contained components. Those components must then > commun

Re: Programmatic reification

2015-04-24 Thread Timothy Baldridge
This is why I like component (https://github.com/stuartsierra/component). The nice thing about using this library is that it encourages you to break your application into self-contained components. Those components must then communicate via protocols, and the result is a modular system that's much

Re: Programmatic reification

2015-04-24 Thread Brian Guthrie
On Fri, Apr 24, 2015 at 10:14 AM, Steven Deobald wrote: > I don't have the answer for you, but I'm definitely curious what your use > case is. Whatcha upto? I've become a firm believer in using protocols to encapsulate operations with side effects, but I don't know of any good test-framework-ag

Re: Programmatic reification

2015-04-24 Thread Timothy Baldridge
This is a situation where I reach for eval. Construct your reify call as if you were inside a macro, but instead of returning data from the macro, call (eval form). The call to reify will be slow (and could cause permgen problems), but if you wrap the form in a function you can cache the function a

Re: Programmatic reification

2015-04-24 Thread Steven Deobald
Okay, Brian. I'll bite. :) I don't have the answer for you, but I'm definitely curious what your use case is. Whatcha upto? Steven Deobald -- ⌀ -- nilenso.com On Fri, Apr 24, 2015 at 7:18 PM, Brian Guthrie wrote: > Hi all, > > Is there a good way to reify protocols programmatically, i.e., by p

Programmatic reification

2015-04-24 Thread Brian Guthrie
Hi all, Is there a good way to reify protocols programmatically, i.e., by passing data structures rather than dropping down into a macro? reify bottoms out in reify*, which doesn't help much. Thanks, Brian -- You received this message because you are subscribed to the Google Groups "Clojure" g