User:BoundedBeans/Programs

From Esolang
Jump to navigation Jump to search

2-Player Tic-Tac-Toe in C-INTERCAL

How to use

The game will display the board, then whose turn it is. Enter the X coordinate, followed by the Y coordinate (ONE, TWO, or THREE for each). If those coordinates have already been played, you lose your turn. It repeats this cycle until someone wins, then displays "WIN" and halts (whoever had the last turn is the winner). You can end the game early by playing an invalid coordinate (it will display the VARIABLES MAY NOT BE STORED IN WEST HYPERSPACE error). There is no draw check.

Compatibility

This has only been tested on cringe, the INTERCAL compiler for .NET, but it can probably be run elsewhere. A few notes on this:

  • To get cringe working, I had to modify the declaration of the variable compiler in the EmitBinary method of spew.cs to have my specific path to csc, the C# compiler for Windows (.NET Framework). However, cringe does output valid cross-platform C# code, so you can alternatively compile that using any C# compiler as an extra step.
    • Edit: Confirmed to work on C-INTERCAL (finally got it running on WSL)
  • cringe uses wimpmode numerical I/O rather than spelled out digits/roman numerals, so that's why it looks like that in the example game. If you run it on another compiler you will have to input in spelled out digits. This game does not output numerically, so you don't have to worry about roman numerals at all.
  • cringe raises a lot of warnings when compiling this program; this is just because cringe raises warnings for comments (since they are syntax errors). The program compiles and runs fine, though.

Code

        DO NOTE === DECLARATIONS
        DO NOTE === GAME BOARD
                #1 = X
                #2 = O
                #3 = BLANK
        PLEASE ,10 <- #3 BY #3
        DO ,10SUB#1#1 <- #3
        DO ,10SUB#1#2 <- #3
        PLEASE ,10SUB#1#3 <- #3
        DO ,10SUB#2#1 <- #3
        DO ,10SUB#2#2 <- #3
        PLEASE ,10SUB#2#3 <- #3
        DO ,10SUB#3#1 <- #3
        DO ,10SUB#3#2 <- #3
        PLEASE ,10SUB#3#3 <- #3
        DO NOTE === #2 IF IT IS O'S TURN
        DO .10 <- #1
        
        DO NOTE === MAIN LOOP
(1)     DO FORGET #1
        PLEASE (10) NEXT
        DO (100) NEXT
        DO .10 <- #1
        DO (20) NEXT
        DO (30) NEXT
        PLEASE (10) NEXT
        DO (101) NEXT
        DO .10 <- #2
        DO (20) NEXT
        DO (30) NEXT
        PLEASE (1) NEXT

        DO NOTE === DISPLAY BOARD ROUTINE
                B: 01000010, 01000010, 66 , 190
                O: 01001111, 11110010, 242, 80
                A: 01000001, 10000010, 130, 368
                R: 01010010, 01001010, 74 , 312
                D: 01000100, 00100010, 34 , 296
                :: 00111010, 01011100, 92 , 198
               LF: 00001010, 01010000, 80 , 268
                |: 01111100, 00111110, 62 , 274
(10)    DO ,11 <- #33
        DO ,11SUB#1 <- #190
        PLEASE ,11SUB#2 <- #80
        DO ,11SUB#3 <- #368
        DO ,11SUB#4 <- #312
        DO ,11SUB#5 <- #296
        PLEASE ,11SUB#6 <- #198
        DO ,11SUB#7 <- #268
        DO ,11SUB#8 <- #274
        DO .1 <- ,10SUB#1#1
        PLEASE (40) NEXT
        DO ,11SUB#9 <- .2
        DO ,11SUB#10 <- .3
        DO .1 <- ,10SUB#1#2
        PLEASE (40) NEXT
        DO ,11SUB#11 <- .2
        DO ,11SUB#12 <- .3
        DO .1 <- ,10SUB#1#3
        PLEASE (40) NEXT
        DO ,11SUB#13 <- .2
        DO ,11SUB#14 <- .3
        PLEASE ,11SUB#15 <- #238
        DO ,11SUB#16 <- #274
        DO .1 <- ,10SUB#2#1
        PLEASE (40) NEXT
        DO ,11SUB#17 <- .2
        DO ,11SUB#18 <- .3
        DO .1 <- ,10SUB#2#2
        PLEASE (40) NEXT
        DO ,11SUB#19 <- .2
        DO ,11SUB#20 <- .3
        DO .1 <- ,10SUB#2#3
        PLEASE (40) NEXT
        DO ,11SUB#21 <- .2
        DO ,11SUB#22 <- .3
        PLEASE ,11SUB#23 <- #238
        DO ,11SUB#24 <- #274
        DO .1 <- ,10SUB#3#1
        PLEASE (40) NEXT
        DO ,11SUB#25 <- .2
        DO ,11SUB#26 <- .3
        DO .1 <- ,10SUB#3#2
        PLEASE (40) NEXT
        DO ,11SUB#27 <- .2
        DO ,11SUB#28 <- .3
        DO .1 <- ,10SUB#3#3
        PLEASE (40) NEXT
        DO ,11SUB#29 <- .2
        DO ,11SUB#30 <- .3
        DO ,11SUB#31 <- #238
        DO ,11SUB#32 <- #0
        PLEASE ,11SUB#33 <- #336
        DO READ OUT ,11
        DO RESUME #1
        
        DO NOTE === TURN
