Fun fact: to support the LLM-based shortcut creation in Shortcuts, Apple implemented support under the hood for declaring shortcuts using Python*. Here's an example of a shortcut that resizes images. #wwdc26

* The syntax is Python, but they don't seem to be using an actual Python implementation under the hood, just a parser that can understand the syntax and convert it to shortcuts models

@_inside oh hey I basically did this back in 2018 https://willhbr.net/2018/12/26/compiling-for-shortcuts/
Compiling for Shortcuts — Will Richardson

In this video I show a program written in Cub being compiled and run inside of the iOS Shortcuts app. The program is a simple recursive factorial function, and I can use it to calculate the factorial of 5 to be 120. Super useful stuff. The idea was first floated by Andrew - who knows that I am someone that is easily nerd-sniped by programming language problems. Even after I pointed out that Shortcuts doesn’t support functions (or any kind...