A package manager is one of the most architecturally rich pieces of tooling you can build. It touches dependency resolution (a provably NP-complete problem in the general case), distributed systems (registry protocol, caching), cryptography (integrity verification, signing), filesystem management (content-addressable stores, atomic installs), and UX design (CLI, error messaging). This guide covers…
A complete reference for tagging, GitHub releases, and distributing Zig libraries and CLI tools across npm, Homebrew, AUR, apt, and Windows package managers.
WebAssembly is often paired with Rust (via wasm-pack), Emscripten'd C++, or Go. All three bring substantial baggage: wasm-pack generates a JS glue file and pulls in a Rust standard library; Emscripten ships a complete POSIX emulation layer including `malloc`, `printf`, and a virtual filesystem; Go embeds a full garbage collector and goroutine scheduler into every binary. The resulting `.wasm`…
A deep dive into how the editors you use every day actually store and manipulate text — and why it's one of the most underrated problems in systems programming.
A deep dive into the Unix/Linux text toolchain — grep, sed, awk, cat, echo, cut, tr, sort,uniq, wc, tee, less, head, tail, printf, xargs, find, diff, patch, strings, hexdump, and more.
"Concurrency is not parallelism. Parallelism is about doing many things at once. Concurrency is about dealing with many things at once. The M:N model is the bridge between the two." — adapted from Rob Pike
How do servers handle thousands of connections? Learn readiness-based I/O with select/poll/epoll, common edge cases, and build a tiny event loop in C, Zig, and Rust.
Language-agnostic & pattern-driven. Every step describes what to build, why it is designed that way, and which Gang of Four (GoF) design pattern governs it. Pseudocode is intentionally simplified — the focus is on architecture decisions, data structures, and the relationships between components. Real implementation can be done in any language capable of systems or application programming (Python,…
Language-agnostic & pattern-driven. Every step describes what to build, why it is designed that way, and which Gang of Four (GoF) design pattern governs it. Pseudocode is intentionally simplified — the focus is on architecture decisions, data structures, and the relationships between components. Real implementation uses the same logical structure in any language (Rust, C++, TypeScript, Python, Go,…
Architecture-focused. Every step describes *what* to implement and why, with concrete data-format references, assembly/pseudocode examples, and memory-layout diagrams so you can build it in x86 Assembly + C (the most common pairing), or adapt to ARM/RISC-V. Tools used; NASM, GCC (cross-compiler), QEMU, GNU ld.
Append-only logs are simple, fast, and crash-friendly. Learn record formats, checksums, compaction, and how WAL-like designs work, with C, Zig, and Rust examples.
Reactor (readiness) and proactor (completion) are two mental models for scalable I/O. Learn how epoll and io_uring fit, and implement tiny examples in C, Zig, and Rust.
A practical guide to debugging memory issues: use-after-free, buffer overflows, leaks, and data races. Learn what tools catch, what they miss, and how to reproduce issues with C, Zig, and Rust.
Build a practical pipeline to process many files concurrently without overwhelming the system. Learn batching, bounded queues, and work partitioning with C, Zig, and Rust examples.
Understand Linux page cache, buffered I/O, dirty pages, writeback, and how fsync interacts with durability. Includes experiments and code in C, Zig, and Rust.
Language-agnostic. Every step describes what to implement and why, with pseudocode and concrete data-format references so you can implement it in any language (Python, Rust, Go, C, TypeScript, etc.).
Practical patterns for safely updating configuration and state files. Covers temp+rename, write-ahead logs, checksums, and length-prefix formats with C, Zig, and Rust examples.
Power loss and crashes turn "it worked" into "it corrupted". Learn what fsync guarantees, why rename is special, and how to implement crash-consistent updates in C, Zig, and Rust.
Futexes are the kernel primitive behind fast mutexes and condition variables on Linux. Learn the "fast path" vs "slow path", and build a tiny mutex using C, Zig, and Rust.
Go beyond basic mmap. Learn how to hint access patterns with madvise, check residency with mincore, and design page-fault friendly readers in C, Zig, and Rust.
Learn message-passing concurrency: bounded vs unbounded channels, backpressure, fan-in/fan-out, and shutdown semantics. Includes C, Zig, and Rust examples and practical patterns.
Thread pools are easy to create and hard to run safely. Learn bounded queues, backpressure, shutdown, and avoiding unbounded memory growth, with C, Zig, and Rust examples.
File locking is deceptively subtle. Learn advisory locks, flock vs fcntl record locks, lease-like patterns, and how to implement a safe "single instance" lockfile in C, Zig, and Rust.
File descriptors are the universal I/O handle on Unix. Learn how fd state works (offsets, flags), how dup/dup2 behave, why CLOEXEC matters, and how to build robust patterns in C, Zig, and Rust.
How do servers handle thousands of connections? Learn readiness-based I/O with select/poll/epoll, common edge cases, and build a tiny event loop in C, Zig, and Rust.
Understand the core filesystem abstractions: inodes, dentries, hard links, symlinks, and why path lookup can be expensive. Includes practical code in C, Zig, and Rust.
When should you use mmap, and when are classic read/write loops better? Learn page cache behavior, page faults, random access, and safe patterns in C, Zig, and Rust.
Build a correct single-producer single-consumer ring buffer using atomics, and understand why SPSC is simpler than MPMC. Includes C, Zig, and Rust implementations.
A detailed, practical guide to concurrency primitives: what mutexes guarantee, how condition variables work, and how to structure correct waiting loops — with C, Zig, and Rust examples.
A practical guide to atomic operations and memory ordering (relaxed/acquire/release/seq_cst). Learn what the CPU and compiler are allowed to do, with C, Zig, and Rust examples.
A detailed, practical walkthrough of virtual memory: pages, page tables, permissions, and what happens during a page fault — with C, Zig, and Rust examples.
Learn how memory allocation works by implementing your own malloc() and free() functions in C. A deep dive into heap management, fragmentation, and optimization techniques.
Welcome to 0xKiire, a blog dedicated to low-level programming, systems design, and performance optimization. Join me as we explore the fascinating world beneath the abstractions.