RSSAmplifier

Blog

trofi - All posts

trofi's blog

trofi.github.ioRSS feed ↗30 posts

Latest posts

Five years on NixOS

Another yer, another instance of my NixOS journey log ( 2025 instance ). System maintenance As usual I don’t remember what I did to my system over the past year, so I’m at the git log for /etc/nixos as it contains all the changes: I had to switch nix GC job from monthly runs to weekly runs: a month is enough to generate so much garbage that individual GC runs are too painful. follow rename of…

Trying out niri

I have been using sway for a while . sway is good. I can remember only one bug where chromium was able to trigger assertion failures and compositor crashed on huge 32K-wide surfaces. It was a bug in wlroots which was fixed quickly. I occasionally look around for other compositors that I could use to check out slightly different tiling ideas and fancy features of a modern wayland desktop. This time…

CONNECT passthrough on nginx

A while ago I explored easy hacks on how to encapsulate SSH into HTTPS on apache2 . Since then I moved a few my systems from apache2 to nginx to play a bit with http/2 and http/3 . I wanted to port my hack to nginx . At the time nginx did not have direct support for CONNECT handling. I used chobits/ngx_http_proxy_connect_module external module to implement CONNECT . But around the end of 2025 the…

Zero Hydra Failures towards 26.05 NixOS release

NixOS-26.05 is around the corner! The schedule says it should happen around 25 May. Today the release process entered ZHF phase. There most packages with build failures are expected to be addresses by the release date. https://github.com/NixOS/nixpkgs/issues/516381 contains detailed step-by-step to identify interesting packages. This time nixpkgs is full of build failures related to gcc-15 changes…

gcc-16 bugs

Almost exactly a year passed since my previous pile report . gcc-16 was branched off from master and will receive only regression fixes. master is called gcc-17 now. Instead of posting incremental updates at arbitrary tine I’ll try yearly ones. That should cover all the bugs I saw in a release cycle in a single post. Summary During gcc-16 cycle I found 31 bug: libstdc++/119970 : mingw32 libstdc++…

another memory corruption case

It’s another story of a mysterious memory corruption being debugged. Story Mode It was another usual week: I updated gcc from master branch and tried to build my system with it. Minor failures are to be expected here. That’s where I draw the material to explore random packages and their failure modes. Sometimes it’s buggy build systems, flaky tests, broken downstream users of libraries that…

sequoia pgp

TL;DR If you are a PGP newbie (like me) then consider reading sq user documentation book! It gave me an idea of how to use the sq tool and how PGP concepts map to it. The book also has a “Background” section that I missed so much to get a better grasp of PGP model. Story mode I created my first PGP key in 2008: $ gpg --list-public-keys slyich@gmail.com pub dsa1024/0x71A1EE76611FF3AA 2008-10-18…

nixpkgs and repology changes

Tl;DR: nixpkgs changed the way it exports data to repology and many packages need fixing In nixpkgs/451424 nixpkgs changed substantially how it exports data about available packages. As a result some packages like flare stopped being reported to repology.org correctly. Luckily the fix is to usually use pname / version instead of direct name . Example fix for flare package: ---…

zellij terminal emulator

my tmux setup I use tmux by default for all my terminal sessions since around 2016 (almost 10 years!): on most days I switch from local desktop keyboard to a laptop and back to run/debug stuff on my desktop. I usually have 4 sessions: various builders, development session, chat session and various one-off investigations. I have a moderate ~/.tmux.conf : set -ga terminal-overrides…

AoC of 2025

This time I managed to finish all AoC challenges within a week of problems being published. My solutions: https://github.com/trofi/AoC/tree/main/2025 . First 9 problems I managed to do in a day they were published. But the 10th one was tough. As usual I tried to solve the problems within 24 hours of publish time and get the source code under 4K . I used rust again. I did not use any external…

Zero Hydra Failures towards 25.11 NixOS release

