Adventures in Language Design: OrbitVM diary 1

Apparently, my brain isn’t satisfied with having to manage fourth year and my honours project, so I needed (yet another) side project. I’m making my own programming language, probably called Orbit (or OrbitVM).

The (far-away) end goal would be to use the language for scripting in the upcoming rewrite of my game engine (look ma, another side project!). For the time being though, I’ll be happy if I can run simple scripts with the basics of any language: a type system, functions, flow control, possibly some lightweight object system.

I don’t particularly fancy going all the way down to machine code, so it’ll be VM-based, very much like Java: a compiler that compiles each script file to a bytecode file, and a VM that loads those files and runs the main() function.

So far, my specs for the language are:

A lot of this is inspired pretty heavily by Swift and Objective-C, which I have always liked working with. I’m only just getting started, so much of it might change as I dive deeper into language design. I’ve already made a quick sandbox VM to play around with that can run some rudimentary bytecode, but it looks like the compiler is going to be the most complex part. Luckily, it turns out that one of my classes next semester is called… “compilers & languages”.

In the meantime, I am going to keep a diary of my progress – I found Brent Simmon’s Vesper Sync Diary series to be incredibly invaluable, and I like talking about nerdy things like compilers, VMs and programming languages.