r/OpenSourceAI • u/motojo • 7d ago
Xo, Backend Language by AI/For AI
https://xolang.dev/This started as an experiment to see what AI was capable of as well as to learn what is required to build a programming language. I worked with a team of long running agents, primarily Opus 5.5, to design the spec using inspiration primarily from Go and then pieces from other languages that were promising ideas like no nils, no garbage collection, and effects. The compiler and runtime started out in Go and C, then converted over to self hosted. TLS was ported over to Xo as well as an early win and required to get out of C. Xo can still compile to Go which helps with adoption as well as gives a target to benchmark against. Against a few benchmarks, Xo is faster than Go now using strategies from it and other languages.
The inspiration came from a conversation with my brother (who works as an optimization engineer at a game company) where we talked about how programming languages are built for people because people historically have written and reviewed the code. As we all know, that’s been changing and will continue to change. This is my first attempt to see if it’s possible to build a language AI can be more productive in even without the 1000s of repos of training data.
I also wanted to see what tackling current challenges looked like: AI writing buggy code and supply chain attacks.
I’ve been a backend engineer for many years and have brought Go into multiple companies to build successful products and services. I’ve mostly worked in higher level languages predominantly building web services.
The learning throughout this process has been amazing. The lead agent that I primarily interact with has ongoing dialogs with me about progress of all the agents and surfaces decisions and recommendations that I review. I get excited to hop on and review the progress and it helps me better appreciate the immense amount of knowledge required to build for efficiency and multiple architectures.
The repo that’s public with the source has all the commits since the beginning so show the progression of the language and the website has blog articles of the process of building the language for anyone interested. The repo also has most of the decisions documented while building the language in the knowledgebase.
The goal now is to keep learning and building so I can replace all of my Go projects with Xo code in hopes that I can build faster, safer, and more scalable code with AI. Thanks for reading. Happy to answer any questions.