btrc – C, but better. Built with AI in just a few weeknights
btrc is a statically-typed language that transpiles to C11. It adds classes, generics (monomorphized), type inference, lambdas, f-strings, collections (Vector, Map, Set), threads, GPU compute via WebGPU, ARC memory management, exception handling, and a standard library — while generating strict C11 with no runtime, no GC, and no VM. The compiler is a 6-stage Python pipeline (lexer → parser → analyzer → IR gen → optimizer → C emitter) driven by a formal EBNF grammar and an algebraic AST spec (Zephyr ASDL). The generated C is readable and linkable with any C11 compiler. It ships with a VS Code…
What it does
In the maker’s words, at launch
btrc is a statically-typed language that transpiles to C11. It adds classes, generics (monomorphized), type inference, lambdas, f-strings, collections (Vector, Map, Set), threads, GPU compute via WebGPU, ARC memory management, exception handling, and a standard library — while generating strict C11 with no runtime, no GC, and no VM. The compiler is a 6-stage Python pipeline (lexer → parser → analyzer → IR gen → optimizer → C emitter) driven by a formal EBNF grammar and an algebraic AST spec (Zephyr ASDL). The generated C is readable and linkable with any C11 compiler. It ships with a VS Code extension (LSP with completions, diagnostics, go-to-def, hover) and 930 tests. I've wanted to build something like this for about 10 years, but it was always too ambitious of a project to do on the side. With AI, I was able to build it over a handful of evenings after work, which is really wild. Some things worth noting: A few things that I find fun / interesting / noteworthy: - The EBNF grammar and ASDL spec are the single source of truth — the lexer, parser, and AST node classes are all derived from them, not hardcoded - Generics are monomorphized (like C++ templates / Rust), so zero runtime overhead but binary size grows per type combination - ARC handles most memory management including cycle detection and cleanup on exceptions — no GC, deterministic destruction - The entire stdlib (collections, math, datetime, IO, threading) is written in btrc itself - @gpu functions transpile to WGSL compute shaders with auto-generated WebGPU boilerplate — array params become storage buffers, scalars become uniforms - The generated C is meant to be readable — you can step through it in gdb/lldb and it mostly makes sense (just verbose with lots of underscores) - There's a 3D game engine example (ball + WASD + jump + shadows + raymarching) that's ~570 lines of btrc across 11 small modules - The VS Code extension reuses the compiler's own lexer, parser, and analyzer — diagnostics match exactly what the compiler reports - btrc inherits C's memory model wholesale — no borrow checker, no lifetime analysis. You can absolutely still shoot yourself in the foot - The whole thing was built in a few evenings after work with heavy AI assistance, which felt like the most interesting part of the project honestly
Does the same job
all alternatives →- SHShivyC – Hobby C compiler created in Python2018 · github.com · ▲120
- APA Python with Hindley-Milner-like type annotations, compiling to C2015 · github.com · ▲134
- ASA systems language with runtime reflection and no GCDec 2025 · xxml-language.com · ▲6
Hi HN, I’ve been working on an experimental programming language called XXML. The project started from a frustration I kept running into across systems languages: Languages with strong ownership tend to avoid runtime reflection. Languages with rich reflection usually rely on GC or give up memory guarantees. Compile-time code generation often requires a separate macro language. I wanted to explore whether those tradeoffs are truly necessary. What XXML is trying to do XXML is a statically-typed, native language that: Uses explicit ownership and borrowing (no garbage collector) Supports runtime…
- XCxocc – C compiler based on BSD license2021 · ▲39
Hello everybody, I'm glad to announce the major release of xocc C compiler, 1.2.1, based on BSD license. xocc is a C compiler that based on XOC infrastructure, XGEN code generator and XOCFE C frontend. Both xocc, XOC, XGEN, and XOCFE are based on BSD license. XOC provides multi-level IRs, flexibility, and the capability of representing almost all popular languages. There are mainly two level IRs used throughout all phases of the compilation. In addition to basic IR, XOC also provides IR builder, BB manipulating api, Control Flow Graph(CFG), IR lowering, Control Dependent Graph, Dominator…
- AAAn application stack Claude coded directly in LLVM IRMar 2026 · github.com · ▲10
This repo is the result of a debate about what kind of programming language might be appropriate if humans are no longer the primary authors. Initially the thought was "LLMs can just generate binaries directly" (this was before a more famous person had the same idea). But that on reflection seems like a bad approach because languages exist to capture program semantics that are elided by translation to machine code. The next step was to wonder if an existing "machine readable" program representation can be the target for LLM code generation. It turns out yes. This project is the result of…
- SDSpec-Driven Development Workflow for Claude CodeMay 2026 · ▲20
Spec Driven Development approach allows to squeeze more from coding agents thanks to few strong concepts: - decomposition across two dimensions. first you generate specs in multiple steps (requirements, code analysis, design), than you split task into multiple subtasks and implement them one by one - you clear context between every step - after spec generation and after subtask implementation. this helps keep cost low and context clear and focused which boost performance - specs written to disk help with information persistency - delivering specs layer by layer help to catch early when agent…
More ai this month
the category →
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com
Astute▲585Automate your B2B brand going viral, with new media creators
AI · 18d ago · company-app.joinastute.com


Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…
AI · 27d ago · cactuscompute.com


Launched alongside, March 2026
the whole month →

Switch from ChatGPT to Claude with import memory feature
AI · Mar 2026 · claude.com


