[Haskell-cafe] hash of a lazy bytestring?

2007-05-13 Thread David Roundy
I was just contemplating hashes, and it occurred to me that it would be nice to be able to compute the hash of a lazily constructed bytestring and lazily consume its output without requiring the whole string to ever be in memory. Or in general, it'd be nice to be able to perform two simultaneous

Re: [Haskell-cafe] hash of a lazy bytestring?

2007-05-13 Thread David Roundy
On Sun, May 13, 2007 at 08:30:41AM -0700, David Roundy wrote: do l - readFile foo let len = length l writeFile bar l putStrLn $ Length is ++ show l Oops, of course this should have been show len in the last line. -- David Roundy http://www.darcs.net

Re: [Haskell-cafe] hash of a lazy bytestring?

2007-05-13 Thread Tom Schrijvers
On Sun, 13 May 2007, David Roundy wrote: I was just contemplating hashes, and it occurred to me that it would be nice to be able to compute the hash of a lazily constructed bytestring and lazily consume its output without requiring the whole string to ever be in memory. Or in general, it'd be

Re: [Haskell-cafe] hash of a lazy bytestring?

2007-05-13 Thread Henning Thielemann
On Sun, 13 May 2007, David Roundy wrote: I was just contemplating hashes, and it occurred to me that it would be nice to be able to compute the hash of a lazily constructed bytestring and lazily consume its output without requiring the whole string to ever be in memory. Or in general, it'd