Telifuck
Jump to navigation
Jump to search
Telifuck is a brainfuck derivative with the key difference being that each line teleports to the line corresponding to the value on the pointer when it finishes the command. Also, [] are no longer commands.
(note: lines start at zero; if at the end of the line, the line you would teleport to does not exist, go to line zero instead; if the line you teleport to has no code, terminate program)
(note2: one could parse the entire line as one command because there are no loops within a line)
Command | Description |
---|---|
>
|
Move the pointer to the right |
<
|
Move the pointer to the left |
+
|
Increment the memory cell at the pointer |
-
|
Decrement the memory cell at the pointer |
.
|
Output the character signified by the cell at the pointer |
,
|
Input a character and store it in the cell at the pointer |
Programs
a random program that extends the number of nonzero numbers by 1 every O(sqrt(n)) iterations
+ +>++ +<+ -<+ --->--
Smaller version:
>+ < ->+
Or
+>+ < ->+
+++++++++++++++++++++++++++++++++++++++++++++++++.+..---------------------------------------------<<+++<++ >+++++++>>+ >+++++++>>++ << ->>+ -->>++ <+>--->>+++++++<< <+>---->+>+++>>+++++++<< <++>----->>+++++<< <++>------>++>+++>>+++++<< >++++++++++++++++++++++++++++++++++++++++++++++++.------------------------------------------------
Cat program:
,.>