Live data from Hacker News

My Most Important Project Was a Bytecode Interpreter

gpfault.net

1–10 of 154 posts

Re: My Most Important Project Was a Bytecode Interpreter

#3
Also: a software rasterizer.

Most people refuse to write one because it's so easy not to. Why bother?

It will make you a better coder for the rest of your life.

Let's make a list of "power projects" like this. A bytecode interpreter, a software rasterizer... What else?

Re: My Most Important Project Was a Bytecode Interpreter

#4
The project that affected my thinking the most was a bytecode interpreter[1].

I've had use for that knowledge, nearly fifteen years later - most of the interesting learnings about building one has been about the inner loop.

The way you build a good interpreter is upside-down in tech - the system which is simpler often works faster than anything more complicated.

Because of working on that, then writing my final paper about the JVM, contributing to Perl6/Parrot and then moving onto working on the PHP bytecode with APC, my career went down a particular funnel (still with the JVM now, but a logical level above it).

Building interpreters makes you an under-techtitect, if that's a word. It creates systems from the inner loop outwards rather than leaving the innards of the system for someone else to build - it produces a sort of double-vision between the details and the actual goals of the user.

[1] - "Design of the Portable.net interpreter"

Re: My Most Important Project Was a Bytecode Interpreter

#5
Nice post! I really enjoy playing around with things like this. It's amazing how little is needed to make a language/interpreter capable of doing virtually anything, even if not elegantly or safely. As long as you can perform calculations, jump around, and implement some kind of stack your language can do just about anything.

I recently threw something together sort of like this, just for fun (I like your interpreter's name better though): https://github.com/briansteffens/bemu

It's crazy how much these little projects can clarify your understanding of concepts that seem more complicated or magical than they really are.

Re: My Most Important Project Was a Bytecode Interpreter

#6
Yes I wrote a parser/compiler and interpreter for a custom domain specific language and it had a similar effect on my career. Lots of fun!

Okay I guess technically I used a parser generator that I then modified to build an AST and convert it into assembly-like code that fed the interpreter.

Re: My Most Important Project Was a Bytecode Interpreter

#7

Also: a software rasterizer. Most people refuse to write one because it's so easy not to. Why bother? It will make you a better coder for the rest of your life. Let's make a list of "power projects" like this. A bytecode interpreter, a software rasterizer... What else?

Your own Lisp-like language (or Scheme implementation). Really recommend it.

Re: My Most Important Project Was a Bytecode Interpreter

#8
I love the author's meta-idea of refusing to accept that unfamiliar things are black boxes full of magic that can't be touched.

A great example of this mindset is the guy who bought a mainframe. [1]

Refuse to be placed in a silo. Work your way up and down the stack and you'll be much better placed to solve problems and learn from the patterns that repeat at all levels.

[1] https://news.ycombinator.com/item?id=11376711

Re: My Most Important Project Was a Bytecode Interpreter

#9

Also: a software rasterizer. Most people refuse to write one because it's so easy not to. Why bother? It will make you a better coder for the rest of your life. Let's make a list of "power projects" like this. A bytecode interpreter, a software rasterizer... What else?

I really recommend a raytracer, especially to anyone interested in graphics. It's straightforward, powerful, infinitely expandable with optional features, and opens up a ton of discussion about performance, code complexity, and general organization. Plus it's fun, in an instant gratification kind of way.

Re: My Most Important Project Was a Bytecode Interpreter

#10

Also: a software rasterizer. Most people refuse to write one because it's so easy not to. Why bother? It will make you a better coder for the rest of your life. Let's make a list of "power projects" like this. A bytecode interpreter, a software rasterizer... What else?

A distributed database.

Same category of probably not a great idea to use and claim is better than what's out there ( it won't be ) but boy howdy will it teach you about distributed systems and pitfalls that will absolutely help you when you are working on one at your day job.

Post reply on HN