[ANN] pjstadig/reducible-stream 0.1.0

73 views
Skip to first unread message

Paul Stadig

unread,
Aug 19, 2016, 2:42:29 PM8/19/16
to Clojure
I have released a library for fusing a stream, decoder, and resource management into a reducible object with the intent to automatically manage resources. You can then apply a transducer to this object. This means you can apply a transducer pipeline that only partially consumes the stream, yet will close the stream nonetheless.

You can also use this object as a sequence, though in that case it will load the entire decoded sequence into memory at the same time. There's a big difference between `(into [] (take 1) (decode-edn! stream))` and `(take 1 (decode-edn! stream))`.

The library is called pjstadig/reducible-stream, and is at https://github.com/pjstadig/reducible-stream/

There is also a blog post covering the concepts: http://paul.stadig.name/2016/08/reducible-streams.html

I hope others find this useful. It's somewhat experimental, so caveat emptor. I welcome feedback.


Cheers!
Paul

Reply all
Reply to author
Forward
0 new messages