218 results for "":

Parsing and serializing ICMP packets with cookie-factory.

In the last part, we’ve finally parsed some IPv4 packets. We even found a way to filter only IPv4 packets that contain ICMP packets.

There’s one thing we haven’t done though, and that’s verify their checksum. Folks could be sending us invalid IPv4 packets and we’d be parsing them like a fool!

This series is getting quite long, so let’s jump right into it.

A simple ping library, parsing strings into IPv4 address

We’ve just spent a lot of time abstracting over LoadLibrary, but we still have all the gory details of the Win32 ICMP API straight in our main.rs file! That won’t do.

This time will be much quicker, since we already learned about carefully designing an API, hiding the low-level bits and so on.

Let’s add an icmp module to our program. Actually, we’ve been dealing with an IPAddr all this time, it also sounds like it could use its own package:

*andfall

Welp, I did it again - I released an album: it’s named *andfall, a play on the word “landfall”, and I wrote it in one week-end, for @McFunkyPants’ entry in the Ludum Dare 33 game jam.

It’s my first solo album, the previous ones were collaborations with @bigsylvain and @geckojsc. It feels a bit weird to release an album alone - there’s nobody to blame for the flaws, and nobody to praise for the good parts!

The Choice Ep. 1: Debriefing

To the programmers

It’s too easy! Where’s the documentation for the API? I found an injection vulnerability! Global functions from ‘window’ leak! I tried to attack your server then realized nginx was ignoring me!

Keep struggling, my pretties. The game is not meant for you, but you are good guinea pigs nonetheless. Just because the game involved programming, you found yourself so, so terribly wrong about one thing: that you understood at all what was happening.

Reading files the hard way - Part 2 (x86 asm, linux kernel)

Looking at that latest mental model, it’s.. a bit suspicious that every program ends up calling the same set of functions. It’s almost like something different happens when calling those.

Are those even regular functions? Can we step through them with a debugger?

If we run our stdio-powered C program in gdb, and break on read, we can confirm that we indeed end up calling a read function (which is called __GI___libc_read here, but oh well):

Engineering a Rust optimization quiz

There are several Rust quizzes online, including one that’s literally called the “Unfair Rust Quiz” at https://this.quiz.is.fckn.gay/, but when I was given the opportunity to record an episode of the Self-Directed Research podcast live on the main stage of EuroRust 2025, I thought I’d come up with something special.

Question Misc 6 of the unfair Rust quiz, about drop order.

The unfair rust quiz really deserves its name. It is best passed with a knowledgeable friend by your side.

Truly headless draw.io exports

I love diagrams. I love them so much!

In fact, I have fairly poor visualization skills, so making a diagram is extremely helpful to me: I’ll have some vague idea of how different things are connected, and then I’ll make a diagram, and suddenly there’s a tangible thing I can look at and talk about.

Of course the diagram only represents a fraction of what I had in mind in the first place, but that’s okay: the point is to be able to talk about some aspect of a concept, and so I have to make choices about what to include in the diagram. And maybe make several diagrams.

Impromptu disaster recovery

Background

im-promp-tu (im-ˈpräm(p)-(ˌ)tü)

  1. made, done, or formed on or as if on the spur of the moment: improvised

  2. composed or uttered without previous preparation: extemporaneous

Merriam-Webster

On March 18th, 2025, I thought I would look into self-hosted project management solutions — something kanban-y, but.. better?

A screenshot of WeKan, the open-source Kanban. It looks.. from another age.

This one does not spark joy.

Day 2 (Advent of Code 2022)

Part 1

In the day 2 challenge, we’re playing Rock Papers Scissors.

We’re given a strategy guide like so:

A Y B X C Z

Left column is “their move”: A means Rock, B means Paper, C means Scissors. Right column is “our move”: X means Rock, Y means Paper, Z means Scissors.

Each line corresponds to a turn, and we must calculate the total score we get. Picking “Rock” gives 1 point, “Paper” gives 2 points, and “Scissors” gives 3. Losing the round gives 0 points, drawing gives 3, winning it gives 6.

Cracking Electron apps open

I use the draw.io desktop app to make diagrams for my website. I run it on an actual desktop, like Windows or macOS, but the asset pipeline that converts .drawio files, to .pdf, to .svg, and then to .svg again (but smaller) runs on Linux.

So I have a Rust program somewhere that opens headless chromium, and loads just the HTML/JS/CSS part of draw.io I need to render my diagrams, and then use Chromium’s “print to PDF” functionality to save a PDF.