Moaiscript

Moaiscript is a stack-based language created by Dtp09 in which the only acceptable characters to use are the Moai Emoji (🗿) and the newline character (\n). Moaiscript was inspired by Chicken and has interpreters written by users Dtp09 and Eiim.
== Layout ==
Moaiscript is comprised of an array of memory, a stack, a compare flag, as well as UTF-8 input and output. Both the stack and memory have a virtually unlimited length and can hold 64-bit floating point numbers, despite non-integer numbers not being possible to create.
== Instructions ==
The instruction to be executed on a given line is determined by the quantity of moais on that line. Any non-moai character will be ignored. A line devoid of any moais will not execute anything.
Number of Moyais 	Name 	Description
 	no-op 	No operation, used for debugging in Eiim's interpreter
🗿 	input 	Pushes a unicode character from input to the stack, that character's index being the top stack value.
🗿🗿 	output 	Outputs the top stack value to the as a UTF=8 character. Outputs 🗿 instead if top stack value is 0.
🗿🗿🗿 	write 	Write the 2nd top stack value to memory at the index determined by the absolute value of the top of the stack.
🗿🗿🗿🗿 	read 	Pushes a value in memory to the stack, the index determined by the top stack value.
🗿🗿🗿🗿🗿 	subtract	Subtracts the top stack value from the second top, pops them both off the stack and pushes the difference.
🗿🗿🗿🗿🗿🗿 	add 	Adds the top 2 stack values, pops them both off the stack and pushes the sum.
🗿🗿🗿🗿🗿🗿🗿 	multiply	Multiplies the top 2 stack values, pops them off the stack and pushes the product.
🗿🗿🗿🗿🗿🗿🗿🗿 	compare 	Set the compare flag if both top stack values are equal, unset if not.
🗿🗿🗿🗿🗿🗿🗿🗿🗿 	jump 	If compare flag set, jump forwards or backwards by an amount of lines determined by the top stack value.
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿... 	push 	Pushes (Number of Moais)-10 onto stack.
== Examples ==
=== Hello, World! ===
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿
=== Cat program ===
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿
🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿
🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿
=== Cat program by Eiim (stack-only) ===
🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿
🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿
🗿🗿🗿🗿
🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿
🗿🗿🗿🗿🗿🗿🗿🗿🗿
== Interpreters ==
An interpreter was written by User:Dtp09 in javascript, and hosted here.
I made an IDE and from-scratch interpreter which can convert between Moaiscript and a human-readable format as well as having basic execution functionality. It may differ from Dtp09's interpreter with certain undefined behavior, but programs should be largely cross-compatable. MoaIDE also uses empty lines to print the state information to the console, which can make it much more useful for debugging. MoaIDE can be found here and its source here. Eiim (talk) 04:41, 12 March 2022 (UTC)
Category:Languages
Category:2021
Category:Stack-based
Category:Turing complete
Category:Implemented
Category:Low-level