Search
Search every article
Find any of the 56 articles by title, topic or concept.
All articles
56 articles, newest first
Programming · Compiler Theory · C++
Compiler Optimisation in C++: Constant Folding and Dead Code Elimination
Build an IR optimiser in C++ with constant folding, branch simplification, unreachable-code removal and dead code elimination while preserving behaviour.
Programming · Compiler Theory · Assembly · C++
Compiler Control Flow in C++: x86-64 Branches, Loops and Jumps
Implement compiler control flow in x86-64 assembly by lowering IR comparisons, conditional branches, if/else statements and while loops.
Programming · Compiler Theory · Assembly · C++
x86-64 Function Calls in a C++ Compiler: System V ABI and Runtime
Add System V AMD64 function calls to a C++ compiler with x86-64 argument registers, stack alignment, return values, a NASM runtime and ELF64 linking.
Programming · Compiler Theory · Assembly · C++
How to Build a Compiler Backend in C++: x86-64 Generation
Build a compiler backend in C++ that translates checked IR into x86-64 NASM assembly with stack frames, arithmetic operations and native Linux executables.
Programming · Compiler Theory · C++
How to Build a Compiler IR in C++: Three-Address Code
Build an intermediate representation in C++. Lower a checked AST into three-address-style instructions with temporaries, variables, basic blocks, branches, loops and function calls.
Programming · Compiler Theory · C++
Compiler Semantic Analysis: Symbols, Scopes and Types in C++
Learn semantic analysis in a compiler by building symbol tables, nested scopes and static type checking in C++, with diagnostics and CTest tests.
Programming · Compiler Theory · C++
How to Build a Recursive Descent Parser in C++ with an AST
Build a recursive descent parser in C++ that converts lexer tokens into an AST, handles operator precedence, reports syntax errors, and runs CTest tests.
Programming · Compiler Theory · C++
How to Build a Lexer in C++: Lexical Analysis and Tokens
Build a lexer in C++ that converts source code into tokens, recognises keywords and operators, applies maximum munch, and reports useful errors.
Programming · Compiler Theory
How to Design a Programming Language from Scratch
Design a small statically typed C-style programming language from scratch, including its syntax, types and grammar, then build its compiler in C++ with CMake and Docker.
Programming · Compiler Theory · Computer Architecture
How a Compiler Works: From Source Code to Machine Code
Learn how a compiler transforms source code into machine code through lexing, parsing, semantic analysis, IR, optimisation and x86-64 code generation.
Programming · Compiler Theory · Computer Architecture
Build a Compiler From Scratch in C++ for x86-64
A step-by-step compiler tutorial in C++: design a language, build a lexer and parser, add semantic analysis, and generate native Linux x86-64 programs.
Operating Systems · ARM · Systems Programming · Shell
Writing a Shell in C: A REPL Over the UART
Give PurgatoryOS a prompt. Add uart_getc and a line-discipline buffer, parse commands on top of Post 12's ramdisk, dispatch built-ins (ls, cat, echo, cd, pwd, help, clear), and load /bin/hello as a flat binary at a fixed address. This is the payoff post, where readers finally type into their own kernel.
Operating Systems · ARM · Systems Programming · Rust
Build a Simple Filesystem: Turning the Heap Into a Ramdisk
Build an in-memory tree filesystem for PurgatoryOS in no_std Rust using Box<Node>, BTreeMap<String, NodeId>, and Vec<u8> on top of Post 11's allocator. Add three new syscalls (open, read, close), a per-task file descriptor table, and a working VFS layer that the shell in Post 13 can type against.
Operating Systems · ARM · Systems Programming · Rust
Rust no_std Kernel Allocator: Bringing Rust Into a C Kernel
Carve the C heap allocator out of PurgatoryOS and replace it with a no_std Rust implementation wired in via extern C FFI. Set up aarch64-unknown-none-softfloat, build-std core + alloc, the GlobalAlloc trait, a spin-locked free list, and a Makefile that links libpurgatory_rs.a into the existing kernel.elf, without rewriting a single line of C above the allocator.
Operating Systems · ARM · Systems Programming
How System Calls Work: Drawing the Line Between User and Kernel
Drop your AArch64 tasks into EL0, trap into EL1 with the svc instruction, decode ESR_EL1 EC=0x15, dispatch through a syscall table, and return cleanly with eret. Four real syscalls (write, exit, getpid and yield) and the hardware-enforced privilege boundary that makes them possible.
Operating Systems · ARM · Systems Programming · Computer Architecture
Context Switching & Process Scheduling: Teaching the Kernel to Multitask
Build a round-robin task scheduler from scratch for your AArch64 bare-metal kernel. Implement the PCB, understand why only callee-saved registers need saving, write the context_switch assembly, and watch two tasks interleave on the UART, the moment your kernel becomes an actual operating system.
Operating Systems · ARM · Systems Programming
Kernel Heap Allocator in C: Teaching the Kernel to Manage Its Own Memory
Write a bump allocator and then a free-list allocator from scratch in C for your AArch64 bare-metal kernel. Learn block headers, first-fit search, coalescing, alignment, and why Rust's no_std offers a safer alternative. Visualize every allocation interactively.
Operating Systems · ARM · Systems Programming · Computer Architecture
AArch64 Exceptions & Interrupts: Teaching Your Kernel to Listen
Build an AArch64 exception vector table from scratch, set up the GICv2 Generic Interrupt Controller on QEMU, and write a working ARM Generic Timer interrupt handler. Your kernel finally responds to the hardware.
Operating Systems · ARM · Systems Programming · Computer Architecture
AArch64 Virtual Memory & the MMU: Teaching the CPU to Lie
Master the AArch64 MMU on bare metal ARM. A deep dive into page table structures, translation levels (L0-L3), and configuring SCTLR_EL1, TCR_EL1, and MAIR_EL1 for kernel memory protection.
Operating Systems · ARM · Systems Programming
Linker Scripts & Kernel Memory Layout: Teaching the Linker What 'Correct' Looks Like
Master ELF sections (.text, .rodata, .data, .bss) and fix alignment bugs in your AArch64 linker script. Learn to verify memory maps using readelf for bare-metal ARM development.
Operating Systems · ARM · Systems Programming · Computer Architecture
PL011 UART Driver on QEMU: Your First Bare-Metal Kernel Output
Learn how to write a bare-metal C driver for the PL011 UART on AArch64. Master Memory-Mapped I/O (MMIO), the volatile keyword in C, and building a kprint function for QEMU virt without a standard library.
Operating Systems · ARM · Systems Programming · Computer Architecture
The ARM64 Boot Process: From Reset Vector to kernel_main
Learn how to write an ARM64 bootloader stub in assembly. We cover AArch64 exception levels (EL2 to EL1), zeroing BSS, stack setup, and jumping to a C kernel_main on bare metal.
Operating Systems · ARM · Systems Programming
AArch64 Toolchain Setup: Cross-Compiler, QEMU and Your First ARM Binary
Step-by-step guide to installing an AArch64 cross-compiler (GCC) and QEMU on macOS and Linux. Write a bare-metal linker script and Makefile to boot your first ARM64 program.
Operating Systems · ARM · Systems Programming · Computer Architecture
Why Build an OS from Scratch? The Case for Going All the Way Down
Stop treating the OS as a black box. Discover why building an AArch64 kernel from scratch on ARM is the ultimate systems programming challenge for 2026. From silicon to shell, we go all the way down.
Operating Systems · Systems Programming · ARM
From Silicon to Shell: Building an OS for ARM and More
A bare-metal journey from a powered-on AArch64 CPU to a working interactive shell. Thirteen chapters of writing a kernel from scratch, covering the bootloader, MMU, interrupts, allocator, processes, syscalls, filesystem and a Rust no_std module, all running on QEMU's virt machine.
Quantitative Finance · Data Science
Itô's Lemma Explained: Stochastic Calculus for Finance
Why the ordinary chain rule breaks for random processes, and how Ito's Lemma fixes it. Derive geometric Brownian motion with a live simulator.
Quantitative Finance · Data Science
The Random Walk: From Coin Flips to Stochastic Calculus
Watch a coin-flip random walk become the Wiener process, meet the heat equation behind diffusion, and simulate Brownian motion in Python.
Data Science · Programming
Data Science with Python for Beginners: Complete Learning Path
Learn data science with Python through a beginner-friendly path covering environment setup, pandas data cleaning, and exploratory data analysis.
Quantitative Finance · Data Science
Finding P values and false hope: A Guide to Risk and Quant Finance
From simple bets to complex bond portfolios. Explore the mathematical structures of uncertainty, debt mechanics, and the Python tools used to model them.
Software Design Patterns · Programming
The Tough Love Architecture Guide
Stop pattern-worshipping and start solving problems. A cynical but practical journey through software design, incremental refactoring, and high-performance systems.
Data Science · Statistics
Sweet Bonanza 1000 RTP Analysis: 60,000 Spins
Python analysis of 60,000 Sweet Bonanza 1000 demo spins, covering RTP, dead spins, bonus frequency, payout concentration, and logging errors.
Quantitative Finance · Data Science
Value at Risk (VaR) vs. CVaR: A Practical Guide for Investors
Build Value at Risk and Conditional VaR from return data in Python, and see why VaR hides the tail loss that actually bankrupts a portfolio.
Data Science · Statistics
Gates of Olympus RTP Analysis: Results From 40,000 Spins
See what 40,000 demo spins reveal about Gates of Olympus RTP, Ante Bet bonus frequency, dry spells, multipliers, and statistical uncertainty.
Quantitative Finance · Data Science
Stock Options 101: A Guide to Calls, Puts, and Pricing
Learn calls and puts from the payoff diagram up, build multi-leg strategies, and see why selling premium is positive-EV with a catastrophic tail.
Data Science
Exploratory Data Analysis (EDA) in Python: Complete Guide
Learn exploratory data analysis (EDA) in Python with pandas, Seaborn, and Matplotlib. Explore distributions, correlations, outliers, trends, and relationships.
Quantitative Finance · Data Science
Portfolio Allocation: The Math Behind the Efficient Frontier
Derive Markowitz mean-variance optimization and build the efficient frontier from scratch in Python, then see why the optimal portfolio is fragile.
Data Science
How to Clean Data in Python with Pandas: 6-Step Guide
Learn how to clean data in Python with pandas step by step, including missing values, duplicates, data types, outliers, validation, and CSV export.
Quantitative Finance · Data Science
Stock Analysis with Python: Modeling Prices, Returns & Distributions
Pull real stock prices with yfinance, turn them into daily returns, and see why the normal distribution underestimates crashes in the tails.
Data Science
Set Up Python for Data Science in VS Code: venv, Jupyter & Colab
Learn how to set up Python for data science in VS Code with venv, Jupyter, NumPy and pandas, plus a beginner-friendly Google Colab setup.
Quantitative Finance · Data Science
The Geometry of Interest: Constructing Yield Curves and Forward Rates
Bootstrap a yield curve from real bond prices in Python, read the forward rates hidden inside it, and discount future cash flows honestly.
Computer Architecture · Systems Programming
How Computer I/O Works: Buses, DMA, GPUs, Multicore CPUs, and SoCs
Learn how CPUs communicate with devices through memory-mapped I/O, interrupts, DMA, PCIe, multicore systems, GPUs, and modern system-on-chip designs.
Quantitative Finance · Data Science
Life in the Tranches: Understanding CDOs and Risk Waterfalls
Learn how CDO tranching splits credit risk into Senior, Mezzanine, and Equity layers, with a step-by-step Python waterfall simulation.
Computer Architecture
How a CPU Executes Instructions: The Fetch-Decode-Execute Cycle
Follow the fetch-decode-execute cycle step by step and learn how the program counter, registers, ALU, control unit, cache, and write-back stages execute machine code.
Quantitative Finance · Data Science
Loans and Bonds: The Mechanics of Borrowing and Default Risk
A quantitative guide to loan amortization and bond pricing. Learn to derive payment formulas, simulate default risk, and understand coupon rates using Python.
Computer Architecture · Operating Systems · Systems Programming
Computer Memory Hierarchy: Registers, Cache, RAM, and Virtual Memory
Learn how the computer memory hierarchy works, including CPU registers, L1/L2/L3 cache, RAM, SSDs, virtual memory, TLBs, and page faults.
Quantitative Finance · Data Science
The Art of Losing Slowly: Risk, Variance, and Decision-Making
Learn why a positive expected value can still ruin you. Risk, variance and the risk of ruin, explained in Python with an interactive model.
Computer Architecture
CPU Control Unit Explained: Instruction Decoding, Control Signals & Microcode
Learn how a CPU control unit works, from instruction decoding and control signals to hardwired logic, microcode, timing, and the fetch-decode-execute cycle.
Data Science · Statistics
Expected Riches and Expensive Lessons: A Data Science Audit of Modern Slots
A data science series using Python, resampling, simulation, and hypothesis testing to analyze slot RTP, bonus frequency, payout concentration, and volatility.
Computer Architecture · Electrical Engineering · Logic
What Is an ALU and How Does It Work? 1-Bit ALU Explained
Learn what an ALU is, how it works inside a CPU, and how to build a 1-bit Arithmetic Logic Unit with logic gates, a full adder, MUX, and control signals.
Software Design Patterns · Programming
Design Patterns for Performance: Scaling Beyond Simple Code
Master high-performance architecture. Explore the Reactor pattern, Actor model, and resilience strategies like Circuit Breakers and Load Shedding for low-latency systems.
Programming · Assembly · Systems Programming
x86-64 Assembly Hello World in Docker (NASM & Linux Guide)
Write, assemble, and link your first x86-64 assembly Hello World program using NASM, Docker, and Linux syscalls. Supports x86-64 & Apple Silicon.
Software Design Patterns · Programming
The Rescue Mission: Refactoring a 'Monster' Class Step-by-Step
Don't delete that messy code just yet. Learn how to transform a tightly coupled Java class into a clean, testable architecture using incremental refactoring and abstractions.
Computer Architecture · Electrical Engineering · Logic
How Logic Gates Work: Build an 8-Bit Binary Adder and Memory Circuit
Learn how logic gates work, build half-adders and full-adders, create an 8-bit ripple-carry adder, and understand latches, flip-flops, and memory.
Computer Architecture · Electrical Engineering
How Transistors Work: Semiconductors, Doping, and MOSFETs Explained
Learn how transistors work inside CPUs, from silicon and semiconductor doping to N-type, P-type, MOSFET channels, binary logic, and transistor history.
Computer Architecture · Electrical Engineering
From Transistor to System: A Friendly Guide to Computer Architecture
Learn how computers work from transistors and logic gates to ALUs, control units, memory, instruction execution, I/O, GPUs, multicore CPUs, and SoCs.
Software Design Patterns · Programming
The Art of Saying No: The Harsh Truth About Design Patterns
Stop pattern-worshipping and start solving problems. Learn why most developers misuse design patterns and how to pick the right architecture for real-world constraints.