Slava Pestov (Hacker News):
This is all, of course, about the dreaded the compiler is unable to type-check this expression in reasonable time error. This error can appear with both valid and invalid code, and the various workarounds are unsatisfactory, to say the least. Splitting up an expression into smaller pieces, introducing type annotations, or attempting other refactorings will sometimes allow valid code to type check, or in the invalid case, surface an actionable diagnostic. However, this breaks flow and becomes a frustrating process of trial and error “shotgun debugging” even for the most experienced Swift programmers. The compiler doesn’t even tell you if your expression is valid or not!
[…]
For a more detailed overview of constraint solving in the Swift type checker, see swift/docs/TypeChecker.md at main · swiftlang/swift · GitHub. For an explanation of why overload resolution is inherently hard, and why every known approach has exponential running time in the worst case, see How does compiler compile SwiftUI code? - #4 by Slava_Pestov and Lambda Expressions vs. Anonymous Methods, Part Five | Microsoft Learn.
[…]
The main goal then, is to devise sufficiently-general heuristics which can quickly solve most realistic problem instances, without hard-coding too many special cases, so that hopefully, the exponential running time only appears with pathological examples which are unlikely to occur in practice. The primary way to accomplish this is to attempt disjunction choices in the right order---this includes both choosing the next disjunction to attempt, and the next choice within a disjunction to attempt. Also, we can avoid considering disjunction choices that lead to contradictions. By doing this, we can find the valid solutions more quickly, and spend less time exploring long “dead ends.”
A secondary goal is to improve the auxiliary data structures and algorithms used in the constraint solver, so that even if an exhaustive search must be attempted on a given expression, as will sometimes be the case, we burn less CPU time while considering the same search space.
I’m glad to see that this is being taken seriously and that they’re also considering minor source-breaking changes that could produce big benefits.
Previously:
Compiler CS Theory Language Design Optimization Programming Swift Programming Language
David Pierce (Slashdot):
When the iPad Pro came along five years later — it went on sale 10 years ago today — nothing much had changed. The Pro ran all the same apps, did all the same things, had pretty much the same things in pretty much the same places. It was just bigger. Its 12.9-inch screen made it the biggest iPad yet, and Apple seemed to think that might change something about how you used it. Nobody was sure what, exactly. Bigger documents, maybe? Apple’s Phil Schiller was excited about bigger documents.
Ultimately, that 12.9-inch screen looked a little too familiar. Apple wanted people to see a larger canvas they could hold and touch and create on, the mythical third device between your computer and your phone. But most people seemed to see a thing about the size of their existing computer, only with a much better screen and vastly fewer features. The iPad’s draconian security policies, underpowered browser, and minuscule ideas about multitasking made the device feel like less than the sum of its parts. Users wanted a new laptop, and Apple told them to kick rocks. The iPad was something else, it said, and if you wanted a laptop you should buy a Mac.
Ten years later, though, the iPad Pro has changed. Rather than try to make it into something other than a laptop, Apple made it… a laptop. The Apple Pencil and the Smart Keyboard lines, which launched with the first Pro, both continued to improve. The iPad’s multitasking got (slowly and chaotically) more powerful. The iPad Pro was one of Apple’s first devices to switch to USB-C. It began to support external drives, and devices like microphones and game controllers. Even the Files app got better. Slowly but surely, Apple’s tablet began to resemble a PC. Apple gave the people what they wanted.
Jason Snell:
But ten years ago, Apple got serious. It shipped the very first iPad Pro, and began a decade-long conversation about whether the iPad could be used for work and even whether or not it was a computer.
[…]
I’m someone who hates writing by hand, but the Apple Pencil even changed how I work. That’s because the Pencil didn’t just support drawing, but (after a few software updates) supported driving the iPad’s entire interface. I discovered that I loved using the Apple Pencil to edit podcasts. Using thoughtful iPad apps like Ferrite Recording Studio made even an inveterate stylus-hater like me into a true believer. The Apple Pencil is a great way to drive all sorts of apps. There’s nothing like it on any of Apple’s other platforms—and it all started with the iPad Pro.
[…]
The biggest change in the iPad Pro over the last decade has probably been where it sits within the iPad product line. The original iPad Pro started at $799—pricey! Today’s large iPad Pro starts at $1299… but there’s another option.
The iPad Air is now basically what the iPad Pro used to be. (The large model even starts at the same price, $799.) The iPad Air supports the Apple Pencil Pro and a Magic Keyboard and offers a pretty great value… just without that OLED display with Face ID, ProMotion, and a few other niceties.
Federico Viticci (2024, Mastodon):
Over the past six months, I completely rethought my setup around the 11” iPad Pro and a monitor that gives me the best of both worlds: a USB-C connection for when I want to work with iPadOS at my desk and multiple HDMI inputs for when I want to play my PS5 Pro or Nintendo Switch. Getting to this point has been a journey, which I have documented in detail on the MacStories Setups page.
This article started as an in-depth examination of my desk, the accessories I use, and the hardware I recommend. As I was writing it, however, I realized that it had turned into something bigger. It’s become the story of how, after more than a decade of working on the iPad, I was able to figure out how to accomplish the last remaining task in my workflow, but also how I fell in love with the 11” iPad Pro all over again thanks to its nano-texture display.
I started using the iPad as my main computer 12 years ago. Today, I am finally able to say that I can use it for everything I do on a daily basis.
Previously:
Anniversary iPad Pro iPadOS iPadOS 26
Jason Koebler (Slashdot):
The FBI is attempting to unmask the owner behind archive.today, a popular archiving site that is also regularly used to bypass paywalls on the internet and to avoid sending traffic to the original publishers of web content, according to a subpoena posted by the website. The FBI subpoena says it is part of a criminal investigation, though it does not provide any details about what alleged crime is being investigated.
Jon Brodkin (Hacker News):
Tucows is headquartered in Toronto, Ontario, and also incorporated in Pennsylvania. The company’s subpoena and warrant policy says it provides registrant information in response to civil subpoenas issued by US courts and warrants related to criminal matters.
[…]
While copyright infringement would be a likely area of investigation for the FBI with Archive.today, the subpoena doesn’t provide specific information on the probe. The subpoena seeks the Archive.today customer or subscriber name, addresses, length of service, records of phone calls or texts, payment information, records of session times and duration of Internet connectivity, mobile device identification codes, IP addresses or other numbers used to identify the subscriber, and the types of services provided.
In contrast with the nonprofit Internet Archive, the operator or operators of Archive.today have remained mysterious. It has used various domains (archive.ph, archive.is, etc.), and its registrant “Denis Petrov” may be an alias.
Nick Heer:
Sketchy as it may seem, Archive.today has become as legitimized as the Internet Archive. I have found links to pages archived using the site in government documents, high-profile reports, and other unexpected places treating it as a high-grade permalink.
Andrey Meshkov:
While the exact nature of the FBI investigation hasn’t been confirmed, it is speculated it can be related to copyright or CSAM (child sexual abuse material) dissemination issues. Altogether, the situation suggests growing pressure on whoever runs Archive.is, and on intermediaries that help make its service accessible. AdGuard DNS, as it turns out, may have just become one such pressure point.
[…]
A few weeks ago, we were contacted by a representative of an organization called the Web Abuse Association Defense, a French group claiming to fight against child pornography. Their website is webabusedefense.com, and here is the archived version as of November 7.
They demanded that we block the domain archive.today (and its mirrors) in AdGuard DNS, alleging that the site’s admin had refused to remove illegal content since 2023. To be clear, Archive.today allows users to take “snapshots” of any webpages, including potentially illegal material. In such cases, it’s the site admin’s job to respond to complaints and promptly remove that content.
Dave Rahardja:
This whole story is incredibly suspicious. Smells to me that there is an organized effort to take archive dot today offline, using “CSAM” as pretext. I am almost certain that there is a financial motive at play here; perhaps some group of paywalled content owners are resenting the fact that archive dot today is circumventing their paywalls.
Child Sexual Abuse Material (CSAM) Copyright Federal Bureau of Investigation (FBI) Legal Privacy Web
I have some old code that uses NSNotificationQueue to coalesce notifications. I think this is an underappreciated class. (Even in the old days, I saw a lot more talk about +cancelPreviousPerformRequestsWithTarget:selector:object:.) My newer code uses more threads, but notification queues are not thread-safe. You can create additional queues beyond the default and have each one be thread-isolated, but the delayed posting is based around the run loop. That doesn’t play so well with GCD and now Swift Testing.
NotificationCenter got some shiny new APIs in Swift 6.2, but there was no love for NotificationQueue. I’m not sure it’s gotten any documented improvements in the entire time I’ve been programming Cocoa.
My first thought was to write a simple helper that would post notifications asynchronously. After enqueueing a posting block, it would suppress any further posts until it observed the arrival of its own notification.
But it turns out that GCD already has a built-in solution to do stuff like this, and it’s probably more efficient. If you create a custom dispatch source, it will automatically coalesce:
To prevent events from becoming backlogged in a dispatch queue, dispatch sources implement an event coalescing scheme. If a new event arrives before the event handler for a previous event has been dequeued and executed, the dispatch source coalesces the data from the new event data with data from the old event. Depending on the type of event, coalescing may replace the old event or update the information it holds.
Using this API looks a little different in Objective-C vs. Swift. In Swift, to set up and receive notifications, you can do something like:
source = DispatchSource.makeUserDataAddSource(queue: .main)
source.setEventHandler() {
center.post(notification)
}
source.resume()
Note that you can post the notifications on whichever queue you want. The main queue works well for coalescing UI updates.
To enqueue a notification, from any thread, you can just use:
source.add(data: 1)
If you want, within the event handler, you can access source.data to see how many updates were coalesced.
I’m pretty sure this is the most modern way to do event coalescing. I didn’t see anything related in Swift Concurrency, though you could certainly use that to implement your own solution.
Previously:
Cocoa Grand Central Dispatch (GCD) iOS iOS 26 Mac macOS Tahoe 26 Programming Swift Concurrency Swift Programming Language Swift Testing