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.
Computer Science, Systems Programming & Quantitative Finance
Clear, structured guides on CPU architecture, operating systems, Python data science, Rust programming, and quantitative finance — connecting low-level hardware concepts with practical software engineering.
Hand-picked articles on computer architecture, operating systems, systems programming, Python data science and quantitative finance.
From simple bets to complex bond portfolios. Explore the mathematical structures of uncertainty, debt mechanics, and the Python tools used to model them.
A bare-metal journey from a powered-on AArch64 CPU to a working interactive shell. Thirteen chapters of writing a kernel from scratch — bootloader, MMU, interrupts, allocator, processes, syscalls, filesystem, and a Rust no_std module — all running on QEMU's virt machine.
Learn how computers work from transistors and logic gates to ALUs, control units, memory, instruction execution, I/O, GPUs, multicore CPUs, and SoCs.
Computer science, systems programming and quantitative engineering
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.
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, yield — and the hardware-enforced privilege boundary that makes them possible.
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.
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.
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.
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.
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.
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.