Programming, Language: Rust

Recent posts (Page 1 of 13)

Rescuing Gentoos with a Rust Solver (Part 2)

Rescuing Gentoos with a Rust Solver (Part 2)

And here we have Part 2! It’s not been that long for you, but since the first part took six months for me to actually get around to writing it… well, this is much better!

Things get a bit more complicated this time, with buttons that can open/close doors and even holes in the floor and BOMBS. But what’s really crazy is how we actually get around to solving how to get to new sublevels this time… and how to take penguins back out of them. Things are getting complicated!

Here are all of the commits from part 1 up through part 2.

And here are all of the parts in this series so far:

read more...

Rescuing Gentoos with a Rust Solver (Part 1)

Rescuing Gentoos with a Rust Solver (Part 1)

Months ago now1, I started playing Gentoo Rescue (after seeing the Aliensrock video). At the core, it’s a Sokoban style puzzle game where you have to guide cute little sliding penguins to their color coded nests… but oh man does it start getting more complicated quickly.

On top of that, it has a really interesting nesting level concept–the level select screens are levels themselves. You can go several ’levels’ deep into levels or eventually further back out. And that’s just with how far I’ve gotten so far…

read more...

AoC 2025 Day 12: Knapsackinator

Source: Day 12: Christmas Tree Farm

Full solution for today (spoilers!).

Part 1

Solve the knapsack problem.

But really, you are given a set of tiles (which all happen to be some subset of a 3x3) and a set of constraints–a MxN grid and how many of each tile to place. Count how many constraints are possible.

Tiles may be rotated and/or flipped.

read more...

AoC 2025 Day 10: Linear Algebranator

Source: Day 10: Factory

Full solution for today (spoilers!).

Part 1

Given a target light pattern [.##.] and a series of buttons ((3) (1, 3) etc) where the first button toggles light ‘3’ (the 4th light) and the second toggles the first and 4th etc, what is the minimum number of buttons you need to press to match the light pattern.

read more...

AoC 2025 Day 7: Laser Splittinator

Source: Day 7: Laboratories

Full solution for today (spoilers!).

Part 1

You are given a map like this:

.......S.......
...............
.......^.......
...............
......^.^......
...............

A laser shines from the top S and splits each time it hits a ^, making this:

.......S.......
.......|.......
......|^|......
......|.|......
.....|^|^|.....
.....|.|.|.....

The two lasers in the center of this example merge to count as one laser.

Count how many times lasers hit splitters.

read more...


All posts