Archive for February 2, 2022

Wednesday, February 2, 2022

Decimal vs. Double

Jesse Squires:

More importantly, Decimaldoes not conform to either BinaryFloatingPoint or FloatingPoint, but begins its protocol conformance at SignedNumeric, which has the single requirement to implement func negate(). This reveals why Decimal cannot be a drop-in replacement for any of Swift’s floating-point types — most functionality is defined in the lower floating-point protocols. Similar to how mixing numeric types like Int and Double in a single expression is a compiler error in Swift, Decimal does not play nicely with the other numerics. Additionally, some common functionality is missing. For example, Decimal does not conform to Strideable like the other numerics, which means you cannot create ranges of Decimal values. Depending on your problem domain, Decimal can be difficult to adopt.

Rob Napier:

I don’t generally recommend Decimal for money. I recommend Int, and store everything in the base unit, most commonly “cents.” It’s more efficient and often easier to use.

Rob Ryan:

Two benefits of Decimal: (1) You can do precise decimal calculations … e.g. add Double of 0.1 ten times ≠ 1.0 (!); (2) You want to enjoy more significant digits … e.g. print Double representation of 12345678901234567890 and it’s not actually 12345678901234567890.

Previously:

ScreenCaptureKit Added in macOS 12.3

Apple:

Use the ScreenCaptureKit framework to add support for high-performance screen recording to your Mac app. The framework gives you fine-grained control to select and stream only the content that you want to capture. As a stream captures new frames of video, it passes your app a CMSampleBuffer that contains the video data and its related metadata.

Jesper (Hacker News):

And interestingly accompanied with a pull request to OBS to integrate it right away (under the banner of "Developer Ecosystem Engineering"), with changes that seem to follow the current work and adhere to its development process, ie not just a code dump or kthxbai.patch file against a months-old revision.

Maxwell Swadling:

why in the world would Apple add a ‘ScreenCaptureKit’ to macOS but still include the orange dot in the video output! no streamer wants that. no viewer wants that.

Previously:

The Case for “Mark as Unread” in Messages

Matthew Bischoff:

But the most popular messaging app on iOS, Messages, has never implemented “Mark as Unread” even though users have been clamoring for it for years and it’s been rumored that they tested it. What’s even wilder is that iMessage doesn’t have any other in-app way for the user to signal that they need to return to a message in order to respond to it. The only gesture toward anything like this is an obscure Siri integration.

Messages routinely get forgotten and go unanswered. The missing “Mark Unread” button has no doubt caused countless accidental ghostings, avoidable arguments, and missed opportunities. And its lack has likely made life more difficult for users with conditions that affect memory or follow-through, like ADHD and depression, who may not be able to respond in the moment and have no easy way to record their intention to do so.

John Gruber:

I love Messages. I know there are a bunch of ways Apple could and should improve it, but I can’t think any single feature that I want more than “Mark as Unread”.

I want it to (as it used to) sync the read states across all my devices so that I don’t have to “read” the same message multiple times.

David Zarzycki:

Pro tip / workaround: always screen iMessages via the notification center. This lets you read the messages without changing the read/unread status. Also relentlessly exit the Messages app before locking your phone to avoid accidentally setting the read bit at unlock.

Update (2022-02-04): Mike Rockwell:

I’d also like to see a visual indicator showing where the new messages begin when you jump into a thread with multiple unread items.

John Gordon:

To be reminded of a message one must ask siri “remind me of this message”. There’s no nonSiri option.

Schneier on Sideloading

Bruce Schneier (post):

I would like to address some of the unfounded security concerns raised about these bills. It’s simply not true that this legislation puts user privacy and security at risk. In fact, it’s fairer to say that this legislation puts those companies’ extractive business-models at risk. Their claims about risks to privacy and security are both false and disingenuous, and motivated by their own self-interest and not the public interest. App store monopolies cannot protect users from every risk, and they frequently prevent the distribution of important tools that actually enhance security. Furthermore, the alleged risks of third-party app stores and “side-loading” apps pale in comparison to their benefits. These bills will encourage competition, prevent monopolist extortion, and guarantee users a new right to digital self-determination.

