XENBLN is a code-golfing language created by User:PythonshellDebugwindow. It uses a character encoding based on the first 256 Unicode characters, but with non-printing characters replaced.
- 1 Etymology
- 2 Program structure
- 3 Storage
- 4 Commands
- 5 Datatypes
- 6 I/O Capabilities
- 7 Examples
- 7.1 Cat (1 byte)
- 7.2 Hello, World! (1 byte)
- 7.3 Quine (1 byte)
- 7.4 Infinite cat (2 bytes)
- 7.5 Infinite loop of nops (2 bytes)
- 7.6 Reverse cat (2 bytes)
- 7.7 Loop while no input (3 bytes)
- 7.8 Truth-machine (3 bytes)
- 7.9 Reversed iotas (6 bytes)
- 7.10 Loop until the user says "stop" (case-insensitive) (9 bytes)
- 7.11 Mean of array (stored in variable a) (12 bytes)
- 7.12 Interpret PlusOrMinus (29 bytes)
- 7.13 Interpret Deadfish (probably) (35 bytes)
The name "XENBLN" is the capitalized Latin-alphabet lookalikes (kind of) of the Cyrillic letters of the Russian transliteration (kind of) of "Jelly" (which is "Желлый"), another code-golfing language.
Like @, a program in XENBLN is made of trees of function calls (with some exceptions). Each character (with some exceptions) represents a function that may take as many or few arguments as it likes. Arguments are then read from directly after it in the code.
For example, if command A takes 1 argument, B takes 2, C takes 3, and D and E both take none, then the XENBLN code
would be written in many languages like
B(A(D()), C(D(), B(E(), D()), E()))); D(); A(E());
Command arguments are evaluated RTL, but commands are executed LTR, except for in special cases like loops and if(/else) statements. While
+a÷bc (infix x
a+(b÷c)) are both valid, the latter is preferred.
The main method of storage in XENBLN is the Array (not to be confused with the array data types), which is like a stack but much more convenient as you can insert, remove, and change elements at all indexes. It also has a variable system (for example,
$a123 would set variable
a to 123,
$+a100 would increment
a by 100, and
a would return its value); the main six are
n are intended for use in functions, but it really doesn’t matter what you use them for), but all unassigned characters can be used as variables as well.
Right now, I’m keeping all the commands on a Google Doc. XENBLN uses 256 characters, not all of which are assigned to, and will take up only as many characters as it does bytes. I copied the doc's current state to Pastebin on March 19, 2020. I won't put it here due to its length.
Here is a table of conversions.
﹡ If no digits are provided on one or both side(s) of the decimal point, that number is assumed to be 0, e.g.
﹡﹡ Escape characters in strings are as follows: \\ for a backslash, \" for double quotes, \n for newline, \t for tab, \f for form feed, \« (« = string separator) for the character «, and anything else after a backslash means that backslash will be replaced by \\ (escaped backslash). Also, if EOF is reached before a string is terminated, then it will be terminated automatically, meaning that the EOF string regex is
, character to separate two numbers in XENBLN, e.g.
[123,456,7.89"str) would in many languages be
[123, 456, 7.89, "str"].
o, etc. represent numbers — these three represent -1, 0, and 1 respectively. There are number, string, and array constants.
There are multiple ways to get input in XENBLN, with different purposes. The
I command (0 args) returns user input as an arbitrary-length string (or empty string if no input is given); the
N command (0 args) returns user input as an arbitrary-size integer (or 0 if no input is given or if an invalid int/float/double is given); the
M command (0 args) returns user input as a float/double or 0.0 if no input or invalid int/float/double; the
Ì command (1 arg) returns user input as an integer or 0 if no input or invalid int/float/double, but its argument is first printed out without a newline like a prompt; the
ì command (1 arg) returns user input as a string or empty string if no input, but its argument is first printed out without a newline like a prompt; and the
í command (1 arg) returns user input as a float/double or 0.0 if no input or invalid int/float/double, but its argument is first printed out without a newline like a prompt.
Like with input, there are multiple commands for output in XENBLN. The
O command (1 arg), which outputs its argument and a newline, but has been rendered obsolete (see Automatic output, below), is perhaps the simplest of these; the
Œ command (1 arg) outputs its argument without a newline; the
Ø command (1 arg) outputs its argument with a newline and then returns it; and the
ø command (1 arg) outputs its argument without a newline and then returns it.
If a non-undefined value is computed and is not an argument to a function, it is output with a newline, meaning the
O command (1 arg) is only needed for outputting undefined (or possibly so) values.
Cat (1 byte)
Hello, World! (1 byte)
Quine (1 byte)
Infinite cat (2 bytes)
Infinite loop of nops (2 bytes)
Reverse cat (2 bytes)
Loop while no input (3 bytes)
Truth-machine (3 bytes)
Reversed iotas (6 bytes)
Loop until the user says "stop" (case-insensitive) (9 bytes)
Mean of array (stored in variable
a) (12 bytes)
Interpret PlusOrMinus (29 bytes)
Interpret Deadfish (probably) (35 bytes)