Arís

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.
This article is a stub, which means that it is not detailed enough and needs to be expanded. Please help us by adding some more information.

Arís (Irish Gaelic for "when", [əˈɾʲiːʃ] "uh-REESH") is an esoteric programming language made by Nurdle. Arís is based off the timeline concept of Cathain, the main difference is that Arís grants control over the timelines.

Syntax

The Initial state is ff.

Text Manipulation

All text replacements must be two hexidecimal numbers (can be any length) seperated by whitespace. ff 00, f 00, fffffff 0000003 are all valid, while p isn't.

Tempval

There is also another allowed character: $ which is the tempval, the tempval acts like a pointer to matches, $ ff points to all instances of ff in the current string's state, even if said instances change $ won't update until you set it again. ff $ replaces every instance of ff with the current tempval value. ff l$ replaces every instance of ff with the number of matches of the tempval in hexidecimal.

Ranges

You can restrict a command's effect using parenthesis, (0xFF) would only allow an operation to effect the hexidecimal digit at 255 in the string (limiting to nibble 255, so to speak). (0x00-0xFF) restricts an operation to the characters between 0 and 255 in the string.

Input

You can use % which will be replaced with user input (ascii codes in hexidecimal) when it is reached, you can simply do % which will just insert into the string (replaces anything in its way). ff % will replace any instance of ff in the string with the user's input (it replaces them in order from the first instance to the last instance, if it runs out of characters from the user's input then it just uses 00.

Special Operations

; BREAK #(timeline id) ; ends a timeline if its id is equal to the given id (only if it is run by said timeline). ; COLLAPSE ; ends a timeline if it is run. ; out (output) ; writes the ascii equivalent of its input to the console, if given $ as an input then it outputs the value of every match (does update the value of the matches), if given a range as input then it will output only what is in that range.

Goto Labels

Goto labels are defined using [ Label_Name ] where the only characters that aren't allowed being whitespace and square brackets. you can call them using goto @(label)

Timestamps

In Arís, there are special labels called "timestamps", they are defined by typing three colons around the name of the timestamp. ::: timestamp_name :::, The only characters that aren't allowed being whitespace and colons. Though timestamps seem similar to goto-labels, they act very differently, when you call a timestamp, you must use either ; new_to @(name) ; or ; new_from @(name) ;. new_to creates a timeline where the state is whatever the state was when that timestamp was declared, while new_from applies all the commands after the timestamp to the initial state (does not read commands that haven't been read by the calling timeline)

ff aa
::: x :::
aa af
; new_to @x ;
f  0

gives us two timelines:

Timelines
Timeline 1 Timeline 2
aa ---
af aa
a0 aa

as you can see, Timeline 2 skipped aa af now if we instead use new_from

ff aa
::: x :::
aa af
; new_from @x ;
f  0

we will get:

Timelines
Timeline 1 Timeline 2
aa ---
af ff
0f 00

since Timeline 2 didn't run ff aa, aa af didn't do anything to its string.

Essentially new_to skips all the code after the timestamp, while new_from skipps all the code before the timestamp. Timelines act as the only way to compare values for conditions.

ff 30
::: x :::
%
; new_to @x ;
; if #0 #1 are EQ ;
; then out 30 ;

The code above prints "0" only if the user gives "0" as input. #0 gets the current state of the first timeline, $0 gets the current value of the tempval of the first timeline.

Examples

Truth Machine

ff 30
::: x :::
%

; new_to @x ;
; if #0 #1 are EQ ;
; BREAK #1 ;
; then goto @zero ;

[ one ]
; out 31 ;
; goto @one ;


[ zero ]
; out 30 ;

Computational Class

Arís has a theoretically infinite tape that can be accessed arbitrarily, and internal logic aswell, therefore it is Turing-complete

See Also