r/Compilers • • 1d ago

We make AI agents write in languages we like. What would a language designed for them look like?

When I ask a coding agent to fix a bug, I’ve usually made the biggest decision for it already. The repo is in Rust, Python, or TypeScript because that’s what we chose. Then I judge how good the agent is at working within that choice. I got curious about the other half of the experiment. What could the language do to make the agent’s job easier?

That question, plus a few beers, turned into Aila. 🍺

One small example is ownership. In Aila, view buffer, use buffer, and give buffer tell you right at the call site whether a function can read the buffer, modify it, or take ownership of it. An agent editing that line can see what it’s allowed to do. If it gives the buffer away and then tries to use it again, the compiler points to both places.

The funny part is that I started this for agents, and now I like reading it.

Aila’s compiler is written in Aila. The question I still want to test is whether a small local model can make a change across several files with fewer retries and less help from me.

If you use coding agents, what’s one thing you keep explaining in prompts that you wish the language itself could tell them?

GitHub — Aila Systems / Aila

0 Upvotes

4 comments sorted by

5

u/AustinVelonaut 1d ago

I don't use coding agents, so I can't address your question, but did you even look at the self-hosted compiler code? It looks very fragile -- full of magic integer constants, etc.

0

u/List_Minute 1d ago

Yeah, I’ve read it, and I agree about the magic numbers. In places you have to remember what a slot means just to follow the code. That’s something I want to fix.

For a bit of context, Aila is six days old. My first goal was to get the compiler to the point where it could compile itself. It got there, and now I’m starting to clean up what it took to get it there.

3

u/AustinVelonaut 1d ago

That seems like a backwards way to work on it: you now have lots of messy code to try to get fixed, rather than working at the beginning to force a principled architecture on the compiler.

0

u/List_Minute 1d ago

You’re right that I’ve bought myself a rewrite. After 20 years of writing code by hand, what’s changed for me is that on a project like this, I can afford one.
It’s the software equivalent of jumping out of a plane without a parachute just to see what it feels like. If I land badly, I can type “redo it” and go to bed.
Which is pretty much my plan for tonight :)