Archive for October 4, 2022

Tuesday, October 4, 2022

Accidentally Quadratic KVO

Saagar Jha:

Here’s an interesting instance of quadratic complexity: adding and removing KVO observers on an object (FB11644022). A graph of its performance as I scale the number of observations is so perfect it could probably feel right at home in an algorithmic complexity textbook!

It’s probably not surprising in the least that observers are stored internally in a set of hash tables. But when you add observations on an object, part of the lookup process calls for computing a hash value over all the observers. This would be O(n) on each KVO update except Foundation caches this hash value whenever the observers change, so lookups are O(1). This is good, except this just hoists the (one-time) O(n) calculation on each update of the observers, because adding and removing observers causes a full rehash.

[…]

By the way, if you’re interested in how KVO is implemented, you can reverse Foundation like I did…or find out after some searching that someone has basically decompiled the entire thing[…]

Ken Case:

Ventura fixes an issue (FB9876193) where KVO rehashing would trigger 300-1400 autoreleases per operation while rebucketing, leading to a performance cliff where we’d see hundreds of millions of pending NSKeyValueObservationInfo releases.

Spark Switches to Electron and Subscriptions

Readdle (MacRumors, Hacker News):

Now people who use Windows can focus on what’s important and enhance their productivity with Spark. […] Please be aware that Spark is working hard towards feature parity between platforms and the experience across iOS, Android, Mac, and Windows may vary.

[…]

See the full list of free and Premium features.

The premium features are $7.99/month or $59.99/year. It also sounds like they are leaving the Mac App Store.

Guischmitt:

The app size and average RAM consumption has doubled.

Previously:

Update (2022-10-13): Garrett Murray:

The problem here is that I don’t need any of their Premium features, and now I’m forced to either pay a monthly fee to remove this ad or stop using Spark. In the case, I’m going to have to stop using Spark.

Frustratingly, I did not notice it was adding a signature ad like this after the most recent update until today, which means I’ve been sending business emails for a week with this ad at the bottom. Yuck.

Garrett Murray:

Good news for Spark users who didn’t want this “Sent with Spark” ad: Readdle is removing this from the Premium feature set[…]

1Password Meets Git

Simon Sickle:

Enable the SSH Agent and optionally biometrics if you wish. Now, we must add a snippet of code to our SSH configuration file to tell the SSH command we wish to delegate key management to 1Password.

[…]

At work, we have some complex configurations and security rules that wouldn't allow me to store my SSH key in this manor... I do, however, work on some open source software from time to time which requires that I have an SSH key to authenticate with GitHub. To accomplish this, I modified the pasted snippet from 1Password to only use the SSH agent for github connections using the git user.

[…]

GitHub now supports code signed by an SSH key! This means you can use 1Password's SSH agent functionality to sign your commits instead of relying on GPG (which has been troublesome in the past on macOS).

This is cool, although the feature I really want is to sync 1Password via Git.

Previously:

Musk-Twitter Deal Back On?

Adi Robertson:

Elon Musk’s deposition for the Twitter v. Musk suit may have been rescheduled for next week, but the public got some more inside dirt about his plans for Twitter, thanks to the release of two slideshow presentations and a slew of Musk texts.

The texts show Musk and a variety of contacts — including former Twitter CEO Jack Dorsey, entrepreneur Jason Calacanis, and podcaster Joe Rogan — talking about everything from the blockchain to putting Oprah on Twitter’s board. (That part might be a joke, but with Musk, it’s difficult to tell.) But above all, they’re a chronicle of the deal’s slow implosion.

The texts are light reading, and you can check them out here if you’re so inclined.

See also: Internal Tech Emails (Hacker News), The Chancery Daily.

Charlie Warzel:

The 151-page redacted document is a remarkable, voyeuristic record of a few months in the life of the world’s richest (and most overexposed) man and a rare unvarnished glimpse into the overlapping worlds of Silicon Valley, media, and politics. The texts are juicy, but not because they are lurid, particularly offensive, or offer up some scandalous Muskian master plan—quite the opposite.

Elizabeth Lopatto (MacRumors):

Elon Musk is said to have sent another offer letter to buy Twitter at $54.20 a share, Bloomberg reported based on anonymous sources. That’s the same price he originally proposed in April before trying to back out of the deal.

Previously:

Update (2022-10-05): Nilay Patel:

Like normally you just say hey court, here’s the settlement agreement between the parties, and the court says, cool, case dismissed. You don’t ask the court to stay the case and adjourn the trial before you’ve settled, and definitely not as a precondition of settling

SEC Filing (via Hacker News):

On October 3, 2022, the Reporting Person’s advisors sent a letter to Twitter (on the Reporting Person’s behalf) notifying Twitter that the Reporting Person intends to proceed to closing of the transaction contemplated by the April 25, 2022 Merger Agreement, on the terms and subject to the conditions set forth therein and pending receipt of the proceeds of the debt financing[…]

tptacek:

There was some grim stuff happening in the Chancery case: multiple bits of evidence suggesting that Peiter Zatko had in fact been in touch with Musk’s team, in advance of the “whistleblowing” release. The Chancery court had just come in with an order giving Twitter extended discovery rights to look for those communications.

If it did turn out that Zatko had been talking to Musk’s team, that would be a very big deal, not only undercutting a big part of Musk’s current case (which he was set to lose anyways) but also falsifying several statements made both to the Delaware court and also to Congress(?!).

I wonder also if the appearance, performative as it is, that Musk is choosing to buy Twitter rather than being forced to buy Twitter is helpful for financing.

Dan Luu (tweet):

This is a scan/OCR of Exhibits H and J from the Twitter v. Musk case, with some of the conversations de-interleaved and of course converted from a fuzzy scan to text to make for easier reading.

I did this so that I could easily read this and, after reading it, I’ve found that most accountings of what was said are, in one way or another, fairly misleading.

See also: Matt Levine.