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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Going into freshman year, figured I should build an interpreter

138 点作者 liamilan超过 1 年前
Hi all!<p>I&#x27;m going into my freshman year, and figured that the best way to prepare for the intro to programming Racket course would be to implement my own garbage-collected, dynamically typed, functional programming language in C ;)<p>Anyways... here&#x27;s the repo: https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb<p>I started learning C over the summer, so I still have a whole lot to learn... Any feedback would be greatly appreciated! :D

18 条评论

poulsbohemian超过 1 年前
Here&#x27;s perhaps some unexpected and unsolicited advice... so pretty clearly you aren&#x27;t going to have a hard time with the CS curriculum (assuming that&#x27;s what you intend to study) so my $0.02 is - find a second or even third major to augment your skill set. If you are already able to get to this level on your own, you&#x27;ll likely breeze right through a typical undergrad CS course of study. So consider other courses of study that might be a bit more of a challenge &#x2F; might give you an even broader skill set four years from now when you enter the workforce or consider grad school.
评论 #37292235 未加载
评论 #37292198 未加载
评论 #37290914 未加载
评论 #37298597 未加载
评论 #37292676 未加载
评论 #37297696 未加载
评论 #37348695 未加载
评论 #37294258 未加载
评论 #37290879 未加载
yeputons超过 1 年前
My main advice: never trust C, C++, or their compilers. Undefined behavior bites. Even if you just care about the latest 64-bit Ubuntu Linux LTS, compiler updates or flag changes bite as well.<p>That&#x27;s the main difference between C and C++ and almost any other language. Not the syntax, neither the perceived &quot;low-levelness&quot;, nor manual memory management. In any other language, if you make a mistake, the program behaves badly, but in a predictable way. In C and C++ it may behave reasonably, it may crash in another file altogether few seconds after the erroneous line is executed, it may produce the correct answer. Or it may crash only sometimes. Or it may silently produce an incorrect answer. Different behaviors on different systems, and even on the same system with different compiler flags (e.g. optimization level), of course.<p>That makes reliable experiments with C and C++ impossible. Even if you have just five lines of code, you almost never know if they&#x27;re valid C or C++ for sure (separately, whether they do what you want with modern&#x2F;legacy compilers). It&#x27;s still fun and everything (congrats on making your own language, that should&#x27;ve been fun!), but you never truly know whether what you wrote is not going to break in a few years (or months) with zero code modifications just because there was another UB lurking around.<p>See <a href="https:&#x2F;&#x2F;evan.nemerson.com&#x2F;2021&#x2F;05&#x2F;04&#x2F;portability-is-reliability&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;evan.nemerson.com&#x2F;2021&#x2F;05&#x2F;04&#x2F;portability-is-reliabil...</a> if you&#x27;re curious about more practical implications.
评论 #37291694 未加载
xrd超过 1 年前
Man, your blog (<a href="https:&#x2F;&#x2F;www.liamilan.com&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;www.liamilan.com&#x2F;</a>) is wonderful. I wish you had an RSS feed, hint, hint.
评论 #37293363 未加载
s_Hogg超过 1 年前
Congratulations, this is great. Have you thought about spending some time writing down what you had to learn and how you went about figuring out what to learn in order to do this? I think it&#x27;d be even more interesting than the language itself.
评论 #37287291 未加载
svilen_dobrev超过 1 年前
For furthering your skills, i can suggest a related topic (that is never taught officialy though): debugging&#x2F;reverse-engineering an interpreter. Does not have to be a JVM-size, most games have lots of interpreters in them too.. (although there might be multiple layers of interpreters - which is magnitude harder)<p>You may start with reversing compiled-code, but interpreter is much-much more.. interesting. Especialy if of unknown (simple) language.
mindvirus超过 1 年前
Love it! I learned so much from building projects like this! None of mine had cool logos like yours - this looks really pro.<p>Have you tried teaching Crumb to GPT4? I bet it could surprise you with what it can do.
withtheprogram超过 1 年前
clickable link to repo: <a href="https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb">https:&#x2F;&#x2F;github.com&#x2F;liam-ilan&#x2F;crumb</a>
tonfreed超过 1 年前
Well done, I had a degree and 5 years professional experience under my belt before doing that.<p>Make sure you foster that curiosity continuously until the day you die, because it&#x27;ll serve you really well
dazhbog超过 1 年前
Learning C controlling some shitty robot in my first year was soo much fun. I was waking up and going to sleep thinking about it. So I hope your first year is also fun.<p>Obviously you are much more advanced, so my advice would be to keep tinkering with everything u can get your hands on.., and keep spreading to adjacent disciplines (electronics, cad, startupy stuff, and even non tech stuff) until u take over the world haha.
brailsafe超过 1 年前
Ambitious! What were some of the educational resources you used or that inspired you before and throughout the project? Textbooks, tutorials etc..?
评论 #37287702 未加载
wxce超过 1 年前
This is so good for your age! I don&#x27;t think I made anything beyond a calculator or a website before entering college.
cod1r超过 1 年前
I wish I was this talented when I was going into college. Nice job though. :)
gus_massa超过 1 年前
Did you wrote your own garbage colector? Is it a moving one or a not moving one?
评论 #37279358 未加载
acheong08超过 1 年前
This is seriously impressive. I’m also just about to enter college for software engineering and projects like this make me concerned about how I’m even gonna compete with such skilled peers.
评论 #37290426 未加载
评论 #37290382 未加载
zerojames超过 1 年前
I love this! Amazing work!
评论 #37287295 未加载
victorsup超过 1 年前
Amazing!
delta_p_delta_x超过 1 年前
Nicely done.<p>You&#x27;re a freshman, picked up C over the summer, and have already built an interpreter for a language that you haven&#x27;t officially been taught yet, and have a blog with a couple dozen posts.<p>I&#x27;ll be honest, people with achievements like yours make me feel pretty worthless.
评论 #37287479 未加载
Cheetah26超过 1 年前
Since you&#x27;re going into your freshman year I&#x27;ll offer my college advice as a current senior. The moment that you feel a class will be covering something you already know, reach out to your advisor and the professor. I personally wasted far too much time in intro classes that could&#x27;ve been easily bypassed. While easy A&#x27;s are great for the GPA, it&#x27;s better to spend your time and money actually learning.
评论 #37290359 未加载