News for hackers. Stuff that matters.

omidmnzadeh

The problem with this piece of code is not that it doesn't do it in-place. The problem is, if the input list is (almost) constant, then this code will (almost) certainly take quadratic time to sort it, even if it is shuffled before being fed to this function.

However, I get what you mean. It really is beautiful!

EDIT: grammar.

Ask HN? Just click! I have almost always found some good advice in these threads.
"Vim"? No. I don't use it anymore. The "Vim's Way"? I use it everyday!
I've used several IDEs before. I used one when Eclipse was the go-to option. Then all the attention went to IntelliJ. But none of them gave me what my Emacs+Evil setup gave me, while the Emacs side got "almost" everything they gave me.
It's been a long time I haven't used Vim. I left it in favor of Evil+Emacs a few years ago. And I don't recommend it to every single person I see.

The phrase "wasting time with Vim" was the thing that made me reply the way I did. Learning Vim properly has helped me every single step of my way.

I'd use Vim from day 1, instead of wasting time with several IDEs.