News for hackers. Stuff that matters.
Re:Ask HN: What is the cleanest code sample you've seen? by e19293001 on Thursday September 15, 2016 @11:40PM (#12511672)
Quicksort in Haskell

    quicksort :: (Ord a) => [a] -> [a]  
    quicksort [] = []  
    quicksort (x:xs) =   
        let smallerSorted = quicksort [a | a <- xs, a <= x]  
            biggerSorted = quicksort [a | a <- xs, a > x]  
        in  smallerSorted ++ [x] ++ biggerSorted
Source: http://learnyouahaskell.com/recursion#hello-recursion
Re:Ask HN: What is the cleanest code sample you've seen? by tome on Friday September 16, 2016 @12:57AM (#12511935)
(Technically this is not quicksort, unless you're willing to be particularly broad with your definition of quicksort)
Re:Ask HN: What is the cleanest code sample you've seen? by ximeng on Thursday September 15, 2016 @12:40PM (#12507615)
Re:Ask HN: What is the cleanest code sample you've seen? by MichaelBurge on Thursday September 15, 2016 @01:52PM (#12508255)
Jon Harrop's code samples for the F# journal are pretty clean, though he charges for access:

http://www.ffconsultancy.com/products/fsharp_journal/index.h...

Re:Ask HN: What is the cleanest code sample you've seen? by daly on Thursday September 15, 2016 @07:12PM (#12510632)
Physically Based Rendering by Pharr and Humphrey (literate program, won an Academy Award)
Re:Ask HN: What is the cleanest code sample you've seen? by azeirah on Thursday September 15, 2016 @12:40PM (#12507611)
print("hello world")
Re:Ask HN: What is the cleanest code sample you've seen? by flukus on Thursday September 15, 2016 @09:42PM (#12511351)
Missing semi colon 0/10.
Re:Ask HN: What is the cleanest code sample you've seen? by avail on Friday September 16, 2016 @05:37AM (#12512833)
python3
Re:Ask HN: What is the cleanest code sample you've seen? by cureyourhead on Friday September 16, 2016 @08:45AM (#12513596)
Everyone talks about clean code, but where are the real world examples? Javascript, Python, something useful and which inspires that the ideal of clean code is actually possible.

I'm considering the perspective that think clean code is this ideal that can be misused by reviewers to blackball otherwise good code for arbitrary personal reasons.

I know the book Clean Code and I like the ideas in it. I just haven't seen any production examples and I'm considering the idea that talking about clean code is a hand waving way to criticize others contributions without substance.