I’ve been reading the Java Virtual Machine spec and the book Inside the Java Virtual Machine. I’ve begun to write my own JVM implementation in C++, not for practical reasons, but just for the learning experience. So far it interprets most of a class file. This has been on hold for a few days. What’s somewhat interesting to me, but which I did not realize before, is that the JVM design is very much centered around the java model of classes, interfaces, methods, etc. Not that it’s stopped people from targeting a lot of languages to it in recent years.
I’m slowly heading back to my FPGA project. I haven’t set up FPGA design software again, nor have I been mucking about in Verilog, however I’ve started to thinking about the implementation of a basic stack machine again. I’m a little disinterested in Forth lately, so I may just code up a quick assembler for it and see what strikes my fancy after that. At the moment, I’ve been scrawling some ideas on paper and thinking about how to best map about 19 instructions into a 16 bit word to minimize decoding logic.
More than ever, I believe that understanding how compilers work is among the most important practical topics in computer science, once you get beyond the basics. I’m glad I took a “Programming Languages and Compilers” course in college, but it was just an intro really. To really understand what’s going on and to really have the ability to make new tools when your tools are insufficient, this is a subject you can’t gloss over. (Steve Yegge has a great rant about this.)
Mostly, I’ve just been cranking out solutions to Project Euler problems and reading books in my spare time.