Previously:

Update (2022-02-08): Guilherme Rambo:

Apple (and people who defend Apple no matter what) make it out as being a big deal that’s going to completely destroy the security of the platform and harm a huge number of innocent users. The reality is way less exciting…

[…]

What about malware? Well, if a bad actor has a vulnerability, I bet they could slip it through App Review without any problems. App Review is not composed of infosec experts. They’re there to ensure that Apple can make their money out of our apps, mostly

What about private API? Again, private API is not a magical thing that gives an app every power it wants. Besides, many apps you know and love from the App Store are probably using private API in one way or another, that’s just the reality of building for a complex platform

[…]

“But then Facebook would force people to sideload so they could spy”. It’s not that simple. Facebook wouldn’t be able to do whatever they want in the app (see above). There’s also at least one instance that proves that people are not willing to do that (Fortnite on Android)

[…]

By putting so much effort into defending that the security of iOS depends on the App Store review process, Apple is basically saying that they’re not competent enough to make a secure mobile operating system, and at the same time telling us that macOS is not secure.

Craig Hockenberry:

When is Apple going to pull it’s head out of its ass and form a bunco squad for App Review?

Took about 30 seconds to identify this as phishing for Facebook credentials that’s been active for over a week.

John Gordon (tweet):

The best reason I know if for competing App Stores is that Apple’s App Store is trash.

Consider the case of the LuniScanner App; #85 in “Business” in the US App Store.

[…]

The VPN app has 22.9K ratings with an average of 4.7/5 by people like “yessirbruh”. The ‘most critical’ ratings (only accessible on iOS) make clear it is a scam with clever subscription pattern that tricks users into paying a high weekly rate.

The Scanner App is the similar scam that bit my family. It has 174K ratings and 5 stars. The vast majority are obviously purchased. The “critical” reviews mention unwitting subscriptions. A screenshot that appears on first launch shows how it works for the “Free” app with add-in purchases[…] This covers the entire screen. It appears that one cannot use the App without clicking Continue. In fact if a user closed this screen the App can be used. Of course most naive users, inducing our family member, will click Continue so they can start their “free trial”. Except that’s NOT what Continue does. Within 3 days charges will start. In our case, not $10 a month, but $5 a week.

The family member has some reading and processing issues, and a trusting nature, that made him particularly vulnerable to a scam. He thought “5 stars” actually meant something. It didn’t occur to him that Apple would allow fake reviews; he trusted Apple.

Chris Hannah:

When I think about buying software from a users perspective, it seems a lot clearer.

Let’s say you pay £1000 for a mobile computer from a company. Then a separate company spends time to develop software for said device.

Why can’t I, as a user, buy that software directly from the developer?

From a developer’s perspective, my business is with the user, not with the manufacturer. And from a user’s perspective, my business is with the developer, also not with the manufacturer.

To be more specific, I don’t have any issue with the App Store existing, and I wouldn’t also mind an option where developers can sell notarised/sandboxed software outside of the store. But…

I think there also needs to be a way where you can buy software without Apple being involved at all. Surely after paying £1000 for a phone, I have earned the privilege of installing software on it? Or do I not actually own my phone?

Also, why does the manufacturer need to know what software I have installed on my devices? I thought Apple loved privacy?

Tom Brand:

You wouldn’t tolerate App Store Only on your Mac/PC. Why should you mobile phone be any different?

EFF:

The decision incorrectly presumed that, if customers are aware of the restrictions when purchasing a device, then competition in that market is sufficient to rein in Apple’s anticompetitive conduct and users are not locked into the App Store.

[…]

We also urged the court to not to buy Apple’s arguments that it needs to keep control over app distribution to protect users’ security and privacy. Despite Apple’s claim that only its paternalistic approach to security and privacy can protect users, Apple bans apps and features that would serve a wider range of those needs, like VPN apps for international travelers and apps that tell the user if their device has been jailbroken. More broadly, our antitrust laws are based on the principle that competition is the best way to create better, safer products, so Apple’s argument that more competition would be harmful to users shouldn’t fly with the court.

