Pixiedust
Java interpreter for the esoteric language Pixiedust.
Install / Use
/learn @The-Snide-Sniper/PixiedustREADME
Pixiedust, an esolang by Stephen Leppik
Pixiedust is an esolang so named because I designed it to look like pixie dust. It was created so that, when asked what tells a computer what to do, the answer "fairies and pixie dust" wouldn't be completely wrong.
This language uses the characters *+.. Any other non-whitespace characters will result in a syntax error. This is an assembly language with instructions separated by newlines.
Instructions
* O R X Yis a mathematical operation:Ospecifies the operation to use:.for copy,++for addition,+.for subtraction,**for multiplication,*.for division,*+for modulo.+*is reserved for future use.Rspecifies the register to store the result to. Registers hold single 32-bit integers. Each register is two characters, with a few special registers:**is the memory pointer,*.is the value at the pointer,*+reads a byte from STDIN or writes to STDERR,..is the test register, and.*is the numeric literal portal.XandYare expressions. More on these below. For a copy operation,Yshould be omitted.. C X Yperforms the comparison specified byCand stores it with 0/1 in the..register.=<>are indicated by*+., respectively.XandYare expressions.++ Xprints the Unicode character represented by expressionXto STDOUT.+. Ldefines a program label;Lcan be any number of characters.+* T Ljumps to labelLbased on the conditionT.Tcan be*to jump if..is not 0,.to jump if..is 0, or+to jump regardless of the value in...
Expressions can be either a normal register, or the reserved .* register followed by a number literal. A number literal is up to 32 + or . characters terminated with a *. With + meaning 1 and . meaning 0, they should form the binary representation of the number exactly how it would be stored as an int in a Java stack frame. Leading . characters can be omitted, and the terminating * can be left out if it's at the end of a line.
A golfed Hello World program would look like this:
++.*+..+...
++.*++..+.+
++.*++.++..
++.*++.++..
++.*++.++++
++.*+.++..
++.*+.....
++.*+.+.+++
++.*++.++++
++.*+++..+.
++.*++.++..
++.*++..+..
++.*+....+
But that's boring, and it doesn't even look too much like pixie dust! So I wrote some code to rewrite it to the following, equivalent program:
+ + . *+ .. +. .. . . . .
+ + .* + +. . + .+ *
++. * + + . ++ . . * . . . . .*
+ +. * + + .+ + . .* . . . . ..
++ . * ++. + ++ + * . . .. . .*
+ + .* + . + +. . . . . . . .
+ + .*+ . .. . .* . . . .. . . .*
+ +. * +. + . ++ +*
+ +. *+ + . ++ ++ .. . ..
+ +. * + + + .. + .* .
+ + . * ++ . + + ..* . ..
+ + . * ++. .+.. . . . . ... ..
+ + . *+ .. . . +*. . . . . .*