(20)    PLEASE WRITE IN .2
        DO ,11 <- #1
        DO ,11SUB#1 <- #0
        PLEASE READ OUT ,11
        DO WRITE IN .1
        DO .9 <- '?"',10SUB.1.2'$#3"'~#5
        DO (51) NEXT
        PLEASE .9 <- '#1$.9'~#3
        DO (21) NEXT
        DO RESUME #1
(21)    DO (22) NEXT
        DO ,10SUB.1.2 <- .10
        PLEASE RESUME #2
(22)    DO (23) NEXT
        DO THROW AWAY INVALID BOOLEANS. THIS ERROR SHOULD NEVER APPEAR.
(23)    PLEASE RESUME .9


        DO NOTE === CHECK FOR WIN
(30)    DO .1 <- #0
        DO .2 <- #1
        DO .9 <- "'?"',10SUB#1#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#1#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#1#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#2#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#3#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#1#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#1#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#1#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#1#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .2 <- #1
        DO .9 <- "'?"',10SUB#1#3'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#2#2'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .9 <- "'?"',10SUB#3#1'$.10"'~'#0$#65535'"~#65535
        PLEASE (50) NEXT
        DO .2 <- "&'.2$.9'"~#1
        DO .1 <- "V'.1$.2'"~#1

        DO .1 <- '#1$.1'~#3

        PLEASE (31) NEXT
        DO (10) NEXT
        DO (102) NEXT
        DO ,11 <- #2
        DO ,11SUB#1 <- #176
        PLEASE ,11SUB#2 <- #80
        DO READ OUT ,11
        DO GIVE UP
(31)    DO (32) NEXT
        PLEASE DO RESUME #2
(32)    DO (33) NEXT
        DO THROW AWAY INVALID BOOLEANS. THIS ERROR SHOULD NEVER APPEAR.
(33)    PLEASE DO RESUME .1


        DO NOTE === ID TO X/O/SPACE (AFTER VERTICAL BAR) AND FOLLOWING VERTICAL BAR
                LETTER:  X        O        [SPACE]  |        [LF]
                NORMAL:  01011000 01001111 00100000 01111100 00001010
                REVERSE: 00011010 11110010 00000100 00111110 01010000
                DECIMAL: 26       242      4        62       80
                -|:      36       -180     58       0        -18
                +256:    292      76       314      256      238

                | AFTER OTHER:
                         X:     26  - 62 + 256 = 220
                         O:     242 - 62 + 256 = 436
                         SPACE: 4   - 62 + 256 = 198
                         LF:    80  - 62 + 256 = 274
(40)    PLEASE (41) NEXT
        DO .2 <- #314
        DO .3 <- #198
        PLEASE RESUME #1
(41)    DO (42) NEXT
        DO .2 <- #76
        PLEASE .3 <- #436
        DO RESUME #2
(42)    DO (43) NEXT
        DO .2 <- #292
        PLEASE .3 <- #220
        DO RESUME #3
(43)    PLEASE RESUME .1

        DO NOTE === ZERO CHECK
(50)    DO (51) NEXT
        PLEASE .9 <- "?'.9$#1'"~#1
        DO RESUME #1

        DO NOTE === NON-ZERO CHECK
(51)    DO .9 <- '.9~.9'~#1
        PLEASE RESUME #1

        DO NOTE === "X"
