
I see that there are a few approaches to doing Binary I/O with Haskell, and the one I'm currently looking at using is Data.Binary from Hackage. I was just wondering what folks were choosing for building networked applications and doing Binary I/O. The approach I was about to take was to use Data.Binary to create ByteString for Network calls with a standard I/O package. Are there other good options? Dave

I use Data.Binary to encode/decode all messages/packets in my P2P VPN
application (http://code.google.com/p/scurry/). It's been quite fast and has
be suitable for all my needs thus far.
On Fri, Apr 24, 2009 at 10:15 AM, David Leimbach
I see that there are a few approaches to doing Binary I/O with Haskell, and the one I'm currently looking at using is Data.Binary from Hackage. I was just wondering what folks were choosing for building networked applications and doing Binary I/O. The approach I was about to take was to use Data.Binary to create ByteString for Network calls with a standard I/O package. Are there other good options?
Dave
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- /jve

Sounds like the endorsement I was looking for :-)
On Fri, Apr 24, 2009 at 7:18 AM, John Van Enk
I use Data.Binary to encode/decode all messages/packets in my P2P VPN application (http://code.google.com/p/scurry/). It's been quite fast and has be suitable for all my needs thus far.
On Fri, Apr 24, 2009 at 10:15 AM, David Leimbach
wrote: I see that there are a few approaches to doing Binary I/O with Haskell, and the one I'm currently looking at using is Data.Binary from Hackage. I was just wondering what folks were choosing for building networked applications and doing Binary I/O. The approach I was about to take was to use Data.Binary to create ByteString for Network calls with a standard I/O package. Are there other good options?
Dave
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- /jve

There is already a network-bytestring package:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-bytestrin...
Regards
Christopher Skrzętnicki
On Fri, Apr 24, 2009 at 16:20, David Leimbach
Sounds like the endorsement I was looking for :-)
On Fri, Apr 24, 2009 at 7:18 AM, John Van Enk
wrote: I use Data.Binary to encode/decode all messages/packets in my P2P VPN application (http://code.google.com/p/scurry/). It's been quite fast and has be suitable for all my needs thus far.
On Fri, Apr 24, 2009 at 10:15 AM, David Leimbach
wrote: I see that there are a few approaches to doing Binary I/O with Haskell, and the one I'm currently looking at using is Data.Binary from Hackage. I was just wondering what folks were choosing for building networked applications and doing Binary I/O. The approach I was about to take was to use Data.Binary to create ByteString for Network calls with a standard I/O package. Are there other good options?
Dave
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- /jve
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

I think I ran across this and somehow thought this was standard, this is
what I was planning to use with Data.Binary :-)
Dave
2009/4/24 Krzysztof Skrzętnicki
There is already a network-bytestring package:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-bytestrin...
Regards
Christopher Skrzętnicki
On Fri, Apr 24, 2009 at 16:20, David Leimbach
wrote: Sounds like the endorsement I was looking for :-)
On Fri, Apr 24, 2009 at 7:18 AM, John Van Enk
wrote: I use Data.Binary to encode/decode all messages/packets in my P2P VPN application (http://code.google.com/p/scurry/). It's been quite fast and has be suitable for all my needs thus far.
On Fri, Apr 24, 2009 at 10:15 AM, David Leimbach
wrote: I see that there are a few approaches to doing Binary I/O with Haskell, and the one I'm currently looking at using is Data.Binary from Hackage. I was just wondering what folks were choosing for building networked applications and doing Binary I/O. The approach I was about to take was to use Data.Binary to create ByteString for Network calls with a standard I/O package. Are there other good options?
Dave
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- /jve
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

The only caveat I would mention about using Data.Binary is that it traverses
lists twice to encode them. Once to determine the length and once to output
the list. As a result you may see space-leak-like behavior when encoding
very long lists with Data.Binary.
-Edward Kmett
On Fri, Apr 24, 2009 at 10:20 AM, David Leimbach
Sounds like the endorsement I was looking for :-)
On Fri, Apr 24, 2009 at 7:18 AM, John Van Enk
wrote: I use Data.Binary to encode/decode all messages/packets in my P2P VPN application (http://code.google.com/p/scurry/). It's been quite fast and has be suitable for all my needs thus far.
On Fri, Apr 24, 2009 at 10:15 AM, David Leimbach
wrote: I see that there are a few approaches to doing Binary I/O with Haskell, and the one I'm currently looking at using is Data.Binary from Hackage. I was just wondering what folks were choosing for building networked applications and doing Binary I/O. The approach I was about to take was to use Data.Binary to create ByteString for Network calls with a standard I/O package. Are there other good options?
Dave
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- /jve
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, Apr 24, 2009 at 08:40, Edward Kmett
The only caveat I would mention about using Data.Binary is that it traverses lists twice to encode them. Once to determine the length and once to output the list. As a result you may see space-leak-like behavior when encoding very long lists with Data.Binary.
The same holds for reading back a very long list. It forces the list spine before you can get at any elements. Denis
participants (5)
-
David Leimbach
-
Denis Bueno
-
Edward Kmett
-
John Van Enk
-
Krzysztof Skrzętnicki