Hi there! 👋

I’m Louis Thibault, a CogSci Ph.D. turned software developer, and this is my blog. There’s no official topic, but my thoughts tend to cluster around p2p networks and mathematics.

I’m also the lead developer of Wetware, so I write about that too.

Randomized enumeration of IP addresses in a subnet

I recently encountered a problem that seemed trivial on the surface, and turned out to be challenging enough to warrant a blog post: Given a subnet, iterate through its addresses in pseudorandom order. Naive Approach For small subnets like 10.8.1.0/24, the naive implementation works well. We enumerate each address and append it to a list, shuffle the list, and then range over the list. The first step is the only one I had to stop and think about, but it ended up being quite straightforward....

November 18, 2022