top | item 46489341

Full optimizing compiler in a week with AI

2 points| pbiggar | 1 month ago |blog.paulbiggar.com

3 comments

order

pbiggar|1 month ago

Sharing my experience of writing a full optimizing compiler for Darklang, using Claude Code, over the holidays.

Would love to hear from more experienced folks (on either AI or compiler-side) over what could be done better.

chrisjj|1 month ago

> I would say it is still much less than production quality, but it feels on its way.

How do you propose to complete it?

pbiggar|1 month ago

I think more systematic testing. It seems the AI is pretty good at generating tests and validating them, so really filling out the places where testing is weak. I think we could do a lot more tests for each compiler pass. For example, I think getting the AI to generate tons of programs and validate that the types the compiler infers on each variable are what we expect them to be.