I've been meaning to take a look at blaze-builder anyways, but there is a specific reason to use lazy ByteStrings. I'm using the Aeson library for parsing/encoding JSON data. The encode function in that library chose lazy ByteStrings as the output format. While performance on this project is a factor, I'm reimplementing a project done in Ruby, so it won't be too hard to best it in that dimension in Haskell, regardless of the output format ;)<div>
<br></div><div><br><div class="gmail_quote">On Thu, Sep 1, 2011 at 7:27 AM, Ertugrul Soeylemez <span dir="ltr"><<a href="mailto:es@ertes.de">es@ertes.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Michael Xavier <<a href="mailto:nemesisdesign@gmail.com">nemesisdesign@gmail.com</a>> wrote:<br>
<br>
</div><div class="im">> I've just recently started learning how to use the enumerator<br>
> library. I'm designing a utility that parses a file where each line is<br>
> a JSON object. I've designed it to look like:<br>
><br>
> source enumerator (enumHandle pretty much) -><br>
> chunk by lines (enumeratee) -><br>
> parse a line into an Object (enumeratee) -><br>
> filter objects based on a criteria (enumeratee) -><br>
> limit some keys from each object (enumeratee) -><br>
> encode the object into a lazy bytestring (enumeratee) -><br>
> output the file to stdout (iteratee)<br>
<br>
</div>If there is no specific reason to use lazy ByteStrings, I would suggest<br>
that you use a concept complementary to iteratees, the blaze-builder<br>
library for efficient stream output.<br>
<br>
<br>
Greets,<br>
Ertugrul<br>
<font color="#888888"><br>
<br>
--<br>
nightmare = unsafePerformIO (getWrongWife >>= sex)<br>
<a href="http://ertes.de/" target="_blank">http://ertes.de/</a><br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Michael Xavier<br><a href="http://www.michaelxavier.net" target="_blank">http://www.michaelxavier.net</a><div><a href="http://www.linkedin.com/pub/michael-xavier/13/b02/a26" target="_blank">LinkedIn</a></div>
<br>
</div>