kosayoda
kosalab.dev
kosayoda
@kosalab.dev
i do things some days and write on https://kosalab.dev
Yep, I want my site to break only when I break it 🫡
May 19, 2025 at 12:58 AM
...beforehand, but it's still wild to me that musl is able to just save and restore two variables while glibc ends up performing 4 extra system calls every time `perror` is called (dup, fcntl, fstat, close)
April 7, 2025 at 9:42 PM
...and if so _duplicates stderr's file descriptor, creates a FILE* from the new file descriptor, uses that, then closes the file!!_

Now `perror` is unlikely to be on the hot path by any means, and this only happens if you haven't interacted with stderr at all...
April 7, 2025 at 9:42 PM
although it must work as if the stream is byte-oriented.

Musl handles this in 4 lines of code: 2 to save the locale and orientation before printing the message, and 2 to restore them afterwards.

Glibc on the other hand checks if the orientation is unset...
April 7, 2025 at 9:42 PM
I realized that my initial post was pretty vague, sorry! An example is the "It stems from pre-processors" heading at piccalil.li/blog/css-nes.... The heading is linkable and the markup includes an SVG link icon to the heading, but the link icon does not show up at all.
CSS nesting: use with caution
Is CSS nesting an exciting new feature or a potential disaster waiting to happen? I note down my worries and prior experience with one of it predecessors: Sass nesting, along with some gotchas native ...
piccalil.li
March 25, 2025 at 3:24 PM
Collaborative task tracker and management calling it now
March 5, 2025 at 10:41 PM
That's not including the _other_ "priorities" a Linux system can have, which isn't documented in the manpage of ps and can only be found in the source code, which are (and I kid you not) pri_foo, pri_bar, and pri_baz...
February 7, 2025 at 7:03 AM
The equivalent to `ps j` with only unix syntax is:

ps -Nt - -u $(ps -eo user= | sort -u | grep -v "^$(whoami)$" | paste -sd, -) -o ppid,pid,pgid,sid,tty,tpgid,stat,uid,time,command

Which says "get every process that is NOT 'all processes that do not have a terminal and whose user isn't me'".
February 5, 2025 at 4:41 PM
Unfortunately it did not play nice with Svelte 5, so I ended up making my own. Thanks for the suggestion though!
January 10, 2025 at 6:07 AM