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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: I wrote a VM and Compiler for a small language in Go

37 点作者 madrafi大约 5 年前

2 条评论

stevekemp大约 5 年前
Looks good, you might compare to this implementation of Monkey with a bunch of extensions (such as &quot;objects&quot;, regular expressions, and a standard-library written in the language itself):<p><a href="https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;monkey&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;monkey&#x2F;</a><p>A similar idea allows embedded usage of a scripting language, as a filter:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;evalfilter&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;evalfilter&#x2F;</a><p>Of course it gets addictive writing little languages, so you&#x27;ll probably want to have fun and try making more! I went with BASIC:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;gobasic" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;gobasic</a><p>But then you start thinking about assembly language:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;math-compiler" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;skx&#x2F;math-compiler</a>
madrafi大约 5 年前
I recently took time to dive into compilers and programming languages by reading Thorsten Bell&#x27;s excellent books, and this is what came out !