Better HN
topnewbestaskshowjobs
Log inSign up

mayoff

2,016 karma · joined Jun 2, 2010 (16y ago) · 382 submissions

Random bits of iOS programming
Submissions

comment 1mo ago · link · parent

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 3mo ago · link · parent

Robin Hobb (a very successful fantasy author) rates books on Goodreads. To her, anything over one star is a good rating. Even two stars means she liked it.

https://www.goodreads.com/author/show/25307.Robin_Hobb

comment 3mo ago · link · parent

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.

4.

Turns are Better than Radians (2022)(computerenhance.com ↗)

352 points · by mayoff · 3mo ago · 216 comments

comment 3mo ago · link · parent

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 3mo ago · link · parent

That can be just a ziplock bag and the same water bath you're going to use for the sous vide anyway.

https://www.youtube.com/watch?v=XrZPLF0ezw8nn

comment 3mo ago · link · parent

> (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 4mo ago · link · parent

This idea is a significant part of Anathem by Neal Stephenson.

comment 4mo ago · link · parent

Here’s what Tim Schafer said about selling Double Fine to Microsoft at the time:

> "I think it's perfect for us, because we can just focus on doing our inspired weird games, and not worry about how we're going to get our next deal. We aren't chasing down our next funding and thinking about how many more months of funding we have all the time."

https://gameinformer.com/2019/06/23/tim-schafer-on-microsoft...

comment 4mo ago · link · parent

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 5mo ago · link · parent

At my office we refer to these (in IntelliJ) as ketchup, mustard, and relish (depending on the color).

comment 5mo ago · link · parent

This article is about actors in the Swift programming language, and I’d answer the question (“is a stateless actor pointless?”) differently: there is no such thing as a stateless actor in Swift.

Every actor in Swift conforms to the Actor protocol, which has one requirement: an instance property named `unownedExecutor`. Swift uses this property implicitly when, for example, the program calls a method on the actor from outside the actor.

https://developer.apple.com/documentation/swift/actor/unowne...

(One could also argue that, because every actor type is a reference type, every actor also has its identity as part of its state.)

comment 6mo ago · link · parent

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 6mo ago · link · parent

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 6mo ago · link · parent

In the Intel CPU + cold cache case, the quad search matters. In the other three cases, only the SIMD matters.

comment 6mo ago · link · parent

Quaternary search effectively performs both of the next loop iteration’s possible comparisons simultaneously with the current iteration’s comparison. This is a little more complex than simple loop unrolling.

Regardless, both kinds of search are O(log N) with different constants. The constants don’t matter so much in algorithms class but in the real world they can matter a lot.

comment 7mo ago · link · parent

While plenty about the iPad situation sucks, my biggest gripe is the discontinuation of the Smart Keyboard Folio. This was the one that only had a keyboard, no trackpad, but could fold all the way back, which the Magic Keyboard (with trackpad) cannot. The Smart Keyboard Folio was just the perfect form factor: there when you need it, discretely out of the way when you didn’t. And when you were using it, the iPad was perfectly balanced to sit on your lap even in cramped circumstances, which the Magic Keyboard is most definitely not.

Sure, get rid of the Magic Keyboard with its unnecessary trackpad. But bring back the Smart Keyboard Folio. It was a delight.

comment 7mo ago · link · parent

It's kind of crazy that the IRS (among other United States government agencies) uses ID.me for account management. The .me domain belongs to Montenegro.

comment 8mo ago · link · parent

How to add a button in SwiftUI:

    Button(“Click Me”) { buttonWasClicked() }

comment 8mo ago · link · parent

When my daughter finally needed one of those godawful monopoly-priced calculators for school, we went to the nearest pawn shop and found a TI 84 Plus, opened, for $40, and a TI 84 Plus CE in its unopened (but roughed up) original packaging for $65.

21.

Live from GDC 1989: 21 Hours of Vintage Talks from Early Gaming Luminaries(gamehistory.org ↗)

2 points · by mayoff · 8mo ago · discuss

comment 8mo ago · link · parent

Somehow Woot still has a supply of the Smart Keyboard Folio for certain 11" iPads Pro/Air.

My wife is still using an older gen 11" iPad Pro and her keyboard folio stopped working (they fall apart after a few years ), so I took a gamble and ordered one. It arrived in the original, sealed packaging. As far as I can tell, it had never been opened, and it is perfect condition and works great. My wife is very happy. I bought a second one for when this one falls apart.

https://www.amazon.com/Apple-Smart-Keyboard-11-inch-iPad-Pro...

comment 9mo ago · link · parent

Most of the “delivery” (getting it from the factory to its final installed location) was done by machine: forklifts, cranes, ships, trucks, and (I'm guessing) a motorized lift on the back of the delivery truck.

comment 9mo ago · link · parent

If you’re a Swift programmer, the swift-snapshot-testing package is a great implementation of these ideas.

https://github.com/pointfreeco/swift-snapshot-testing

comment 9mo ago · link · parent

For an electrification company.

comment 9mo ago · link · parent

I'm pretty sure you meant something other than "buildings under about 6 feet".

27.

AI hype is 80% real(sealedabstract.com ↗)

5 points · by mayoff · 10mo ago · 2 comments

comment 10mo ago · link · parent

Thank you for this. I’ve been using it for years.

comment 11mo ago · link · parent

Maybe just don't utilize "utilize" or "utilise" at all. There are very few cases where utilizing "utilize" or "utilise" is better than using "use".

comment 11mo ago · link · parent

I was shocked they didn’t do this when they added the “notch” to MacBooks.
12345
13