Re: [Haskell-cafe] MD5?

2007-11-17 Thread Andrew Coppin
Neil Mitchell wrote: Hi The MD5SUM.EXE file I have chokes if you ask it to hash a file in another directory. It will hash from stdin, or from a file in the current directory, but point-blank refuses to hash anything else. Try http://www.cs.york.ac.uk/fp/yhc/dependencies/UnxUtils.zip

Re[2]: [Haskell-cafe] MD5?

2007-11-17 Thread Bulat Ziganshin
Hello Andrew, Saturday, November 17, 2007, 5:45:29 PM, you wrote: wasn't MD5 itself. It's all the datatype conversions. Nowhere in the Haskell libraries can I find any of these functions: I had to write all these myself, by hand, and then check that I got it's a good case for making useful

[Haskell-cafe] Small optimisation question

2007-11-17 Thread Andrew Coppin
Suppose I write something like this: foo :: [Int] foo = concat (replicate 4 [4,7,2,9]) The value of foo is completely determined at compile-time. So, will the compiler generate calls to concat and replicate, or will it just insert a large list constant here? Obviously, once somebody has

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Stefan O'Rear
On Sat, Nov 17, 2007 at 04:01:34PM +, Andrew Coppin wrote: Suppose I write something like this: foo :: [Int] foo = concat (replicate 4 [4,7,2,9]) The value of foo is completely determined at compile-time. So, will the compiler generate calls to concat and replicate, or will it just

[Haskell-cafe] Network.HTTP problem

