6 ms·
I know. I just wanted a provocative title.
by garrisonj 11y ago
I know. I just wanted a provocative title.
- coolsunglasses 11y agoIt's annoying particularly because Haskellers are perfectly aware of the problems with the example, but have struggled on the mailing list to come up with something which: 1. Could make at least some sense to somebody that knows zero Haskell 2. Isn't too trivial 3. Isn't leaning too heavily on libraries 4. Is at least somewhat "real"/performant Your example doesn't address any of the constraints of the medium. If you can think of a better example for that part of the website, it would be welcomed on the mailing list. I've been watching people try to figure out something that isn't too weak in any of those dimensions for months and now you're going to post an article with a title calling them liars because you want more attention for your blog? What would satisfy you? Renaming the sieve function? What do we need to do to prevent people like you from writing an article like this again? Edit: There, I fixed it and it's merged https://github.com/haskell-infra/hl/pull/114 https://github.com/haskell-infra/hl/pull/114 We're calling it a filter instead of a sieve.
- Veedrac 11y agoWhat's wrong with just quicksort? Even if not, you can simplify it to prime n = notElem 0 $ map (mod n) [2..n-1] primes n = filter prime [2..n] which at least doesn't pretend to be something it's not. It's also easier to optimize (take the root of `n` in `prime`).
- coolsunglasses 11y ago>What's wrong with just quicksort? The quicksort you're thinking of isn't a real quicksort and would bring on the same criticism. >Even if not, you can simplify it to Nah. I just wanted to get rid of the word sieve, not create more surface area for bikeshedding.
- Veedrac 11y ago> >What's wrong with just quicksort? > > The quicksort you're thinking of isn't a real quicksort and would bring on the same criticism. If you're saying that because it's not in-place, I'll point you to: http://en.wikipedia.org/wiki/Quicksort#Space_complexity http://en.wikipedia.org/wiki/Quicksort#Space_complexity If you're saying that for another reason, why? > Nah. I just wanted to get rid of the word sieve, not create more surface area for bikeshedding. I was pointing out something that fits your four points, which is what you asked for.
- coolsunglasses 11y agoThe not-a-quicksort you're bringing up was discussed and dismissed (for good reasons) on the mailing list.
- Veedrac 11y agoDo you have a link?
- deleted 11y ago[deleted]
- garrisonj 11y agoThe post originally had a paragraph in the beginning explaining why I thought the algorithm was a 'lie'. I explained that Haskell had quickly become my favorite language over the past year. And I started partly because I saw these overly simplified algorithms and thought they were beautiful. Only after working with Haskell for awhile do you realize these algorithms are kinda 'lies'. But, I realized nobody would care about that, and they would want me to get right into the algorithm. So I deleted the paragraph. That's why I gave the post that title.
- frankmcsherry 11y ago> What do we need to do to prevent people like you from writing an article like this again? I thought it was a great read, and totally didn't take the "Haskell programmers are liars" literally ... ... until I saw #4 on your list and that this example was actively discussed on the mailing list and ultimately determined to satisfy it. Haskell is really nice. Keep looking for a better example. :)
- coolsunglasses 11y agoThe list is my framing of what I think is wanted based on what I saw in the mailing list threads, I don't decide the direction of anything WRT the haskell.org website. I'm just a barnacle writing a book so people stop saying Haskell is hard.
- pervycreeper 11y ago>We're calling it a filter instead of a sieve. Prepare for the ire of pedantic set theorists, and the ensuing clickbait articles about it. /s