2025-12-15 12:05:09
With #Rust 1.92.0, have a good start into this week!
https://blog.rust-lang.org/2025/12/11/Rust-1.92.0/
With #Rust 1.92.0, have a good start into this week!
https://blog.rust-lang.org/2025/12/11/Rust-1.92.0/
rust-script | Run Rust files and expressions as scripts without any setup or compilation step.
#rust
TIL that docs.rs has 7.75TiB of compressed documentation in an S3 bucket.
#rustlang
Patterns for Defensive Programming in #Rust
https://corrode.dev/blog/defensive-programming/
Canonical is doing a good job working with #Rust based #coreutils for their distro. Their work will help the #Linux community as a whole.
In the future, I would be interested in trying them …
Just because someone else dislikes "rust" doesn’t mean I should join the same hate train, especially as someone who doesn’t code and doesn’t fully understand the language.
#Rust #Developer #Development
This #Linux #bluescreen brought to you by #Rust. 🦀
Hrmm, worked on writing the #adventofcode 2025 Day 1 solve in Rust, wasn't too horrible. Pretty fast though I did have all of the tabs open trying to figure out how to do things.
#rust
Making the case that #Cargo features could be improved to alleviate #Rust compile times
https://saghm.com/cargo-features-rust-…
Really nice, @… have written about #Rust in their blog, providing 5 good reasons why you should "rewrite everything in Rust":
#EuroRust2026 en España. 😮 Estoy muy deseando volver a #Barcelona. :amaze: Mi última visita fue hace ya 12 años.
#EuroRust
RE: #Rust accounts for roughly 0.3% of the
Comparison Traits - Understanding Equality and Ordering
#Rust
Sequoia PGP exemplifies everything that's wrong about #RustLang (don't mean this against Sequoia). It features a bunch of different CLIs, which is a reasonable design.
If Sequoia were written in C, these CLIs would probably be using some shared library. If Sequoia were written in Python, they would probably use a shared Python package. However, it's written in Rust, so every CLI is a huge binary with its own copy of subset of shared Sequoia code, built separately:
-rwxr-xr-x 1 root root 12M 10-08 06:36 /usr/bin/gpg-sq
-rwxr-xr-x 1 root root 4,7M 10-08 06:36 /usr/bin/gpgv-sq
-rwxr-xr-x 1 root root 21M 10-08 08:38 /usr/bin/sq
-rwxr-xr-x 1 root root 6,9M 10-08 08:38 /usr/bin/sqop
-rwxr-xr-x 1 root root 3,1M 10-08 08:32 /usr/bin/sqv
A quick comparison using `hyperfine` for some benchmarking on the #adventofcode 2025 Day 1 solution. Not too shabby for any of the solutions, and its interesting to compare them.
#rust #nim
Oh fun find, there was actually something called Oxide in the history of #Rust already - a formalization attempt:
https://arxiv.org/abs/1903.00982 🦀
cc @…
A #rust warning just found a mistake I was in the middle of making; I had a match clause like:
(_, Bad) =>
and the warning was that the variable 'Bad' should be lower case; But hang on...that's no variable - that should be an enum member of State::Bad. Which is a nice find.
(Although I can't tell why it didn't figure out it was a member of State automatical…
Under the hood: Vec<T>
Let's look at Vec<T> to get a better understanding of its inner structure.
🦀 #rust
Yet another #Rust ownership tutorial
https://blog.frankel.ch/yet-another-rust-ownership-tutorial/
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
A little #Rust secwet:
Dewiving OwO automatically gets you both Clowone and Cowopy.
#[dewive(OwO)]
pub struct UwU { /* ... */ }
Tiago Manczak from Infineon gave a nice overview of #Rust tooling for safety-critical projects at the first #MunichEmbedded meetup - very useful, not only for #embedded development, but also other …
I know of HX-Tape, but I decided to write my own demodulator to read Epson HX-20 tape data; mostly because I wanted to refresh my #rust skills, but also because I had this realisation it would work as a set of chained iterators. It does (I'm straight from HX-20 ext-cassette to PC audio); I've got a layer that does levels (high/low/0) with hysteresis, that passes it to one that does transiti…
Hrmm, so created a HashMap (`HashMap::<&str, fn(u8) -> u8>`) in Rust without too much issue which was kinda nice. Then decided to try and make this work inside of an `impl` which...err...Rust has some rather strong opinions about, most of which is telling me to stop what I'm doing because this isn't gonna work.
Kinda fun to try though...lol
#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
#Cloudflare just got faster and more secure, powered by #Rust
https://blog.cloudflare.com/20-percent
I have been learning #Rust for a couple of years, and using it for pet projects and demos alike. Working for a JVM-heavy company, I thought it would be my fate forever. Last week, I had a nice surprise: I convinced my management that using Rust for a particular project was the right choice. It’s not a huge project, but I want to describe my experience using Rust in a "real" project.
"How to Optimize Rust for Slowness" – Carl Kadie
#rustlang
Insight of the day from the functional safety panel discussion at #EuroRust25:
#Testing #engineers are more inclined to touch code written in
Let's write a #macro in #Rust - Part 1
https://hackeryarn.com/post/rust-macros-1/
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
Writing tests in #Rust is really nice.
I am enjoying it right now while working on the @… flash layout and boot flow library.
Writing tests in #Rust is really nice.
I am enjoying it right now while working on the @… flash layout and boot flow library.
A nice bump in difficulty for today's #AdventOfCode problem!
Although the first part came to me very easily, I spent way too much time trying to implement a flooding algorithm for part 2, only to find out that it would take too much time and there should be a better way.
The worst part is that I had the intuition for my final solution super early on, but couldn't materialize it in a simple way until tonight.
I also must admit I realized quite late that the points were sorted in the input :D I should RTFM better sometimes.
My final #rust solution runs very quickly and is reasonably clean.
#AoC #AoC2025 #AdventOfCode2025 #RustLang
A cool graph problem today in #AdventOfCode
Nothing special here, I leveraged the `petgraph` #rust crate which I love! Calculating all pairs' distances (squared) and joining the pairs that are closest with an edge.
Only thing I wish I had more time to implement would be the graph traversal algo during sub-net aggregation, but swamped with work at the moment.
#AoC #AoC2025 #AdventOfCode2025 #RustLang
Today's #AdventOfCode problem was more about parsing than about complex logic, but it was fun!
I opted to keep the parsing with winnow simple and do most of it by hand from the raw characters, to exercise my #rust iterators a bit.
#AoC #AoC2025 #AdventOfCode2025 #RustLang
Today's puzzle in #AdventOfCode was another grid puzzle, where I again represented the entities as a sparse set.
Part 1 was relatively straightforward, a simplified BFS-like process allowed to construct the beams going through the system.
For part 2, additionally to gathering where a beam was present, I added metadata about how many paths were going through each position, adding them up and splitting them as required. Summing the paths for the last row gave the required result.
#AoC #AoC2025 #AdventOfCode2025 #RustLang #rust
Another easy challenge in today's #AdventOfCode puzzle.
Part 1 is straightforward, and for part 2, the trick was to sort the list of ID ranges first, which made the merging pretty easy.
#AoC #AoC2025 #AdventOfCode2025 #rust #RustLang
Didn't feel like thinking too much for today's problem of #AdventOfCode, so my solution is quite naive and runs in a few tens of milliseconds for part 2 (thanks, #RustLang!).
I went for a HashSet for the grid just because it made looking up neighbours simpler at the edges, probably also not the most performant solution, but gets better as the grid becomes sparser.
#AoC #AoC2025 #AdventOfCode2025 #rust
Super happy with my solution for today's #AdventOfCode problem!
It initially took me a little bit of time to find a suitable strategy, but it all clicked when I noticed that the left-most selected digit had the most significance in the final value. Thus, I maximized the value of that left-most digit, leaving enough digits on the right side to be able to pick the required total number of batteries in the bank.
The solution is relatively short and sweet:
#AdventOfCode2025 #AoC #AoC2025 #RustLang #rust
Today's #AdventOfCode problem was fun! I kept a different implementation for part 1 vs part 2 as they both run relatively fast.
For part 1, I iterated over all IDs (the ranges are quite small) and split them in half mathematically (no string representation) to compare both halves.
For part 2, I instead generated all interestings IDs (mathematically again) up to a length of 10 digits (the max in my input) and checked if any of the ranges contained them.
#AoC #AoC2025 #AdventOfCode2025 #RustLang #rust
New article on the blog!
This time, it's about how I optimized an algorithm which turns byte offsets into line/column numbers and UTF-16 offsets.
Most of the performance improvement came from the use of SIMD to efficiently count ASCII characters.
#rust #RustLang #SIMD #optimization #blog