Blog
Below is a collection of my thoughts, organized from most to least recent. Posts that I’m particularly fond of will have a little preview. Happy Reading!
Intelligence and the importance of consistency
2024-08-13 · About 14 minutes long
People are quick to point out that Large Language Models (LLMs) tend to hallucinate facts and lack the ability to reason. LLMs are not grounded in reality. Hallucination is an architectural limitation due to how Transformers, as auto-regressive sequence predictors, are constructed.
Dealing with Cyclic Data in Rust, Part I
2022-07-22 · About 20 minutes long
Or, a GhostCell Deep Dive.
In this two-part series, we build GhostCell from first principles. In Part I we go over the underlying theory required to understand GhostCell. This post’s been sitting on my hard drive for about 9 months, so I’ve decided to bite the bullet, split what I’ve written in two, and hit publish on Part I. Hope you enjoy!
Over the past month or so, something I’ve repeatedly run into is GhostCell, a technique that (ab)uses Rust’s lifetime system to detach ownership of data from the permission to mutate it. In short, this makes it possible to write datatypes that rely on shared interior mutability (think doubly-linked lists and other cyclical graph-like structures). In this post I wanted to explore Rust’s lifetime system to explain GhostCell from first principles, and why it’s kinda a big deal.
Building a Rust Mentality
2022-07-21 · About 5 minutes long
What really helped me begin to grok how Rust really worked was working towards building an understanding of how its compiler works.
Late Night Conversations about Nothing in Particular
2022-07-15 · About 22 minutes long
The Beginning of the End (of Today)
As I write this today, it’s tomorrow.
And… We’re talking about school?
N.B. This post is not about school, bear with me.
Throughout the school year, I’m usually pretty consistent with my sleep schedule. It’s like a rhythm, every hour of my day planned out. I wake up at 5:55 exactly, do some morning studying (it’s always so much easier to get stuff done in the morning), shower an hour later, breakfast, and I’m out the door.
School’s rhythmic too. This was my last year of high school, my senior year. I think I overdid it a bit, to be honest. 6 APs and 2 college math courses, on top of, you know, everything else that goes on in life, is a bit much for anyone, especially for a simple-minded guy like me. I appreciate the rhythm school brings to my life.
So why am I writing this at 1 AM?
Sketchnoting: a spontaneous but needed reflection
2022-02-11 · About 6 minutes long
Preface
Since September of last year, I’ve been chipping away at a long-form post on how to take good notes. This, sadly, is not that post—consider this post a teaser to tide you over until then.
Today I finished my fourth book of sketchnotes. Each book has about 240 blank A5 pages, so I guess I’m fast-approaching the thousand-page mark. In celebration of filling yet another volume, I took a trip down memory lane and dug out Volumes 1-3. Taking the time to read through some of my older notes, it’s easy to see that I’ve improved quite a lot.
While reading through my second notebook, though, I found a short hand-written collection of my thoughts on note-taking. Although it’s been a few years since then, I feel like the core of what I had to say then rings true today.
Below I’ve typed up those few pages of notes, I hope you find them interesting:
Predicting the technology of 2027
2022-01-04 · About 4 minutes long
Using Proof-of-Work to Manage Backpressure
2021-12-01 · About 6 minutes long
Thinking about efficient backing stores for CRDTs
2021-08-02 · About 9 minutes long
A Conflict-Free Replicated Datatype is a bit like a smoothie: the same ingredients will produce the same result, regardless of the order in which they are added. In the context of, say, text editing in a distributed context, merging two documents will always succeed in a deterministic manner. In other words, A CRDT is a bit like a git repository that never has merge conflicts.
There are many different ways to approach the construction of CRDTs, each construction having its own strengths and weaknesses. Today, we’re going to focus on creating out an efficient backing store for a particular family of algorithms known as Replicated Growth Arrays (RGA).
Getting bindgen working on NixOS
2021-07-08 · About 4 minutes long
A Small Test Post for this New Blog
2021-04-30 · About 1 minute long
A Tiny Introduction to Parsers
2020-07-08 · About 3 minutes long
A Question
The other day, someone asked how parsers worked on The Programmer’s Hangout Discord server. Here’s an an abridged version of my explanation.