Re: What is best practice regarding transducers
If you have a public project on Github that is using transducers, would you please point me to it? I would like to see what you did. Fipp's Clojure 1.7 tuned-up engine uses transducers to emulate mapcat(-with-state), while minimizing intermediate object allocations. Reducers was used previously, but mapcat still required intermediate allocations. Transducers avoid that, but take on a more effectful feel. Code here: https://github.com/brandonbloom/fipp/blob/648d928d94f0b247af9a0c4f95e7ec7024b5b001/src/fipp/engine.cljc -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: What is best practice regarding transducers
xempty is a transducer that just returns an empty result, essentially ignoring the input. The thought was that a degenerate transducer might be useful in a complex chain if you want to stop processing. I haven’t actually used it for anything, just experimenting. On May 10, 2015, at 3:12 PM, piastkra...@gmail.com wrote: That is interesting. What is xempty for? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: What is best practice regarding transducers
That is interesting. What is xempty for? On Friday, May 8, 2015 at 4:09:53 PM UTC-4, miner wrote: I wouldn’t make any claims about “best practices” but I’ve been playing with transducers in my little project: https://github.com/miner/transmuters I have a blog post about how to “chain” transducers. (Not sure that’s the best term.) Basically, I wanted to use a transducer that might terminate (as with ‘take’), and then have another transducer pick up the input from there. The “chain” transducer is like a sequential combination of transducers. Of course, you can mix ‘chain’ and ‘comp’ to make work flows. http://conjobble.velisco.com/blog_posts/transducer-chain In any case, it was a fun experiment for me. Steve Miner steve...@gmail.com javascript: On May 6, 2015, at 11:15 AM, larry google groups lawrenc...@gmail.com javascript: wrote: I would like to write a detailed blog post about how developers are actually using transducers. If you have a public project on Github that is using transducers, would you please point me to it? I would like to see what you did. If you are not using transducers, but you plan to in the near future, I would be curious to see the code where you think they could help you. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: What is best practice regarding transducers
I wouldn’t make any claims about “best practices” but I’ve been playing with transducers in my little project: https://github.com/miner/transmuters I have a blog post about how to “chain” transducers. (Not sure that’s the best term.) Basically, I wanted to use a transducer that might terminate (as with ‘take’), and then have another transducer pick up the input from there. The “chain” transducer is like a sequential combination of transducers. Of course, you can mix ‘chain’ and ‘comp’ to make work flows. http://conjobble.velisco.com/blog_posts/transducer-chain In any case, it was a fun experiment for me. Steve Miner stevemi...@gmail.com On May 6, 2015, at 11:15 AM, larry google groups lawrencecloj...@gmail.com wrote: I would like to write a detailed blog post about how developers are actually using transducers. If you have a public project on Github that is using transducers, would you please point me to it? I would like to see what you did. If you are not using transducers, but you plan to in the near future, I would be curious to see the code where you think they could help you. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: What is best practice regarding transducers
I used transducers here https://github.com/raspasov/neversleep/blob/master/src/neversleep_db/node_keeper.clj Look at all the functions ending in -xf, they return transducers that are being attached to core.async channels. On Wednesday, May 6, 2015 at 8:15:42 AM UTC-7, larry google groups wrote: I would like to write a detailed blog post about how developers are actually using transducers. If you have a public project on Github that is using transducers, would you please point me to it? I would like to see what you did. If you are not using transducers, but you plan to in the near future, I would be curious to see the code where you think they could help you. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: What is best practice regarding transducers
I used it here https://github.com/raspasov/neversleep/blob/master/src/neversleep_db/node_keeper.clj Look at all the functions ending in -xf, they return transducers that are being attached to core.async channels. On Wednesday, May 6, 2015 at 8:15:42 AM UTC-7, larry google groups wrote: I would like to write a detailed blog post about how developers are actually using transducers. If you have a public project on Github that is using transducers, would you please point me to it? I would like to see what you did. If you are not using transducers, but you plan to in the near future, I would be curious to see the code where you think they could help you. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.