projects
I mostly write toy projects to learn about different things and because programming is fun.
programming languages and parsing
- kukka: a small and fast parser combinators library written in Rust. The library works by using static dispatch to avoid the runtime overhead of trait objects. The downside being longer compilation times and more complex type signatures. The library is mature enough to be able to easily parse for example JSON or CSV files.
- mc: a C compiler written in Go, featuring lexical analysis, parsing, intermediate representation generation, and x64 assembly code generation.
- rc: a Lisp compiler written in Rust that generates standalone ELF binaries. Parses S-expressions, generates intermediate representation with optimizations like constant folding, and compiles directly to x64 machine code. Without needing an assembler. The lisp is compiles is rather simplistic.
- simdcsv: a fast C++ CSV parser utilizing simd instructions to speed up indexing a CSV file. It uses a two-pass approach where the first pass identifies row and column boundaries using simd, and the second pass extracts the actual data.
security and cryptography
- pch: an end-to-end encrypted chat that contains a X3DH and Double Ratchet implementation using cryptographic primitives from the Go standard library. The chat is self is built using bbolt for storage and GRPC for communication.
- merkle: merkle trees implemented in Go and C. It uses the SHA-256 hash function to create a binary merkle tree from a list of data blocks. It supports generating and verifying inclusion proofs for data blocks.
- gocry: a proof-of-concept ransomware implementation for educational and security research purposes.
- lamportsig: an implementation of Lamport signatures which is a one-time signature scheme based on hash functions.
- sss: an implementation of Shamir's Secret Sharing scheme in Go. It allows splitting a secret into multiple shares, requiring a minimum number of shares to reconstruct the original secret. This is done by using polynomial interpolation over a finite field.
distributed systems and databases
- haystack: a distributed file system inspired by Facebook's Haystack architecture. Features a Raft-based directory cluster for high availability, mapping files to logical volumes stored as large append-only files. The directory coordinates client read/write operations without directly handling file storage, while replication ensures data durability across multiple store servers.
- serie: an embeddable time series database with a custom LSM tree optimized for time series queries. Uses delta-delta encoding for memory efficiency and includes HTTP API, and a custom query language parser for data aggregation.
- dcache: a distributed in-memory cache built with Go. Uses gRPC for inter-node communication, Serf for cluster management, and Raft for distributed consensus.
- distsql: a distributed SQLite3 database.
- levelsql: a minimal SQL implementation which encodes relation data as key-value pairs built on top of LevelDB.
random / fun
- stupidhttp: a HTTP server built from scratch in Go without using net/http. Implements a subset of HTTP/1.1 with HTTPS support.
- hashvis: a utility that generates unique ASCII art visualizations from file contents.