Nibble
An attempt at a single pass LLVM frontend in ~3000 lines of C without external dependencies, malloc, or an AST. Included are some graphical examples. The IR isn't perfect, and the README touches on one particular downfall
Nibble launched on May 14, 2026 with 102 votes, #308 of 20,538 launches that month and more than 95% of that year's launches.
In plain words
Nibble is a compact LLVM frontend written in approximately 3000 lines of C that operates in a single pass without external dependencies, memory allocation, or an abstract syntax tree. Designed for developers interested in compiler construction, it demonstrates an alternative approach to traditional compiler design. The project includes graphical examples to illustrate its functionality, though the generated intermediate representation has known limitations that are documented in the accompanying README.
written from the facts on this page · September 2026
From the sources
Generating LLVM IR without malloc or external dependencies - GitHub - glouw/nibble: Generating LLVM IR without malloc or external dependencies
Nibble was written in 3000 lines of C to demonstrate an approach to LLVM IR generation without relying on external dependencies or heap allocations. Nibble supports defer, recursion, integer, floating, and boolean types, structs (simply named types), GLSL-like struct operators, pointers, function pointers, branching, loops, type checking, basic C interoperability via generic pointers, and reasonable error messages. Included are these four graphical demos demonstrating Nibble's ability. To try them out, ensure SDL2 is first installed, as well as Clang, and then run make . Clang will compile main.c and output the nibble compiler, and nibble will then compile and run the graphical demos. Of…from github.com
Does a similar job
all alternatives →
A compiler and VM for a simple language, in 150 lines of code2022 · gist.github.com · ▲200A complete compiler for a simple language (in less than 150 LoC) - 00_readme.md
A nibble-oriented CPU in Verilog to build a scientific calculatorMay 2026 · github.com · ▲119The core question: how did HP's scientific calculators actually work at the gate level? That rabbit hole led to building one from scratch. The architectural decision everything else follows from: a decimal calculator should store numbers as BCD — one decimal digit per 4-bit nibble. A standard byte-oriented CPU (Z80, 6502) fights that layout constantly. So I designed a small custom CPU in Verilog where 4 bits is the natural data width and memory is nibble addressable. What the project covers: - Custom CPU: Harvard architecture, 12-bit ISA, 8-state execution FSM, hardware stack guard with a…
- GIGoing into freshman year, figured I should build an interpreter2023 · ▲138
Hi all! I'm going into my freshman year, and figured that the best way to prepare for the intro to programming Racket course would be to implement my own garbage-collected, dynamically typed, functional programming language in C ;) Anyways... here's the repo: https://github.com/liam-ilan/crumb I started learning C over the summer, so I still have a whole lot to learn... Any feedback would be greatly appreciated! :D
A small virtual machine written in C2014 · github.com · ▲212"interesting" VM in C. Let's see how this goes. Contribute to tekknolagi/carp development by creating an account on GitHub.
A hash array-mapped trie implementation in C2023 · github.com · ▲171Long-simmering side project that is finally ready to see the light. HAMTs are a cool persistent data structure and implementing one has been a lot of fun. Beyond the code, there is likely some value in the extensive and largely complete implementation docs; basic benchmarks are linked in the README, too. Kind of aiming to be "the libavl for HAMTs". That is obviously a high and aspirational bar but a distinct possibility if it stirs up a little interest and/or contribution. Anyways, it's time for this to go out, collect feedback and maybe even some use outside of toy projects. Let me…
Kent Dybvig's Scheme Machine in 400 Lines of C (Heap-Memory Model)2025 · gist.github.com · ▲226Heap based scheme machine. GitHub Gist: instantly share code, notes, and snippets.
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 1d ago · permit.petercai.com
- IV
Life & fun · 14d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 14d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 8d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 12d ago · carrierexplode.com

Life & fun · 22d ago · space.bl2.net
Source: Show HN post ↗
Launched alongside, May 2026
the whole month →

Parallel agents, diff reviewer, and multi-model comparisons
Dev tools · May 2026 · kilo.ai



Hey HN, Henry here from Cactus. We open-sourced Needle, a 26M parameter function-calling (tool use) model. It runs at 6000 tok/s prefill and 1200 tok/s decode on consumer devices. We were always frustrated by the little effort made towards building agentic models that run on budget phones, so we conducted investigations that led to an observation: agentic experiences are built upon tool calling, and massive models are overkill for it. Tool calling is fundamentally retrieval-and-assembly (match query to tool name, extract argument values, emit JSON), not reasoning. Cross-attention…
Life & fun · May 2026 · github.com

🌱 Private, quiet space for thinking. Simple app for .md files. - zakirullin/files.md
Dev tools · May 2026 · github.com