TL;DR
Nibble is a new systems programming language written in C that demonstrates LLVM IR generation without external dependencies. It supports key features like recursion, pointers, and error handling, with graphical demos illustrating its capabilities.
Developers have introduced Nibble, a C-like systems programming language designed to demonstrate LLVM IR generation without external dependencies or heap allocations, accompanied by graphical demonstrations of its capabilities.
Nibble was written in 3000 lines of C and supports features such as defer, recursion, various data types, structs, pointers, function pointers, branching, loops, type checking, and basic C interoperability. It includes four graphical demos: two multithreaded shader-toy renditions, a red-black tree implementation, and a basic game programming setup. The compiler compiles top-down in a single pass and allows allocas within loops, which simplifies front-end design but can cause stack overflows when optimized by Clang.
The project aims to showcase an approach to generating LLVM IR without relying on external dependencies or heap allocations, emphasizing simplicity and readability. The developer notes that despite the simplified design, issues with stack overflows have been observed under certain Clang optimizations.
Why It Matters
This development matters because it introduces a new approach to systems programming language design focused on minimal dependencies and LLVM IR generation, which could influence future compiler projects. The graphical demos demonstrate practical applications, including shader rendering and data structures, highlighting Nibble’s potential for educational and experimental use in low-level programming.
LLVM IR compiler development kit
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Background
Nibble’s creation aligns with ongoing efforts in the programming community to explore minimalistic, dependency-free compiler design. Its approach to generating LLVM IR in a single pass and supporting advanced features like recursion and pointers reflects current trends in systems programming research. The project builds on existing knowledge of LLVM and C, aiming to provide a simplified yet powerful tool for developers interested in compiler construction and graphics programming.
“Nibble compiles top down in a single pass and allocas freely, even within loops, by design. This simplified front-end design greatly improves main.c readability but causes stack overflows with lower (and sometimes even higher) clang back-end optimizations.”
— the developer
“I have been meaning to explore stacksave/stackrestore but my LLVM curiosity has more or less been satisfied, and I deem this compiler momentarily complete.”
— the developer

The Rust Programming Language, 3rd Edition
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What Remains Unclear
It is not yet clear how well Nibble will perform under various compiler optimizations or how widely it will be adopted. The stack overflow issue under Clang optimizations remains unresolved, and further testing is needed to assess stability and usability in different environments.

Most Complete Starter Kit for UNO R3 Project Electronics Starter Kit with Tutorial Compatible with IDE STEM Projects for Teens Adults Robotics & Engineering Kits Science | Coding | Programming Kit
Includes UNO R3 controller board and USB cable (30cm/11.81inch), compatible with Arduino UNO R3, UNO R4, Arduino kit.
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
What’s Next
The developer plans to explore stack management techniques like stacksave/stackrestore and may continue refining Nibble. Future updates could include addressing optimization issues, expanding features, and more comprehensive documentation or community engagement.

LOW-LEVEL PROGRAMMING WITH C AND ASSEMBLY: Embedded systems performance tuning and OS foundations
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
What are the main features of Nibble?
Nibble supports defer, recursion, multiple data types, structs, pointers, function pointers, branching, loops, type checking, and basic C interoperability. It also includes graphical demos demonstrating its capabilities.
How is Nibble different from other systems programming languages?
It is designed to generate LLVM IR without external dependencies or heap allocations, emphasizing simplicity and readability, with a unique compilation approach that compiles top-down in a single pass.
What are the current limitations of Nibble?
One major limitation is stack overflow issues when compiled with certain Clang optimizations, which can affect stability. Its development is ongoing, and some features may be refined further.
Can Nibble be used for real-world projects?
Currently, Nibble appears more suited for experimental, educational, or demonstration purposes rather than production use, given its experimental nature and known issues.