| Hey! I’m JC. I’m 17 and part of Hack Club, a nonprofit where we help teenagers ship programming projects with their friends while growing technically. A while ago, I asked myself the question, “How exactly do programming languages work behind the scenes?”
It seemed really daunting until I went to a half hour workshop at a high school hackathon about writing a tree-walk interpreter and realized that getting started was actually super fun. This guide is designed in the vein of that - to get people, especially teenagers, started on learning how to build a programming language in a literal weekend by actually shipping one. It’s a stepping stone for learning the big things - compilers, optimizations for performance, etc.
It’s very inspired by Crafting Interpreters and why’s poignant guide, but meant to be approachable in a weekend. Some backstory on me: A year ago I finished high school early and joined Hack Club full-time to build projects like this. I’ve been programming since COVID, and learned how to code primarily by shipping things that seemed daunting to me and taking inspiration from people taking the time to break down various topics online. Give it a try and take it out for a spin! Constructive feedback is also really appreciated. It’s open source on GitHub at https://github.com/hackclub/easel |
Making a programming language is a great way to better understand computation and start to explore different means of expressing concepts in code beyond those available in existing languages.
Programming languages are a difficult concept to get one's head around. Having one that implements a lexer, parser, and execution engine -- and is packaged as a resource for others to use -- is an impressive technical feat.
Writing a guide so others can learn is doubly impressive.
Asking a question like "How exactly do programming languages work behind the scenes?" is a great quality to have in your creative pursuits. Not to mention that such questions are the basis of HN: journeys that satisfy our creative curiosities.
Keep making cool things!
---
One piece of feedback: I find the size of the code instruction boxes on the page a bit small. There are no visual indicators that I need to scroll down to see all of the code. I would love for the boxes to be taller so I can read the code and retain all the context without scrolling.
---
Another idea: You may enjoy writing a post about what you learned making the language. What did you find more difficult than you thought? What challenges did you run into? How did you solve them? Why did you choose the syntax you used?
I love reading about the how behind cool projects :D