kosalab
kosalab
2025
- Functors and Monads in Rust A quick showcase of the Functor and Monad patterns in Rust. Mar 02
 - EOF Is and Is Not a Character It depends on the context. Jan 29
 - Parameter Inversion in `matches!()` The variable to match(es!) must be the first argument, otherwise you get an easily-ignorable warning and a devious bug. Jan 05
 
2024
- CSS Theme Variables Without Duplication A trick with CSS custom properties to avoid duplicating theme tokens for light and dark modes. Dec 25
 - Difference between TcpListener::bind('[::]:8000') and TcpListener::bind(':::8000') One calls getaddrinfo, one does not. Dec 19
 - IRC with The Lounge, Soju, Caddy, and Podman My IRC setup with a web client and bouncer hosted behind a reverse-proxy, all containerized. Nov 13
 - Overengineered HTML Codeblocks Tricks for better code blocks on the web. Oct 24
 - Pointer to `usize` Bug Weird integer comparison behavior involving pointer casts, lifetimes, and LLVM. Oct 07
 - Control Flow Option Options Various ways you can handle `Option` values with control flow in Rust. Sep 29
 
2023
- Incorrect "Unsatisfied Trait Bounds" Version-related issue that caused a mysterious trait bound error. Nov 23
 - Random Tic-tac-toe A random variation of the game tic-tac-toe. Nov 22
 - Macro Fizzbuzz A concise fizzbuzz implementation using Rust macros. Nov 18
 - Send and Sync Concurrency-related traits in the Rust programming language. Nov 07
 - A Better Firefox Scrollbar CSS tweaks and settings to improve the Firefox scrollbar Oct 13
 - Inclusive Range Performance Inclusive ranges may hurt performance compared to the equivalent exclusive range. Oct 08
 - The Danger of Blindly Trusting Compiler Help Blindly trusting help messages from the Rust compiler hurts beginners. Oct 05
 - 10Print My foray into the C64 BASIC one-liner and its variants. Oct 02
 - 'Javascript Selector' for CSS Apply CSS selectively based on whether Javascript is enabled by the user. Sep 27
 - color-mix Using `color-mix` to retroactively apply transparency to colors in CSS variables. Sep 27
 - Shell Rice: Last Command Exit Code Using `strsignal` and friends to have improve the exit status code display for the last command ran in the shell. Jun 20
 - C Sanitizers Runtime detection of C errors with sanitizer libraries. Mar 04
 - What Is the Longest Glibc Function Name? It's posix_spawn_file_actions_addtcsetpgrp_np. Feb 19
 - Pumping Lemma for Regular Languages Colorful, interactive explanation of the pumping lemma. Feb 05
 
2022
- Fish Shell Tips and Tricks Making my life easier when working with the shell for the 90s. Jul 17
 - Python Formatted Strings Interactive generator for Python f-strings. Apr 22
 - MIPS Single Cycle Datapath Visualization of the single cycle datapath from The Hardware-Software Interface by Patterson & Hennessy. Feb 26