back to projects
Snout

Snout

JULY 2025 · completed

Snout started as a joke idea while I was learning Go for the first time, what if I built a programming language where all the output was in French?

why i built it

At the time, I had also become really curious about how interpreters and compilers actually worked under the hood. I realized I used programming languages every day without understanding what happened between writing code and seeing it execute. Snout became my way of forcing myself to learn that process from scratch.

the language

The language itself is intentionally absurd. Variables, arrays, booleans, functions, and errors all print in French. true becomes vrai, null becomes nul, and syntax errors greet you with an ASCII dog and messages like ERREUR: identifiant introuvable.

what i learned

What made the project meaningful wasn't really the final language, it was the learning process behind building it. Before Snout, code felt abstract. You write something, the computer runs it, and somehow it works. Building an interpreter forced me to understand every layer between raw text and execution.

I learned how lexers break source code into tokens, how parsers transform those tokens into ASTs, and how evaluators walk through those trees to execute code. Implementing Pratt parsing for operator precedence, environment systems for variable scope, and runtime type checking completely changed how I think about programming languages. Now when I write JavaScript or Python, I understand the machinery behind the language instead of just the syntax.

learning go

Learning Go at the same time made the experience even better. Since I didn't already know the language, I couldn't rely on habits or blindly copy patterns. Every struct, interface, pointer, and error handler forced me to slow down and actually understand what I was writing. Go's simplicity ended up being perfect for interpreter design because it exposed the logic directly instead of hiding it behind abstractions.

the repl

I also built a fully interactive REPL so the language feels alive instead of just theoretical. You can write code interactively, test expressions instantly, and debug with French error messages and the little ASCII dog yelling at you.

tech stack

Built entirely in Go with a custom lexer, parser, evaluator, REPL, runtime environment system, and translation layer powered by the Lingva Translate API.

More than anything, Snout taught me that the best way to understand something deeply is to build it yourself. I started the project not knowing Go or interpreter design, and ended up learning both simultaneously through experimentation, debugging, and a lot of trial and error.

It's ridiculous, impractical, and honestly one of my favorite things I've built. Sometimes the best projects really do start with "hmm why not lol." 🐶

technologies

GoLingva Translate API