It is November again! The usual plan is to have a NixOS-.25.11 release on 30th ( full schedule ). Yesterday the schedule got to ZHF phase where no major changes are accepted to master branch and the focus is on fixing build failures It’s a good time to fix easy build failures or remove long broken packages. https://github.com/NixOS/nixpkgs/issues/457852 contains detailed step-by-step to identify…

AoC of 2024

Almost a year later I finally finished AoC 2024: https://adventofcode.com/2024 . My solutions: https://github.com/trofi/AoC/tree/main/2024 . Similar to last year I managed to solve most of problem within a day of them being published with a single exception of problem 21 . That one took me most of 2025 :) As usual problems were appearing once a day at 5AM from Dec 1 to Dec 25. Nowadays I get up at…

profiling binutils linkers in nixpkgs

background I’ve been using binutils-2.45 against local nixpkgs checkout for a while to weed out minor problems in other packages. So far I encountered my old friend guile over-stripping issue . GNU gold linker was deprecated in binutils upstream as it does not have developer power behind it. While bfd linker (the default) gets maintenance attention. binutils-2.45 intentionally does not have gold…

gcc-16 devirtualization changes

A quiz Let’s start from a quiz: is this single file program a valid c++ program? Will it always build and run? void d_impl(void); /* has no definition at all! */ struct B { virtual void f(void) {} }; struct D : public B { virtual void f(void) { d_impl(); } }; void do_f(struct B* o) { o->f(); } int main(void) { return 0; } Running gcc It feels like this whole program is just an obfuscated version…

nix-build in tmpfs

I build a lot of nix packages locally. Until nix-2.30 release nix-build command triggered builds in /tmp directory by default. As it’s not a tmpfs by default I used to enable boot.tmp.useTmpfs = true; to force all of /tmp into tmpfs to get slightly faster builds. In nix-2.30 nix switched its default build directory to /nix/var/nix/builds : ... `build-dir` no longer defaults to `$TMPDIR` ... This…

four years on NixOS

It’s another yearly instance of my NixOS journey ( 2024 instance ). I meant to write it around 25.05 but completely forgot! system maintenance As usual I don’t remember what I did to my system over the past year, so I’m at the git log for /etc/nixos as it contains all the changes: follow hardware.opengl -> hardware.graphics rename follow hardware.opengl.driSupport{,32Bit} removal follow rename of…

nix and guix for Gentoo in 2025

Two years have passed since the last issue of ::nix-guix overlay updates. The overlay still ships latest nix-2.30.2 and guix-1.4.0 packages. One notable addition is lix-2.93.3 ! Our list of contributors over past 2 years is: dependabot[bot] G-Src Jiajie Chen Kris Scott Sergei Trofimovich Vincent de Phily There are no major user-visible changes. But a few things to note are: sys-apps/lix was added…

sort by key in coreutils

This post is about sort tool from GNU coreutils . Until today I foolishly thought that to sort a file by a second (and just second column) you just need to use sort -k2 option. Indeed, that does seem to work for a simple case: $ printf "1 2\n2 1\n" 1 2 2 1 $ printf "1 2\n2 1\n" | sort -k2 2 1 1 2 But today I attempted a slightly more complicated sort by sorting commit history: abcd foo: commit z…

Zero Hydra Failures towards 25.05 NixOS release

It’s May 1 and that means NixOS-25.05 is almost there . Today the release entered ZHF phase ( Zero Hydra Failures ) where the main focus is to squash as many build failures as possible before the release. It’s a good time to fix easy build failures or remove long broken packages. https://github.com/NixOS/nixpkgs/issues/390768 contains detailed step-by-step to identify interesting packages. an…

To chromium

Tl;DR I switched from firefox to chromium as a primary web browser on my desktop. On firefox I was a happy firefox user since the 1.5 release. Internet says it was released in 2005. This made a 20-year run for me. The web changed so much since then. Adobe Flash went away and web 2.0 javascript -heavy applications took its place. At some point I had to start using content filtering extensions to be…