(100)   DO ,11 <- #3
        DO ,11SUB#1 <- #230
        PLEASE ,11SUB#2 <- #202
        DO ,11SUB#3 <- #336
        DO READ OUT ,11
        DO RESUME #1

        DO NOTE === "O"
(101)   DO ,11 <- #3
        DO ,11SUB#1 <- #14
        PLEASE ,11SUB#2 <- #418
        DO ,11SUB#3 <- #336
        DO READ OUT ,11
        DO RESUME #1

        DO NOTE === "WIN"
                W: 01010111, 11101010, 234, -234, 22
                I: 01001001, 10010010, 146, 88  , 344
                N: 01001110, 01110010, 114, 32  , 288
             NULL: 00000000, 00000000, 0  , 114 , 370
(102)   PLEASE ,11 <- #4
        DO ,11SUB#1 <- #22
        DO ,11SUB#2 <- #344
        DO ,11SUB#3 <- #288
        PLEASE ,11SUB#4 <- #370
        DO READ OUT ,11
        DO RESUME #1


(60000)
        PLEASE NOTE:
                THIS DID NOT END UP BEING USED IN THE PROGRAM, BUT IT MAY BE INTERESTING AS AN INTERCAL STRATEGY.
                I DON'T KNOW WHETHER THE CODE WORKS, BUT THE IDEA MIGHT BE USEFUL.S
        DO NOTE:
                THE FOLLOWING LINES ARE BASICALLY A SIMULATION OF THE TERNARY OPERATOR.
                THE PURPOSE OF THEM IS SELECTING EITHER THE NEW VALUE OR THE OLD VALUE,
                DEPENDING ON THE VALUE OF .9, WHICH HOLDS #1 IF THE TILE IS BLANK, AND
                #0 OTHERWISE.

                WHAT I CAME UP WITH WAS THIS:
                1. USE REPEATED SELF-INTERLEAVING TO PRODUCE A WHOLE 16 BITS FILLED WITH EITHER
                        ZERO OR ONE. CALL THE RESULT B.
                2. SELECT THE 'TRUE' VALUE WITH B.
                3. CREATE NOT B BY INTERLEAVING B WITH A NUMBER WITH ALL BITS AS 1 (#65535),
                        USE UNARY XOR (X XOR TRUE = NOT X),
                        SELECT EVERY OTHER BIT,
                        THEN SELECT WITH #65535 TO UNIVERSALLY GUARANTEE THAT IT WILL BE
                        ONE-SPOT.
                4. SELECT THE FALSE VALUE WITH NOT B.
                NOTE: ONE OF THE RESULTS SHOULD BE ALL ZEROES, THE OTHER SHOULD CONTAIN THE DESIRED VALUE.
                5. GET THE FINAL VALUE BY INTERLEAVING THE RESULTS TOGETHER,
                        USING UNARY OR,
                        SELECTING EVERY OTHER BIT,
                        THEN SELECTING WITH #65535 TO UNIVERSALLY GUARANTEE THAT IT WILL BE
                        ONE-SPOT.
        PLEASE .9 <- '.9$.9'~#3
        DO .9 <- '.9$.9'~#15
        DO .9 <- '.9$.9'~#255
        DO .9 <- '.9$.9'~#65535
        DO ,10SUB.1.2 <- "'V"'.10~.9'$'"'&"',10SUB.1.2'$'"'?".9$#65535"'~'#0$#65535'"~#65535'"'~'#0$#65535'"~#65535'"'~'#0$#65535'"~#65535
        PLEASE RESUME .1

Obfuscated Hello, world! polyglot in C# and Half-Broken Car In Heavy Traffic

public/**/class/**/p{//dj;gh0jy0y0troe0wo0oe0rt000hhhkje0ofgh--eg
static/**/int/**/j=32;static/**/void/**/Main(){//we9rtwerti0yh-0-
j=32;System.Collections.Generic.List<string>s;//eorgh0o-t-r-r-tgh
j=32;s=System.Activator//sdfghoit0rpreo0w0eor0ghno0hgt0reo0o00go0
/*;[*/.CreateInstance<System.Collections.Generic.List<string>>();
s.Add(@"!sewksdpfgp-p---p-p-ew9tfjivbwijf;ergih9i0hog0re0o00fo0gg
@outtext;%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_%W(_
%W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(_%W(_v%W(_%W(_%%^;eifgkytgkse0vg0ve0doo
^%^%W(_v%W(_%W(_%W(_%W(_%W(_%%%v%W(_%W(_%%^;difgktytreowkf0f0foff
^%^%W(_<%W(_%W(_%W(_%W(_%W(_%%%v%W(_%W(_%%^;sidfg0h6o5=43[e=dgob0
^%W(_%>^<%W(_%W(_%W(_%W(_%W(_%%v%W(_%W(_%%^;edfgiy0tore-o0eog0d--
^%W(_%^%W(_%W(_%W(_%W(_%W(_%W(_v%W(_%W(_%%^;wg-tg-ew--gt0troewo-;
^%W(_%v%W(_%W(_%W(_%W(_%W(_%W(_>%^<%W(_%%%^;sihgow0dfg0tg0fo0wif0
^%W(_%<%W(_%W(_%W(_%W(_%W(_%W(_^;eifghj0o0oyt0reo0wo0dfogh0o0roe;
%W(_>>^<;eigh0yt9iw3#$%^&*IKJHGFDwifkvb0ny0hg0s0ov0bto0reo00fgi00
%>%%^<v;dfg;wikb0nylreiw9i0wfig9h6iyewasfb0noyorewklfgnpptr;t[h;6
%^%>v<<;efigjhiy0rewowjfg0htreiwkofgitrkeww3i4tyhkewiwithg9erg9g9
%%v;eigjhoyktriewjk0ghiytkreoeiiy0trekert0yo032e040to40r30ew9tir0
>v<;sfghtewksuudifighoyitrew0i9ei0g95ire9ieig04i0fig04e0igrt0ir0i
%%^;wgkoktre0dofg0to0reo0dfg0tr0eo0fgh5ire0dfigit0ri0dfgit0ti0r00
%>^<;sfgkn-oy0tore0wo-dof-ghyo-ttroew-wod-fbon-johgew00eiof-gto-t
%o>v;eijghjouy0ytre//eigho-ytp-wrpg=hy;jh[gf[[[h[h[h[h[h[h[[hgowi
%v%>%%^<;sfgohkytrew0ie0fgih0yir0ewiw9dif0yi0treie0et0git0re0ei00
%v%^");System.Console.WriteLine("Hello,"+((char)j)+"world"+/*[.*/
s[0][0]);/*ewoelrhn-mu-ytytr-epw=p=gph=ypj=htrpe=p=gpn=p=p=p=/*;w
skw;erwofg0hoytewefghjutrewqwhjjytre*/}/**/}//iek00gor0o0o0ro0o0o

Mystery program in ???

"'

Notes:
* Typically I don`t write this choppily, but hiding messages in punctuation is HARD.
* This comment block can be safely omitted from the program, but it can also be included in the program if you want.
* It may be easier to copy this from the wiki source rather than the direct page (both will function fine).
* This is a program written in [[???]].
* This program ``cheats`` a little bit by using grave accent marks in place of double quotes or single quotes.
"'

One day I bought a lemon tree from a site called fastgrowingtrees. "It can fruit in the first year,`` they said confidently, but my beautiful, leafy, green, potted lemon tree never did end up fruiting; I had it for well over a year. I waited and waited for my golden yellow meyer lemons. It eventually became apparent that the tree was not happy indoors. So I gave it a grow-light because the west window wasn't "quite enough light``; it was however the brightest window in my home. The tree seemed to enjoy the light for a while. It was the middle of winter and new leaves were popping up left and right! The leaves would typically start off a maroon color. Then they would grow bigger and greener over time. I`m not entirely sure if it`s good for trees to grow that much in winter. Plants need their rest after all. Apparently it`s been scientifically proven that trees sleep. I think I remember reading an article on how the average height of tree branches decreases during night time. Speaking of plants at night time here`s another interesting night related plant fact. Normally when farmers plow their fields to remove weeds they come right back in a few days. Scientists found out this is because even a few thousand photons is enough to cause seeds to germinate. Any harmful seeds under the soil could be briefly exposed to light. There is actually a very simple solution to this. Plow your fields at night! Anyway let's go back to the lemon tree because I`m going on a bit of a tangent so this text seems longer because this text has totally no "secret messages`` hidden in the letters, word lengths, rhymes, punctuation, or sentence lengths; I`m not that cringe. The lemon tree seemed happy in its grow-light and didn't protest the "slight yellowness`` of the light at all; the light may have only looked yellow in its surroundings. The lemon tree then inexplicably started throwing a bit of a plant tantrum. It was being quite the drama queen. Every single leaf fell off the tree one by one! Most of the leaves at that point were a little different than the ones it came with. The starter leaves were waxy and small and the new leaves weren't "like that,``; they were glossy and huge. The lemon tree`s problems are still unsolved. It could be a whole load of different things (lemon trees are quite sensitive). It could be over-watering although I wasn't watering it any more than I was "supposed to``; the lemon tree`s problems never became obvious. It was really infested with fruit flies so that might be a potential reason! Eventually it became late spring and it was time to move the tree outside. The tree looked bad at this point. It was just a thorny stick. Something interesting happened. Something completely unexpected and exciting happened. It was really happy in the sunlight! Leaves started popping up, but some of the leaf buds were shaped a bit differently, and as they grew, it became apparent that they were not leaves, but instead flowers! The flowers had four silky, white petals and were fragrant! Some of the flower petals blew off in the wind, leaving only the reproductive parts which I wasn't initially "happy`` about, but I actually decided to take this tiny green oval and cut it open with my fingernail, and it smelled very strongly like lemon, had little tiny seedlike things inside; it was an unfertilized lemon. I didn`t think it would be able to handle the fruit any-way since it still didn't have very many "fully grown leaves``; it was however a fun experience to have flowers on the tree, even without fruit! Eventually it was the fall, and the tree had healed, but then it started looking a bit unhappy, and I didn't know what the "problems`` were, and it was really sudden; I eventually thought it needed fertilizer. I never actually got it fertilizer. It started to lose leaves - the same leaves it worked so hard to grow back in the summer ~ and it wasn't getting any better and I thought "I really should get it fertilizer``; I never did! The tree`s leaves became loose. Sometimes when watering the tree a leaf would just fall off. The tree's trunk began to lose its green color and the "fertilizer problem`` still hadn`t been solved, even with all these warnings, even after everything it had gone through, even as it was slowly turning brown; I procrastinated. Eventually the only green was a slight tinge on the ends of the branches. I had a chance to help it by bringing it to a well-experienced citrus tree owner but ultimately the transport wasn't going to "work``; I didn't take this final opportunity! And...

Clojure->JSARed Minecraft Datapack Quine Relay

The following program, when run with Clojure, compiles into a JSAR-archived Minecraft datapack where when you run the function minecraft:main, it outputs the original Clojure program to chat. Note that the datapack won't run on the newest versions due to the functions folder being renamed to function in newer versions, but this should run on 1.19.4 to give an example.

(ns kronosta-minecraft-datapack-quine.core
  (:gen-class)
  (:require clojure.string))

(defn quote-rp [str] (-> str
  (clojure.string/replace "=q" "\\\"")
  (clojure.string/replace "=b" "\\\\")
  (clojure.string/replace "=e" "=")))

(defn -main [& args]
  (def source-code-array [
    "(ns kronosta-minecraft-datapack-quine.core"
    "  (:gen-class)"
    "  (:require clojure.string))"
    ""
    "(defn quote-rp [str] (-> str"
    "  (clojure.string/replace =q=eq=q =q=b=b=b=q=q)"
    "  (clojure.string/replace =q=eb=q =q=b=b=b=b=q)"
    "  (clojure.string/replace =q=ee=q =q=e=q)))"
    ""
    "(defn -main [& args]"
    "  (def source-code-array ["
    "  ])"
        "  (println =q{=q)"
    "  (println =q    =b=qFiles=b=q: {=q)"
    "  (println =q        =b=qpack.mcmeta=b=q: {=q)"
    "  (println =q            =b=qContents=b=q: [=q)"
    "  (println =q                =b=q{=b=bn=b=q,=q)"
    "  (println =q                =b=q  =b=b=b=qpack=b=b=b=q: {=b=bn=b=q,=q)"
    "  (println =q                =b=q    =b=b=b=qpack_format=b=b=b=q: 12,=b=bn=b=q,=q)"
    "  (println =q                =b=q    =b=b=b=qdescription=b=b=b=q: =b=b=b=qThe quined output of a clojure program.=b=b=b=q=b=bn=b=q,=q)"
    "  (println =q                =b=q  }=b=bn=b=q,=q)"
    "  (println =q                =b=q}=b=bn=b=q=q)"
    "  (println =q            ]=q)"
    "  (println =q        }=q)"
    "  (println =q    },=q)"
    "  (println =q    =b=qCommands=b=q: [],=q)"
    "  (println =q    =b=qDirectories=b=q: {=q)"
    "  (println =q        =b=qdata=b=q: {=q)"
    "  (println =q            =b=qFiles=b=q: {},=q)"
    "  (println =q            =b=qCommands=b=q: [],=q)"
    "  (println =q            =b=qDirectories=b=q: {=q)"
    "  (println =q                =b=qminecraft=b=q: {=q)"
    "  (println =q                    =b=qFiles=b=q: {},=q)"
    "  (println =q                    =b=qCommands=b=q: [],=q)"
    "  (println =q                    =b=qDirectories=b=q: {=q)"
    "  (println =q                        =b=qfunctions=b=q: {=q)"
    "  (println =q                            =b=qFiles=b=q: {=q)"
    "  (println =q                                =b=qmain.mcfunction=b=q: {=q)"
    "  (println =q                                    =b=qContents=b=q: [=q)"
    "  (dotimes [x 11]"
    "    (println =q                                        =b=qsay =q (quote-rp (get source-code-array (- x 1))) =q=b=bn=b=q,=q)"
    "  )"
    "  (doseq [x source-code-array]"
    "    (println =q                                        =b=qsay     =b=b=b=q=q x =q=b=b=b=q=b=bn=b=q,=q)"
    "  )"
    "  (dotimes [x 52]"
    "    (if (=e x 49) (println =q                                        =b=qsay    (println =b=b=b=q}=b=b=b=q) =b=bn=b=q=q) (println =q                                        =b=qsay =q (quote-rp (get source-code-array (+ x 10))) =q=b=bn=b=q,=q))=q"
    "  )"
    "  (println =q                                    ]=q)"
    "  (println =q                                }=q)"
    "  (println =q                            },=q)"
    "  (println =q                            =b=qDirectories=b=q: {},=q)"
    "  (println =q                            =b=qCommands=b=q: []=q)"
    "  (println =q                        }=q)"
    "  (println =q                    }=q)"
    "  (println =q                }=q)"
    "  (println =q            }=q)"
    "  (println =q        }=q)"
    "  (println =q    }=q)"
    "  (println =q}=q)"
    ")"
  ])
  (println "{")
  (println "    \"Files\": {")
  (println "        \"pack.mcmeta\": {")
  (println "            \"Contents\": [")
  (println "                \"{\\n\",")
  (println "                \"  \\\"pack\\\": {\\n\",")
  (println "                \"    \\\"pack_format\\\": 12,\\n\",")
  (println "                \"    \\\"description\\\": \\\"The quined output of a clojure program.\\\"\\n\",")
  (println "                \"  }\\n\",")
  (println "                \"}\\n\"")
  (println "            ]")
  (println "        }")
  (println "    },")
  (println "    \"Commands\": [],")
  (println "    \"Directories\": {")
  (println "        \"data\": {")
  (println "            \"Files\": {},")
  (println "            \"Commands\": [],")
  (println "            \"Directories\": {")
  (println "                \"minecraft\": {")
  (println "                    \"Files\": {},")
  (println "                    \"Commands\": [],")
  (println "                    \"Directories\": {")
  (println "                        \"functions\": {")
  (println "                            \"Files\": {")
  (println "                                \"main.mcfunction\": {")
  (println "                                    \"Contents\": [")
  (dotimes [x 10]
    (println "                                        \"say " (quote-rp (get source-code-array x)) "\\n\",")
  )
  (doseq [x source-code-array]
    (println "                                        \"say     \\\"" x "\\\"\\n\",")
  )
  (dotimes [x 50]
    (if (= x 49) (println "                                        \"say    (println \\\"}\\\") \\n\"") (println "                                        \"say " (quote-rp (get source-code-array (+ x 10))) "\\n\","))
  )
  (println "                                    ]")
  (println "                                }")
  (println "                            },")
  (println "                            \"Directories\": {},")
  (println "                            \"Commands\": []")
  (println "                        }")
  (println "                    }")
  (println "                }")
  (println "            }")
  (println "        }")
  (println "    }")
  (println "}")
)