Skip to content
Tech News
← Back to articles

Show HN: Nibble

read original more articles
Why This Matters

Nibble is a lightweight, C-like systems programming language designed to generate LLVM IR without external dependencies or heap allocations. Its features support advanced programming constructs and graphical demos, showcasing its potential for systems and graphics programming. This development could influence future language design and tooling for performance-critical applications.

Key Takeaways

Nibble is C-like systems programming language.

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 these four demos, two demos are multithreaded software renditions of popular shader-toy demos, one demo is a demonstration of a red-black tree implementation, and the final demo demonstrates a basic setup for game programming.

Thoughts