RSSAmplifier

Blog

0xKiire

Exploring low-level programming, systems design, and performance optimization

0xkiire.comRSS feed ↗46 posts

Latest posts

How to Build a Package Manager — A Complete Implementation Guide

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…

zypher — Complete Developer Guide

A complete reference for zypher-cli and zypher framework

Releasing & Distributing Zig Projects

A complete reference for tagging, GitHub releases, and distributing Zig libraries and CLI tools across npm, Homebrew, AUR, apt, and Windows package managers.

WebAssembly with Zig 0.16.0: A Complete Tutorial and Reference

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`…

Text Editor Data Structures: Gap Buffers, Ropes, and Piece Tables

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.

Terminal Text Utility Tools: A Comprehensive Guide

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.

Building a GUI Library from Scratch

The Complete Guide to creating A UI Library Using Only C and SDL2

The M:N Concurrent Model — A Complete Guide. From First Principles to Production Schedulers

"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

I/O Multiplexing: select(), poll(), and epoll() Explaination Extended

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.

The Complete Emacs Guide. Mastering the World's Most Powerful Editor

A comprehensive guide to mastering Emacs, covering everything from basic concepts to advanced customization and workflow optimization.

Introduction to Graphics Programming with Vulkan

A Comprehensive Guide from First Principles to a Complete 3D Renderer

Build a Complete Web Framework From Scratch — Architecture, Design Patterns & Complete Checklist

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,…

The Complete Guide to Build Systems

build systems guide. Why they matter, why should you even care, significatincy and much more

Build a Full-Featured Text Editor From Scratch — Architecture, Design Patterns & Complete Checklist

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,…

Build a Mini Operating System From Scratch — A Complete Checklist & Guide

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.

The Complete Guide to Clean Architecture

Architecture-focused. Every step describes what is involved and the role it plays in clean architecture

The Complete Guide to Tilemaps, Fonts, and Asset Management

Building Professional 2D Games with SDL in C. A Comprehensive Resource Management and Rendering System.

The Complete Guide to C Macros, Preprocessor Directives, and Compiler Attributes

Mastering the C Preprocessor for Portable and Kernel-Level Code. A Comprehensive Resource for Cross-Platform Development and Linux Kernel Programming.

The Complete Guide to ECS-Driven and Immediate Mode Graphics Programming

A Data-Oriented Approach to Game Development with SDL in C. Building High-Performance Games with Entity Component Systems.

Append-Only Logs: The Storage Pattern Behind Databases and Durable Systems

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 vs Proactor: Event Loops, Async I/O, and How Servers Scale

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.

Memory Debugging: AddressSanitizer, Valgrind, and Practical Triage

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.

Concurrent File Processing Pipelines: Batching, Backpressure, and Work Partitioning

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.

The Page Cache and Writeback: Why Disk I/O Doesn't Behave Like You Think

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.

Build Git From Scratch — A Complete Checklist & Guide

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.).

Atomic File Save Patterns: temp files, write barriers, and avoiding torn writes

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.

Crash Consistency: fsync(), rename(), and Durable Writes You Can Trust

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 and Parking: How Fast Locks Sleep Without Syscalls

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.

Advanced mmap: madvise(), mincore(), and Page-Fault Aware Performance

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.

Message Passing and Channels: Concurrency Without Shared Mutable State

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.

The Complete Guide to Graphics and Games Programming with SDL in C

The Complete Guide to Graphics and Games Programming with SDL in C. A Comprehensive Journey from Pixels to Professional Game Development.

Thread Pools and Backpressure: Scaling Work Without Melting Down

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 on Unix: flock() vs fcntl() and What They Actually Guarantee

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 Deep Dive: open flags, offsets, CLOEXEC, and dup()

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.

Async I/O on Linux with io_uring: A Practical Overview

io_uring moves beyond readiness: submit I/O and receive completions. Learn the core concepts, when it helps, and minimal examples in C, Zig, and Rust.

I/O Multiplexing: select(), poll(), and epoll() Explained

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.

Filesystems 101: Inodes, Directories, and What a Path Lookup Really Does

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.

mmap vs read/write: Choosing the Right File Access Strategy

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.

Lock-Free SPSC Ring Buffer: A High-Throughput Queue Between Two Threads

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.

Threads and Synchronization: Mutexes, Condition Variables, and Semaphores

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.

Atomics and Memory Ordering: Building Correct Lock-Free Code

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.

File I/O Fundamentals: read/write, Buffers, and the Cost of Syscalls

Learn the practical mechanics of file I/O: file descriptors, syscalls, buffering, partial reads/writes, and robust patterns with C, Zig, and Rust.

Cache Locality and Data Layout: Turning Memory Into Throughput

CPU caches reward predictable access. Learn spatial/temporal locality, AoS vs SoA, prefetching, and how to measure improvements in C, Zig, and Rust.

Virtual Memory Foundations: Address Spaces, Paging, and Protection

A detailed, practical walkthrough of virtual memory: pages, page tables, permissions, and what happens during a page fault — with C, Zig, and Rust examples.

Building a Memory Allocator from Scratch in C

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 - Exploring the Depths of Systems Programming

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.