I&#39;ve been meaning to take a look at blaze-builder anyways, but there is a specific reason to use lazy ByteStrings. I&#39;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&#39;m reimplementing a project done in Ruby, so it won&#39;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">&lt;<a href="mailto:es@ertes.de">es@ertes.de</a>&gt;</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 &lt;<a href="mailto:nemesisdesign@gmail.com">nemesisdesign@gmail.com</a>&gt; wrote:<br>
<br>
</div><div class="im">&gt; I&#39;ve just recently started learning how to use the enumerator<br>
&gt; library. I&#39;m designing a utility that parses a file where each line is<br>
&gt; a JSON object.  I&#39;ve designed it to look like:<br>
&gt;<br>
&gt; source enumerator (enumHandle pretty much) -&gt;<br>
&gt; chunk by lines (enumeratee) -&gt;<br>
&gt; parse a line into an Object (enumeratee) -&gt;<br>
&gt; filter objects based on a criteria (enumeratee) -&gt;<br>
&gt; limit some keys from each object (enumeratee) -&gt;<br>
&gt; encode the object into a lazy bytestring (enumeratee) -&gt;<br>
&gt; 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 &gt;&gt;= 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>