Skip to content

Engineering

Embed You a ponyc for Great Good

The ponyc command you run every day is a main() function with a terminal-width detector glued to it. The actual compiler is a library called libponyc. ponyc is a wrapper around that library, and the wrapper is 149 lines of C.

That’s the setup for this post. The Pony compiler is a library and you can link against it. And because you can link against it, you can build your own tools. And if you want your tool to be one binary instead of a ball of loose dependencies, you want libponyc-standalone.

Teaching Claude to Write Pony

I’m not really sure how to tell the story of me teaching Claude to write Pony, so I’m just going to tell it and see how it goes.

A year ago, every LLM I tested on Pony produced the same thing: a weird Python/Pony hybrid that didn’t compile and didn’t understand Pony’s semantics. I’d ask for a program that prompts you for your name and prints “Hello {name}.” Simple stuff. They all failed miserably. So when I sat down two weeks ago to try again with Claude Code, my expectations were modest.