Posts

Regular Expression Partitioner

Lexicographically partitioning all strings accepted by a regular expression (or NFA).

Monthly Interest Rates

Converting annual interest rates to monthly interest rates is done with the 12th root, not dividing by 12.

Matrices with Maximum Row and Column Sums

How many NxM matrices, with 0, 1, or 2 in each cell, have no row or column with sum > K?

Precision in Food Labels

This frozen mac and cheese I got one time is labeled as having 2.5 255 gram servings in a box of 567 grams total. Interesting.

N-M Balancers from 2-2 Balancers

An N-M balancer is something that has N inputs and M outputs. Whatever goes into 1 input is evenly balanced among the M outputs. What's the minimum number of 2-2 balancers needed to make an N-M balancer?

Split Computation on Rings

Breaking apart arithmetic on non-negative integers for bogus speed and security benefits and maybe something actually practical.

I love my BF Challenges at BSidesSF 2026

Writing a few BrainFuck reverse engineering challenges for BSidesSF 2026 CTF.

BrainFuck Instruction Finder

Converting any function to the (almost) shortest BrainFuck code possible.

String Art Portraits

Converting images to string art with a single thread.

Merge Order vs Merge Sort

How much faster can we join data using merge order versus a merge sort?

Middle Order

Given a number, N, efficiently generate the sequence of all the numbers in [0, N) in a "middle order" where each number appears exactly once. The first number in a middle order is N / 2, rounding up or down, and the next numbers would be N / 4 and 3 * N / 4.

Arena Lineups and State Transitions

In a competitive 1v1 arena, how often does the best player get to play? How often does each line up happen?