Articles

Product & engineering notes

Insights on practical software engineering, learning by building, and hands-on development

Engineering

How a Neural Network Solves XOR with a Hidden Layer

A single sigmoid unit cannot separate XOR. We train a 2-2-1 network, inspect its hidden coordinates, and see how a nonlinear layer turns the problem into one a straight line can solve.

Rillence Team · 15 min read Read →
Engineering

How a Perceptron Learns: The Simplest Machine Learning Algorithm

We follow every correction made by a perceptron learning AND, inspect the boundary encoded by its weights, and see why the same algorithm can never learn XOR.

Rillence Team · 14 min read Read →
Engineering

How a Green Health Check Hides a Broken Service

A monitoring experiment shows how sparse probes can miss most incidents while reporting accurate uptime, and why a healthy endpoint may say nothing about user-facing operations.

Rillence Team · 14 min read Read →
Engineering

Why 16 Threads Were Slower Than One: A Global Queue vs. Work Stealing

Two schedulers run the same two million tasks. A shared mutex makes sixteen workers five times slower than one, while local queues and rare work stealing produce a fivefold speedup.

Rillence Team · 15 min read Read →
Engineering

What Happens Between Pressing Enter and Seeing Output

We build a small Rust shell and trace how fork, exec, pipes, dup2, close, and wait turn a command line into cooperating Unix processes.

Rillence Team · 16 min read Read →
Engineering

Finding a Lost Second in a Rust Service: Building a Span Tree with tracing

A Rust service has complete logs but no direct answer for a one-second delay. We replace paired log lines with tracing spans and build a Layer that preserves the request as a tree.

Rillence Team · 14 min read Read →
Engineering

Why Cargo Keeps Rerunning build.rs: Declaring the Generator's Real Inputs

A schema generator recompiles 60,310 lines after an unrelated edit. Precise rerun-if directives remove that work, while an incomplete input list silently produces stale Rust types.

Rillence Team · 17 min read Read →
Engineering

Why Your Rust/WASM Bundle Is Larger Than It Needs to Be: From Cargo to the Browser

Three Rust pixel filters start at 2,629,023 bytes. Inspecting DWARF, Cargo profiles, wasm-bindgen, wasm-opt, the allocator, and the ABI reveals what the browser actually needs.

Rillence Team · 18 min read Read →
Engineering

Precedence Without a Grammar Table: Building a Pratt Parser Step by Step

A recursive-descent grammar ladder and a Pratt parser build identical ASTs; binding powers cut parse calls from 3,887,015 to 594,970 across 100,000 generated expressions.

Rillence Team · 18 min read Read →
Engineering

Nagle's Algorithm Ruined My Afternoon: 40 Milliseconds from Nowhere

A 20-byte request over loopback taking 41 ms: how Nagle's algorithm and delayed ACK lock each other through a write-write-read protocol, two measured cures, the whole story reconstructed from ss -ti — and the flood where Nagle wins 11×.

Rillence Team · 12 min read Read →
Engineering

I Put My Rust Code Inside PostgreSQL — Building an Extension with pgrx

A standalone Levenshtein implementation becomes a native PostgreSQL function through pgrx — including the contracts for NULL, the query planner, parallel workers, panics across FFI, and PostgreSQL memory contexts.

Rillence Team · 16 min read Read →
Engineering

How an Async Runtime Works in Rust — Building an Executor, Timer, and epoll from Scratch

The compiler turns async fn into a state machine and walks away; everything else — a run queue, a deadline heap, epoll with parked wakers — is an ordinary program you can build and measure: 836 lines, three threads, 5000 live connections.

Rillence Team · 18 min read Read →
Engineering

What the Borrow Checker Can't See: Checking Unsafe Rust with Miri

A hand-rolled Vec<T> with a plausible use-after-realloc bug: the compiler approves, all native tests pass — and Miri convicts the dangling pointer in 2.18 seconds, with the allocation's full biography.

Rillence Team · 16 min read Read →
Engineering

The GGUF Format: Seven Gigabytes That Explain Themselves

Reading a 7 GB model file byte by byte — header, metadata, tensor directory — and predicting its exact size to the last byte without touching the weights.

Rillence Team · 22 min read Read →
Engineering

Auto-Vectorization in Rust: Why the Compiler Couldn’t Do It at First—and Then Did It Poorly

The same five-tap blur in two shapes of one loop: the one LLVM refuses to vectorize, and the one it vectorizes badly — with the disassembly and the numbers.

Rillence Team · 23 min read Read →
Engineering

How to Make Python 100× Faster Without Rewriting the Entire Application

Keep the app in Python, move one hot function to Rust: a 100× speedup measured end to end, with the code and the numbers.

Rillence Team · 18 min read Read →
Newsletter

New playgrounds in your inbox

Get an email when a new playground drops, plus the occasional engineering deep-dive. No spam, unsubscribe anytime.