8 ms·
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
by typhonius 6y ago
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 https://www.ibiblio.org/harris/500milemail.html
- lozf 6y agoSame 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"
- philjackson 6y agoUseless use of echo there.
- ttul 6y agoNot unless you’re also trying to demonstrate the magic of fork.
- lozf 6y agonoted, thanks
- techbio 6y agoExtraneously strenuous use of "useless" when using "redundant" would have done...unless useless has another usage. EDIT: The commenter echoed, duckly.
- x0 6y agoIt'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.
- watersb 6y agoI use a construct like this to ensure that the value ends with a newline.
- smorrow 6y ago$() chomps the newline though...
- blauditore 6y agoFun 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...
- mulmen 6y agoThe FAQ [1] addresses both of these questions. See numbers 8 and 15, respectively. [1]: https://www.ibiblio.org/harris/500milemail-faq.html https://www.ibiblio.org/harris/500milemail-faq.html
- blauditore 6y agoThanks 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?
- coffeemaniac 6y agoThis 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 https://www.ibiblio.org/harris/500milemail-faq.html
- YesThatTom2 6y agoI 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.
- generalizations 6y agoLast time this showed up on here, a poster claimed to be the consultant who did the upgrade and caused the problem.
- cgranier 6y agoSame here... And I think it was quoted here a week or so ago again. Great story.
- dheera 6y agoFirst 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.
- gsk22 6y agoWell, flour isn't a unit...
- AlotOfReading 6y agoIt'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.
- greydius 6y agoThere 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.
- mkesper 6y agoNeither is cup...
- klyrs 6y agohttps://en.m.wikipedia.org/wiki/Cup_(unit) https://en.m.wikipedia.org/wiki/Cup_(unit)