Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Every time I read this story the part that always surprises me again is the units command. Converting from 3 millilightseconds to miles is brilliant, and I am delighted every time that the units command can do this.


kragen posted a several of excellent comments highlighting the capabilities of GNU Units a couple of months back, these two in particular:

<https://news.ycombinator.com/item?id=36988917>

<https://news.ycombinator.com/item?id=36995046>

And Trey Harris's "500 mile email" story is what clued me on to GNU units and its capabilities.

Reminder: if you're on MacOS, or one of the BSDs, your default units is from BSD, not the GNU version, and is far less capable. GNU units can be installed on MacOS through Homebrew. The package is "gnu-units", the command is "gunits" once installed.

Edit: Corrected Homebrew package name.


GNU Units is also available in FreeBSD ports, just type "pkg install units" (or go to /usr/ports/math/units and "make install"). It likewise gets the binary name "gunits"


It's also in chocolatey for windows


Should also be in Cygwin as well as be installable through WSL.

(I've not touched MS Windows in a couple of decades now.)


Actually,

brew install gnu-units


Gah! Thanks, corrected above.

(I run the command far more often than I install the package.)


Anyone who likes the units command should plan an evening where they can sit in a comfortable chair with an appropriate beverage, and read all the comments in the data file in the source. It is like a novel about the history of measurement.


If only it had been written as a Literate Program, it would have been.


My units command (on macOS) doesn't have it. :/ Is there a better version out there?


Yes, you want the gnu units. It's in homebrew as gnu-units (and you run it as gunits)


He made the story up. When confronted with the fact that units didn't convert some of the units from his story his response was essentially "Oh yeah, well of course I always supplemented my units definitions on all my machines with obscure units.".


Do you have a source for that?

EDIT: #19 here https://www.ibiblio.org/harris/500milemail-faq.html


These potential anachronisms are easy to insert when retelling a story. It doesn't really mean he "made it up", but reverse engineering how the diagnostic was determined might lead one to use tools/definitions that didn't exist at the time.

It's also entirely plausible that a local definitions file was used to provide the unit that didn't come in the default install. Hence the anachronism is merely "potential" instead of "definite"


Check his own FAQ.


I don't think that's enough evidence to claim he made the whole story up.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: