2025-12-27 08:05:06
Rust unit testing: basic HTTP testing
Real-world application testing - Beginning with Axum
🦀 #rust
Rust unit testing: basic HTTP testing
Real-world application testing - Beginning with Axum
🦀 #rust
Trying to understand recent #RustLang activities (https://github.com/rust-lang/compiler-team/issues/922), why do types with uninhabited fields (or enum variants that are uninhabited) ta…
#Rust’s most complicated features explained
https://www.youtube.com/watch?v=9RsgFFp67eo
With #Rust 1.92.0, have a good start into this week!
https://blog.rust-lang.org/2025/12/11/Rust-1.92.0/
They don't stop... Ladybird is using ai to port it's codebase from #c to #rust: https://ladybird.org/posts/adopting-ru
Der Rewrite von `ls` war erst exa und nun eza. Warum hat niemand die Chance ergriffen, die Software `eya` zu nennen?
Eya, zeig mir das Verzeichnis!!11!elf!!
#rust
Patterns for Defensive Programming in #Rust
https://corrode.dev/blog/defensive-programming/
A little #Rust secwet:
Dewiving OwO automatically gets you both Clowone and Cowopy.
#[dewive(OwO)]
pub struct UwU { /* ... */ }
For the last day of #AdventOfCode, I took a very simple and naive approach of: depth-first search.
Basically try all combinations until one fits. The trick to avoid a VERY long runtime is to filter out all cases where we already know from the start that the pieces (gifts) won't fit in the region, because their summed area exceeds the area of the region. Went for recursion this time around, because why not.
#AoC #AoC205 #AdventOfCode2025 #RustLang #rust
Day 11 of #AdventOfCode is a classical graph problem like we're used to from previous years.
Unlike previously, I immediately thought of checking what the graph looked like with a visualization tool. Luckily, `petgraph` allows to export a graphviz file which can be then used to visualize the nodes and edges.
From that, it was clear that a few nodes were acting as "bridges" between largers subnets of nodes with no particular arrangement besides being directed towards the next "bridge" layer. Those bridge layers comprised 4 to 5 nodes in my input, and were the only ones with more than 6 incoming edges, so I used that as my filter criterion.
To gather them, I sorted the graph in topological order and chunked them by their position offset compared to the previous node. When doing this, all the nodes from a bridge layer end up being at most 20 positions away from the previous node in the sorted list.
Finally, I progressed through each subnet, collecting information about how many paths lead to each one of the end layer's nodes. By multiplying with all the paths leading to each start layer's node, we get the overall total number of paths.
#AoC #AoC2025 #AdventOfCode2025 #RustLang #rust
Yes! Today's puzzle in #AdventOfCode was quite hard (especially part 2) but so rewarding and I learned a lot!
For part 1, I implemented A* from scratch, my favorite little pathfinding algo that I use pretty much every year for #AoC (sometimes I use a lib instead of implementing it but it's been a while so a refresher was in order).
For part 2, after trying A* again and noticing it was running for way too long, I went back to the drawing board and solved the first machine by hand. I noticed the constraints were a system of linear equations.
I then researched algorithms to solve such integer programming problems and didn't feel like learning AND implementing the algorithms in one day (ain't nobody got time fo that). But this lead me to discover the `good_lp` #rust crate which is really good and that I will keep in my back pocket from now on!
So I used the library to define a system of variables and constraints which could be solved magically for me.
#AoC2025 #AdventOfCode2025 #RustLang