(Trying to describe this neutrally because I've seen enough bickering about it over the last ~20 years and don't have strong feelings about it.)
Djbsort: A new software library for sorting arrays of integers
31–40 of 158 posts
Re: Djbsort: A new software library for sorting arrays of integers
#32That's pretty cool, are there any bindings for e.g. Go out there?
Unrelated to the article I recently learned Go just as a side-interest. I was appalled by how terrible the language is. Usually, language warts aren't apparent until you use it a bit but here annoyances were present on day 1 and never went away.
Re: Djbsort: A new software library for sorting arrays of integers
#33Earlier quoted context omitted.
Care to elaborate? I am also looking into it, so would be interested to hear what the issues are.
There's an indexed list of posts about Go's flaws here: https://github.com/ksimka/go-is-not-good In my opinion, don't use Go at all if you can avoid it - it may be acceptable for a tiny CLI project but anything of significant complexity needs a language that can scale.
https://www.quora.com/Will-the-Golang-code-become-unmaintain...
Re: Djbsort: A new software library for sorting arrays of integers
#34The library doesn't have a license on the site or in the tarball. From djb's previous writing and software, he probably intends it to be license-free software, which is an uncommon situation worth investigating before use: https://en.wikipedia.org/wiki/License-free_software (Trying to describe this neutrally because I've seen enough bickering about it over the last ~20 years and don't have strong feelings about it.)
* cpucycles/mips/cpucycles.c
* cpucycles/cortex_vct/cpucycles.c
* cpucycles/cortex/cpucycles.c
Regarding the missing license:
I guess if you download the software from his website you are not allowed to distribute it yourself. Is that correct?
Re: Djbsort: A new software library for sorting arrays of integers
#35Earlier quoted context omitted.
Unrelated to the article I recently learned Go just as a side-interest. I was appalled by how terrible the language is. Usually, language warts aren't apparent until you use it a bit but here annoyances were present on day 1 and never went away.
It's kinda hilarious to see that as more and more successful projects and companies use Go in their stacks, the number of comments like these increases in HN.
Nobody's going to tell him no and there's not going to be significant discussion about the merits and even if there was, there's no best practices to lean on to make the decision rely on anything other than pure emotion.
Re: Djbsort: A new software library for sorting arrays of integers
#36Earlier quoted context omitted.
I actually really like the authenticity and humility of DJB including that in the instructions. I think it's likely many people trust his code (and he's certainly written a lot of extremely security sensitive stuff), but of course it's a much better practice to not trust him quite so much.
> humility of DJB Really? This is software where the author named it after himself, claims that it holds a new speed record with no comparisons benchmarks (just references a single number from a paper in 2015), uses the word "easily" FOUR times in the limitation-section without any links or explanations, and doesn't reference any other libraries/resources/software/solutions.
Re: Djbsort: A new software library for sorting arrays of integers
#37Earlier quoted context omitted.
Yes, presumably to run the build as a user which is as unprivileged as possible. Which is a reasonable idea, though it might seem paranoid in today's `curl | sudo sh` world.
I actually really like the authenticity and humility of DJB including that in the instructions. I think it's likely many people trust his code (and he's certainly written a lot of extremely security sensitive stuff), but of course it's a much better practice to not trust him quite so much.
Re: Djbsort: A new software library for sorting arrays of integers
#38Earlier quoted context omitted.
Hmm, interesting question. Radix sorts, by their nature, execute the same code regardless of the contents of their elements. ( I think, I haven't thought about this before). However you will see some variation in execution time based on varying memory access patterns.
No, it's not constant time. Depending on implementation details, you end up putting different elements in different buckets in different cache lines and that creates side channels. Radix sort will perform differently for an input that is 1,1,1,... and 1,2,3,...,n. I have not read up on how djbsort deals with this issue, but it's the problem it's trying to solve.
Re: Djbsort: A new software library for sorting arrays of integers
#39The library doesn't have a license on the site or in the tarball. From djb's previous writing and software, he probably intends it to be license-free software, which is an uncommon situation worth investigating before use: https://en.wikipedia.org/wiki/License-free_software (Trying to describe this neutrally because I've seen enough bickering about it over the last ~20 years and don't have strong feelings about it.)
Re: Djbsort: A new software library for sorting arrays of integers
#40Earlier quoted context omitted.
There's an indexed list of posts about Go's flaws here: https://github.com/ksimka/go-is-not-good In my opinion, don't use Go at all if you can avoid it - it may be acceptable for a tiny CLI project but anything of significant complexity needs a language that can scale.
That's very odd. Go was purposefully designed to scale and be used by 1000s of engineers collaborating on a project. https://www.quora.com/Will-the-Golang-code-become-unmaintain...
They have huge numbers of junior developers right out of university (those that Rob Pike, one of the main authors of Go, likes to claim aren't good enough to learn advanced concepts) and their coding style is not focused on correctness and simple implementations - do something, do a lot of it, write a lot of tests.
For companies that aren't the size of Google, that don't work the same way (monorepos etc.), and that simply don't have the same set of resources available it will often end up being much easier to use a language that either prevents flaws (via a strong type system, like in Haskell or Rust, which Go does not have) or gracefully handles flaws (via an error handling strategy, like in Erlang or Elixir, which Go does not have).