HN user

alexjm

128 karma

Hello!

Posts0
Comments59
View on HN
No posts found.

I have a kitchen slide rule that I use to scale recipes and do simple conversions. I used it last week when inflating a ball that had a target diameter in centimeters, but measuring the circumference was much easier and my measuring tape was in inches.

You might want to add the --http0.9 flag to curl, to tell it that getting a response of just "ok" (HTTP 0.9 style, body only without headers) isn't an error.

Grep is from an ed editor command: global (g) to apply a command to all lines that match a regular expression, a regex surrounded by slashes (/), and print (p) to display those lines. Or g/re/p for short. This proved a useful enough operation that they made it a separate command in the early days of Unix.

The minor difference is that :q! quits without saving but returns zero as the exit code, but :cq quits with a nonzero exit code. Git interprets the nonzero exit code as "editing failed", following the Unix convention that zero means success. If you didn't save the commit message while working on it, :q! will send the empty template back to Git, which Git is smart enough to not commit. But if you accidentally save your work partway through, :q! will still commit the message you wanted to abandon.

I have a kitchen slide that I use for ratios in recipes. It's an old plastic one from Think Geek.

For example, I usually put 15 grams of coffee with 8 oz of water (please excuse the mixed units). To make a different amount, I align the 1.5 on the top rule with the 8 on the bottom rule to set the ratio. Then each number on the top rule (coffee in grams) matches the scaled value on the bottom rule (water in oz). The 6 on the bottom rule aligns with ~1.1 on the top, meaning I should brew my little six-ounce cup with 11g of coffee. In practice, I do this a lot with bread, but the "baker's percent" convention for writing bread recipes makes it a more complicated example.

Another way to use a kitchen slide rule is when scaling a recipe. Say I want to make 2/3 of a batch of cookies. I line up the 3 on top with the 2 on the bottom. Then for each ingredient, I find the recipe's quantity on top, and read off the scaled quantity on the bottom. This works better with recipes that use weights, to avoid awkward fractions or converting between units so you can subdivide.

It's most likely legacy from pre-computer unit record equipment. These machines could only handle numbers and printed zeros without a slash because there was nothing to confuse them with. When letters were later added, it was the new character that got the slash.

Additional citation hunting from 2020 when the BASIC manual was shared & discussed here:

https://news.ycombinator.com/item?id=25462835

I saw one city park where they took this one step farther. They had a small wooden structure (I think the cover to a water valve, from years ago when they used to set up an ice skating rink). The open it so rarely they don't even padlock it - they just bend open an S shaped link of chain, put that where the lock would go, and bend it shut. When someone needs to access it, they cut the one link of chain with a pair of bolt cutters, and then put on a new one.

LLMs generate content that's statistically plausible, not factually accurate. We don't need more content about USB that might be mostly right.

Yes, you're looking for US patent 4,549,302:

Thus, even if the file being transmitted [...] includes occurrences of the escape command string of bits, it is extremely unlikely that any random occurrence of the escape command would occur unintentionally in the environment of the entire escape sequence, that is, the escape command string surrounded by a second of no data on either side.

I've heard that the "do you not have" phrasing was used in polite Soviet-era Russian, leading to a joke about a customer who walks into a shop and sees all the shelves are empty:

- Excuse me, do you not have any bread? - Sorry, this is a butcher's shop. We don't have any meat. The bakery is across the road. They're the shop that doesn't have any bread.

In the Apple documentation for MVC, "controller" refers to a class that sits between the model and view. When data changes in the model, it updates the view; and when the user interacts with the view, it passes events to the model.

https://developer.apple.com/library/archive/documentation/Ge...

Elsewhere, the documentation contrasts the Cocoa and Smalltalk versions of MVC where all three pieces communicate directly:

https://developer.apple.com/library/archive/documentation/Co...

Like you said, this separation means you can "drive" the same model through different UIs. That's one of the things I always thought was cool about AppleScript support -- the app exposes a different interface to the same model.

Most man pages give good PostScript output with "man -t". I like reading those on screen or occasionally printing manuals I refer to frequently. The main problem I've run into in recent years are man pages that use ASCII art but don't wrap that in explicit roff requests for a fixed-width font, making the result mostly unreadable outside the terminal.