Seas
Seas is a 2D esoteric programming language made by User:AmNow and was made for TeamSeas.
Commands
The memory field is an infinite sea with the instruction pointer at 0,0 and moves rightward.
ππππ π³π¦π¦π¦ π¦π¦π¦π¦
Everything outside of a written program is initialized with a space or a random character from the printable ASCII range with a β chance. Program execution ends when the instruction pointer reaches the top of the sea. Every line must be the length of the first one. The first line can only have π (whitespace not allowed).
π¦ - NOP. π - Ends the program, this can only be at the first line. 0οΈβ£ through 9οΈβ£ - Push the corresponding digit to the stack. π ΏοΈ - Pop the top two values on the stack and locate the coordinates in the sea and swap it with the accumulator. π§Ύ - Swap the top of the stack with the accumulator. π‘ - Set the accumulator to 0. π - Clear the entire stack. π - Reverse the stack. π - Move the bottom-most element up to the top. π - Move the top element to the bottom. πβοΈ - Mirrors. π - Pop the top value of the stack, if it is 0, move up, otherwise move down. π - Pop the top value of the stack, if it is 0, move left, otherwise move right. βββοΈβ - Add, Subtract, Multiply and divide on the stack. πΌπ½βοΈβΆοΈ - Rotate the instruction pointer to match which way it is facing. π‘- Input a number and push it. π - Input a Unicode Character and push it. π³ - Pop the top value and output as a number. π - Pop the top value and output as a Unicode Character. βοΈ - Pop and discard. βοΈ - Swap. π§» - Duplicate. π₯€ - Logical NOT the top of the stack.
Programs
Truth-Machine
πππππππ π‘π½π³π¦π¦π¦π¦ π¦βΆοΈππ¦π¦π¦π¦ π¦π¦βΆοΈ1οΈβ£π³1οΈβ£βοΈ
Computational class
Seas can be proven to be Turing-complete by reduction from Reversible StackBit with only 10 instructions and no accumulator (arrows could be replaced by mirrors reducing it by 2 but for simplicity arrows will be used):
ππ¦0οΈβ£1οΈβ£πππ½πΌπ½βοΈβΆοΈ
0
is:
π 0οΈβ£ π¦ π¦
1
is:
π 1οΈβ£ π¦ π¦
~
is:
π π π¦ π¦
*
is:
πππ π½βΆοΈβΆοΈ βΆοΈππ¦ π¦βΆοΈπΌ π¦π¦π¦
[abc]
is:
πππ...πππ π½βΆοΈβΆοΈabcπ½βΆοΈβΆοΈ βΆοΈππ¦...βΆοΈππ¦ π¦βΆοΈπ¦...π¦π¦πΌ π¦π¦πΌ...π¦βοΈπ¦
There should be n
amount of empty lines between third and fourth lines based on amount of nested loop times 2 inside, each time a nested loop occurs this amount is reduced by two.