Full Width [alt+shift+f] Shortcuts [alt+shift+k]
Sign Up [alt+shift+s] Log In [alt+shift+l]

Quentin Santos

Quentin Santos
Rust Gotcha: last() on DoubleEndedIterator tl;dr: don’t call last() on a DoubleEndedIterator How do you efficiently get the last part of a...
a month ago
41
a month ago
tl;dr: don’t call last() on a DoubleEndedIterator How do you efficiently get the last part of a space-separated string in Rust? It will be obvious to some, but the obvious answer of s.split(' ').last() is wrong. The mistake is easy to make; I encountered it in a recent MR I...
Quentin Santos
Rust Strings for C Programmers This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec<T>, &Vec<T> with C code,...
2 months ago
55
2 months ago
This article will quickly explain the Rust types [T; N], &[T; N], &[T], Vec<T>, &Vec<T> with C code, and what the str, &str, String, OsString and CString add. Arrays and Slices Rust C [T; N] (array)Example: [i32; 100]Allocated on the stack T[N]Example: int[100]Allocated on the...
Quentin Santos
You can move !Unpin Although I am now mostly comfortable with Rust, some concepts still elude me. One of them is the...
2 months ago
53
2 months ago
Although I am now mostly comfortable with Rust, some concepts still elude me. One of them is the exact meaning of Unpin. The documentation says: The documentation of Unpin says: Types that do not require any pinning guarantees. Where pinning is described as: From this, you could...
Quentin Santos
On-Die ECC This article will be pretty short. When I built my new desktop computer, I considered ECC memory....
3 months ago
31
3 months ago
This article will be pretty short. When I built my new desktop computer, I considered ECC memory. So, I looked around for DDR5 ECC memory. Surprisingly, DDR5 memory sticks that mentioned ECC was not significantly more expensive than other DDR5 memory sticks. Sometimes, they were...
Quentin Santos
AMD CPUs, CCDs and CCXs When researching for my article about Linux pipes and for other upcoming articles, I had to get more...
4 months ago
23
4 months ago
When researching for my article about Linux pipes and for other upcoming articles, I had to get more familiar with how my CPU works. I thought I knew quite a bit, with L1/L2/L3 caches, ISA extensions, branch predictors, register renaming and so much more. But, it turns out, even...
Quentin Santos
Upgrading to Debian Trixie I had been running Bookworm for quite a while. It has now been stable for more than a year. In other...
4 months ago
15
4 months ago
I had been running Bookworm for quite a while. It has now been stable for more than a year. In other words, Trixie has now been testing for more than a year, and will most likely become the new stable in less than a year. In the past, I encountered a few surprises with unstable …...
Quentin Santos
Beware Rust Buffering This article is about a small pitfall I stumbled uopen Rust. Since it took me relatively too much...
5 months ago
15
5 months ago
This article is about a small pitfall I stumbled uopen Rust. Since it took me relatively too much time to figure it out, I made this article as a reminder. Also, there is a post scriptum, also about buffers, but not about Rust. While writing my article about Linux pipes, I needed...
Quentin Santos
Interactive Flamegraphs In my latest article, I made heavy use of flamegraphs. To makes things clearer, flamegraphs are...
5 months ago
17
5 months ago
In my latest article, I made heavy use of flamegraphs. To makes things clearer, flamegraphs are visualizations of how much time is spent in each function in a program: ./write –write_with_vmsplice –huge_page –busy_loop | ./read –read_with_splice –busy_loop Profiling of ./write...
Quentin Santos
Linux Pipes are Slow Errata: Some significant mistakes were pointed out to me by email by Brendan MacDonell. I have...
6 months ago
12
6 months ago
Errata: Some significant mistakes were pointed out to me by email by Brendan MacDonell. I have included errata, but the results might not be reliable, so take this with pinch of salt! vmsplice is too fast Some programs use a particular system call “vmsplice” to move data faster...
Quentin Santos
Git Super-Power: The Three-Way Merge tl;dr: git config --global merge.conflictstyle diff3 In my previous post, I preached about the one...
9 months ago
13
9 months ago
tl;dr: git config --global merge.conflictstyle diff3 In my previous post, I preached about the one true way to merge MRs in a git workflow. The answer is obviously to rebase for conflicts, and a merge commit for posterity of the MR. What I did not talk about is that there is a...
Quentin Santos
Merging Responsibly tl;dr: I do not like merging the main branch into feature branches, and I do not like squashing...
10 months ago
12
10 months ago
tl;dr: I do not like merging the main branch into feature branches, and I do not like squashing MR/PRs git commit git has emerged as the obvious choice for SCCS (Source Code Control System). The consensus is that it is unambiguously better than the previous standard, SVN. There...
Quentin Santos
ViHN: Vim for Hacker News tl;dr: I made ViHN to read Hacker News without having to move my hands away from the keyboard. It’s...
12 months ago
14
12 months ago
tl;dr: I made ViHN to read Hacker News without having to move my hands away from the keyboard. It’s freely available on Firefox and Chrome. This is about yet another Hacker News extension. But other people with my obsession for killing the mouse might enjoy it. Most of the...