Timeline
Paradigm(s) | imperative |
---|---|
Designed by | User:Undalevein |
Appeared in | 2025 |
Memory system | variables |
Dimensions | two-dimensional |
Computational class | Unknown |
Major implementations | Official |
Influenced by | Befunge |
File extension(s) | .timeline |
Timeline is an esoteric programming language created by User:Undalevein in January 2025. Aimed to be a language that is both difficult to read and difficult to comprehend, the design of Timeline was first conjured as a "3-dimensional programming language in a 2-dimensional projection."
Taking some inspiration from Befunge, programmers control a data pointer that points to a section in your code. The data pointer can pick up items from infinity cells in which the accumulator that automatically stores and evaluates data and operators inside it. To get access to different values or operators, you must travel downwards and only downwards to get what you want.
Language Overview
Data Pointer
Similar to Befunge, Timeline uses the same date pointer rules.
The data pointer starts at row 0, column 0 of your code, or the top left corner of the file. It will travel right by default, and it will keep moving right until it gets redirected by a character command.
The program begins by first performing an action on the character the data pointer is looking for act, then evaluates the accumulator, then moves, and then it will repeat the process until it is terminated by the X
character command. If a data pointer reaches either ends of the row or column and steps out of bounds, it will loop around that same line or column.
Layers
When a program runs, the data pointer will begin at layer 0.
The data pointer can go down the next layer by 1 when it interprets the @
character command. Simultaneously, it will also affect Infinity Cells.
Infinity Cells are characters where they will offer the data pointer a value depending on which layer the data pointer is located in. Take the character D
as an example where it holds digit characters 0
to 9
then repeats. If the data pointer is at layer 0, then it will get 0
into the accumulator and if the data pointer is at layer 1, then it will get 1
and so on and so forth. Until the data pointer is at layer 10 is where the digits the accumulator can get wraps around, in which case the data pointer will receive 0
again if pointed.
Accumulator
When a data pointer reads an Infinity Cell, it will store that value collected into an accumulator (excluding the Infinity Cells that redirect your pointer). The accumulator stores 3 items: a left-value, an operator, and then a right-value. The accumulator begins filling up the left-value, then the operator, then the right-value.
The left-value and right-value are, internally, string type. However, they can behave similarly to other data types like integers, floats, or Booleans. So, if you concatenate 1
and 0
to make 10
and then add it with 1
, then it will be evaluated to 11
.
The operator can only get operator types, and they can be either unary or binary operators.
If the left-value or right-value is given an operator type or the operator is given a string type, then the accumulator will become amorphous. This means that the accumulator, if received any more items, will automatically evaluate as amorphous. It will remain amorphous until the accumulator is cleared by the clear character command ?
or this print cell .
.
After evaluating the cell the pointer is on, the accumulator automatically evaluates before moving to the next character. It evaluates under the following conditions:
- If there's only the left-value (left-value is not empty), then no evaluation will be made.
- If there's a left-value and a unary operator, then an evaluation will be made.
- If the left-value is incompatible with the operator (i.e. negating `"HELLO!"`), then the accumulator becomes amorphous.
- If the left-value is compatible with the operator, it will perform the evaluation and save the result to the left-value and then removes the operator from the accumulator.
- If there's a left-value and a binary operator but the right-value is empty, then no evaluation will be made.
- If there's a left-value, a binary operator, and a right-value, then an evaluation will be made.
- If either value is incompatible with the operator (i.e. adding
"M"
to"9"
), then the accumulator becomes amorphous. - If both values are compatible with the operator, it will perform the evaluation and save the result to the left-value and then removes the operator and the right-value from the accumulator.
- If either value is incompatible with the operator (i.e. adding
Types
Numbers
Although everything is a string, they can still be interpreted as integer or float types. When evaluating using operators that require integers or float values, it will first evaluate the values as integers (if available) and the evaluate the values as floats.
A string is inferred as an integer if all of characters are digit character. A string can still be an integer if the first character is a minus symbol, but it must have digit characters after it.
Examples of integers: 154
, -4231
A string is inferred as a float if all characters are a digit character and exactly one period somewhere in the string. Like the integer, a string can still be a float if the first character is a minus symbol, but it must have digit characters and a dot after it.
Examples of floats: 356.0
, -0.1
Booleans and Truthiness
Booleans are "TRUE"
and "FALSE"
. These are results after using a successful relational operator evaluation.
Technically, you can make the word "FALSE"
and it will be considered as false internally, though I am not sure why you want to do that.
In some scenarios when a Boolean is required, the interpreter will evaluate things as truthy or falsy. Everything is considered truthy except for the following:
- The left-value is
"FALSE"
(all capitalized). - The left-value is a null character
\0
(only obtained through stdin input). - The left-value is empty.
- The accumulator is amorphous.
- The accumulator contains a binary operator that it can't evaluate yet.
However, these below are not considered falsy.
- Left-value is
"AMORPHOUS"
, including its lowercase variations, but the accumulator itself is not amorphous. - Left-value is
"NULL"
or"EMPTY"
, including their lowercase variations, but the accumulator is not actually empty. - Left-value is
"0"
(or only zero characters). - Left-value is any of the lowercase variations of
"FALSE"
.
Command List
Below are the characters that are used in the program. Any other character not listed are considered comment characters.
Infinity Cells
Infinity cells are cells that contain all of the necessary values and operators that can perform computation. Additionally, there are characters that changes the direction of your data pointer. If your data pointer is pointing at one at a given moment, it will add that item to your accumulator based on your layer number.
Character | Term | Order |
---|---|---|
A |
Booleans | TRUE → FALSE → ...
|
B |
Boolean Operators | not → and → or → ...
|
C |
Concatenation Operators | concat → repeat → ...
|
D |
Digits | 0 → 1 → 2 → ... → 8 → 9 → ...
|
E |
Relational Operators | == → != → < → <= → > → => → ...
|
I |
Stdin Input | Stdin[0] → Stdin[1] → ... → Stdin[n] → \0 → ...
|
L |
Lowercase Letters | a → b → c → ... → y → z → ...
|
M |
Arithmetic Operators | + → - → * → / → ** → % → negation → ...
|
N |
Bitwise Operators | ~ → & → | → << → >> → >>> → ...
|
R |
Estimation Operators | round → ceil → floor → trunc → ...
|
S |
Symbols | ! → " → # → $ → % → & → ' → ( → ) → * → + → , → - → . → / → : → ; → < → = → > → ? → @ → [ → \ → ] → ^ → _ → ` → { → | → } → ~ → ...
|
T |
Trigonometry Operators | sin → cos → tan → csc → sec → cot → ...
|
U |
Uppercase Letters | A → B → C → ... → Y → Z → ...
|
W |
Whitespace | → \n → \t → ...
|
a |
Movement 1 (Changes Accumulator Direction) | LEFT → DOWN → RIGHT → UP → ...
|
b |
Movement 2 (Changes Accumulator Direction) | DOWN → RIGHT → UP → LEFT → ...
|
c |
Movement 3 (Changes Accumulator Direction) | RIGHT → UP → LEFT → DOWN → ...
|
d |
Movement 4 (Changes Accumulator Direction) | UP → LEFT → DOWN → RIGHT → ...
|
Static Cells
Static Cells do not change when going down layers. Unless explicitly specified in the command's description, they will not clear the accumulator.
Character | Description |
---|---|
> |
Turn clockwise unconditionally. |
< |
Turn counterclockwise unconditionally. |
) |
Turn clockwise if the accumulator is true. |
( |
Turn counterclockwise if the accumulator is true. |
@ |
Enter the next layer by 1. |
# |
Hop over the cell in front of you. |
0 |
Storage. Drop a copy of the left-value on the same layer on the character. Won't drop if the accumulator is empty or AMORPHOUS. Will pick up the item to either the left or right value once. Can be reused on the same layer. |
1 |
Storage. Drop a copy of the left-value down 1 layer on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
2 |
Storage. Drop a copy of the left-value down 2 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
3 |
Storage. Drop a copy of the left-value down 3 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
4 |
Storage. Drop a copy of the left-value down 4 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
5 |
Storage. Drop a copy of the left-value down 5 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
6 |
Storage. Drop a copy of the left-value down 6 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
7 |
Storage. Drop a copy of the left-value down 7 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
8 |
Storage. Drop a copy of the left-value down 8 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
9 |
Storage. Drop a copy of the left-value down 9 layers on the character. Won't drop if the accumulator is empty or AMORPHOUS or if a value has already been dropped down before. Will pick up item the item to either the left or right value once. |
? |
Clears the accumulator. |
. |
Prints the left-value from the accumulator only if the value in the accumulator is not AMORPHOUS or unevaluated. If it is AMORPHOUS, it will print AMORPHOUS. If it has not been evaluated, it will print UNEVALUATED. Clears the accumulator afterwards. |
, |
Prints the left-value from the accumulator only if the value in the accumulator is not AMORPHOUS or unevaluated. If it is AMORPHOUS, it will print AMORPHOUS. If it has not been evaluated, it will print UNEVALUATED. |
X |
Terminates the program. |
Examples
Hello, World!
Here's a very inefficient program to print out "Hello, World!"
@@@@@@@U.@@@@@@@@@@@@@@@@@@@@@@@L.@@@@@@@L,.> <@@@@@@@@@@@@@@@@@@@@@@@@@@@@@.W@@.S@@@.L@@@> <U.@@@@@@@@@@@@@@@@@@L.@@@L.@@@@@@@@@@@@@@@@> <@@@@@@@@@@@@@@@@@.L@@@@@@@@@@@@@@@@@@.L@@@@> <@@@@@@@@@@S.X
Cat program
I )X> @.> >
Truth machine
IED)?@b?D.D?d ? D . X
Miscellaneous Program
><<<<<<<<<< W@U@U@U@U@ #.........< < <U9876543210.< ........... XU@U@U@U@U@ >>>>>>>>>>
Above will output the following:
AABACADAEAFAGAHAIAJA