The FizzBuzz programming language
C Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

The FizzBuzz programming language is a special-purpose language specifically created to solve the FizzBuzz problem.


The language was inspired by my own 99 programming language and by my fizzbuzz-polyglog project. Students of the 99 language will note a remarkable similarity in syntax.

It is not suitable for the 99 Bottles of Beer web site. I may eventually devise a hybrid of the FizzBuzz and 99 programming languages.

The language definition is relatively straightforward.


  • A FizzBuzz program consists of a single text file.

  • On each line, everything from a # character to the end of the line is ignored, i.e., comments are introduced by # characters. (Unlike some other languages, # characters within character constants and string literals are not an issue.)

  • After comments are stripped, leading and trailing white space are ignored.

  • Empty lines are ignored.

  • Anything not ignored is a syntax error.


  • A syntactically valid FizzBuzz program, when executed, prints exactly 100 lines of output as specified by the FizzBuzz problem.

This distribution includes a FizzBuzz interpreter fizzbuzz, written in Perl 5, another implementation of the interpreter, fizzbuzz_interp.c written in C, two sample FizzBuzz program, fizzbuzz.fizzbuzz and empty.fizzbuzz, and a sample output file, fizzbuzz.fizzbuzz.out. The interpreter can read its input either from a file named on the command line, or from standard input if no arguments are given. The interpreter implements a language extension, permitting multiple input files to be treated as a single FizzBuzz program; this extension is not supported by the language definition, as no actual use for it has been discovered.

For your convenience, most systems already include a sample FizzBuzz program, typically called /dev/null (on Unix-like systems), NUL: (CP/M, MS-DOS and Windows), NIL: (Amiga), NL:, or NLA0: (OpenVMS).