kosayoda
kosalab.dev
kosayoda
@kosalab.dev
i do things some days and write on https://kosalab.dev
So the standard I/O streams in C (stdin/stdout/stderr) are unoriented by default until first use (ie. calling fgetc vs fgetwc on stdin determines if it is a byte-oriented stream or wide-oriented stream).

However, POSIX forbids `perror` from changing the orientation of unoriented streams,
April 7, 2025 at 9:42 PM
Thinking of ways to hint more strongly that the KOSALAB at kosalab.dev is clickable and leads to a lot more content without putting another link down somewhere else
kosalab
kosayoda's personal website.
kosalab.dev
March 31, 2025 at 5:48 PM
@piccalil.li Are article heading links broken on the site right now? I see markup indicating support in the HTML so the CSS might be borked
March 24, 2025 at 8:38 PM
Thanks duckduckgo AI
February 22, 2025 at 6:33 AM
snrub www.youtube.com/watch?v=HRIt... by dankmus and delorean www.youtube.com/watch?v=JNaN... by toconoma have a similar tune
February 19, 2025 at 9:45 PM
Did you know that `ps` has 3 different priorities that have the same column name in the output?
February 7, 2025 at 7:03 AM
Don't you just love how `/proc/pid/status` has CamelCase, Capital_snake_case, Camel_Snake_Case, and snake_case fields
February 7, 2025 at 12:33 AM
ah C, you never fail to impress me
February 5, 2025 at 9:54 PM
The `ps` command from procps-ng has so many options, all in different styles, all that may or may not clash with one another it's kinda funny.

For example, you can't get the same output as `ps j` (without using BSD syntax) without multiple commands.
February 5, 2025 at 4:41 PM
today I realized I lost one of my blog posts

I forgot to migrate it when I redid my site, and thought I was losing it when I couldn't find it on my website...had to dig through the old codebase to find it
February 2, 2025 at 1:59 AM
New post! This time it's about EOF and the many things it is and isn't: kosalab.dev/posts/eof-is...
EOF Is and Is Not a Character
It depends on the context.
kosalab.dev
January 29, 2025 at 5:49 PM
w3schools has done it

they've ruined their only useful page, www.w3schools.com/cssref/css_s... by splitting the content into multiple different pages
January 22, 2025 at 2:52 AM
Somewhat miffed I can't style `::before::selection` because `::selection` does not apply to other pseudo-elements
January 10, 2025 at 6:09 AM
Mobile app idea: power-user alarm

I want alarm groups
I want to be able to say "set an alarm every 10 minutes between 7am and 8am"
January 6, 2025 at 5:37 AM
Surprised that I can't seem to find a nice color picker widget for my use-case. Closest is github.com/simonwep/pic... but it doesn't work too nicely with svelte
January 6, 2025 at 3:56 AM
Wrote about a silly bug today: kosalab.dev/posts/matche...

Q: What do you think the following code will output?
January 5, 2025 at 6:53 AM
Against better judgement I have implemented an HTML DSL in lua
December 31, 2024 at 7:59 PM
Looked at Teal today (github.com/teal-languag...) to see if it works nicely with my use-case on my website, but unfortunately its union type is lacking and literal types are currently unsupported.

Looking at Luau now (luau.org) and it seems promising
December 28, 2024 at 7:05 PM
This has to be the weirdest Firefox bug I've seen so far...
December 26, 2024 at 11:47 PM
New blog feature: Runnable Rust code snippets! Implementation similar to github.com/rust-lang/md... using play.rust-lang.org.

Demo video shows a snippet from kosalab.dev/posts/pointe....
December 24, 2024 at 5:39 AM
New post! It's a short one, don't ask me why it took two weeks instead of an hour...

kosalab.dev/posts/rust-i...
Difference between TcpListener::bind('[::]:8000') and TcpListener::bind(':::8000')
One calls getaddrinfo, one does not.
kosalab.dev
December 19, 2024 at 6:15 PM
Thanks Github...
December 17, 2024 at 2:21 AM
hello?
December 12, 2024 at 1:31 AM
I was curious about how the various tools for scripting eBPF work re: running the script and creating the eBPF bytecode, so I did a little digging:

github.com/bpftrace/bpf...

The user runs `bpftrace
> compile eBPF kernel code to JSON

wat
December 6, 2024 at 7:36 PM