[ANN] Shrubbery 0.4.0, a stubbing, spying, and mocking library for Clojure protocols

2016-08-22 Thread Brian Guthrie
Clojure protocols are a great way to encapsulate operations with side effects, but suffer from a lack of general test tooling. Shrubbery provides a small set of basic building blocks for working with them. New in this release: – A throws function, which returns an object suitable for use with the

Re: [ANN] Shrubbery 0.3.0, a stubbing, spying, and mocking library for Clojure protocols

2015-10-06 Thread Brian Guthrie
On Tue, Oct 6, 2015 at 6:16 AM, Atamert Ölçgen wrote: > It would be great if multiple return values for multiple calls were > supported. First use case it something like an iteration, calling some > protocol method repeatedly (possibly with different inputs). Another use > case is just calling it

Re: [ANN] Shrubbery 0.3.0, a stubbing, spying, and mocking library for Clojure protocols

2015-10-05 Thread Brian Guthrie
Great to hear! Let me know if there are any questions I can answer. Feedback gratefully accepted. Cheers, Brian On Mon, Oct 5, 2015 at 11:56 AM, James Reeves wrote: > Very nice. I was looking for something like this. > > - James > > On 5 October 2015 at 15:14, Brian

[ANN] Shrubbery 0.3.0, a stubbing, spying, and mocking library for Clojure protocols

2015-10-05 Thread Brian Guthrie
Clojure protocols are a great way to encapsulate operations with side effects, but suffer from a lack of general test tooling. Shrubbery provides a small set of basic building blocks for working with them: * stub, which accepts a variable list of protocols and a optional hashmap of simple value i

[ANN] Shrubbery 0.2.0, a stubbing, spying, and mocking library for Clojure protocols

2015-05-08 Thread Brian Guthrie
Clojure protocols are a great way to encapsulate operations with side effects, but suffer from a lack of general test tooling. Shrubbery provides a small set of basic building blocks for working with them: * stub, which accepts a protocol and a hashmap of functions and returns an implementation w

Re: Programmatic reification

2015-04-24 Thread Brian Guthrie
4 AM, Steven Deobald > wrote: > >> 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,

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 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

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

Re: [ANN][book] Clojure Reactive Programming

2015-03-28 Thread Brian Guthrie
Congratulations Leo! Folks, I had an opportunity to read some advance chapters and it looked great even then. I'm really looking forward to reading the whole thing. Well done. On Tue, Mar 24, 2015 at 10:25 AM, Leonardo Borges < leonardoborges...@gmail.com> wrote: > Hi all, > > Some of you may kno

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 Jame

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: [ANN] async-sockets - work with sockets using core.async channels

2014-10-07 Thread Brian Guthrie
On Mon, Oct 6, 2014 at 12:10 AM, wrote: > Zach makes an excellent point; I've used AsyncSocketChannels and its irk ( > http://docs.oracle.com/javase/8/docs/api/java/nio/channels/AsynchronousServerSocketChannel.html), > with core.async in the past. Perhaps replacing your direct java.net.Sockets >

Re: [ANN] async-sockets - work with sockets using core.async channels

2014-10-07 Thread Brian Guthrie
On Sun, Oct 5, 2014 at 11:57 PM, Zach Tellman wrote: > If I'm reading this correctly, you're using non-blocking thread pools for > blocking operations on the sockets. Given more than N connections (last > time I looked the thread pool's size was 42), you risk deadlock or at the > very least poor

[ANN] async-sockets - work with sockets using core.async channels

2014-10-05 Thread Brian Guthrie
Hi all, I'm releasing a little library for working with sockets. Feedback and pull requests gratefully appreciated. The skinny --- This library allows you to create socket servers and socket clients and interact with them asynchronously using channels. Servers return a record with a

Re: For async, expose the channel directly or expose a function?

2014-10-05 Thread Brian Guthrie
Fair enough. Thanks again. On Sat, Oct 4, 2014 at 11:49 AM, Stuart Sierra wrote: > > On Sat, Oct 4, 2014 at 12:31 AM, Brian Guthrie > wrote: > >> But I'm troubled by the idea of accepting channels as arguments, even >> though there's a lot to be said for co

Re: For async, expose the channel directly or expose a function?

2014-10-03 Thread Brian Guthrie
way the consumer gets to decide about > buffering. > > -S > > > > > Friday, October 3, 2014 12:06:05 PM UTC-4, Brian Guthrie wrote: >> >> Hi all, >> >> I'm assembling a library for working with sockets asynchronously (both as >> a serve

For async, expose the channel directly or expose a function?

2014-10-03 Thread Brian Guthrie
Hi all, I'm assembling a library for working with sockets asynchronously (both as a server and a client) and was wondering if there was a widely-accepted way of handling channels. The rough idea is that each socket gets two channels, in and out, receiving data in the former and using the latter to