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.
* O R X Yis a mathematical operation:
Ospecifies the operation to use:
+*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.
Yare expressions. More on these below. For a copy operation,
Yshould be omitted.
. C X Yperforms the comparison specified by
Cand stores it with 0/1 in the
=<>are indicated by
++ Xprints the Unicode character represented by expression
+. Ldefines a program label;
Lcan be any number of characters.
+* T Ljumps to label
Lbased on the condition
*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
. characters terminated with a
+ 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:
+ + . *+ .. +. .. . . . . + + .* + +. . + .+ * ++. * + + . ++ . . * . . . . .* + +. * + + .+ + . .* . . . . .. ++ . * ++. + ++ + * . . .. . .* + + .* + . + +. . . . . . . . + + .*+ . .. . .* . . . .. . . .* + +. * +. + . ++ +* + +. *+ + . ++ ++ .. . .. + +. * + + + .. + .* . + + . * ++ . + + ..* . .. + + . * ++. .+.. . . . . ... .. + + . *+ .. . . +*. . . . . .*