Recent posts:
-
Grep and the Theory of Pattern Matching
grepis one of those small programs that expose a large idea. It can find symbols in codebases, locate failed requests in a log, filter pipelines, or test whether a configuration setting exists. The central problem is simple enough: we are given some text, and a description of what we want to find.grepis what solves this line by line. The newline is its default record separator, so the program can work incrementally: read a record, decide whether to emit or discard it based on the description, and continue. This small design choice is why it fits the Unix pipeline so well. Underneath, it hides interesting connections to formal languages, finite automata, compiler construction, and careful algorithm design. Let's explore.
-
The Wild Atlantic Way
This is the rightful conclusion to an epic trilogy of mighty roadtrips, full of vast green plains and breath-taking steep seaside cliffs. We previously did Scotland's NC500, then Iceland's Ring Road. Now it's time for Ireland's Wild Atlantic Way.
-
The Mechanics of the Global Oil Market
Every single day, the world consumes over 100 million barrels of oil. It's a resource that dictates everything from geopolitical power to the price of your groceries. This article explains how the oil industry works from the reservoir to the refinery, then from the refinery to the futures market and the broader economy. It's an important and timely topic, given its impact in the world economy and also in our lives.
-
My Time in Singapore
I am very grateful to have had the opportunity to spend some time in Singapore. My first visit was a five-month exchange at NUS at the beginning of 2020, and it became perhaps the single most transformative experience of my life up to that point. I first heard about COVID-19 only a day after I landed; soon after, the pandemic began to escalate. Despite the fear and disruption, I stayed for the full semester. My second visit was much shorter and more recent, for AAAI-26. This post documents observations and thoughts from those visits - things I would consider too dear to forget.
-
ETFs Under the Hood
ETFs are often praised as the ultimate passive investment tool. But why? How do they work? How does a fund swap thousands of stocks without paying taxes? How does it track market indices? In this post, we’ll pry open the lid of this financial machine, exploring its engineering from first principles.
Every subset of less than half the total number of vertices has a proportionally large boundary of edges.