P
Philippe Gaultier
gaultier.github.io · Personal blog · on HN since 2023
Philippe Gaultier writes about systems programming, covering assembly, Wayland, Go data races, undefined behavior, Rust, and static site generators.
What HN saysHN commenters link his Wayland and Go posts; one criticizes the mutex code in his data race article as obviously wrong.
23HN people shared it
10linked it in comments
52stories submitted
1.8Kstory points
4 months agolast shared
2023people per year2026
Most-shared posts
- 1Learn x86-64 assembly by writing a GUI from scratch (2023)6 people · 284 points · first shared 2023 · 27 comments on HN
- 2How to rewrite a C++ codebase successfully4 people · 22 points · first shared 2024 · discussion on HN
- 3Learn Wayland by writing a GUI from scratch4 people · 2 points · first shared 2023 · discussion on HN
- 4A million ways to die from a data race in Go3 people · 155 points · first shared 2025 · 138 comments on HN
- 5The production bug that made me care about undefined behavior3 people · 5 points · first shared 2025 · discussion on HN
- 6Don't run SQL migrations in tests: How I sped up the test suite by 2x3 people · 5 points · first shared 2026 · discussion on HN
- 7Way too many ways to wait on a child process with a timeout2 people · 131 points · first shared 2024 · 32 comments on HN
- 8Perhaps Rust Needs "Defer"2 people · 74 points · first shared 2024 · 67 comments on HN
- 9The missing cross-platform OS API for timers2 people · 51 points · first shared 2025 · 33 comments on HN
- 10Making my static blog generator 11 times faster2 people · 7 points · first shared 2025 · 1 comments on HN
- 11How to reproduce and fix an I/O data race with Go and DTrace2 people · 6 points · first shared 2025 · discussion on HN
- 12Observe live SQL queries in Go with DTrace2 people · 5 points · first shared 2025 · discussion on HN
- 13Roll your own memory profiling: it's not hard2 people · 3 points · first shared 2023 · discussion on HN
- 14How to make your own static site generator2 people · 1 points · first shared 2026 · discussion on HN
- 15You've just inherited a legacy C++ codebase, now what?1 people · 380 points · first shared 2024 · 347 comments on HN
What HN people wrote when they linked it
broken_broken_ · 2026-04-05
Interesting to see an ebpf approach to this idea, some time ago I did the same with Dtrace: https://gaultier.github.io/blog/detecting_goroutine_leaks_with_dtrace.…
However I did not think of observing the ‘castgstatus’ runtime function.
Always nice to be able to compare the DTrace and Ebpf approaches, they both have different strong points.
azangru · 2026-03-17
The first random page it returned to me was this — https://gaultier.github.io/blog/how_to_make_your_own_static_site_gener… — which was about building one's own static site generator, which I really liked. I did not realise when I closed that page how hard it would be to find it again, because, of course every new visit to Kagi returns a different page :-)
kiitos · 2025-11-25
> I have been writing production applications in Go for a few years now.
sorry, what?
https://gaultier.github.io/blog/a_million_ways_to_data_race_in_go.html…
this code is obviously wrong, fractally wrong
why would you create a new PricingService for every request? what makes you think a mutex in each of those (obviously unique) PricingService values would somehow protect the (inexplicably shared) PricingInfo value??
> the fix
https://gaultier.github.io/blog/a_million_ways_to_data_race_in_go.html…
what? this is in no way a fix to the problem.
it's impossible to believe the author's claims about their experience in the language, this is just absolute beginner stuff..
amjoshuamichael · 2024-11-23
I've seen some interesting work in doing Wayland by hand:
https://gaultier.github.io/blog/wayland_from_scratch.html
I'd also look at the work done on minimal wayland projects like [foot](https://codeberg.org/dnkl/foot), which supports wayland well and seems to be written by hand (see: https://codeberg.org/dnkl/foot/src/branch/master/wayland.c)
shmerl · 2024-06-21
Oh, the author has a cool example of a minimalistsic Wayland GUI application:
https://gaultier.github.io/blog/wayland_from_scratch.html
mananaysiempre · 2024-05-09
asicsp · 2023-10-14
See also: Learn x86-64 assembly by writing a GUI from scratch https://gaultier.github.io/blog/x11_x64.html
Discussion: https://news.ycombinator.com/item?id=36153237 (638 points | 4 months ago | 146 comments)
bsder · 2024-10-30
> It's unsurprising that the author would go use Zig next time since they didn't seem to have any value alignment with Rust's core safety guarantees.
I don't think that's true. The end application talks to smart cards. See also one of the links: https://gaultier.github.io/blog/how_to_rewrite_a_cpp_codebase_successf…
However, the codebase has the possibility to use multiple memory allocators, and Rust is simply actively bad when faced with that.
It just seems like the codebase has a set of idioms that really lean into the areas that Zig is actively good at and where Rust is weak. Memory allocators, lexical (not RAII) defer, C interop, C++ interop, and cross-compilation are Zig's raison d'être, after all.
The one thing I disagree with is the complaint about "repr(C)". Sorry, but I've become convinced that if we want our compiler and languages to work well on modern hardware, we're going to have to allow the compilers to do lots of struct-of-array to array-of-struct (and vice versa) transformations depending upon the actual access patterns. That means that a struct or an array will not be locked to a specific memory layout unless you specifically request as such.
sandreas · 2023-12-20
https://www.binwang.me/2023-12-14-ZFS-Profiling-on-Arch-Linux.html
https://gaultier.github.io/blog/x11_x64.html
https://diy.viktak.com/2022/04/home-made-tpm2-0-module.html
https://r.bluethl.net/how-to-design-better-apis
https://crystalverse.com/sodium-chloride-crystals/
https://twitter.com/Kristy_Viers/status/1287189581926981634