github.com/LukeGrahamLandry
two years of 100% organic fair trade bit patterns
self hosted compiler
for franca, the language i designed.
<15kloc
lightly optimising codegen backend
ported from qbe but my own instruction encoding instead of an external assembler. targets arm64/amd64/riscv64/wasm32, JIT or AOT(mach-o/elf).
<24kloc
c compiler
ported from chibicc but faster, more targets, and no toolchain dependencies. can
build real programs
and allows franca to
import c libraries
without bindings.
<8kloc
a minimal operating system for aarch64
. smp threads,
virtual memory
,
load elf files
,
virtio drivers
, enough
libc
to render
doom (jitted by my c compiler)
.
<7kloc
a webassembly runtime
that can run my compiler but not much else.
<3kloc
graphics/windowing library
for metal/webgpu ported from sokol but with my own
shader compiler
to run franca on the gpu.
<12kloc
chess movegen/engine
ported from my old zig one to franca.
plus a gui
.
various graphics demos:
mandelbrot
,
terminal emulator
,
2d farm game
,
laz point cloud viewer
,
events test
,
stackie renderer
,
objdump like debug utilities for
mach-o
,
elf
,
wasm
,
devicetree
,
deflate decompressor
,
sha256 hasher
for
fetching
external tests.
many little languages:
llvm's kaleidoscope jit tutorial
ported to my backend,
a prospero challenge jit
,
a lox interpreter
,
too many bfs
,
a very unfinished
rustc codegen backend
using my compiler instead of llvm and
a rust builder api
for my ir's binary format.
documentation
for my language,
test suite
for my various compilers.
Franca Compiler
Self hosted compiler for a programing language with arbitrary compile time execution.
Generates native machine code for arm64/amd64/riscv64 (JIT or AOT) without depending on assembler/linker/llvm.
Various macro capabilities for generating code (demos include a C11 compiler that runs at comptime to import libraries).
Compiles itself in one second. The compiler does not depend on libc on linux.
Also targets wasm.
Try it online!
2024-2026
Chess Bot
A chess engine written from scratch and compiled to web assembly with a simple canvas UI.
Alpha-beta pruning, transposition tables, bitboards, and more. ~1700 rating on Lichess.
Do you have what it takes to defeat the machine?
Try it online!
Zig, JavaScript
2023
Fractal Rendering
Real time Mandelbrot, Julia, and Newton fractal zoom explorer.
Iterative math on complex numbers makes pretty pictures.
Rendered on the GPU, extended precision using pairs of floats.
MacOS only.
Swift, C++
, Metal, SwiftUI
2023
2.5d Maze Rendering
Explore 2d mazes in first person. Dynamic lighting and portals, rendered with only vertical lines.
Maze generation based on the book Mazes for Programmers.
Try it online!
Rust
, SDL
2023
Ray Tracer
Real time ray tracing. Supports spheres, cubes, planes, shadows, reflection, and refraction.
The same code can run on the GPU (MacOS only) or the CPU (cross platform).
Based on the book The Ray Tracer Challenge.
Rust, C++
, Metal
2023
Minecraft Mods
Added various features to Minecraft.
Some work with larger teams. Several open source contributions. 10 million cumulative downloads.
Freelance work for 40+ clients paid my university tuition.
Experince determining requirements from non-technical stakeholders.
Java, Kotlin
, Forge, Fabric, Mixin
2020-2022
Lox Interpreter
A stack based, bytecode virtual machine for a dynamically typed, garbage collected, object-oriented programming language.
Based on the book Crafting Interpreters.
Try it online!
C++, Python
2023
words
Prospero Challenge Entry
2026
How Many Digits In Infinity?
2024
more incomplete projects
compile a subset of scratch to rust
(written in rust) 2024
compile a subset of c to (llvm ir, cranelift, or aarch64 assembly text)
(written in rust) 2023
compile a subset of java bytecode to llvm ir
(written in ocaml) 2023
a cli launcher/installer for modded minecraft
(written in dart) 2023