Adding binary to the Haskell Platform

Krasimir Angelov kr.angelov at gmail.com
Wed Aug 5 03:15:51 EDT 2009


The binary package is too lazy and in some cases the decoding dies
with "stack overflow". At least this was the situation the last time
when I tried to use it. Since then I am using hacked version which is
stricter. This should be addressed before to add this package to the
platform.

Another problem that I see is that Int is serialized as 64 bit
integer. This makes the serialized data too large. The Int type is
also used internally, for example to store the length of a list, the
size of a map, etc, so you can't avoid the problem by using custom
putInt function. In fact the binary representation is so verbose that
sometimes it is more compact to use textual representation. In my
hacked version I use serialization for integers which use variable
number of bytes. If someone wants to store 64 bit integer then he/she
could always use Int64. I know that the binary package could be
combined with gzip to make the data more compact but this is
unnecessary overhead.

Krasimir


On 8/5/09, Don Stewart <dons at galois.com> wrote:
> Here's a ticket for Simon Marlow's proposal:
>
>    http://trac.haskell.org/haskell-platform/ticket/86
>
> Let's discuss, then have the steering committee recommend yay/nay.
>
> -- Don
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>


More information about the Libraries mailing list