Ixux is an object-oriented esolang by User:BoundedBeans inspired by Unix/Linux commands.
/usr/../ refer to local variables, paths of the format /bin/../[uppercase hex string or +]/[string without slash]/f refer to a field access of an object (the hex string, or + for the current object) with field name (the other string). The path /bin/../G is for the return value of a method, settable within that method. Paths following the format /bin/../G/[path] refer to global variables. Paths named /bin/../H[DecimalNumber] refer to zero-based parameters to a method. The path /bin/../I contains the number of parameters represented as a decimal string. Some special variables have paths as files in the directory /bin/../Ixux/. Extension special variables can use /bin/../IxuxE//dev/stdin, /dev/stdout, and /dev/stderr automatically jump past the device files and directly print/input it, which means it won't require root permissions.Ixux has significant whitespace, where each level should be exactly four spaces indented from the last.
A class is written like:
?CLASS? @ClassName@
?METHOD? @MethodName@
*code*
?METHOD? @AnotherMethod@
*code*
A class must have a method named @Init@ that creates the object based on the parameters.
A special syntax exists for a line that activates on any line containing exactly three exclamation points.
Ignored!number of preceding spaces!line contents!ignored
For example:
A comment!8!{ECHO} [486921] => [2F7573722F2E2E2F610A]!Another comment
/bin/../Ixux/Commands is an @Ixux_Dict@ with @Ixux_Function@ values, which can be used for custom commands of the format {[name]} [parameter]*. The default commands aren't included in here, and neither is anything else at the start, but you can both add new commands and override old ones using this. The function will receive an @Ixux_Dict@ of all the local variables of the caller as its 0th argument, which can be modified to change the values. The remaining arguments will be passed from index 1 and onward.Special classes and methods have names starting with Ixux_ or IxuxE_, which are reserved. Ixux_ is for official functionality while IxuxE_ is for extensions.
The only statement is the assignment statement, written as:
(Command) => (file path as hex string)
: @[MethodName]@ [ObjectPath] [ParameterPath]*
|
Calls a method on the object with parameters. |
. @[ClassName]@ [ParameterPath]*
|
Constructs an object with the @Init@ method. |
{ECHO} [Argument]*
|
Returns the arguments, separated by byte 32, followed by byte 10. If one of the arguments is "-n", it is ignored and byte 10 is not added to the end. |
{CAT} [Argument]*
|
Linux cat with support for -AbeEnstTuv. Does not support long options. Returns the output. |
{CUT} [Argument]*
|
Linux cut with support for -bcfds and --output-delimiter=string. Returns the output. |
{PASTE} [Argument]*
|
Linux paste with support for -d. Returns the output. |
{XXD} [Argument]*
|
Linux xxd with support for -abcEglprsu. Long options not supported. Returns output. |
{HEAD} [Argument]*
|
Linux head with support for -cn and negative numbers for the values of those options. |
{RM} [Argument]*
|
Linux rm with support for -rf. Long options and -R not supported. Returns output. |
^[FilePathHex]
|
Evaluates the contents of the file or variable as a line of code. |
| [CommandInNestableAngleBrackets]+
|
Makes a chain of piping outputs to inputs. Returns output of the final command. |
% [FilePath1] [FilePath2] ~[LabelName]~
|
If the two variables are equal, goto the command after the ~~ command with the same label name and return the empty string. Otherwise, just return the empty string. |
~[LabelName]~
|
Label placeholder, when encountered (such as by advancing from the previous command), return the empty string. |
?CLASS? @StartClass@
?METHOD? @Init@
{ECHO} [48656C6C6F2C20776F726C6421] => [2F6465762F7374646F7574]
?CLASS? @StartClass@
?METHOD? @Init@
{HEAD} [2D63] [31] [2F6465762F737464696E] => [2F7573722F2E2E2F7472757468]
{ECHO} [2D6E] [30] => [2F7573722F2E2E2F31]
% [2F7573722F2E2E2F7472757468] [2F7573722F2E2E2F31] ~Zero~ => [2F7573722F2E2E2F6A756E6B]
~Loop~ => [2F7573722F2E2E2F6A756E6B]
{ECHO} [2D6E] [31] => [2F6465762F7374646F7574]
% [2F7573722F2E2E2F31] [2F7573722F2E2E2F31] ~Loop~ => [2F7573722F2E2E2F6A756E6B]
~Zero~ => [2F7573722F2E2E2F6A756E6B]
{ECHO} [2D6E] [30] => [2F6465762F7374646F7574]