2007-11-17 Thread Radosław Grzanka
Hello, I have a problem with Network.HTTP module (http://www.haskell.org/http/) version 3001.0.0 . I have already mailed Bjorn Bringert about it but I didn't get answer yet so maybe someone here can help me. GHC v. 6.6.1 Ubuntu 7.10 x86_64 . I have turned on debug flag. Using get example

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Andrew Coppin
Stefan O'Rear wrote: On Sat, Nov 17, 2007 at 04:01:34PM +, Andrew Coppin wrote: Suppose I write something like this: foo :: [Int] foo = concat (replicate 4 [4,7,2,9]) The value of foo is completely determined at compile-time. So, will the compiler generate calls to concat and

Re: [Haskell-cafe] MD5?

2007-11-17 Thread Andrew Coppin
Bulat Ziganshin wrote: Hello Andrew, Saturday, November 17, 2007, 5:45:29 PM, you wrote: wasn't MD5 itself. It's all the datatype conversions. Nowhere in the Haskell libraries can I find any of these functions: I had to write all these myself, by hand, and then check that I got

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Stefan O'Rear
On Sat, Nov 17, 2007 at 04:10:58PM +, Andrew Coppin wrote: Stefan O'Rear wrote: On Sat, Nov 17, 2007 at 04:01:34PM +, Andrew Coppin wrote: Suppose I write something like this: foo :: [Int] foo = concat (replicate 4 [4,7,2,9]) The value of foo is completely determined at

Re[2]: [Haskell-cafe] MD5?

2007-11-17 Thread Bulat Ziganshin
Hello Andrew, Saturday, November 17, 2007, 7:13:23 PM, you wrote: Out of curiosity, what's hackage, and how do you put stuff on it? google for haskell hackage. i never uploaded anything to it, but site should contain instructions while working on my own program, i've made bindings to aes,

Re: [Haskell-cafe] MD5?

2007-11-17 Thread Thomas DuBuisson
BTW, while I'm here... I sat down and wrote my own MD5 implementation. How is the performance on this new MD5 routine? It looks like we have gone from just one Haskell MD5 implementation (that I know of) to three in a short period of time. This isn't counting the C bindings, of coarse. Also,

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Andrew Coppin
Stefan O'Rear wrote: On Sat, Nov 17, 2007 at 04:10:58PM +, Andrew Coppin wrote: OK. I presume this is due to the fact that the result of executing an expression at compile-time could be arbitrarily large? Yes, and it's not even guaranteed to terminate. That would be

Re: [Haskell-cafe] MD5?

2007-11-17 Thread Andrew Coppin
Thomas DuBuisson wrote: BTW, while I'm here... I sat down and wrote my own MD5 implementation. How is the performance on this new MD5 routine? Ask me *after* I modify it to give the correct answers. ;-) Interesting question: How do you determine when an implementation of something as

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Stefan O'Rear
On Sat, Nov 17, 2007 at 04:31:33PM +, Andrew Coppin wrote: Both. A curious feature of the STG machine is that constructor thunks and evaluated data are represented identically in memory. Ooo... As per the Lambdacats Boxed cat has a uniform representation? Well, presumably the guys who

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Andrew Coppin
Stefan O'Rear wrote: On Sat, Nov 17, 2007 at 04:31:33PM +, Andrew Coppin wrote: Well, presumably the guys who designed STG did it this way for a really good reason, and they know far more than me, so... ;-) The STG-machine was brilliant when it was designed, but times have

Re: [Haskell-cafe] My MD5

2007-11-17 Thread Andrew Coppin
Thomas DuBuisson wrote: BTW, while I'm here... I sat down and wrote my own MD5 implementation. Huzzah! It works! :-D I had a silly bug where somewhere deep in the heart of the huge complex message padding algorithm, I forgot to add on the cumulative total to the message size count.

Re: [Haskell-cafe] Re: Knot tying vs monads

2007-11-17 Thread John D. Ramsdell
Thank you for your interesting reply. I found it enlightening. Compared to that, I'm missing the specification part for your pretty printer. How's it supposed to lay out? The specification is in Paulson's book. The pretty printer is used with S-Expressions, and the block layout generates

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Jake McArthur
On Nov 17, 2007, at 11:26 AM, Stefan O'Rear wrote: The STG-machine was brilliant when it was designed, but times have changed. In particular, indirect jumps are no longer cheap. Pointer tagging has allowed STG to hobble into the 21st century, but really the air is ripe for a new abstract

Re: [Haskell-cafe] MD5?

2007-11-17 Thread Derek Elkins
On Sat, 2007-11-17 at 16:40 +, Andrew Coppin wrote: Thomas DuBuisson wrote: BTW, while I'm here... I sat down and wrote my own MD5 implementation. How is the performance on this new MD5 routine? Ask me *after* I modify it to give the correct answers. ;-) Interesting

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread Stefan O'Rear
On Sat, Nov 17, 2007 at 12:39:14PM -0600, Jake McArthur wrote: On Nov 17, 2007, at 11:26 AM, Stefan O'Rear wrote: The STG-machine was brilliant when it was designed, but times have changed. In particular, indirect jumps are no longer cheap. Pointer tagging has allowed STG to hobble into the

Re: [Haskell-cafe] Re: Knot tying vs monads

2007-11-17 Thread Derek Elkins
On Sat, 2007-11-17 at 13:30 -0500, John D. Ramsdell wrote: ... It seems rather hard to avoid lazyness in the current version of Haskell when it's not wanted. I hope one of the proposals for deep strictness makes it into Haskell prime. In my application, there is one datastructure, such that

Re: [Haskell-cafe] MD5?

2007-11-17 Thread Don Stewart
bulat.ziganshin: Hello Andrew, Saturday, November 17, 2007, 5:45:29 PM, you wrote: wasn't MD5 itself. It's all the datatype conversions. Nowhere in the Haskell libraries can I find any of these functions: I had to write all these myself, by hand, and then check that I got it's a

Re: [Haskell-cafe] Small optimisation question

2007-11-17 Thread jerzy . karczmarczuk
Stefan O'Rear writes: Jake McArthur wrote: On Nov 17, 2007, at 11:26 AM, Stefan O'Rear wrote: The STG-machine was brilliant when it was designed, but times have changed. ... really the air is ripe for a new abstract machine. Do you know of any candidates? Hahaha - no. (Do ask John

[Haskell-cafe] Re: Knot tying vs monads

2007-11-17 Thread apfelmus
John D. Ramsdell wrote: Compared to that, I'm missing the specification part for your pretty printer. How's it supposed to lay out? The specification is in Paulson's book. The pretty printer is used with S-Expressions, and the block layout generates compact, indented output that is good when

[Haskell-cafe] Re: MD5?

2007-11-17 Thread Aaron Denney
On 2007-11-17, Andrew Coppin [EMAIL PROTECTED] wrote: pack8into16 :: [Word8] - Word16 pack8into32 :: [Word8] - Word32 unpack16into8 :: Word16 - [Word8] unpack32into8 :: Word32 - [Word8] pack8into16s :: [Word8] - [Word16] pack8into32s :: [Word8] - [Word32] etc. I had to write

Re: [Haskell-cafe] Re: Binary [was MD5]

2007-11-17 Thread Andrew Coppin
Aaron Denney wrote: On 2007-11-17, Andrew Coppin [EMAIL PROTECTED] wrote: pack8into16 :: [Word8] - Word16 pack8into32 :: [Word8] - Word32 unpack16into8 :: Word16 - [Word8] unpack32into8 :: Word32 - [Word8] pack8into16s :: [Word8] - [Word16] pack8into32s :: [Word8] - [Word32]

Re: [Haskell-cafe] Network.HTTP problem

2007-11-17 Thread Bjorn Bringert
On Nov 17, 2007, at 17:07 , Radosław Grzanka wrote: Hello, I have a problem with Network.HTTP module (http://www.haskell.org/http/) version 3001.0.0 . I have already mailed Bjorn Bringert about it but I didn't get answer yet so maybe someone here can help me. GHC v. 6.6.1 Ubuntu 7.10 x86_64 .

Re: [Haskell-cafe] Network.HTTP problem

2007-11-17 Thread Graham Fawcett
On Nov 17, 2007 4:52 PM, Radosław Grzanka [EMAIL PROTECTED] wrote: Also: $ ./get http://digg.com/rss/indexvideos_animation.xml However this one still seems to hang and eventually ends with : get: recv: resource vanished (Connection reset by peer) It's not a Haskell problem. It looks

[Haskell-cafe] Re: [Haskell] AmeroHaskell

2007-11-17 Thread Tim Chevalier
On 11/17/07, Derek Elkins [EMAIL PROTECTED] wrote: However, to put things in motion for something concrete at all, we're hoping to put together a meeting taking place in the Portland area as that seems most convenient to the most people who had registered interest in AmeroHaskell and an easy

Re: [Haskell-cafe] Re: [Haskell] AmeroHaskell

2007-11-17 Thread Derek Elkins
On Sat, 2007-11-17 at 16:45 -0800, Tim Chevalier wrote: On 11/17/07, Derek Elkins [EMAIL PROTECTED] wrote: However, to put things in motion for something concrete at all, we're hoping to put together a meeting taking place in the Portland area as that seems most convenient to the most

Re: [Haskell-cafe] Re: [Haskell] AmeroHaskell

2007-11-17 Thread Tim Chevalier
On 11/17/07, Derek Elkins [EMAIL PROTECTED] wrote: Don mentioned that. However, something specifically Haskell and aimed at a wider audience than just the Portland area is desirable. It's also a different tone than a user group. Hopefully, there would be a reprise next year in a different

Re: [Haskell-cafe] Re: [Haskell] AmeroHaskell

2007-11-17 Thread Derek Elkins
On Sat, 2007-11-17 at 17:38 -0800, Tim Chevalier wrote: On 11/17/07, Derek Elkins [EMAIL PROTECTED] wrote: Don mentioned that. However, something specifically Haskell and aimed at a wider audience than just the Portland area is desirable. It's also a different tone than a user group.

[Haskell-cafe] Stream fusion for Hackage

2007-11-17 Thread Don Stewart
Just a quick announce: the stream fusion library for lists, that Duncan Coutts, Roman Leshchinskiy and I worked on earlier this year is now available on Hackage as a standalone package: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/stream-fusion-0.1.1 As described in the

Re: [Haskell-cafe] MD5?

2007-11-17 Thread Thomas DuBuisson
On Nov 17, 2007 11:40 AM, Andrew Coppin [EMAIL PROTECTED] wrote: As far as I know, mine is unique in that it's 100% Haskell and requires nothing aside from the libraries shipping with GHC in order to compile. (E.g., I downloaded somebody else's, and it just wouldn't compile. It was looking for

Re: [Haskell-cafe] What is the role of $!?

2007-11-17 Thread PR Stanley
Hi okay, so $! is a bit like $ i.e. the equivalent of putting parentheses around the righthand expression. I'm still not sure of the difference between $ and $!. Maybe it's because I don't understand the meaning of strict application. While we're on the subject, what's meant by Haskell being

Re: [Haskell-cafe] What is the role of $!?

2007-11-17 Thread Jonathan Cast
On 17 Nov 2007, at 8:04 PM, PR Stanley wrote: Hi okay, so $! is a bit like $ i.e. the equivalent of putting parentheses around the righthand expression. I'm still not sure of the difference between $ and $!. Maybe it's because I don't understand the meaning of strict application. While