Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {%}+")1$~":x`+0x
- {%}+")1$~":n`+0
- $ echo -n 3 | golfscript quining.gs
- {3 % ")1$~"}0)1$~
- $ echo -n 3 | golfscript quining.gs | golfscript
- {3 % ")1$~"}1)1$~
- $ echo -n 3 | golfscript quining.gs | golfscript | golfscript
- {3 % ")1$~"}2)1$~
- $ echo -n 3 | golfscript quining.gs | golfscript | golfscript | golfscript
- {3 % ")1$~"}0)1$~
- # (implicit) Read from STDIN.
- {%}+ # Concatenate the read input with the block.
- # For example, "3"{%}+ -> {3 %}.
- ")1$~":x # Push that string and save it in the the variable `x'.
- `+ # Inspect the string and concatenate it with the block.
- # For example, {3 %}'")1$~"'+ -> {3 % ")1$~"}
- 0x # Push a 0 and the string stored in `x'.
- { } # Define a block.
- 3 % # Take the integer on the stack modulo 3.
- ")1$~" # Push that string.
- 0) # Push 0 and increment. Pushes 1.
- 1$~ # Copy the block from the bottom of the stack and execute it.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement