OrdinalFuck
Paradigm(s) | Imperative |
---|---|
Designed by | SpencerW |
Appeared in | 2021 |
Computational class | Uncomputable |
Major implementations | Unimplementable |
File extension(s) | .txt |
OrdinalFuck is a hypercomputable programming language. It is a brainfuck derivative with the ability to solve the Halting problem. OrdinalFuck was inspired by and takes influence from Hyperon.
Memory
The memory system is similar to brainfuck. There is a bi-infinite tape of memory locations. Different from brain fuck however each of these locations can store an ordinal number. For set-theoretic reasons, we will consider OrdinalFuck to actually be an infinite class of programming languages called OrdinalFuck_n where n is an ordinal number and the largest ordinal aloud in that language. If a spot in memory is incremented larger than its largest ordinal it will wrap around back to 0.
Instructions
There are two families of instructions in OrdinalFuck. The first are those from brain fuck. They are listed here for reference.
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 (if limit ordinal do nothing) |
.
|
Output the ordinal signified by the cell at the pointer |
,
|
Input a ordinal and store it in the cell at the pointer |
[
|
Jump past the matching ] if the cell at the pointer is 0
|
]
|
Jump back to the matching [ if the cell at the pointer is nonzero
|
The next set of commands are specific to OrdinalFuck_n. They are both forms of brackets that are put on the outside of strings of code.
Command | Description |
---|---|
(*)
|
Run the code written as * infinitely over a blank tape. Write the supremum of all the ordinal numbers written on that tape to memory at the current location. |
{*}
|
open up an instance of OrdinalFuck_m (where m is the ordinal at the current memory position) and run the code writen as * on it. If the code terminates increment the curent memory position, else dont. |