
Thanks. Here you go. --Tim On May 11, 2010, at 12:00 PM, beginners-request@haskell.org wrote:
Send Beginners mailing list submissions to beginners@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-request@haskell.org
You can reach the person managing the list at beginners-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Haskell Serialization (Ashish Agarwal) 2. Re: Problem installing Haskell platform on Ubuntu Karmic (Ashish Agarwal) 3. Re: Haskell Serialization (Daniel Fischer) 4. Re: Haskell Serialization (Stephen Tetley)
----------------------------------------------------------------------
Message: 1 Date: Mon, 10 May 2010 15:00:14 -0400 From: Ashish Agarwal
Subject: Re: [Haskell-beginners] Haskell Serialization To: Stephen Tetley Cc: beginners@haskell.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" the Binary class as it is specialized to serializing values for Haskell only
Can you please expand on this? I've been using Data.Binary to (de)serialize messages for some networking protocols, and have made all my types instances of Binary. Non-Haskell programs will be receiving and sending messages on one end, but I didn't think that mattered since my get and put functions are written to adhere to the protocol's definition. Is there some issue I'm missing?
On Mon, May 10, 2010 at 6:18 AM, Stephen Tetley
wrote:
Hi Tom
If you are interfacing with non-Haskell binary objects - you will want binary parsing / writing rather than simple serialization as the format will be determined by the foreign objects.
You can still use Data.Binary (indeed its probably the best choice), but you will want to use the modules Data.Binary.Get and Data.Binary.Put directly and probably avoid the Binary class as it is specialized to serializing values for Haskell only.
There are probably quite a few libraries on Hackage that you can look at for examples, though there might be more packages that supply parsers only and don't do writing, e.g:
http://hackage.haskell.org/package/pecoff (Parser only)
There will be more among the packages this list that directly depend on Binary:
http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/binary-...
Best wishes
Stephen _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners