What is Unary?
Unary is an esoteric programming language (and numeric encoding system) where everything is represented using just one repeated symbol — typically the character 1, but sometimes |, *, or any single mark. Instead of multiple instructions or keywords, Unary counts meaning by quantity, not structure.
Unary is intentionally inefficient, verbose, and impractical. Even tiny numbers require long sequences of repeated symbols. The language exists as a thought experiment: What does programming look like when syntax is removed entirely and only counting remains?
Specs
Language Type: Minimalist / Experimental
Instruction Model: Single repeated character
Representation: Count-based
Purpose: Study extreme minimalism and encoding
CODE EXAMPLE (Hello World)
A Unary “Hello World” program varies by interpreter. A conceptual example would look like:
111111111111111111111111111111111111111111111111111111
The number of 1s corresponds to an ASCII code table or interpreter mapping.
(Actual programs tend to be extremely long.)
How It Works
- Unary systems represent values by how many symbols appear. Example:
Top comments (0)