Re: [Haskell-cafe] Data.Binary Endianness

2007-09-16 Thread Adrian Hey
Stefan O'Rear wrote: packages is only for those libraries that are shipped with GHC. It is? This is news to me. An obvious counter example seems to be the collections package which has been put here. This is not shipped with ghc and I'm not aware of any plans to do this. Perhaps if this is the

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-15 Thread Sven Panne
On Tuesday 11 September 2007 09:17, Don Stewart wrote: Just in case people didn't see, the `binary' package lives on http://darcs.haskell.org/binary/ However, Lennart Kolmodin, Duncan and I are actively maintaining and reviewing patches, so send them to one (or all) of us for review.

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-15 Thread Stefan O'Rear
On Sat, Sep 15, 2007 at 01:20:57PM +0200, Sven Panne wrote: On Tuesday 11 September 2007 09:17, Don Stewart wrote: Just in case people didn't see, the `binary' package lives on http://darcs.haskell.org/binary/ However, Lennart Kolmodin, Duncan and I are actively maintaining and

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-15 Thread Sven Panne
On Saturday 15 September 2007 20:09, Stefan O'Rear wrote: packages is only for those libraries that are shipped with GHC. First of all, this fact would be new to me, furthermore this would be a highly volatile categorization. Should URLs change when a package suddenly gets into or was thrown

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Sven Panne
On Monday 10 September 2007 19:50, Thomas Schilling wrote: [...] instance Binary MP3 where get = MP3 $ getHeader * getData -- [*] where getHeader = do magic - getWord32le case magic of ... Of course this works in the sense that it

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Don Stewart
sven.panne: On Monday 10 September 2007 19:50, Thomas Schilling wrote: [...] instance Binary MP3 where get = MP3 $ getHeader * getData -- [*] where getHeader = do magic - getWord32le case magic of ... Of course this works in the

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Sven Panne
On Tuesday 11 September 2007 08:14, Don Stewart wrote: sven.panne: On Monday 10 September 2007 19:50, Thomas Schilling wrote: [...] instance Binary MP3 where get = MP3 $ getHeader * getData -- [*] where getHeader = do magic - getWord32le case magic of

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Sven Panne
On Monday 10 September 2007 19:26, Don Stewart wrote: Yep, just send a patch. Or suggest what needs to happen. OK, I'll see what I can do next weekend, currently I'm busy with packaging/fixing GHC. I have similar code lying around in various places, and it would be nice if there was a more

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Don Stewart
sven.panne: On Monday 10 September 2007 19:26, Don Stewart wrote: Yep, just send a patch. Or suggest what needs to happen. OK, I'll see what I can do next weekend, currently I'm busy with packaging/fixing GHC. I have similar code lying around in various places, and it would be nice if

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Ketil Malde
On Tue, 2007-09-11 at 09:10 +0200, Sven Panne wrote: foo :: Binary a = ... - a - ...? This should probably mean foo is using some portable (de-)serialization, but doesn't care about the actual representation, I'm probably missing something, but: How can the format be portable if the

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Jules Bean
Ketil Malde wrote: On Tue, 2007-09-11 at 09:10 +0200, Sven Panne wrote: foo :: Binary a = ... - a - ...? This should probably mean foo is using some portable (de-)serialization, but doesn't care about the actual representation, I'm probably missing something, but: How can the format be

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Ketil Malde
On Tue, 2007-09-11 at 12:01 +0100, Jules Bean wrote: How can the format be portable if the representation isn't unambigously defined? And if it is unabmigously defined, what's wrong with using it for externally defined data formats? It's portable because it works on other machines also

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Jules Bean
Ketil Malde wrote: On Tue, 2007-09-11 at 12:01 +0100, Jules Bean wrote: How can the format be portable if the representation isn't unambigously defined? And if it is unabmigously defined, what's wrong with using it for externally defined data formats? It's portable because it works on other

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Brandon S. Allbery KF8NH
On Sep 11, 2007, at 7:01 , Jules Bean wrote: The actual format used by Data.Binary is not explicitly described in any standard (although in most cases it's moderately obvious, and anyone can read the code), and it's not formally guaranteed that it will never change in a later version

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Neil Davies
So the answer for persistence is Data.Binary - ASN.1 converter that can be used in extrema? On 11/09/2007, Brandon S. Allbery KF8NH [EMAIL PROTECTED] wrote: On Sep 11, 2007, at 7:01 , Jules Bean wrote: The actual format used by Data.Binary is not explicitly described in any standard

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Bryan O'Sullivan
Jules Bean wrote: For these reasons, although it is very cool, I don't think it can be recommended as a basis for long-term file format definitions. Indeed, the authors have never claimed that this is what it's for. Unfortunately, because the authors haven't *disclaimed* this as a purpose,

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Jules Bean
Bryan O'Sullivan wrote: (All of the above speaks of the 'high-level' Data.Binary not the 'low-level'.) Data.Binary *is* the low-level Data.Binary :-) I was distinguishing between these two levels: (1) High-level = Binary typeclass. Contains instances for many, many useful common types, the

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Andrew Coppin
Don Stewart wrote: Just in case people didn't see, the `binary' package lives on http://darcs.haskell.org/binary/ However, Lennart Kolmodin, Duncan and I are actively maintaining and reviewing patches, so send them to one (or all) of us for review. Right. And this is the real

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-11 Thread Don Stewart
andrewcoppin: Don Stewart wrote: Just in case people didn't see, the `binary' package lives on http://darcs.haskell.org/binary/ However, Lennart Kolmodin, Duncan and I are actively maintaining and reviewing patches, so send them to one (or all) of us for review. Right. And

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Jules Bean
Adrian Neumann wrote: For example, the internet states, that the magic number, that puts 'BM' in the first two bytes of the file is 19778. But when I put (19778::Word16) I get 'MB' instead. I read on the german Wikipedia, that bmp uses little endian encoding, but Data.Binary uses big endian.

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Thomas Schilling
On Mon, 2007-09-10 at 11:10 +0100, Jules Bean wrote: The docs are not as well interlinked as you might hope. In fact, the docs on hackage are interlinked nicely. That is, for packages for which the documentation builds. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Jules Bean
Thomas Schilling wrote: On Mon, 2007-09-10 at 11:10 +0100, Jules Bean wrote: The docs are not as well interlinked as you might hope. In fact, the docs on hackage are interlinked nicely. That is, for packages for which the documentation builds. On the documentation page:

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Sven Panne
On Monday 10 September 2007 17:17, Jules Bean wrote: On the documentation page: http://www.cse.unsw.edu.au/~dons/binary/Data-Binary.html [...] Just a small hint: That page seems to be out of date compared to: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/binary-0.3 The

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Thomas Schilling
On Mon, 2007-09-10 at 16:17 +0100, Jules Bean wrote: Thomas Schilling wrote: On Mon, 2007-09-10 at 11:10 +0100, Jules Bean wrote: The docs are not as well interlinked as you might hope. In fact, the docs on hackage are interlinked nicely. That is, for packages for which the

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Thomas Schilling
On Mon, 2007-09-10 at 18:11 +0200, Sven Panne wrote: On Monday 10 September 2007 17:17, Jules Bean wrote: On the documentation page: http://www.cse.unsw.edu.au/~dons/binary/Data-Binary.html [...] Just a small hint: That page seems to be out of date compared to:

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Sven Panne
On Monday 10 September 2007 18:21, Thomas Schilling wrote: On Mon, 2007-09-10 at 18:11 +0200, Sven Panne wrote: [...] The library looks quite nice, but I'm missing support for reading/writing Int{8,16,32,64} maybe this?

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Don Stewart
sven.panne: On Monday 10 September 2007 18:21, Thomas Schilling wrote: On Mon, 2007-09-10 at 18:11 +0200, Sven Panne wrote: [...] The library looks quite nice, but I'm missing support for reading/writing Int{8,16,32,64} maybe this?

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Don Stewart
nominolo: On Mon, 2007-09-10 at 16:17 +0100, Jules Bean wrote: Thomas Schilling wrote: On Mon, 2007-09-10 at 11:10 +0100, Jules Bean wrote: The docs are not as well interlinked as you might hope. In fact, the docs on hackage are interlinked nicely. That is, for packages for

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Thomas Schilling
On Mon, 2007-09-10 at 18:40 +0200, Sven Panne wrote: Type classes might be used to get a slightly smaller API, but I am unsure about the performance impact and how much this would really buy us in terms of the ease of use of the API. There shouldn't be any problem w.r.t. performance, the

Re: [Haskell-cafe] Data.Binary Endianness

2007-09-10 Thread Andrew Coppin
Don Stewart wrote: sven.panne: Of course I can *implement* everything on top of this, but this is not the point. The binary library should have builtin support for more data types, and this is probably not hard to implement. Yeah, just send patches against the darcs repo for either