Advent of Code 2024 - In Rust - Days 16-20

This is the third article in a series covering Advent of Code 2024 in Rust. Day 16: Reindeer Maze This puzzle asks to search for paths in a maze with different costs for going straight (1) vs. taking a 90-degree turn (1000). I thought this looked really simple, completely missing the challenge at first. I figured I could just run Dijkstra’s algorithm, which I already had implemented for day 10’s Hoof It puzzle.

Advent of Code 2024 - In Rust - Days 11-15

This is the third article in a series covering Advent of Code 2024 in Rust. Day 11: Plutonian Pebbles This puzzle presents some magic “pebbles” with rules governing how they multiply, asking to compute the total number of stones after applying the rules a certain number of times. Of course a first idea here is the brute force approach where we recursively apply the rules to the input and count the number of stones in the end.

AIMA - Part II - Problem Solving

Part II – Problem Solving After the high-level introduction of what an agent is, which task environments it might live in and some ways of building agents and representing state, part II of the book is focused on problems that involve some notion of searching for a solution. Chapter 3 – Solving Problems By Searching Chapter 3 introduces problem-solving agents that need to plan (or find) some sequence of actions that take them to a goal in task environments where state can be modeled as atomic.

AIMA - Part I - Artificial Intelligence

Part I – Artificial Intelligence In this first part of the book, Russel and Norvig give an overview of the history of the field and adjacent areas of research, and describe the idea of intelligent agents. They claim that we can think of “intelligent agents that do the right thing” - that is a view focused more on the actions taken and how we judge them as the “standard model” of AI research.

Let's finally encrypt - HTTPS a decade later

It’s 2025, I just published an article on Advent of Code 2024 in Rust, and my browser won’t even load http://treibgut.net. Turns out, I’m partying like 2014, with my lighthttpd only configured to serve plain old HTTP on port 80. Ugh. $SERVER["socket"] == "<ip>:80" { ... } Time to do what everyone and their grandma have done and set up HTTPS with Let’s encrypt. Let’s Encrypt was founded in 2015 and is a certificate autority (CA) that hands out free certificates for HTTPS.

Advent of Code 2024 - In Rust - Days 6-10

This is the second article in a series covering Advent of Code 2024 in Rust. Day 6: Guard Gallivant This puzzle asks to trace the path taken by a “guard” in a simple grid with obstacles. In the first part of the puzzle, the guard simply turns right at every obstacle and the goal is count the number of fields covered until they exit the grid. I built some basic data structures to represent the grid with marked fields, the guard with a position and direction, and I then implemented the prescribed logic, marking fields as the guard moves.

Advent of Code 2024 - In Rust - Days 1-5

Day 1: Historian Hysteria The first puzzle aks to compute a few things on two lists of numbers, including their pairwise distance and multiplying numbers by their frequency in the second list. Not much to see here, the main effort went into creating some basic outline of Rust crate with per-day modules and parsing the input. The actual solutions were mainly done with sorting/mapping and creating a frequency map for the second part.

Learning Rust - Early thoughts

I decided to stretch my programming muscles by taking a peek at Rust. This article has a few thoughts from the early learning journey. Most of it is a kind of stream of consciousness notes as I went through The Book which probably was more valable for me to write than it is for you to read in detail. I’ve summarized a few general impressions in a first section, that might be useful if you are interested in “what’s rust like?

Whose IP's are these anyway? - splitting a VPN by target

I’ve been quite happy with my poor man’s VPN using sshuttle, which allowed tunneling traffic from any device on a local VLAN through a VPN. So far I had an all-or-nothing approach, where devices in the VLAN had all of their traffic sent through the VPN. However, I’ve recently hit a case where I had a single device that needed both VPN and regular routing (don’t ask…). This article explores how to update the sshuttle setup, allowing for mixed routing, where traffic to some destinations gets routed through the VPN tunnel, but other traffic bypasses the tunnel.

Headless Raspberry Pi Installation

I seem to enjoy buying Raspberry Pis, as I find myself setting a new one up often enough that I made a small checklist for a headless setup. UPDATE (2024): These days, the RaspberryPi Imager allows pre-configuring most of the settings (ssh, default user, hostname, locale) when copying an image to the SD card. Prefer this, as it’s less work and avoids connecting an RPi with a well-known default user/password to the network.