This is an interesting place to showcase Haskell.

http://en.literateprograms.org/LiteratePrograms:Welcome
There's some Haskell there already, but I think a lot more could be
shown there. Even code dumps of things would be nice. They can always
be explained later.
--
Michael T. Richter

It does not bode well that the first example I looked at (which I chose because it maximally would highlight the benefits of Haskell over other languages): http://en.literateprograms.org/Sieve_of_Eratosthenes_%28Haskell%29 has the following "Haskell" program. primes :: [Int] -> [Int] primes :: [] -> [] primes (n:ns) = n : primes (filter (\v -> v `mod` n /= 0) ns) Not only are there two conflicting type declarations (making this uncompilable), but after the "obvious" syntactic fix: primes :: [Int] -> [Int] primes [] = [] primes (n:ns) = n : primes (filter (\v -> v `mod` n /= 0) ns) primes (n:ns) gives the wrong answer unless n == 2. *P> primes [2..47] [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47] *P> primes [5..47] [5,6,7,8,9,11,13,17,19,23,29,31,37,41,43,47] *P> length . primes $ [100..200] 100 As there are so far relatively few Haskell programs listed (~100), perhaps an interested party might go through and do a sanity check on them. Dan Michael T. Richter wrote:
http://en.literateprograms.org/LiteratePrograms:Welcome
There's some Haskell there already, but I think a lot more could be shown there. Even code dumps of things would be nice. They can always be explained later.
-- *Michael T. Richter*
mailto:ttmrichter@gmail.com> (*GoogleTalk:* ttmrichter@gmail.com) /Never, ever, ever let systems-level engineers do human interaction design unless they have displayed a proven secondary talent in that area. Their opinion of what represents good human-computer interaction tends to be a bit off-track. (Bruce Tognazzini)/ ------------------------------------------------------------------------
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On Fri, 2007-15-06 at 11:42 -0700, Dan Weston wrote:
As there are so far relatively few Haskell programs listed (~100), perhaps an interested party might go through and do a sanity check on them.
Where are you seeing 100 Haskell programs? I'm seeing 9.
(http://en.literateprograms.org/Category:Programming_language:Haskell)
It was the low number that made me think a whole bunch of code dumps
(the explanations can be edited in later on a much more leisurely basis)
would be a good idea.
At any rate, I think I have fixed the problems with the original
implementation. Could somebody please vet
http://en.literateprograms.org/Sieve_of_Eratosthenes_%28Haskell%29 and
tell me if it's OK and if not either let me know what I did wrong or fix
it?
--
Michael T. Richter

Now where is that "Unsend" button! :( I realize in hindsight that my wording could have been a little less flippant. Thanks for contributing to that website. Now pardon me while I enter a shame spiral to atone for my needless hostility... Dan Michael T. Richter wrote:
On Fri, 2007-15-06 at 11:42 -0700, Dan Weston wrote:
As there are so far relatively few Haskell programs listed (~100), perhaps an interested party might go through and do a sanity check on them.
Where are you seeing 100 Haskell programs? I'm seeing 9. (http://en.literateprograms.org/Category:Programming_language:Haskell) It was the low number that made me think a whole bunch of code dumps (the explanations can be edited in later on a much more leisurely basis) would be a good idea.
At any rate, I think I have fixed the problems with the original implementation. Could somebody please vet http://en.literateprograms.org/Sieve_of_Eratosthenes_%28Haskell%29 and tell me if it's OK and if not either let me know what I did wrong or fix it? -- *Michael T. Richter*
mailto:ttmrichter@gmail.com> (*GoogleTalk:* ttmrichter@gmail.com) /I'm not schooled in the science of human factors, but I suspect surprise is not an element of a robust user interface. (Chip Rosenthal)/

On Fri, 2007-15-06 at 22:23 -0700, Dan Weston wrote:
I realize in hindsight that my wording could have been a little less flippant. Thanks for contributing to that website.
I'm.... Happy to hear that. Now if you could point out where you were offensive I'll even understand. :) (Or did you think I was the original author of the Sieve thing? If so, don't worry. I wasn't. I'm the author of the current version, though.) I've decided to use that site as my own place to hammer out my Haskell issues. I'm familiar with a lot of languages represented there, so I'll take a look at what other people do in those and write Haskell equivalents. I'll then post the URLs here and have you kind people put me in my place for how awful my code is. ;)
Now pardon me while I enter a shame spiral to atone for my needless hostility...
Umm... Sure. Whatever. Just let me know when you come out of the
spiral so that I can understand why you entered it, OK?
--
Michael T. Richter
participants (2)
-
Dan Weston
-
Michael T. Richter