XENBLN is a code-golfing language created by User:PythonshellDebugwindow.
- 1 Etymology
- 2 Program structure
- 3 Datatypes
- 4 I/O Capabilities
- 5 Examples
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. 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 code
in XENBLN 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.
﹡ 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 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.
Hello, World! (1 byte)
Quine (2 bytes)
Infinite loop of nops (2 bytes)
Cat (1 byte)
Infinite cat (2 bytes)
Reverse cat (2 bytes)
Truth-machine (3 bytes)
Loop until the user says "stop" (case-insensitive) (9 bytes)
Mean of array (stored in variable
a) (12 bytes)