Osprey Blog

Language design and implementation notes.

python-flavor pydantic-ai agents osprey-native

Osprey Agent: a Coding Agent on the pydantic-ai Port

The pydantic-ai agent engine is ported to Osprey's Python flavor, and a desktop coding agent runs on it with real file and command tools.

3 min read By Christian Findlay
ui-testing accessibility ai-agents osprey-native testing

An Accessibility Tree AI Agents Can Drive: Automated UI Testing by Label

Computer-use agents squint at screenshots; browser agents read the page's accessibility tree. Osprey's UI machines give every native control a role and a label, so tests and agents find the Play button by name and press it with real pointer events, with no window, browser or device.

7 min read By Christian Findlay
chromecast google-tv macos osprey-native gpui

How to Chromecast From a Mac to a TV: A Native Player Written in Osprey

Chrome only casts a tab, and macOS has no Cast button. This native Mac player finds your Chromecast or Google TV, plays an MP3 on it with full controls, and puts a moving spectrum on the TV instead of a still picture.

6 min read By Christian Findlay
gpui rust ui-framework osprey-native state-machines

A Rust UI Framework Without Writing Rust: GPUI Apps as State Machines

GPUI is the GPU-rendered Rust UI framework behind the Zed editor. Osprey's UI machines put a whole GPUI app's interface in one data file: parallel state machines, a view, and skins drawn from an image atlas. The only code left is a small adapter.

7 min read By Christian Findlay
python-flavor static-typing type-inference chromecast

Static Typing for Python-Style Code, Without Writing Type Hints

Static typing catches the wrong value before the program runs; dynamic typing finds out when that line executes. Osprey's Python flavor keeps def, lambda and f-strings, and infers every type and checks it at compile time. Here it is on a real 1,262-line port of a Chromecast sender.

7 min read By Christian Findlay
gpui osprey-native desktop rust gpu

Desktop Apps on GPUI, Written in Osprey

Osprey Native now has a GPUI host: the application is Osprey, Zed's Rust UI framework draws it with the GPU. A boids game holds 120 fps on an M4 Max, and a port of GPUI's painting example matches the Rust original pixel for pixel.

6 min read By Christian Findlay
python packages numpy pytorch uv

Python Packages in Osprey: NumPy, PyTorch-Style Code, and uv

Osprey's Python-flavor ports compile as Osprey packages. Real Python dependencies use uv. Here is how effects, scoped package names and verified locks connect the two.

5 min read By Christian Findlay
gpu gpt2 machine-learning python-flavor

GPT-2 Runs on Osprey’s GPU Backend, in the Python Flavor Too

GPT-2 generation in Osprey’s Default and Python syntax flavors, with CPU and GPU handlers. Recorded Apple M4 Max measurements include a 3.3× training-step speedup on Metal.

4 min read By Christian Findlay
algebraic-effects handlers language-design koka ocaml

Effect Handlers You Can Call

Osprey handlers are now ordinary values, operations declare whether they can be abandoned, and integer overflow is an effect the compiler makes you handle.

6 min read By Christian Findlay
error-handling exceptions panics algebraic-effects result-types ocaml koka eff language-design

Exceptions and Panics Were a Mistake: Better Error Handling

Exceptions and panics turn ordinary control flow into hidden exits. Osprey makes expected failure explicit with Result types and algebraic effect handlers.

20 min read By Christian Findlay
package-management semantic-versioning breaking-changes compatibility testing

SemVer Is All Lies. Please Stop

Semantic versioning records maintainer intent, not compatibility proof. Osprey's package plan proposes exact identity, compatibility epochs, and downstream testing.

9 min read By Christian Findlay
perceus automatic-reference-counting memory-management functional-programming compiler

Perceus ARC in Osprey: Functional Memory Management

Osprey ships opt-in Perceus automatic reference counting. The compiler inserts ownership operations, and the runtime reclaims values as owner counts reach zero.

10 min read By Christian Findlay
language-design flavors functional-programming ml-syntax python-flavor

Osprey Flavors: Any Syntax, One Language

Every Osprey flavor lowers its concrete syntax tree into one canonical AST.

3 min read By Christian Findlay
collections data-structures functional-programming language-design

Persistent Collections in Osprey: Immutable List and Map with Structural Sharing

Osprey now ships persistent List<T> and Map<K,V> backed by a 32-way bitmapped vector trie and a HAMT — the same data structures that power Clojure and Scala. Append, set and remove are O(log32 n); old versions of a collection stay valid in O(1) extra space.

8 min read By Christian Findlay