Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-08 Thread Vincent Hanquez
On 01/08/2012 04:12 AM, Aristid Breitkreuz wrote: Why? I don't actually need the hash object for anything, usually. All I need is the ByteString, and then I need to learn how to use the cereal package to get it... The whole rationale i believe, is having meaningful types associated to your

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-08 Thread Aristid Breitkreuz
To use the hash, I have to convert it to a ByteString, and then I suddenly have lost all this safety. I don't really see how there is any real safety gained. That said, just exposing a direct method of getting to that ByteString without cereal (as Thomas proposed) would be an improvement.

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-08 Thread Vincent Hanquez
On 01/08/2012 02:35 PM, Aristid Breitkreuz wrote: To use the hash, I have to convert it to a ByteString, and then I suddenly have lost all this safety. I don't really see how there is any real safety gained. Using the hash and carrying it around are two different things. You don't get any

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-08 Thread Thomas DuBuisson
Aristid Breitkreuz arist...@googlemail.com wrote: To use the hash, I have to convert it to a ByteString, and then I suddenly have lost all this safety. I don't really see how there is any real safety gained. But that isn't true for all users. Sometimes a hash is computed long before it is

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Greg Weber
great! I am wondering if you can provide even higher-level APIs for the common case: hash - runResourceT $ hashFile my-file and possibly something that runs the ResourceT transformer: hash - runHashFile my-file On Sat, Jan 7, 2012 at 12:16 AM, Felipe Almeida Lessa felipe.le...@gmail.com

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Felipe Almeida Lessa
On Sat, Jan 7, 2012 at 8:06 AM, Greg Weber g...@gregweber.info wrote: I am wondering if you can provide even higher-level APIs for the common case: hash - runResourceT $ hashFile my-file and possibly something that runs the ResourceT transformer: hash - runHashFile my-file That's dead

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Aristid Breitkreuz
And while we're at it, some code to deal with the cumbersome decoding of those hash objects would be nice! Cheers, Aristid Am 07.01.2012 11:07 schrieb Greg Weber g...@gregweber.info: great! I am wondering if you can provide even higher-level APIs for the common case: hash - runResourceT $

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Felipe Almeida Lessa
On Sat, Jan 7, 2012 at 9:12 AM, Aristid Breitkreuz arist...@googlemail.com wrote: And while we're at it, some code to deal with the cumbersome decoding of those hash objects would be nice! I'm sorry, but what do you mean by cumbersome decoding? Cheers, =) -- Felipe.

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Aristid Breitkreuz
Well, how do you get a ByteString from the hash object? Aristid Am 07.01.2012 13:04 schrieb Felipe Almeida Lessa felipe.le...@gmail.com: On Sat, Jan 7, 2012 at 9:12 AM, Aristid Breitkreuz arist...@googlemail.com wrote: And while we're at it, some code to deal with the cumbersome decoding of

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Felipe Almeida Lessa
On Sat, Jan 7, 2012 at 12:16 PM, Aristid Breitkreuz arist...@googlemail.com wrote: Well, how do you get a ByteString from the hash object? Just use encode from Data.Serialize. =) Cheers, -- Felipe. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Aristid Breitkreuz
Yeah and that's annoying IMHO. :) It's not really important though. Aristid Am 07.01.2012 15:39 schrieb Felipe Almeida Lessa felipe.le...@gmail.com: ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Vincent Hanquez
On 01/07/2012 04:21 PM, Aristid Breitkreuz wrote: Yeah and that's annoying IMHO. :) It's not really important though. What would you prefer ? At the moment, i'm inclined to someday move cryptohash apis to be similar to crypto-api. i.e. from a result type being a bytestring to an opaque

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Aristid Breitkreuz
2012/1/8 Vincent Hanquez t...@snarc.org: What would you prefer ? At the moment, i'm inclined to someday move cryptohash apis to be similar to crypto-api. i.e. from a result type being a bytestring to an opaque type with serialize/show instance. Why? I don't actually need the hash object for

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Antoine Latter
On Sat, Jan 7, 2012 at 10:12 PM, Aristid Breitkreuz arist...@googlemail.com wrote: 2012/1/8 Vincent Hanquez t...@snarc.org: What would you prefer ? At the moment, i'm inclined to someday move cryptohash apis to be similar to crypto-api. i.e. from a result type being a bytestring to an opaque

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Thomas DuBuisson
Why? I don't actually need the hash object for anything, usually. All I need is the ByteString, and then I need to learn how to use the cereal package to get it... What would you think if Crypto.Classes exported Data.Serialize.encode? Or how about if it exported Antoine's hash suggestion

Re: [Haskell-cafe] [web-devel] [ANNOUNCE] First release of crypto-conduit

2012-01-07 Thread Antoine Latter
On Sun, Jan 8, 2012 at 12:39 AM, Thomas DuBuisson thomas.dubuis...@gmail.com wrote: Why? I don't actually need the hash object for anything, usually. All I need is the ByteString, and then I need to learn how to use the cereal package to get it... What would you think if Crypto.Classes