Draft:U9
From Esolanging
Jump to navigationJump to search
U9 is an esoteric programming language by User:AnalysisOfVariance in 2026. It is a hyper-extension of HQ9+.
Overview
The program starts out with one thread and halts when there are no more threads running.
Each thread has an unbounded signed integer accumulator, as in HQ9+.
Lone expressions' values are printed, as to maintain compatibility with HQ9+.
Primary expressions
| Command | Name | Description |
|---|---|---|
H
|
Hello, world! | Returns the string "Hello, world!" |
Q
|
Quine | Returns a string containing the entire program's source code. |
9
|
99 bottles of beer | Returns a string containing the lyrics to 99 bottles of beer. By default, it uses "1 bottle" and "No more bottles" and this last verse:
No more bottles of beer on the wall, No more bottles of beer. Go to the store, buy some more, 99 bottles of beer on the wall. |
+
|
Increment accumulator | Increments the unbounded accumulator belonging to this thread. |
-
|
Decrement accumulator | Decrements the unbounded accumulator belonging to this thread. |
4
|
Random Number Generator | Returns 4. |
F
|
Fibonacci function | Returns the nth term of the Fibonacci sequence (starting at F0 = 0 and F1 = 1) where n is the value of this thread's accumulator. If the accumulator is negative, returns null. |
Examples
Hello, world! program
H
Quine
Q
Non-cheating quine:
Hello, world!
99 bottles of beer
9
Increment the accumulator
+
XKCD Random Number
4