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 Damn, they should expose this as an actual way to use shortcuts directly
@luana @_inside I would love this, it would definitely get me to try shortcuts again. I’ll probably play with the Ilm shortcuts but doesn’t sound as fun.
@_inside I’m not sure what to make of this - is it clever or just a hack?
@_inside Can I store these and have the shortcuts import them? I’d finally be able to version control my shortcuts in a legible way (not XML)
@_inside Very cool. In my last job, the firmware team used that approach to define an API exposed over I2C and SPI. Tools created C headers and structs, XML spec, and HTML documentation.
@_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...

@_inside reminds me a lot of Unreal Engine’s python reflection