<br><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke <span dir="ltr">&lt;<a href="mailto:batterseapower@hotmail.com">batterseapower@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
If you want plain text serialization, &quot;writeFile &quot;output.txt&quot; . show&quot;<br>
and &quot;fmap read (readFile &quot;output.txt&quot;)&quot; should suffice...<br>
<br>
Max<br></blockquote><div><br>
This is really a simple way that I like, thanks. Do I understand this 
right, that in this case Haskell run-time will  do all the necessary 
data buffering as needed? <br>
I am trying to solve the following task:<br>
<br>
1) Parse a log of 30 000 lines where each line is about 200 chars. 
Parsing includes splitting out of every line two text fields and 
converting them to GUID. Then build from this log a list of GUIDs and 
save it for future use in text file. As a result list will have 30 000 
integer elements.<br>
<br>
2) Read GUID list and traverse it several times from E(s) to E(N), where
 E(s) - start and  E(N) - end elements of traverse, and  &#39;s&#39; = [1.. 
N-1], so I have the following traversals:<br>
1 ...N<br>
2 .. N<br>
3 .. N<br>
...<br>
N-1 .. N<br>
<br>
3) As a result of this traversal I build a Data.Map holding various pairs of list elements (key) and number of times  <br>
pair occurs in the list (value). I need to save this map in text file for future use.<br>
<br>
4) Read from a text file this map back into Data.Map and build from it another list, save it to text file, etc.<br>
<br>
I wonder how Haskell will distribute memory between the buffer for sequential element access 
(list elements, map tree nodes) and memory for computation while reading in list, Data.Map from file?    <br>
 <br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div class="h5"><br>
On 9 June 2011 08:23, Dmitri O.Kondratiev &lt;<a href="mailto:dokondr@gmail.com">dokondr@gmail.com</a>&gt; wrote:<br>
&gt; Hello,<br>
&gt; Please advise on existing serialization libraries.<br>
&gt; I need a simple way to serialize Data.List and Data.Map  to plain text<br>
&gt; files.<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Dmitri<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br><br clear="all"><br><br>