Re: [Haskell-cafe] Binary I/O options

2009-04-25 Thread Denis Bueno
On Fri, Apr 24, 2009 at 08:40, Edward Kmett ekm...@gmail.com wrote: 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

[Haskell-cafe] Binary I/O options

2009-04-24 Thread 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

Re: [Haskell-cafe] Binary I/O options

2009-04-24 Thread 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 leim...@gmail.com wrote: I see that there are a few

Re: [Haskell-cafe] Binary I/O options

2009-04-24 Thread David Leimbach
Sounds like the endorsement I was looking for :-) On Fri, Apr 24, 2009 at 7:18 AM, John Van Enk vane...@gmail.com 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

Re: [Haskell-cafe] Binary I/O options

2009-04-24 Thread Krzysztof Skrzętnicki
There is already a network-bytestring package: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/network-bytestring Regards Christopher Skrzętnicki On Fri, Apr 24, 2009 at 16:20, David Leimbach leim...@gmail.com wrote: Sounds like the endorsement I was looking for :-) On Fri, Apr

Re: [Haskell-cafe] Binary I/O options

2009-04-24 Thread 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. -Edward Kmett On Fri, Apr 24, 2009 at

Re: [Haskell-cafe] Binary I/O options

2009-04-24 Thread David Leimbach
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 gte...@gmail.com There is already a network-bytestring package:

[Haskell-cafe] Binary I/O

2007-04-02 Thread Daniel Brownridge
Hello. I am a Computer Science student attempting to write an emulator using Haskell. One of my main design choices is how to deal with machine code. Clearly it is possible to represent 0's and 1's as ASCII characters, however it strikes me that it would be much nicer to the I/O using raw

Re: [Haskell-cafe] Binary I/O

2007-04-02 Thread Stefan O'Rear
On Mon, Apr 02, 2007 at 03:26:05PM +0100, Daniel Brownridge wrote: Hello. I am a Computer Science student attempting to write an emulator using Haskell. One of my main design choices is how to deal with machine code. Clearly it is possible to represent 0's and 1's as ASCII characters,

Re: [Haskell-cafe] Binary I/O

2007-04-02 Thread Pepe Iborra
On 02/04/2007, at 16:26, Daniel Brownridge wrote: Hello. I am a Computer Science student attempting to write an emulator using Haskell. One of my main design choices is how to deal with machine code. Clearly it is possible to represent 0's and 1's as ASCII characters, however it strikes

Re: [Haskell-cafe] Binary I/O

2007-04-02 Thread Bulat Ziganshin
Hello Daniel, Monday, April 2, 2007, 6:26:05 PM, you wrote: however it strikes me that it would be much nicer to the I/O using raw binary. I don't seem to be able to find much documentation on this. it's our secret weapon ;) http://haskell.org/haskellwiki/Library/Streams