Hacker News new | past | comments | ask | show | jobs | submit login

My first exposure to GNU Units was when I read the story about emails failing if they were to be sent more than 500 miles.

I’m sure it’s popped up here before but here’s a link for those who haven’t come across it: https://www.ibiblio.org/harris/500milemail.html




Same here back in the early aughts, but it took me a while to really dig in and discover that units also handles times too.

e.g. units "sec $(echo $SECONDS)" "day;hr;min;sec"


Useless use of echo there.


It's very important to watch out for useless uses of echo/cat. What is cat, a few megabytes now? Fine for those of us on modern hardware, but you never know what PDP-11 user is going to copy paste your comment into their terminal.


Not unless you’re also trying to demonstrate the magic of fork.


Extraneously strenuous use of "useless" when using "redundant" would have done...unless useless has another usage.

EDIT: The commenter echoed, duckly.


I use a construct like this to ensure that the value ends with a newline.


$() chomps the newline though...


noted, thanks


First time user. Failed on me.

    You have: 25 C
    You want: K
    conformability error
        25 A s
        1 K

    You have: 1 cup flour
    Unknown unit 'flour'
I think I'll stick with Google.


Well, flour isn't a unit...


It's relevant information if you're converting to mass, which was probably the intention. Google will return the correct result for "mass 1 cup flour", by comparison.


There is no correct way to turn "1 cup flour" into a mass. For one thing, you can fit more into the same volume by compressing. But more importantly, the material is ambiguous. There are many different kinds of flour with varying physical properties.


Neither is cup...



Last time this showed up on here, a poster claimed to be the consultant who did the upgrade and caused the problem.


Same here... And I think it was quoted here a week or so ago again. Great story.


Fun story, but the numbers don't add up for me:

Wouldn't the signal have to do a full round trip within the timeout of 3 ms, meaning it could not go beyond 580 / 2 = 290 miles?

Additionally, the connection from A to B is usually not a straight line, and at that time fiber lines were much less widespread. All these factors combines make it unlikely that even 200 miles could be reached...


The FAQ [1] addresses both of these questions. See numbers 8 and 15, respectively.

[1]: https://www.ibiblio.org/harris/500milemail-faq.html


Thanks for that link.

> Well, to start with, it can't be three milliseconds, because that would only be for the outgoing packet to arrive at its destination. You have to get a response, too, before the timeout will be aborted. Shouldn't it be six milliseconds?

> Of course. This is one of the details I skipped in the story. It seemed irrelevant, and boring, so I left it out.

I don't understand, so it was in fact 6 ms?


I remember chatting with Trey about this as it happened in real time.

I love that every time this link gets posted to HN someone says it looks like a hoax.


I never claimed it was a hoax, I just didn't agree with the math, that's all. No reason to get upset.


I love that every time someone says something is a hoax a person who was there shows up to correct the record :)


I wanna see that happen for The Loch Ness monster!


This is addressed in the FAQ[1].

> That three millisecond time doesn't make sense as the timeout for a connect() call.

> Yes, I know. And it wasn't the timeout, actually. In the story, I make it sound like it took all of ten minutes from being made aware of the 500-mile email limit and determining a 3 ms light-speed issue. In fact, this took several hours, and quite a bit of detective work. The point is, eventually I came up with that figure, ran units, and gagged on my latte. (I'm fairly certain it was a different latte from the one I started with.) So what, in particular, is your question about the 3 ms figure?

[1] https://www.ibiblio.org/harris/500milemail-faq.html




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: