HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
skx
go.vm
Go2018–2022
skx / go.vm · Archived

go.vm

A simple virtual machine - compiler & interpreter - written in golang

3Distinct people
7Mentions
0Explicit recommenders
345GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A simple virtual machine - compiler & interpreter - written in golang

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2018-07-02 14:55:37 UTC to 2022-05-08 16:15:10 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC321
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC211
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101

What Hacker News says

7 sources
You might find something interesting if you were to look at virtual-machines - many are used for implementing scripting-languages, so while you'd not be writing assembly-code, you'd be writing "bytecode" programs. You could write bytecode for Lua, or bytecode for Python for example. I had a fun few weeks writing a simple virtual-machine, and a "compiler" which turns a simple assembly-language-like input into bytecodes which are then interpreted: https://github.com/skx/go.vm/ Other examples, along with lua/python which were already mentioned, might include "Writing a compiler in go" this turns a scripting-language into a set of opcodes which a VM executes: * https://compilerbook.com/
In New Assembly Like Programming Language?
Virtual machines are definitely fun, and can be useful things to know about if you ever design/implement a scripting language or an emulator. I wrote a toy system a few years ago, a simple interpreter (C) along with a compiler/decompiler (Perl) to match it. Unfortunately my system didn't have a terribly well-designed instruction set. If I were to start over I'd probably implement 8086 instruction-set, or similar. That said even a toy system is fun, the biggest issue with writing your own instruction-set is that you have to write the actual programs too. Which is often less fun! I rewrote my interpreter in golang recently, keeping the same instruction-set but adding a better trap-system. Of course re-implementing it meant that I still have the problem of no real programs being written for the machine! https://github.com/skx/go.vm/
In Write Your Own Virtual Machine
It is always nice to see projects like this. Creating a simple interpreter isn't a hard job, but it's still pretty educational. One thing that you'll benefit from is documenting the instruction-set, and usage a little more clearly. For example my own toy language was written in C here: https://github.com/skx/simple.vm And I think I did a good job of showing how to use the instructions. Then for fun I rewrote it in golang https://github.com/skx/go.vm which showed some interesting differences. Your own tastes might differ, but I'd think after the interpreter a compiler/decompiler would be good next steps. Makes it a lot easier to write code/programs in your assembly!
In Basic Virtual Machine Implementation in C99
http://emulator101.com/ is a good resource, as is https://www.reddit.com/r/emudev/. Or you can just cheat, design a "toy" instruction set, and write something to process it. A couple of years ago I did that, in C/Perl: * https://github.com/skx/simple.vm Later I rewrote the interpreter/emulator in go: * https://github.com/skx/go.vm The downside with my approach here is that I ignored graphcs, sound, & I/O. These days I'd recommend you write an emulator for the Chip-8 system..
In Goboy: Multi-Platform Nintendo Game Boy Color Emulator Written in Go

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.