Re: core.async: Deprecated - this function will be removed. Use transducer instead

2015-02-19 Thread Ben Smith-Mannschott
I'm unclear on one thing: what's the purpose of core.async/pipe? In your blog article, you write: (- source (pipe (chan)) payload-decoder payload-json-decoder) (pipe source destination) just copies elements from source to destination. How is that any different than just using source here

Re: core.async: Deprecated - this function will be removed. Use transducer instead

2015-02-19 Thread Malcolm Sparks
You're right - thanks for that! I've updated the blog article to remove it. On 19 February 2015 at 17:37, Ben Smith-Mannschott bsmith.o...@gmail.com wrote: I'm unclear on one thing: what's the purpose of core.async/pipe? In your blog article, you write: (- source (pipe (chan))

core.async: Deprecated - this function will be removed. Use transducer instead

2015-02-18 Thread Ben Smith-Mannschott
I'm probably just especially dense today, but perhaps someone can give me a poke in the right direction. I'm trying to wrap my head around transducers. (1) For debugging purposes I'd like to be able to consume the values on a channel and put them in a collection to be printed. I'm doing this at

Re: core.async: Deprecated - this function will be removed. Use transducer instead

2015-02-18 Thread Erik Price
(let [out (async/chan 0 (map inc))] (async/pipe in out) out) Earlier in your email you mention printing, however. If you have I/O to perform (like printing), I’m told that you don’t want to do it in a transducer. You can use pipeline-async for this instead: (defn f [v ch] (async/go

Re: core.async: Deprecated - this function will be removed. Use transducer instead

2015-02-18 Thread Ben Smith-Mannschott
Thanks Malcolm, you're blog post was a great help to me. On Thu, Feb 19, 2015 at 3:06 AM, Malcolm Sparks malc...@juxt.pro wrote: I have recently written a blog article which explains how to use transducers with core.async. You can find it here: http://malcolmsparks.com/posts/transducers.html

Re: core.async: Deprecated - this function will be removed. Use transducer instead

2015-02-18 Thread Malcolm Sparks
I have recently written a blog article which explains how to use transducers with core.async. You can find it here: http://malcolmsparks.com/posts/transducers.html On Wednesday, 18 February 2015 21:48:05 UTC, bsmith.occs wrote: I'm probably just especially dense today, but perhaps someone