Nibbles Home

Nibbles is a code golf language for mortals (it aims to be good at code golf while remaining relatively simple). It is also purely functional, statically typed, and fully lazy. Syntax is Polish (prefix) notation. Each instruction is half a byte when automatically converted from ascii to the binary form.

Currently there are 86 ops which is far fewer than other competitive competitive golf languages which are typically around 400 ops. There are some special rules explained in minutiae, but overall the core language is simple too. Most of the work on the implementation is for static type analysis, error handling, and managing the automatic conversion between the literate and binary form. Things that you don't have to think about!

In my experience on golf.shinh.org nibbles is shorter than GS2 and Jelly about 75% of the time. It is also much easier to write thanks to optional identifiers in the literate form.

Example: FizzBuzz

This program appears as 28 characters here, but each takes only half a byte in the binary form (except for the digits and string text). It is trivially encoded as 18 bytes. That's pretty decent considering 8 of those bytes are for the text FizzBuzz.

$?,:^-~%$3"Fizz"^-~%$5"Buzz"

Resources

The tutorials can teach you the language.

Also check out the Why page if you're interested in the ideas behind Nibbles.

Where to Golf?

Good places to use Nibbles for competing online are:

Feedback?

Bug reports, pain points, suggestions, and code reviews are appreciated (I'm new to Haskell), make a push request or email me at image of email

News