[Haskell-cafe] haskell.org

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Tue Apr 21 00:27:23 UTC 2015


On 21 April 2015 at 08:53, Ertugrul Söylemez <ertesx at gmx.de> wrote:
> Hi everybody,
>
> I'd like to note that the prime "sieve" example that is sitting at the
> top of the homepage is not a real sieve and will more likely make people
> with number theory experience (like me) feel highly irritated rather
> than fascinated.  A real sieve does not only run a million times (!)
> faster and consumes far less memory, but is also much longer, even in
> Haskell.  Here is a real one:
>
>     <http://lpaste.net/101980>
>
> I don't want to make a mountain out of a molehill, but please note:  If
> I'd be new to Haskell, that example would have turned me off, because it
> would have hurt my ability to take Haskell programmers seriously.  You
> can easily promote your tools when you claim that they can build a car
> easily, except in reality it's just a toy bicycle.
>
> It's the same feeling to cryptographers when people call a regular
> stream cipher a "one-time pad" and promote it as such.  It rings the
> "this is snake oil!" alarm bell.
>
> So I propose to either rename the 'sieve' function to something more
> appropriate (like `trialDiv`) or replace the example altogether.  I
> would suggest an example that truly shows Haskell's strengths.  Trial
> division search is really just a bad substitute for the more common and
> equally inappropriate list quicksort example.

My understanding is that it *is* a sieve, just not the Sieve of
Eratosthenes (because it's a bit hard to fit that into that small
little sample box up the top of the page :p).


-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list