Software

Here are some of the larger software projects I’ve worked on.

Beacon

Beacon is a smart bike glove that makes you safer on the road. It signals with you: when you raise your hand to signal a left turn, it illuminates a left-facing arrow; when you signal a right turn, it illuminates a right-facing arrow. It makes cycling hand signals less ambiguous to cars, and looks great too!

The source is available on Github.

C0 Compiler

For Carnegie Mellon’s Compilers course, I wrote a compiler for C0, a simple C-like language. The compiler targeted x86-64 assembly.

With optimizations enabled, it generated code that ran at about 160% of the speed of GCC. These speed tests covered a number of benchmarks with contained memory-intensive tasks like matrix multiplication.

The compiler is written in Haskell. As the class is still ongoing, the code is not public, but I can provide it on request.

OurTOS

OurTOS is an RTOS (Real-Time Operating System) developed for the Freescale MC9S12C128, a 16-bit microcontroller. It’s very lightweight (only a few hundred lines of code!), but it provides uses with basic task scheuling and mutexes to share between those tasks.

It uses a version of the priority ceiling protocol to safely intermix real-time scheduling with mutexes: if a low-priority task is holding a mutex which a high-priority task wants, the lower task temporarily gains a higher priority until it is finished with the mutex.

The source is available on Github.

ByteTorrent

ByteTorrent is a BitTorrent-like peer-to-peer application. Its use is similar to BitTorrent’s: it allows a number of clients to create torrent files which describe data files, share these torrent files via a tracker server, and share files directly. It also addresses many of the design challenges that BitTorrent did: for example, how do clients deal with other malicious clients?

ByteTorrent is written in Go, and utilizes Go’s message-passing concurrency model throughout for high performance. ByteTorrent also uses an implemenation of the Paxos concensus protocol to keep its servers in sync.

ByteTorrent lives here.