Web Excursions 2021-09-28
The Grammarphobia Blog: Let’s swap
“swap” was probably onomatopoeic in origin.
That is to say, it means what it sounds like—a clap or a smack.
by the late 1300s, it was being used with the apparent sense of “to ‘strike hands’
in token of an agreement or bargain.”
And to this day, striking is associated with bargaining.
in only a few decades it moved from the sense of striking a blow (circa 1350) to that of striking an agreement.
The old hitting and smiting uses of “swap” are mostly obsolete today,
but the bargaining and exchanging senses of the verb have survived.
about the spelling of “swap.”
In its earliest uses it was spelled with an “a.”
But over the centuries it’s also been spelled “swop,”
particularly in British English,
and the “o” spelling is accepted today as a chiefly British variant.
Daring Fireball: Why Does the iPhone Still Use Lightning?
If the iPhones 13 had switched to USB-C, you know who would have complained?
Hundreds of millions of existing iPhone users
who have no interest in replacing the Lightning cables and docks they already own.
How many normal people do you know who ever buy anything that plugs into a Lightning port other than a USB cable?
And Apple doesn’t make more money selling their own (admittedly overpriced) Lightning cables to iPhone owners
than they do selling their own (also overpriced) USB-C cables to iPad Pro and MacBook owners.
My theory is that Apple carefully weighs the pros and cons for each port on each device it makes,
and chooses the technologies
for those ports that it thinks makes for the best product for the most people.
they didn’t say it was because USB-C is better, period,
and certainly not solely for the reason that USB-C is “open”.
They said it was to enable iPads Pro to do things that theretofore only PCs and Macs could do, like connecting to external displays.
iPhones aren’t meant for that.
People do not like buying new cables, no matter if they’re “better”.
Optimizing ProMotion Refresh Rates for iPhone 13 Pro and iPad Pro | Apple Developer Documentation
You can’t force a ProMotion display to show your content at any specific rate.
The system insulates the ProMotion’s actual refresh rate from your app.
From your app’s point of view, the refresh rate for a ProMotion display
is the rate that Core Animation renders the content for the entire display.
Your app can provide hints to Core Animation about what refresh rates the app prefers for its animations.
The iPhone 13 Pro and iPhone 13 Pro Max ProMotion displays: 120Hz (8ms); 80Hz (12ms); 60Hz (16ms); 48Hz (20ms); 40Hz (25ms); 30Hz (33ms); 24Hz (41ms); 20Hz (50ms); 16Hz (62ms); 15Hz (66ms); 12Hz (83ms); 10Hz (100ms);
The iPad Pro’s ProMotion display: 120Hz (8ms); 60Hz (16ms); 40Hz (25ms); 30Hz (33ms); 24Hz (41ms);
Custom animations in your app need to be able to adapt to changes in refresh rates.
Display refresh rates can change for many reasons and your app must not presume any specific refresh rate, at any time.
For example,
the system disables faster refresh rates in low power mode or if a device gets hot.
Core Animation might elect to vary the refresh rate to provide an enhanced user experience.
while UIKit and Core Animation are managing various GUI elements
If you don’t enable faster refresh rates for your app,
your CADisplayLink callback might run at any of the speeds that the ProMotion display supports,
at different times during normal GUI operations.
Core Animation won’t unlock any refresh rate that’s faster than the system’s default.
On iPhone 13 Pro or iPhone 13 Pro Max,
add the following key to your
Info.plist
file<key>CADisableMinimumFrameDurationOnPhone</key><true/>
to enable the full range of refresh rates for CADisplayLink callbacks and CAAnimation animations in your app:
Your app must use this key to access higher frame rates (above 60Hz) it sets in the preferredFrameRateRange hint API.
The iPad Pro doesn’t require this special configuration
When specifying a preferred frame rate, specify the best possible frame rate for your content.
iOS 15 provides special priority to 30Hz and 60Hz refresh rates
(if your app provides hints that request either of these rates) to help with early adoption for game developers.
This prioritization is specific to iOS 15.
Animation Type and Notes
High-impact animations - Use sparingly to minimize power consumption
Alpha/Color transitions Small movements - No need for a higher frame rate for same visual effect
Small, low-speed animations - Looks good at slow speeds; power-saving opportunities
for better visual appearance use faster refresh rates when animating fast-moving items that travel across large areas of the screen.
But, if you’re animating a smaller item that doesn’t move over a great distance, but “animates in place”, that typically doesn’t benefit from a high refresh rate.
As a guiding principle, strive for the lowest animation speed possible while maintaining good visual appearance.
Developers Must Opt In To 120Hz Animations On iPhone 13 Pro
the lack of published documentation meant that everyone assumed that adopting 120Hz would be done automatically by the system.
for the iPhone 13, high frame rate animation is actually gated twice,
firstly by a global Info.plist key and
secondly by the fact that each individual animation in the codebase will need to be audited
and marked as wanting high refresh rate pacing.
an onus on developers to meticulously check all the animations in their app and do the code changes where it makes sense
All apps will see ProMotion benefits when the user is actively interacting with the display and generating touch events,
which thankfully means scrolling is always ultra-responsive and fluid across the system.
Apple believes the benefit to battery life is worth the pain of enforcing selectivity.
Key Apple, Tesla suppliers halt production amid China power crunch
[Among the affcted suppliers are]
Eson Precision Engineering, an affiliate of Foxconn -- the world's biggest iPhone assembler -- and a key mechanical parts supplier for Apple and Tesla
Unimicron Technology, a major print circuit-board maker and key Apple supplier
iPhone speaker component supplier Concraft Holding
Key iPhone assembler Pegatron, which operates massive production sites in both Kunshan and Suzhou
Foxconn's manufacturing facilities in Longhua, Guanlan, Taiyuan and Zhengzhou -- the world's largest iPhone manufacturing complex -- had not yet been affected
Facebook is spending $50 million to ‘responsibly’ build the metaverse
The company describes [the metaverse] as “virtual spaces where you can create and explore with other people”
that you’re not physically with,
spread out over a variety of products and services.
Facebook says the fund’s goal is to make sure it builds its part of the metaverse
with an eye towards compatibility with other services,
as well as inclusivity, privacy, safety, and “economic opportunity.”
Facebook has recently been trying to paint itself as a responsible platform owner.
Prevent Google from mangling links on the search results when clicking or copying on Firefox
[The Gist is a UserScript to “prevent Google from mangling links on the search results when clicking or copying on Firefox.” It achieves so by “prevent[ing] the mousedown event from propagating to the respective event listeners attached to the various link elements.”]
(function() {
window.addEventListener("mousedown", (event) => {
event.stopImmediatePropagation();
}, true);
})();
Prevent Google from mangling search result links when click/copying on Firefox | Hacker News
varenc:
Google does this so they have click tracking data.
But they don't need to mangle URLs in Chrome because it supports the ping attribute on tags.
The ping attribute
basically adds click tracking as a native browser feature
so you don't need to do URL redirects.
It also makes these analytics much easier for the site and mysterious to the user.
Looks like most vendors besides Firefox support it. (They were pretty opposed I recall)
If you're a Chrome user, there's some extensions that disable ping requests/link auditing.
EDIT: a commenter noted that uBlock Origin already blocks these
hvdijk:
Firefox has a
browser.send_pings
setting to control this,not sending any pings when it is set to false.
This is explicitly a valid browser implementation of the ping attribute
The problem isn't that Firefox doesn't support the ping attribute,
the problem is that Google fails to respect user requests not to track.
Explainer: Logs
Like a ship’s log, a computer’s log is a record of events,
normally a time-ordered sequence of messages written
so those events can be analysed to determine the cause of bugs or crashes, investigate security breaches, assess performance, and for many other purposes.
Prior to macOS Sierra, Mac OS X followed Unix conventions,
in that its logs consisted of various text files stored in obvious places, such as the Logs folder in each of the standard Library folders.
Key entries were scattered across several different files, including system.log and console.log,
which were regularly rotated as part of daily housekeeping.
Although the vestiges of that old system still remain, the vast majority of entries written using standard system calls now go into the Unified Log,
which is stored in compressed binary form and far more detailed.
Currently, each log entry consists of up to 27 different fields
Those are stored in binary format and compressed, in proprietary-format tracev3 files.
Although their format has been reversed, in practice the only reliable means of access are the Console app and the log command.
widespread adoption by subsystems within macOS mean that the Unified log is dominated if not overwhelmed by incessant system chatter, making access a real challenge.
Both Console and the log command support the use of search predicates to filter the entries found.
Unfortunately, writing effective predicates isn’t trivial, and requires detailed knowledge of the processes that you’re interested in.
Console, formerly an accessible browser of logs of the recent past, [has been upgraded to a] new version
to accompany the switch to the Universal log
[which] only gives easy access to the current log message stream, not entries already saved.
It is possible to use Console to browse past log entries,
but to do so you must first export the active log to a logarchive, and browse that with Console.
the Unified log automatically censors content in many messages with
<private>
.In many places, this renders its entries meaningless.
Log entries written when normal privacy protection is in force don’t save the censored content,
which can therefore never be recovered from the log.