Live data from Hacker News

Djbsort: A new software library for sorting arrays of integers

sorting.cr.yp.to

51–60 of 158 posts

Re: Djbsort: A new software library for sorting arrays of integers

#51

Am I the only one who thought the name had something to do with Djibouti?

Probably one of the few. On HN, a search for "djb" results in about 60 submissions where "djb" is in the submission title. There are about 6 for Djibouti.

Also, the airport code "DJB" is for Sultan Thaha Airport. The Djibouti–Ambouli International Airport code is JIB.

Re: Djbsort: A new software library for sorting arrays of integers

#52
post #32

Earlier 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.

"There are only two kinds of languages: the ones people complain about and the ones nobody uses."

- Bjarne Stroustrup

Re: Djbsort: A new software library for sorting arrays of integers

#53
post #48
post #46

Earlier quoted context omitted.

> Why do I need ... assumptions about system paths? > what is the rationale for a build flow that involves: It solves problems. https://cr.yp.to/compatibility.html https://cr.yp.to/slashpackage/studies.html https://cr.yp.to/slashpackage/finding.html https://cr.yp.to/slashpackage/sharability.html > Would it really be that much harder to give us a git repo and a ./configure or a CMakeLists.txt? Yes.

FWIW, I read through each of your links. They don't address cross-compilation at all, or the needs of software packagers. I can 100% promise you that somebody packaging this library for any Linux distro (or for a Yocto/Buildroot system) would grind their teeth in frustration at everything in the those links. The solution to having inconsistent packaging paths isn't to introduce _yet another_ packaging path system, bu…

> or the needs of software packagers.

They address the needs of users.

I don't care about software packagers at all, except insofar as they can address the needs of users.

> The solution to having inconsistent packaging paths isn't to introduce _yet another_ packaging path system, but this one specific to djb stuff. It's to use a standard build system with overrideable paths, and not to assume the author knows better than the packager.

Having "inconsistent packaging paths" isn't the problem. The problem is I have a program called "foo" and I don't know if it should begin with:

    #!/usr/local/bin/python
or:

    #!/usr/bin/python
Somebody who doesn't have a real job made the joke that it should "obviously" use "overridable paths" like this:

    #!/usr/bin/env python
but that person hasn't used very many unix systems so they're unaware that this doesn't work on some systems. Eventually the "package manager" compromised with:

    #!/bin/sh
    ''':'
    if type python2 >/dev/null 2>/dev/null; then
      exec python2 "$0" "$@"
    else
      exec python "$0" "$@"
    fi
    '''
And users are like "what the fuck!?" All we needed to agree was that python "lives" in /usr/local/bin/python and python3 (an incompatible alternative to python) lives someplace else, we would have been fine.

And for what? Why did we bother with this? What did we actually gain for all this extra shit? Some package manager felt like he was doing the job of a tarball?

> They don't address cross-compilation at all, or the needs of software packagers.

Cross-compilation is tricky for programs that need to run programs to figure out how they need to be built; neither cmake or GNU autoconf do anything to address it.

The best solution package managers seem to suggest is to "not do that" but those programs are slow.

Re: Djbsort: A new software library for sorting arrays of integers

#54

Why might the installation instructions require the creation of a new user specific to the sorting program? Purely for security of the normal user given that the installation is using a wget / shell script process? https://sorting.cr.yp.to/install.html

I wonder if it is an instinctive reaction to the common complaints (no, relatively, easier packaging or installation routes) to djb softwares. It was previously seen in TweetNaCl [1] which is arguably an irritated response to libsodium [2] which in turn wraps djb's NaCl library [3] in the way djb considers suboptimal [4]. djb is known to be not very interested in the modern packaging systems or practices, so it might well be his way to protest them.

[1] https://tweetnacl.cr.yp.to/

[2] https://download.libsodium.org/doc/

[3] https://nacl.cr.yp.to/

[4] Page 3 in https://tweetnacl.cr.yp.to/tweetnacl-20140917.pdf

Re: Djbsort: A new software library for sorting arrays of integers

#55
post #40
post #33

Earlier quoted context omitted.

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...

The type of codebase scaling Google does is very different from other companies. 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 are…

Go is strongly typed.

https://en.wikipedia.org/wiki/Comparison_of_programming_lang...

It also has an error checking system that is very simple and easy to use.

Re: Djbsort: A new software library for sorting arrays of integers

#56
post #41

My job involves a lot of packaging/cross-compilation, and djb's libraries always seem consistently hostile to the lowly packaging engineer. Would it really be all that much work to package in autotools or CMake? Why do I need his special-snowflake build system with its hard-coded assumptions about system paths? I know that the cult of djb will downvote this into oblivion, but seriously, what is the rationale for a bu…

Do you know of any guidelines for making libraries easy to package? Or examples of projects that do it right?

Re: Djbsort: A new software library for sorting arrays of integers

#57
post #41

My job involves a lot of packaging/cross-compilation, and djb's libraries always seem consistently hostile to the lowly packaging engineer. Would it really be all that much work to package in autotools or CMake? Why do I need his special-snowflake build system with its hard-coded assumptions about system paths? I know that the cult of djb will downvote this into oblivion, but seriously, what is the rationale for a bu…

Is this software that he presently wants to see disseminated randomly, or is it provided here for academic purposes at this time?

I don't know if it's his intention to have this library become part of a bunch of linux or BSD distros or not. But, it seems kind of presumptuous on your part to assume that he does.

Re: Djbsort: A new software library for sorting arrays of integers

#58
post #13

The problem with AVX2 accelerated code (and much of AVX) is that unless you have a lot of it to run you end up with a substantial speed hit that comes from the cost of switching to a different power bin (which often takes 1 or 2ms!) and then running at a lower clock speed. This often still ends up being an improvement over scalar code (at the cost of higher power usage), but for occasional workloads that don't need t…

You also have penalties from context switches, although you can reduce their impact by performing them in a lazy fashion. AVX512 is even worse, of course.

Re: Djbsort: A new software library for sorting arrays of integers

#59
post #41

My job involves a lot of packaging/cross-compilation, and djb's libraries always seem consistently hostile to the lowly packaging engineer. Would it really be all that much work to package in autotools or CMake? Why do I need his special-snowflake build system with its hard-coded assumptions about system paths? I know that the cult of djb will downvote this into oblivion, but seriously, what is the rationale for a bu…

as a user, i'd be pretty fucking happy if ./configure disappeared off the face of the earth.

Re: Djbsort: A new software library for sorting arrays of integers

#60
post #53
post #48

Earlier quoted context omitted.

FWIW, I read through each of your links. They don't address cross-compilation at all, or the needs of software packagers. I can 100% promise you that somebody packaging this library for any Linux distro (or for a Yocto/Buildroot system) would grind their teeth in frustration at everything in the those links. The solution to having inconsistent packaging paths isn't to introduce _yet another_ packaging path system, bu…

> or the needs of software packagers. They address the needs of users. I don't care about software packagers at all, except insofar as they can address the needs of users. > The solution to having inconsistent packaging paths isn't to introduce _yet another_ packaging path system, but this one specific to djb stuff. It's to use a standard build system with overrideable paths, and not to assume the author knows better…

Also, is cross-compilation even a goal for a software library written with the clear caveat that it makes use of specific CPU features?
Post reply on HN