Hello! 👋

I'm Ethan, a student at Cornell Engineering interested in hardware, programming languages (PL), and systems. I'm a part of Cornell Electric Vehicles, and I'll be working as a PL researcher with CAPRA over the summer.

Outside of academics, I've done a lot of personal projects, from reverse-engineering to creating interactive physics lessons.

Optimizing Compiler

I wrote an optimizing compiler from scratch in OCaml with two friends. My major contributions involved:

  • Static analysis (both type checking and control flow analysis)
  • Intermediate representation and live variable analysis
  • x86 assembly abstraction
  • Parts of the parser/lexer
  • CLI/program driver

My other two friends wrote the IR generation, register allocation, rest of the parser/lexer, and randomized testing.

Iterative Closest Points

I am creating a Simultaneous Localization and Mapping library, integrated with ROS, for my project team. This subproject implements the Iterative Closest Points (ICP) algorithm. Scan matching uses ICP to determine position and velocity from laser scans.

The result of running ICP on two point clouds.


I reverse-engineered the object file format on Apple software, designed an extensive analysis tool, and wrote documentation for compiler developers.

Example analysis of an object file using my tool.

Physics lessons

I programmed an interactive physics lesson on the principle of least action with simulations and animations. It was featured by Grant Sanderson in the Summer of Math Competition, winning top 100 and a spotlight in the results.

An illustration of the question the principle of least action attempts to answer.

Text-based UI library

This is a UNIX TUI library that I wrote, golfed (i.e., wrote in as few characters as possible) to 869 bytes.

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <termios.h>
#include <fcntl.h>
#include <poll.h>
#define P printf
#define U struct termios
#define E "\033"
#define Y(x)TC##x##FLUSH
struct tui{int w;int h;char k;int f;U t;U u;char*b;struct pollfd p;};
#define tui_begin(T,W,H)T.w=W;T.h=H;P(E"[?25l");T.f=fcntl(I,F_GETFL);tcgetattr(O,&T.t);fcntl(I,F_SETFL,T.f|O_NONBLOCK);T.u=T.t;T.u.c_lflag&=~(ECHO|ICANON);tcsetattr(O,Y(SA),&T.u);T.p.fd=I;T.p.events=POLLIN;T.p.revents=0;T.b=malloc(W*H);memset(T.b,' ',W*H);
#define tui_end(T) P(E"[?25h");fcntl(I,F_SETFL,T.f);tcsetattr(O,Y(SA),&T.t);free(T.b)
#define tui_keys(T) T.k=0;if(poll(&T.p,1,5)>0)read(I,&T.k,1)
#define tui_draw(T) P(E"[H");for(int i=0;i<T.h;i++){for(int j=0;j<T.w;j++)putchar(T.b[i*T.w+j]);putchar('\n');}tcflush(O,Y(IO))

3D graphics

I programmed a 3D graphics pipeline from scratch that can render triangle primitives using ray casting.

The next steps are to incorporate lighting, which is tricky, especially given that this project is entirely on the CPU.

A spinning pyramid rendered by my graphics pipieline.

Other projects

Here are some miscillaneous projects I've worked on. Keep in mind that some are rather old!

  • libcmdapp, a concise and powerful command line parsing library in C.
  • mtrack, a tool to debug memory errors.
  • C Hacking, an exploration of different ways to push C to its limits.
  • Tacitus's Germania, an online commentary.

You can read my statement on privacy here.