pr0h0

One year of BPL3: from a weekend parser to a language with its own web stack

A look back at the first year of BPL3 — the third version of my programming language — and how it went from a few hundred lines to a compiler, standard library, package manager and web framework.

Abdulah Proho Updated 5 min read

On 16 November 2025 I made the first commit to BPL3. The commit message was "Initial Commint", typo included. A year and more than 3,300 commits later, the same repository holds a compiler, a standard library, a package manager, a test runner, a browser playground, an editor extension and two large applications written entirely in BPL.

This post looks back at how it got there.

Third time's the charm#

BPL stands for Best Programming Language. The name is a joke; the project is not. BPL3 is the third complete attempt:

  • BPL (2023) was an interpreted language written in TypeScript.
  • BPL2 (2024) was an experiment in C#.
  • BPL3 (2025) compiles to LLVM IR and produces native executables through Clang.

Each version taught me something the previous one couldn't. An interpreter shows you how a language behaves. A compiler forces you to decide what it is: how big a struct is, where memory comes from, what happens when a pointer is null, and what a function call looks like at the machine level.

import [IO] from "std/io.bpl";

frame main() ret int {
    local name: string = "BPL";
    IO.log(`Hello from ${name}!`);
    return 0;
}

Months one and two: making it a language#

The first weeks were classic compiler work: expressions, operator precedence, member access, return statements, constant folding and dead-code detection. A VS Code extension with syntax highlighting arrived in the first two weeks, and a language server followed by the end of November.

December was the busiest month of the early phase. In a few weeks BPL gained:

  • generics with full monomorphization
  • structs with methods, inheritance and operator overloading
  • lambdas, tuples and string interpolation
  • const correctness
  • inline assembly in multiple syntax flavours
  • an online playground with tutorials

The month ended with a small CRUD todo app with static file serving. It was the first time BPL did something you could actually use.

The quiet part#

After January the project went almost silent. There was one commit in February, then nothing until late May.

Every long side project has a stretch like this, and it is worth saying so out loud. The difference between a project that dies and one that doesn't is often just whether you come back. When I did, I didn't start with new syntax.

Making it trustworthy#

The work that followed was less visible and far more important. Early BPL had plenty of features and not enough guarantees, so May and June were mostly about correctness and tooling:

  • a deterministic fuzzing campaign for the compiler
  • a seeded differential corpus that compares compiled programs against expected runtime behaviour
  • stable, machine-readable JSON diagnostics for check, lint and doctor
  • a hardened package manager with lockfiles and cache verification
  • WebAssembly as a compilation target

June turned into a performance month: more than 400 commits that start with perf:. Most of them are tiny — cache this lookup, avoid that allocation, skip a redundant pass. Each one was measured over hundreds of alternating runs and had to produce byte-identical ASTs, diagnostics and LLVM output. Compilers reward that kind of patience: no single change matters much, but together they do.

Eating my own cooking#

In September the runtime checks — null access, bounds checking, division by zero, integer overflow — were rewritten in BPL itself, and the hand-written LLVM runtime file was deleted. A language feels real when its own runtime can be written in it.

October was the busiest month of the whole project, with more than 800 commits. It opened with stable C exports and generated headers, so BPL code can now be called from other languages. Then came a web stack written in BPL: an HTTP core with routing and middleware, plus optional packages for SQLite, templates, validation, authentication, CSV and an HTTP client. To prove it holds together, the examples now include a persistent college web application with private accounts. The bpl executable also became standalone, so installing it no longer means installing the toolchain it was built with.

Living in it#

November was about making BPL pleasant to use every day. bpl test runs test functions from *_test.bpl files, and bpl new creates projects that already have tests. The linter got ten new rules and a --fix that removes unused imports, and the formatter can show a diff before it changes anything.

The standard library more than doubled. It now has regular expressions, arbitrary-precision integers, SHA-1/256/384/512 and HMAC, DEFLATE and gzip written in pure BPL, threads and synchronization, lazy iterators, and data structures from ring buffers to tries. New packages cover JSON and JSON Schema, JWTs, WebSockets, structured logging, Prometheus metrics, caching and Markdown.

To stress all of it at once, I started bpl-quant, a market analytics application of about 48,000 lines of BPL. It has an order book and matching engine, a backtester with its own strategy language, a SQL dialect over trades and bars, a FIX gateway, and a REST and WebSocket API. A program that size finds bugs in places no small test reaches, which was the point.

The browser playground was rewritten as well. It runs programs as WebAssembly in an isolated worker with a Stop button, so nobody's infinite loop freezes a tab. On WebAssembly, exceptions now use native Wasm exception handling, and malloc has a heap that grows and reuses freed blocks.

A year ago the language couldn't return a value from a function.

By the numbers#

  • 3,300+ commits
  • ~71,000 lines of TypeScript in the compiler
  • 96 standard library modules, ~31,800 lines of BPL
  • 22 first-party packages
  • 534 example programs, 530 of them wired up as integration tests
  • ~48,000 lines in bpl-quant, the largest BPL program so far
  • 800+ bugs logged and tracked
  • 80+ documentation chapters, from the first tutorial to the grammar reference

What I learned#

Correctness compounds; features don't. By January the bug tracker had passed a hundred entries, most of them in features added quickly in December. It has passed eight hundred since, and every one of them is written down. Fuzzing and treating "byte-identical output" as a requirement were what finally made changes feel safe.

Tooling is the language. Nobody judges a language by its grammar. They judge it by the error message on their first typo, by whether the formatter agrees with them, and by whether go-to-definition works. Those took more effort than generics did.

Write the boring parts in the language. Moving the runtime into BPL, and then writing a 48,000-line application in it, found more rough edges than any test I had written, because I was suddenly a user and not just the author.

What's next#

The roadmap is deliberately unglamorous: fuzz stability, a sturdier WebAssembly toolchain, and package and import reliability. The C export path and the new standard library both need to become as solid as the compiler underneath them. New syntax is the lowest priority.

The source is on GitHub. If you are curious how a compiler works from end to end, or you just want to see what a year of evenings on a hobby language looks like, have a look around.