In-place sort (one script)
2015/02/19 - UPDATE: couple of very slight speed tweaks.
This is a much simpler sorting algorithm than the others I made, and it's also in-place (meaning it doesn't use any other lists than the one that's being sorted).
I decided to also aim to make it a single script, so it's very easy to import into other projects. :)
It's basically a slightly modified recursive QuickSort, with something like a Selection-Sort once the 'chunks' get small enough.
It does not require any extra lists, though it does append on the end of the list being sorted as a temporary stack during the recursion.
It's simple enough that it took less than a couple of hours to put it all together. Plenty of comments inside, too...