Let’s build a CPU with Ruby!

this Topic will be presented by Denis Defreyne

at April Meetup 2015, hosted by Tobias Pfeiffer

Ruby is a deliciously high-level language. It allows you to focus on what you want to do, and not care about how to do it. All of this is made possible by object orientation, garbage collection, dynamic typing, metaprogramming, closures, etc.

A CPU has no knowledge about these high-level concepts, however. It knows about registers, stacks, frame pointers, labels, conditional jumps, etc—far from what we’re used to in Ruby!

In this talk, I’ll design a CPU from the ground up, and write a simulator for it in Ruby. It’s not a particularly useful thing to do, but it will give you some insight in how a computer works under the hood, and it’s fun!

14 People like it

Fork me on GitHub!
Become a patron