Implement a programming language from scratch
Report a link problem
The originally submitted URL now redirects to the address above. Updating the destination does not change the item’s HN history, Hall membership, or rank.
Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderIn my experience, many people will miss the significance of this, or will simply fail to grasp how this is implementing a programming language at all. After all, you're taking advantage of the host language for every single aspect of the new language, even tokenizing/parsing. More interesting for beginners (in my opinion) are examples implementing a simple tokenizer, parser, and compiler to another source language. This seems to be what closes the gap between programming languages as mystical constructs and…
Matt Might's website has taught me so much over the years, going all the way back to ... I want to say 2008-2009? From programming languages to Unix-fu to a huge amount of topics in-between. I'm super glad to see his writing still being shared. One of my favorite corners of the web.
For a fairly liberal definition of "from scratch", of course...
This one is a cheat because read does a lot of the work. I can tolerate treating STDIN/OUT as black boxes because they often are. The Scheme interpreter's functionality is what's custom. The read function is crucial to it. So, it's implementation should be included. That puts this way over 7 lines. The good news is that I now know where the name Y Combinator comes from. I imagine it will take me a lot longer to wrap my head…
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 2
- Total points
- 420
- Total comments
- 100
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2010-06-28 | 7 lines of code, 3 minutes: Implement a programming language from scratch | adg001 | 99 | 24 |
| 2012-12-25 | Implementing a 7-line Interpreter | mjdesa | 9 | 0 |
| 2015-03-31 | Implement a programming language from scratchFirst breakout · Best thread | sea6ear | 136 | 23 |
| 2015-09-09 | Implement a programming language in 7 lines | frankpinto | 59 | 15 |
| 2018-06-18 | 7 lines of code, 3 minutes: Implement a programming language from scratch | amzans | 2 | 0 |
| 2019-11-25 | 7 Lines of code, 3 minutes: Implement a programming language from scratch | reedwolf | 3 | 0 |
| 2022-03-30 | 7 Lines of code, 3 minutes: Implement a programming language | behnamoh | 1 | 0 |
| 2026-05-11 | 7 lines of code, 3 minutes: Implement a programming language (2010)Latest 20+ point return | azhenley | 111 | 38 |