TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: I'm 17 and wrote a guide on how to build your own programming language

149 点作者 jianmin-chen大约 1 年前
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.<p>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.<p>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.<p>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.<p>Give it a try and take it out for a spin! Constructive feedback is also really appreciated.<p>It’s open source on GitHub at <a href="https:&#x2F;&#x2F;github.com&#x2F;hackclub&#x2F;easel">https:&#x2F;&#x2F;github.com&#x2F;hackclub&#x2F;easel</a>

11 条评论

zerojames大约 1 年前
Congratulations on launching the project!<p>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.<p>Programming languages are a difficult concept to get one&#x27;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.<p>Writing a guide so others can learn is doubly impressive.<p>Asking a question like &quot;How exactly do programming languages work behind the scenes?&quot; 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.<p>Keep making cool things!<p>---<p>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.<p>---<p>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?<p>I love reading about the how behind cool projects :D
8338550bff96大约 1 年前
If I were to pick one book that has had the most impact on how I think about programming languages it would be the textbook Programming Language Pragmatics by Michael Scott.<p><a href="https:&#x2F;&#x2F;www.goodreads.com&#x2F;book&#x2F;show&#x2F;89197.Programming_Language_Pragmatics?ref=nav_sb_ss_2_27" rel="nofollow">https:&#x2F;&#x2F;www.goodreads.com&#x2F;book&#x2F;show&#x2F;89197.Programming_Langua...</a>
kunley大约 1 年前
That&#x27;s great!<p>You have excellent inspirations, both of them.<p>It&#x27;s also awesome that your adventures with parsers happen quite early in your coding life, that&#x27;s a big plus, you will look at things from different perspective. (Btw, contrary to some other commenters here, I think it&#x27;s great you have mentioned your age xD).<p>Btw, I totally recommend getting into VM-based approach from the second half of Robert Nystrom&#x27;s book. It&#x27;s not only closer to how hardware works, but also it resembles how early compilers were written when memory was scarce. I implemented stuff based on that approach and learned a lot, even though I am coding for thirty years. If you had some comments, questions or even already hacked on that, I&#x27;d love to hear about it - you can find the email on my profile page here.<p>Good luck!
andoando大约 1 年前
Very cool. Someone correct me if I am wrong but I dont think this is accurate.<p>&gt;Minimally, should have the following features: variables, looping (think: for&#x2F;while loops), conditional branching (think: if&#x2F;else statements) and some form of recursion (think: functions). Why? These are what make a programming language Turing-complete.
评论 #40381311 未加载
评论 #40381630 未加载
评论 #40381344 未加载
评论 #40381415 未加载
评论 #40381370 未加载
chris_mnhn大约 1 年前
This was an awesome read, really amazing job. Most particularly though, I love your style of teaching through storytelling. I was so captivated by the story; it&#x27;s not just a guide or tutorial, but it adds another layer of mental stickiness. Are you planning to write other guides like this about other programming topics?
codetrotter大约 1 年前
Very cool. I especially like the programming language jam, and the fact that the guide pairs with it.
mise_en_place大约 1 年前
Excellent work. When I was your around your age, it was QuakeC that exposed me to programming concepts and really sparked my interest in programming. If you’re interested you may want a follow up project to create a stack or register based VM.
评论 #40382394 未加载
slantedview大约 1 年前
Really cool - I&#x27;m looking forward to reading through this. Since you mention, Crafting Interpreters, how would you compare this guide to that?
quraai大约 1 年前
This is amazing, love the work JC
blacktechnology大约 1 年前
very cool
dang大约 1 年前
[stub for offtopicness]
评论 #40380846 未加载
评论 #40380827 未加载
评论 #40381261 未加载
评论 #40381035 未加载
评论 #40381076 未加载
评论 #40380963 未加载