Created
November 26, 2022 18:26
-
-
Save mliezun/c750ba701608850bd86d646a3ebf700f to your computer and use it in GitHub Desktop.
Grotsky Quine
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let tabChar = 9 | |
let quoteChar = 34 | |
let commaChar = 44 | |
let code = [ | |
"let tabChar = 9", | |
"let quoteChar = 34", | |
"let commaChar = 44", | |
"let code = [", | |
"]", | |
"for let i = 0; i < 4; i = i+1 {", | |
" io.println(code[i])", | |
"}", | |
"for let i = 0; i < code.length; i = i+1 {", | |
" io.println(strings.chr(tabChar) + strings.chr(quoteChar) + code[i] + strings.chr(quoteChar) + strings.chr(commaChar))", | |
"}", | |
"for let i = 4; i < code.length; i = i+1 {", | |
" io.println(code[i])", | |
"}", | |
] | |
for let i = 0; i < 4; i = i+1 { | |
io.println(code[i]) | |
} | |
for let i = 0; i < code.length; i = i+1 { | |
io.println(strings.chr(tabChar) + strings.chr(quoteChar) + code[i] + strings.chr(quoteChar) + strings.chr(commaChar)) | |
} | |
for let i = 4; i < code.length; i = i+1 { | |
io.println(code[i]) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment