mayoff

Joined 16 years ago

Karma
2,016
Submissions
382
Member since
Jun 2
Random bits of iOS programming
View on Hacker News

Recent submissions

Comment · 1 month ago
Eric didn’t post the full stock option agreement, only its cover sheet. Given the language of the 1996 termination letter, it’s a good guess that the full agreement specified expiration 90 days after termination.
Comment · 2 months ago
Comment · 2 months ago
I like to store angles as turns in my own code, because (as noted) it makes quarter-turns computable without rounding. OTOH if you need, say, twelfths of a turn, you might want to just store angles as degrees since that’s already common.

Michael Spivak, in Calculus (3rd ed p. 301) considers the unit choice to be a property of the function and initially defines sin° and sinʳ (before settling on sin meaning sinʳ) and considers “sin x°” and “sin x radians” to be misleading, saying that ‘a number x is simply a number—it does not carry a banner indicating that it is “in degrees” or “in radians”’. I don’t really understand this argument, since in science and engineering we constantly carry units around with our quantities.

Comment · 2 months ago
I started using SuperDuper user in 2005 and was happy with it for a decade. Then one day in 2015 or 2016 it stopped working, and upon investigating, I discovered it used AppleScript under the covers. Even though I'd written AppleScript occasionally, it is such an obtuse programming system that I wasn't willing to spend any time trying to debug SuperDuper's script. And while I suspect David Nanian provides excellent support, I figured giving Carbon Copy Cloner a try would be faster and easier, and I've been using CCC ever since.
Comment · 2 months ago
Comment · 3 months ago
> (Mary, at 16, was twice her age)

The problem states “She _is_ twice as old as Ann was”, not “She _was_ twice as old as Ann was”.

Comment · 3 months ago
This idea is a significant part of Anathem by Neal Stephenson.
Comment · 3 months ago
Comment · 4 months ago
I’m with Casey on this: I will not buy a car without CarPlay. Of course, I haven’t bought a car since 2013. That one is a Tesla Model S and I think its UI is pretty decent for maps and playing audio, but I have rented enough cars since then to know that I would much prefer CarPlay support. If I had to replace my car today, I’d probably buy a Volvo EX90, which is the electric version of the XC90 Casey talks about.
Comment · 4 months ago
At my office we refer to these (in IntelliJ) as ketchup, mustard, and relish (depending on the color).
Comment · 5 months ago
Comment · 6 months ago
In Swift (Apple’s C++ successor), the normal operators (`+`, `-`, `*`) trap on overflow for integer types. If you want twos complement wrapping, you can use `&+`, `&-`, and `&*`.

Given that Apple has been making its own CPU cores for years now, I suspect overflowing checking on Apple CPUs is virtually free (aside from code size).

Comment · 6 months ago
The second sentence of your summary is fine, but I don’t like the first sentence:

> Use your language’s type system to parse unstructured inputs.

We don’t use the type system to parse. We use the type system to provide evidence (also called a proof or a witness) that parsing was successful, and we rely on the language’s access control facilities (public/private) and the soundness of its type system to prevent fabrication of false evidence.

Comment · 6 months ago
In the Intel CPU + cold cache case, the quad search matters. In the other three cases, only the SIMD matters.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton