On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke batterseapo...@hotmail.com
wrote:
If you want plain text serialization, writeFile output.txt . show
and fmap read (readFile output.txt) should suffice...
Max
This code works:
main = do
let xss = [[1,2,3],[4,5,6],[7,8],[9]]
On Friday 10 June 2011, 13:49:23, Dmitri O.Kondratiev wrote:
On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke
batterseapo...@hotmail.com
wrote:
If you want plain text serialization, writeFile output.txt . show
and fmap read (readFile output.txt) should suffice...
Max
This code
On Fri, Jun 10, 2011 at 4:13 PM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
On Friday 10 June 2011, 13:49:23, Dmitri O.Kondratiev wrote:
On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke
batterseapo...@hotmail.com
wrote:
If you want plain text serialization, writeFile
Dmitri O.Kondratiev doko...@gmail.com writes:
xss2 - read `fmap` readFile output.txt
Two questions:
1) Why to use 'fmap' at all if a complete file is read in a single line of
text?
Because it's not 'map', it's more generalized. So the argument ('read'
here) is applied to whatever is
On Friday 10 June 2011, 14:25:59, Dmitri O.Kondratiev wrote:
Two questions:
1) Why to use 'fmap' at all if a complete file is read in a single line
of text?
Well, it's a matter of taste whether to write
foo - fmap read (readFile bar)
stuffWithFoo
or
text - readFile bar
let
Thanks for the excellent explanation! :
On Fri, Jun 10, 2011 at 4:49 PM, Daniel Fischer
daniel.is.fisc...@googlemail.com wrote:
On Friday 10 June 2011, 14:25:59, Dmitri O.Kondratiev wrote:
Two questions:
1) Why to use 'fmap' at all if a complete file is read in a single line
of text?
Hello,
Please advise on existing serialization libraries.
I need a simple way to serialize Data.List and Data.Map to plain text
files.
Thanks,
Dmitri
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On 9 June 2011 17:23, Dmitri O.Kondratiev doko...@gmail.com wrote:
Hello,
Please advise on existing serialization libraries.
I need a simple way to serialize Data.List and Data.Map to plain text
files.
Well, the obvious solution is to just use show and read... though if
you want something
If you want plain text serialization, writeFile output.txt . show
and fmap read (readFile output.txt) should suffice...
Max
On 9 June 2011 08:23, Dmitri O.Kondratiev doko...@gmail.com wrote:
Hello,
Please advise on existing serialization libraries.
I need a simple way to serialize Data.List
Binary should be pretty easy to use (and more advisable if you need
performance), since it defines the Binary instance for every basic type,
including of course Map.
I don't know about cereal, but I suppose it will be pretty much the same.
The major difference is that binary offers lazy
On Thu, Jun 9, 2011 at 11:31 AM, Max Bolingbroke batterseapo...@hotmail.com
wrote:
If you want plain text serialization, writeFile output.txt . show
and fmap read (readFile output.txt) should suffice...
Max
This is really a simple way that I like, thanks. Do I understand this right,
that
Hi Dmitri,
On 9 June 2011 09:13, Dmitri O.Kondratiev doko...@gmail.com wrote:
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?
Your list only has
On Thu, Jun 9, 2011 at 7:23 PM, Max Bolingbroke
batterseapo...@hotmail.comwrote:
Hi Dmitri,
On 9 June 2011 09:13, Dmitri O.Kondratiev doko...@gmail.com wrote:
I wonder how Haskell will distribute memory between the buffer for
sequential element access (list elements, map tree nodes) and
13 matches
Mail list logo