Hacker Newsnew | past | comments | ask | show | jobs | submit | kaykay's commentslogin

Might have shorted Tesla


i think so ..I think it's hubris ..I stopped listening to most 'experts' long ago..


There is a bug in the code, unless the input is expected to be a set instead of a list.

I believe the right implementation should be something like:

  main :: IO ()
  main = print $ quicksort [1, 123, 42, 90, 1, 23, 24, 12, 3]
  quicksort [] = []
  quicksort (x:xs) = quicksort left ++ [x] ++ quicksort right
      where left  = [ y | y <- xs, y < x ]
            right = [ y | y <- xs, y >= x ]


Thanks for the fix! It's up on the site now.


Have you considered replacing the example entirely? A toy program that looks good but is terribly nonperformant is exactly what I'd put up if I wanted to make a Haskell-style language look bad.


Performance of a tiny code sample is not why people select one language over another. If that was the case, no one would be using anything besides assembly or C. Even in other languages, you'll use an abstraction heavy implementation for the benefit of long-term maintenance and code evolution and then performance optimise the bits that can pack a punch. Performance optimisation in any language looks ugly be it C or Haskell.


> Performance of a tiny code sample is not why people select one language over another.

It's not how people should choose a language, but I'd wager it plays a non-trivial part even if only from laziness alone.

We have to remember we aren't marketing to perfect* developers but more to the average if an aim is mass adoption.

*Perfect as in follows general programming best practices. Following best practices is not always best. Not trying to make a value judgment here.


Where did you get the > 100000 H1B's number?


Easy enough to find through the Wikipedia citations.

153,223 visas were issued in 2013, although some of that is to continue the presence of people who were already here in previous years... It's not all new arrivals.


The US State Department, this page has a graph of H1-B visa issuances and links to some of the reports -

http://travel.state.gov/content/visas/english/law-and-policy...

The US Citizenship and Immigration Services web page has numbers as well.


$5.99


I switch between barefoot and Nike free for my runs. I like 'em. They resemble regular shoes so you could wear them all day.


I just got a copy of this, meaning to read this for a long time.


Part time


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: