Archive for August 4, 2023

Friday, August 4, 2023

Brave Search for Images and Video

Brave (via Hacker News):

Brave Search is releasing its own privacy-preserving image and video search that is independent from Big Tech search engines. Users will no longer need to leave Brave Search for image and video search results. Now any Brave Search query can be served directly from Brave’s own index, enabling users to benefit from a fully independent search engine that protects their privacy and is censorship-resistant. Our recently released Brave Search API will also imminently include these image/video results.

My initial impression is that the image search finds fewer and less relevant matches than other search engines, but it’s good to see them working on this.


Apple’s Q3 2023 Results

Apple (transcript, Hacker News, MacRumors):

The Company posted quarterly revenue of $81.8 billion, down 1 percent year over year, and quarterly earnings per diluted share of $1.26, up 5 percent year over year.

“We are happy to report that we had an all-time revenue record in Services during the June quarter, driven by over 1 billion paid subscriptions, and we saw continued strength in emerging markets thanks to robust sales of iPhone,” said Tim Cook, Apple’s CEO.

Jason Snell:

The three key hardware categories were all down year-over-year: Mac was down 7%, iPad was down 20%, and the all-important iPhone was down 2%. Things were a little different in the two portions of Apple’s business that have shown indefatigable growth in recent years: Services revenue was up 8% and the Wearables, Home, and Accessories category was up 2%.


Update (2023-08-11): Benjamin Mayo:

But that’s about all Apple will tell us as to the performance of Services. It hasn’t reported Apple Music subscriber numbers since 2019, nor has it ever given hard figures about the performance of Apple TV+, Apple Arcade, News, iCloud, or Apple One in general. A billion subscribers is a huge headline figure, but it obscures the real story of what most people think of when you say ‘Apple services’. Services includes the App Store, and so a majority of that 1 billion total includes In-App Purchase subscriptions from third-party apps in the App Store. Although we never know for sure because Apple won’t tell us, it follows that the majority of Services revenue growth hails from the 15-30% commission Apple collects on those in-app purchase transactions.

If I was a financial investor, I would be growing increasingly dissatisfied with the murkiness of the Services business. For Apple’s flagship growth unit, it’s really hard to get a read on its performance. The golden goose of Apple’s stronghold on the App Store is constantly under threat from regulation, but we can’t measure the potential impact on Services revenue. The success of Apple’s content services are a hedge against the risk of App Store commission drying up, but we don’t know anything about the state of those offerings — we can’t even say for sure they are successful.

Avoiding Implicit Retain Cycles When Using Swift Function References

Svein Halvor Halvorsen:

Even though we capture self unonwed in the outer closure, the callbacks that gets registered with the socket, are captured strongly. So even when the object above is released from where ever it was created, the object is still kept alive.


The [unowned self] in and argument list is just boilerplate, repeated over, with no other purpose than to pass arguments from one function (the in-line closure) on to the next (the actual event handler functions).


What if we took self.dynamicType.onChatMessageReceived from the second event handler above, but without the argument (self), and passed that as a parameter to our wrapper function, together with a reference to self? Maybe we could then capture that reference unowned, and pass the unowned instance reference to the class function to get an instance function, without creating a retain cycle.

As he says, this works but it is far from optimal. I wonder if there’s a way to make it better with macros.

Sean Heber:

In the first line, Swift will helpfully tell me that I’m accidentally capturing self, but in the second line there’s no warning whatsoever.


Update (2023-08-09): Doug:

I’ve hit that enough to make a helper library and there’s a forum discussion proposing a syntax for weakly capturing a method that’s quite relevant.

However, the last post was more than 5 years ago.

Update (2023-08-15): See also: Revisiting requiring explicit self. when passing a method as an escaping closure (via Robin Kunde).

Spectre Camera Pro

Tim Hardwick:

Spectre, the long-exposure AI-powered iPhone camera app made by the developers of the popular Halide photography app, is now free.


Previously $1.99, the app's switch to freeware marks the introduction of a new paid-for Pro version, which includes additional 15- and 30-second exposure modes, plus a new Pro icon [for $4.99].