Re: [Haskell-cafe] Data.Binary and error handling

2009-12-03 Thread Alexey Khudyakov
On Fri, Nov 27, 2009 at 10:36 PM, Mark Lentczner ma...@glyphic.com wrote: I'm in the same quandary: Data.Binary from the binary package has no error handling Data.Serialize from the cereal package uses only strict ByteString I was going to add error handling to Binary as a weekend project

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-29 Thread Khudyakov Alexey
В сообщении от 27 ноября 2009 23:55:47 Don Stewart написал: alexey.skladnoy: It does but it was already noted that cereal uses strict bytestrings which are not really convenient when dealing with huge inputs. One may end up using both binary and cereal which is not really satisfactory.

[Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Alexey Khudyakov
Hello Is there any plans to add error handling for binary? When it comes to binary parsing most awkward part is error handling I presume answer will be like there are some vague plans but no one to implement them so the second question how could it be done? Naive implementation of error

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Svein Ove Aas
On Fri, Nov 27, 2009 at 12:00 PM, Alexey Khudyakov alexey.sklad...@gmail.com wrote: Hello  Is there any plans to add error handling for binary? When it comes to binary parsing most awkward part is error handling I presume answer will be like there are some vague plans but no one to

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Mark Lentczner
I'm in the same quandary: Data.Binary from the binary package has no error handling Data.Serialize from the cereal package uses only strict ByteString I was going to add error handling to Binary as a weekend project (it isn't that hard), but when I contacted the developers of binary, I was

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Don Stewart
alexey.skladnoy: Hello Is there any plans to add error handling for binary? When it comes to binary parsing most awkward part is error handling It is now available in the 'cereal' package. A strict binary with explicit, checked error handling. ___

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Khudyakov Alexey
В сообщении от 27 ноября 2009 23:09:53 Don Stewart написал: alexey.skladnoy: Hello Is there any plans to add error handling for binary? When it comes to binary parsing most awkward part is error handling It is now available in the 'cereal' package. A strict binary with explicit,

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Don Stewart
alexey.skladnoy: В сообщении от 27 ноября 2009 23:09:53 Don Stewart написал: alexey.skladnoy: Hello Is there any plans to add error handling for binary? When it comes to binary parsing most awkward part is error handling It is now available in the 'cereal' package. A strict

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Khudyakov Alexey
В сообщении от Пятница 27 ноября 2009 23:55:47 вы написали: It is quite hard to do a good job of lazy input, but explicit checked errors (turning it into an Either Error a makes the whole stream strict!). It does. To a degree. For example if one need to read 8 bytes to decide whether parsing

Re: [Haskell-cafe] Data.Binary and error handling

2009-11-27 Thread Antoine Latter
On Fri, Nov 27, 2009 at 3:14 PM, Khudyakov Alexey alexey.sklad...@gmail.com wrote: You might want to look at designs that interleave error tokens in the stream. Could you point out any examples? http://hackage.haskell.org/packages/archive/tar/0.3.1.0/doc/html/Codec-Archive-Tar.html#v%3Aread