I was once a computer science undergraduate student and so wrote a lot of code. I write a bit less code now as a math graduate student, but it still comes in handy all the time. Here are some programs I’ve written over the years.
These programs are written in CWEB, and are meant to be read! I have also included the C and PDF outputs so you don’t have to download a CWEB compiler to read them.
- LLL-ALGORITHM. A program that performs lattice reduction via the famous LLL algorithm (C) (PDF).
- LP-BALLS. A program for experimenting with points in the unit ball of $L^p$. (C) (PDF).
If you wish to compile my sources from TeX, you’ll need to download these macros and typeset using the Plain TeX engine. Feel free to use and modify them for your own purposes as well.
- fontmac.tex (Fonts and document formatting)
- mathmac.tex (Mathematical shortcuts)
- proofmac.tex (Proof figures)
If you use LaTeX and want your documents to kind of look like my Plain TeX documents, I have a LaTeX
.sty file that sort of approximates it.
You can see a demo I prepared (LaTeX/PDF). I’m not going to keep this updated though, so if you like the style you should consider switching to Plain TeX. Terms and conditions apply. GohLaTeX should not be used to typeset machine learning documents.
Solutions to exercises in various computer science textbooks.
- Structure and Interpretation of Computer Programs, by H. Abelson and G. Sussman (Scheme)
- The Art of Computer Programming, by D. E. Knuth (MIX Assembly)
A compiler and bytecode interpreter for a sizeable subset of Python, written in OCaml (with the help of Ocamllex and Menhir for lexing and parsing). Created as an individual semester-long software project under the supervision of Adam Dingle at Charles University in Prague. Relevant blog posts: 1, 2.
An interactive lambda-calculus interpreter that performs normal-order beta-reduction and includes support for variable bindings.
A program that generates syntax trees for English sentences, written in Haskell. A blog post detailing the approach as well as the limitations of the program can be found here.
A collection of small programs and scripts I wrote while learning new languages. Many are solutions to coding puzzles and challenges. Some of the most fleshed-out are:
- A calculator, implemented as a stack-based virtual machine (OCaml)
- A program that collects and analyses weather data (Haskell)
- An implementation of some abstract data structures (C)
- A tool for analysing/generating Cayley tables (Haskell)
My teammate and I created Mattoni, a program that allows you to generate and interact with escape-time fractals. We used the SDL2 graphics library and wrote the program in C. I wrote more about it here. (May 2019)
My team created CourseTalk, a discussion and collaboration platform for students. A blog post describing the process and functionality can be found here. (November 2018)
These are my assignment solutions for certain classes. They were made public only after their respective course end dates.
Assignments from COMP 206 Introduction to Software Systems at McGill University.
Assignments from COMP 321 Programming Challenges at McGill University.