Trunq: a prompt compression engine
I've been working on a token-aware text compression service called trunq. This obviously makes it suitable for LLM prompt compression, but the underlying logic actually has very little to do with LLMs and everything to do with classical NLP.
This site, version 3
In May 2023, I created this website. I'd never touched JS, let alone React, but I was dying to write code that wasn't for EECS 281. So I followed the Next.js Pages Router tutorial
The padding oracle attack, step by step
A major con of CBC is the so-called padding oracle attack. Padding is often performed with PKCS#7 padding. If the end of your message requires b bytes to fill the last block
A graphical interpretation of sinusoidal positional encodings
In the original transformer architecture, Vaswani et al. introduced sinusoidal positional encodings, given by
The symmetries of a tetrahedron are isomorphic to
An interesting problem from Math 412.
Tree visualizations of chess openings
The first thing that strikes you when learning chess opening theory is volume. Modern theory is so broad that variations increase exponentially with the number of moves. You can get a sense of this by reading any [opening book](https://lichess.org/opening) and trying to memorize as many lines as possible.
Elementary Analysis
Sequences, differentiation, and integration, plus some algebra and topology.
Machine Learning
Theory and implementation of (supervised and unsupervised) machine learning algorithms.
Cryptography
Precise attack models and security definitions, and constructions of real-world cryptosystems.
Quantum Programming
Quantum circuits, algorithms, and computation.
Modern Algebra
Rings, groups, fields, and some other topics.






