Show HN: Nibble

TL;DR

Nibble is a newly introduced C-like language focused on LLVM IR generation without external dependencies. It supports features like recursion, pointers, and graphical demos. Its development highlights new approaches to compiler design.

A developer has introduced Nibble, a C-like systems programming language built in 3000 lines of C, aimed at demonstrating LLVM IR generation without external dependencies or heap allocations. The project is shared on Hacker News, highlighting its design and capabilities.

Nibble supports a range of features including defer, recursion, multiple data types (integers, floats, booleans), structs, GLSL-like struct operators, pointers, function pointers, branching, loops, and type checking. It also offers basic C interoperability via generic pointers and produces reasonable error messages. The language is demonstrated through four graphical demos, which include multithreaded shader-like rendering, a red-black tree implementation, and a simple game programming setup.

The compiler compiles top-down in a single pass and uses allocas freely, even within loops, which simplifies readability but can cause stack overflows with certain Clang optimizations. The developer notes that the design intentionally favors simplicity over compatibility with some backend optimizations, and considers the compiler momentarily complete after exploring LLVM’s features.

Why It Matters

This development matters because Nibble represents an experimental approach to systems programming language design, emphasizing minimal dependencies and direct LLVM IR generation. Its graphical demos showcase practical applications and performance considerations, potentially influencing future compiler or language development. It also highlights ongoing challenges in balancing language simplicity with compiler optimization compatibility.

LLVM Techniques, Tips, and Best Practices Clang and Middle-End Libraries: Design powerful and reliable compilers using the latest libraries and tools from LLVM

LLVM Techniques, Tips, and Best Practices Clang and Middle-End Libraries: Design powerful and reliable compilers using the latest libraries and tools from LLVM

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Developed by an individual developer and shared on Hacker News, Nibble builds on existing trends in language experimentation and LLVM-based compiler design. The project arises amid broader interest in minimal, efficient languages for systems programming and graphics programming. Prior efforts in similar domains include projects like Zig, D, and various LLVM front-ends, but Nibble distinguishes itself through its minimal C foundation and focus on IR generation without external dependencies.

“Nibble compiles top down in a single pass and allocas freely, even within loops, by design.”

— the developer

“I have been meaning to explore stacksave/stackrestore but my LLVM curiosity has more or less been satisfied.”

— the developer

Code: The Hidden Language of Computer Hardware and Software

Code: The Hidden Language of Computer Hardware and Software

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 Nibble will perform in more complex or real-world applications beyond the initial demos. The developer notes potential stack overflow issues with certain compiler optimizations, and broader community testing and feedback are still pending.

ELEGOO Mega R3 Project The Most Complete Ultimate Starter Kit with Tutorial Compatible with Arduino IDE

ELEGOO Mega R3 Project The Most Complete Ultimate Starter Kit with Tutorial Compatible with Arduino IDE

The ELEGOO MEGA2560 complete starter kit includes over 200pcs premium components, and is compatible with Arduino kits

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Future steps include refining the compiler to handle more complex scenarios, addressing stack overflow issues, and potentially expanding documentation and community engagement. The developer may also explore deeper LLVM backend interactions and optimization strategies.

Modern CMake for C++: Effortlessly build cutting-edge C++ code and deliver high-quality solutions

Modern CMake for C++: Effortlessly build cutting-edge C++ code and deliver high-quality solutions

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, various data types, structs, pointers, function pointers, branching, loops, type checking, C interoperability, and graphical demos.

How does Nibble generate LLVM IR?

It compiles in a single top-down pass, directly generating LLVM IR without relying on external dependencies or heap allocations.

What are the limitations of Nibble?

It can cause stack overflows with certain Clang optimizations and is currently limited to the features demonstrated in initial demos. Broader application testing is still needed.

Is Nibble suitable for production use?

Currently, Nibble appears to be experimental and primarily a proof of concept. Its stability and performance in production scenarios are yet to be established.

You May Also Like

Most In-Demand Programming Languages of 2025

In 2025, Python, JavaScript, and Go remain the most in-demand programming languages.…

Jarred tried rewriting Bun in Rust and it passes 99.8% of the existing test suite we’re not being ambitious enough

Jarred’s effort to rewrite Bun in Rust successfully passes 99.8% of the test suite, signaling significant progress in performance and stability.

Top 10 Github Repositories to Learn From in 2026

In 2026, exploring top GitHub repositories helps you discover best practices, effective…

HeidiSQL – Lightweight MariaDB, MySQL, SQL Server, PostgreSQL and SQLite Manager

HeidiSQL, a popular lightweight GUI for managing multiple databases, continues development for MariaDB, MySQL, SQL Server, PostgreSQL, and SQLite, with recent updates and ongoing improvements.