Johnny Cai



Recreation of the game Factorio.

Written in: C++17, Python (loading runtime data), OpenGL.

Built via: CMake, Azure Pipelines.

Optimized renderer: cache locality, threading, assessing generated assembly.

C Compiler

A C99 compiler I wrote, in C.

It currently supports all the basic language constructs: conditionals, loops, expressions, arrays, pointers, function calls, and so on.

It uses top-down recursive descent with backtracking to build nodes of language productions. The nodes are translated to a custom intermediate language, which is then converted into assembly via macro expansion and register allocation with graph coloring.

Vim LaTeX Equation Editor

Edit LaTeX equations in a vim style editor.

I find a vim style editor much faster to use for writing equations. As none of the existing websites supported a vim style editor, I made my own.