How to write a tiny compiler
Write your own compiler: introduction. Code genetation. AST. Abstract syntax tree. lisp. javascript.
How to write a tiny compiler launched on February 9, 2017 with 224 votes, #104 of 3,156 launches that month and more than 95% of that year's launches. The site was still online in September 2026, 9 years on.
In plain words
How to Write a Tiny Compiler is a blog series that teaches the fundamentals of compiler design by building a simple compiler in JavaScript. The compiler translates LISP-like syntax into C-like syntax, covering key concepts including code generation and abstract syntax trees. It is designed for developers interested in understanding how compilers work, breaking down what seems like a complex topic into manageable concepts and practical implementation.
written from the facts on this page · September 2026
From the sources
Nothing in computer science sounds more challenging than writing a compiler. And indeed, it is challenging - very challenging. You probably have to be one of those genius guys in order to be able to write a real compiler. Nevertheless, in this series of blog posts, we are going to show the basic structure of a compiler by implementing a very simple compiler in javascript : our compiler is going to compile code in LISP -like syntax into C -like syntax. This is not going to be easy - but I can guarantee you that you are going to enjoy. I know that for sure because in this series there will be a lot of code snippets and all the code snippets are going to be interactive. You can modify the code…from blog.klipse.tech
Does a similar job
all alternatives →
Ultra Tiny Compiler in less than 90 lines of code2016 · github.com · ▲61Ultra Tiny Compiler. Contribute to antonmedv/ultra-tiny-compiler development by creating an account on GitHub.
A compiler for a small language into x86-64 assembly2020 · github.com · ▲74Compiler for a small language into x86-64 Assembly - MauriceGit/compiler
A self-hosted js compiler in 1k loc2017 · github.com · ▲47Minimal self-hosted JavaScript compiler in 1k lines of code - maierfelix/mini-js
TinyGo – LLVM-based Go compiler for microcontrollers2018 · github.com · ▲177Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM. - tinygo-org/tinygo
A compiler and VM for a simple language, in 150 lines of code2022 · gist.github.com · ▲200A complete compiler for a simple language (in less than 150 LoC) - 00_readme.md
My C compiler compiled itself2024 · github.com · ▲275One of the most challenging projects of my life :)
More dev tools this month
the category →

open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.
Dev tools · 27d ago · github.com

Contribute to reladraw/reladraw development by creating an account on GitHub.
Dev tools · 25d ago · github.com
OpenBot▲362Grok Bot alternative: free, local, open-source, multiplayer
Dev tools · 22d ago · openbot.run
Talanoa▲340Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…
Dev tools · 20d ago · talanoa.email
CoreSpeed▲332One MCP for everything your agents need: apps, memory, tools
Dev tools · 27d ago · corespeed.io
Source: Show HN post ↗
Launched alongside, February 2017
the whole month →
Lottie by Airbnb▲1,138Easily add high-quality animation to any native app
Dev tools · 2017 · airbnb.com
Web Gradients▲906Curated collection of 180 free fresh background gradients 🚀
Work · 2017 · webgradients.com




A free guide to all HTML elements and attributes.
Life & fun · 2017 · htmlreference.io