Jesper:

Take can today reveal a partial draft of developer guidelines aimed at qualifying applications distributed via sideloading, designed as a contigency plan if events force Apple to open up application distribution.

Previously:

Update (2022-02-11): JF Martin (tweet, Hacker News):

I’m changing my mind on the sideloading of apps on the iPhone. I’m all in, and it is all Apple’s fault. I’m the one who wrote, “A Message to Apple Developers: We Don’t Need Another Android Platform”. And yet, I’m changing my mind. In a perfect world, I wouldn’t want sideloading, but we’re not in a perfect world. Apple isn’t perfect. The App Store isn’t perfect. Developers aren’t perfect. The App Store review team isn’t perfect. Everything isn’t perfect.

If the App Store was scam-free, entirely free of copycats, I would trust Apple’s review team in its abilities. It’s not the case. Apple can’t honestly defend the App Store as being a secure place. It is not. The App Store today is full of crap. Sideloading has nothing to do with this fact.

In a world where sideloading is possible, I expect a proliferation of “curated” App Stores. Those stores won’t be perfect, either. They will probably be full of highly questionable applications. Horror stories involving scams will be inevitable. The world isn’t perfect. But it is not the issue at play here.

Epic Appeals Ruling in Apple Lawsuit

Juli Clover (ruling):

Both Apple and Epic Games have decided to appeal the original ruling as neither company was satisfied with the outcome. Epic Games wanted the court to force Apple to support third-party App Stores, which did not happen.

[…]

In the filing, Epic Games again argues that Apple’s App Store restrictions and fees are harming developers and consumers, calling the App Store unnecessary.

[…]

Epic Games argues that the court made an error when it found no Sherman Act violation against Apple, which would have painted Apple as a monopolist and would have likely resulted in a very different ruling.

Florian Mueller:

On this basis, Epic warns against “disastrous consequences” because “Section 1 would not reach firms with the market power to coerce non-negotiable terms,” which would “incentivize anticompetitive behavior.” One way to respond to this is: “So what? You still have Section 2. Higher hurdle, but still.”

I’m surprised that Epic puts this part front and center. Should Epic believe that this is its strongest point, then I wouldn’t be too optimistic about the prospects of its appeal. I am in favor of reasonably strong antitrust enforcement, but I don’t think unilateral conduct should just be imported into Sec. 1.

[…]

Epic does manage to demonstrate some inconsistencies in the district court’s reasoning that have implications for the rule-of-reason analysis. I’ve said before that one can find errors in that judgment (just like there are typos), but the question is whether anything changes the outcome.

[…]

Judge YGR decided the singe-brand market question against Epic based on an unreasonably high standard with elements that other (higher) courts had rejected.

[…]

From a policy point of view, I can’t see--and apparently various lawmakers and regulators can’t see either--why the in-app payment system for non-digital goods and services must be viewed as inextricably linked to app distribution. There would be a huge policy problem, however, if companies like Apple could just defend themselves by saying “we decided to combine the two, so it’s not tying.”

Florian Mueller (Hacker News):

35 U.S. states led by Utah and Microsoft have officially thrown their weight behind Epic’s appeal through amicus curiae briefs filed with the United States Court of Appeals for the Ninth Circuit.

Florian Mueller:

The Antitrust Division of the United States Department of Justice, speaking on behalf of the United States of America, has filed the following brief, formally in support of neither party but practically supporting some of the most important elements of Epic’s appeal[…]

Previously:

Update (2022-02-04): Florian Mueller:

What Apple is telling the ITC there is this: even if [Ericsson] patent infringements are identified, the iPhone can’t be banned because it’s a product category of its own. There’s nothing else quite like it. Android smartphones may also be smartphones, but they are not iPhones, so they are not "like" articles (which would count as a potential replacement under the ITC’s rules).

In the Epic Games v. Apple App Store antitrust case, however, Apple argued that there was a broad market for game distribution.