gcc-15 bugs, pile 2

8 more months have passed since my previous pile report . gcc-15 was branched off from master and will receive only regression fixes. master is called gcc-16 now. It’s a good time to look at the compiler bugs I encountered. summary I got about 30 of those: rtl-optimization/116516 : ICE on linux-6.10 due to inability to handle some address calculation expressions. middle-end/116516 : ICE on…

Trying out helix editor

This is another February story about text editors similar to the vim one . You might want to ignore this one as well :) Tl;DR helix is a nice program: I switched to it from vim as a default text editor. If you never heard of helix editor and are vim or nvim user I suggest you to look at it. hx --tutor is short and yet it covers a few cool things. https://helix-editor.com/ has a nice asciinema…

Another Nix Expression Language non-determinism example

Today I found another source of non-determinism in nix expression language . This time it’s a builtins.sort primitive! How do you break sort ? Compared to the previous non-determinism instance this case of non-determinism breaking sort is not as arcane. a working sort example Before triggering the problematic condition let’s look at a working sort: $ nix repl nix-repl> builtins.sort…

Rebasing past reformats

TL;DR Did you ever have to deal with a huge list of conflicts on rebase caused by automatic reformatting of an upstream codebase? If you got into a similar situation you might be able to automatically recreate your changes with git filter-branch --tree-filter and a git commit --allow-empty trick. story mode I have local fork of staging branch of nixpkgs git repository to do various tests against…

C union initialization and gcc-15

a contrived example Let’s start from a quiz. What do you think will this program print: #include <stdio.h> __attribute__((noipa)) static void use_stack(void) { volatile int foo[] = { 0x40, 0x41, 0x42, 0x43, }; } __attribute__((noipa)) static int do_it(void) { // use 'volatile' to inhibit constant propagation volatile union { int dummy; struct { int fs[4]; } s; } v = { 0 }; return v.s.fs[3]; } int…

ski 1.5.0 is out

TL;DR: ski-1.5.0 is available for download! It is primarily a maintenance release that completely removes motif and gtk backends, fixes building against C23 toolchains and adds a small -initramfs option to supply separate initramfs file to be used along with emulated kernel. 1.4.0 announcement has a few hints on how to run it. Have fun!

gcc-15 switched to C23

Tl;DR In November gcc merged the switch from C17 ( -std=gnu17 ) to C23 ( -std=c23 ) language standard used by default for C code. This will cause quite a few build failures in projects written in C . A few example fixes: libffi : optional va_start parameter. ncompress : void foo() changed the meaning to void foo(void) . ell bool , true and false are new keywords. And specifically false is not…

Zero Hydra Failures towards 24.11 NixOS release

ZHF (or Zero Hydra Failures) is the time when most build failures are squashed before final NixOS-24.11 release (see full release schedule ). To follow the tradition let’s fix one bug for ZHF . I picked xorg.libAppleWM build failure. It’s not a very popular package. The failure looks trivial: make[2]: Entering directory '/build/libapplewm-be972ebc3a97292e7d2b2350eff55ae12df99a42/src' CC applewm.lo…

xmms2 0.9.4 is out

Tl;DR: xmms2-0.9.4 is out and you can get it at https://github.com/xmms2/xmms2-devel/releases/tag/0.9.4 ! xmms2 is still a music player daemon with various plugins to support stream decoding and transformation. See older announcement on how to get started with xmms2 . Highlights It’s a small maintenance release. The only notable change is support for ffmpeg-7 as a build dependency. Have fun!

gcc-15 bugs, pile 1

About 4 months have passed since gcc-14.1.0 release. Around the same time gcc-15 development has started and a few major changes were merged into the master development branch. summary This time I waited to collect about 20 bug reports I encountered: c++/114933 : mcfgthread-1.6.1 type check failure. Ended up being mcfgthread bug caused by stronger gcc checks. tree-optimization/114872 : sagemath…