This is a complete dump of everything that I have worked on so far. Who knows, you might find something interesting :-)

bpat (2019-)

WebAssembly WebGL OpenGL ES Android AAudio PulseAudio Win32 X11 WebAudio GLSL

Cross-platform portability layer for multimedia applications. Deploy to Windows, Linux, Android and the Web via a single codebase. Includes a Javascript-superset DSL for writing WASM-to-JS bindings and a bytecode-based realtime audio rendering engine that implements a subset of the WebAudio spec. Currently under heavy development.

Learn more... Try it out online!

CIR (2019-)

C JIT x86-64 metaprogramming

An experimental C source-to-source compiler that enables compile-time metaprogramming to be performed via compile-time evaluation through a compile-time JIT compiler. I developed this for my bachelor's thesis at my university, and was awarded the Outstanding Undergraduate Research Prize for this project.

Learn more... Try it out online!

DSL for Visual Novels in Scala (2019)

Scala DSL OpenGL LWJGL stb_truetype stb_image GLSL

This was a pretty fun project that I did in a team of two for the Programming Language Implementation course at my university. We implemented a DSL for writing visual novels in Scala, inspired by Ren'Py's script language. As a demonstration, we ported over a condensed version of The Question. I implemented the scene graph/2d rendering and some parts of the DSL.

Learn more... Try it out online!

CS4212-Compiler (2018)

Java CUP JFlex compiler SSA

Toy programming language to ARM assembly compiler, written in Java, that I did for a Compiler Design course at my university. Features a SSA backend with separate spilling and coloring passes. Global next-use analysis is used in the spilling pass, allowing some variables to be preserved in registers across loops without unnecessary spills/reloads. This project scored a full 100/100 for all 3 components (Parsing, Type Checking/IR Generation, Backend).

Learn more... Try it out online!

Moving object detection from LiDAR scans (2018)

C++ CUDA OpenGL perception

A project I worked on during my internship with DSO National Laboratories, Singapore. I implemented a moving object detection pipeline using C++ and CUDA for use with their perception system over a period of 6 months. The detection solution can detect moving vehicles and pedestrians and extract their point cloud from lidar scans. The pipeline was implemented by combining techniques used in existing literature. Full details on this project is under NDA.

DanceDance (2017)

C Python Arduino Raspberry Pi

A dance movement detector that I did in a team of 6 for a capstone project at my university. I contributed to the firmware/communications aspect of the project, especially to ensure that the system remained robust in the face of temporary hardware failures, and loose wire connections. I also had to debug obscure firmware/hardware bugs (1, 2, 3), and designed and implemented a protocol in C for rapid transmission of data between the Raspberry Pi and Arduino, with support for re-transmission in the event of lost/corrupted packets.

Learn more... Report excerpt

CanIHasReview (2017)

Typescript React NodeJS

GitHub pull request versioning utility. I wrote this web application to make up for GitHub's poor support for rebase workflows. CanIHasReview can take snapshots of PRs and generate interdiffs between them. Written with Typescript, React, NodeJS. The internal architecture is pretty nifty -- the frontend and backend are both written in Typescript and they share code with each other.

Learn more... Try it out online!

EE2024 embedded dev board programming assignment (2017)

C GPIO I2C SPI UART embedded systems

An project done in a team of 2 for the "Microcontroller Programming and Interfacing" course at my university. We were tasked with building a system for monitoring the elderly to ensure their safety and security. This was implemented on top of the Embedded Artist's LPC1769 LPCXpresso board and LPCXpresso Base Board. We used various methods and protocols (GPIO, I2C, SPI, UART) to interface with the various sensors and actuators available on the board. My contributions include implementing the low light detection and fall detection systems and writing an entire OLED display driver just to ensure that our system was responsive. This project scored nearly full (59/60) marks.

Learn more... Report excerpt

ngkbuild build system (2016-2017)

Typescript NodeJS build system

A build system similar to make, ninja. I wrote it because I needed a build system that supported file paths with spaces and ran commands directly without spawning a shell. ngkbuild takes a directed acyclic graph of tasks/input files and dependencies, and performs an incremental build, only running tasks when their inputs have changed since the last run. ngkbuild tries to run tasks in parallel as much as possible to take advantage multi-core processors.

View on GitHub

Port git-pull and git-am to C for Git (2015)

C Git

I participated in Google Summer of Code to experience how its like working actively in an established open source project. I chose to work with Git (the widely-used version control system), and proposed and rewrote git-pull and git-am from shell scripts into C for my project. Benchmarks showed that the rewritten git-am speeds up git-rebase (for 50 patches) by a factor of 6-7x. In total, I contributed 117 commits (approx. 4796 lines of code added) to the Git codebase.

View Project Page @ GSoC Archive

btrup backup script (2015)

Python btrfs

To assist in backing up my files periodically, I wrote a Python script that performs incremental backups to my backup server using btrfs send-receive. I run it via a cron job, and till this day it is still faithfully backing up my files.

View on GitHub

pyglreg (2015)

Python OpenGL XML

A library for parsing and extracting data from OpenGL XML API Registry files. Types, enums and functions (commands) in the registry can be enumerated and inspected. The library also provides functions to resolve dependencies and filter APIs in the registry. This makes it useful for generating OpenGL headers and loaders. I wrote this library to automatically generate OpenGL bindings. Nowadays you should use something like glad.

View on GitHub

Bouncy Boar 3 (2009 / 2019)

Visual Basic.NET OGRE 3d SDL_mixer Cg

A short 3d platformer game. Navigate through the floating platforms in space, collect all the red coins, and defeat the final boss! The game is written in Visual Basic.NET with the OGRE 3d rendering engine and SDL/SDL_mixer for audio via the MOGRE and Tao Framework bindings for .NET respectively. Cg shaders are used for simple graphical effects such as the rim lighting effect. This was my first foray into 3d programming and I'm pretty proud of the result. Thanks to bpat, Bouncy Boar 3 can now be played online!

Learn more... Try it out online!

Under Construction