9
\$\begingroup\$

This is a challenge the Cops' Thread can be found here

Your challenge, as robbers is to take outputs from the cops' thread and find anagrams of the output that when run as a program output the original output provided.

The winner will be the person with the most valid cracks on this question.

Rules

  • You may not crack answers marked as safe with a provided program.

  • If a cop provides a language that the intended solution is in you must crack it in that particular language, if they choose not to you may crack it in any competing language.

  • Standard rules for Quines apply.

  • Cracks must not be perfect Quines. i.e. they must not output their exact source but a reordering of it (the order is provided by the cop).

\$\endgroup\$
5
\$\begingroup\$

Unspecified language (CJam), 254 bytes, DJMcMayhem

0000000: 3235 362c 583e 3130 2d5b 445d 2f41 612a  256,X>10-[D]/Aa*
0000010: 3a63 6523 0102 0304 0506 0708 090b 0c0e  :ce#............
0000020: 0f10 1112 1314 1516 1718 191a 1b1c 1d1e  ................
0000030: 1f20 2122 2425 2627 2829 2b2e 3334 3738  . !"$%&'()+.3478
0000040: 393b 3c3d 3f40 4243 4546 4748 494a 4b4c  9;<=?@BCEFGHIJKL
0000050: 4d4e 4f50 5152 5354 5556 5759 5a5c 5e5f  MNOPQRSTUVWYZ\^_
0000060: 6062 6466 6768 696a 6b6c 6d6e 6f70 7172  `bdfghijklmnopqr
0000070: 7374 7576 7778 797a 7b7c 7d7e 7f80 8182  stuvwxyz{|}~....
0000080: 8384 8586 8788 898a 8b8c 8d8e 8f90 9192  ................
0000090: 9394 9596 9798 999a 9b9c 9d9e 9fa0 a1a2  ................
00000a0: a3a4 a5a6 a7a8 a9aa abac adae afb0 b1b2  ................
00000b0: b3b4 b5b6 b7b8 b9ba bbbc bdbe bfc0 c1c2  ................
00000c0: c3c4 c5c6 c7c8 c9ca cbcc cdce cfd0 d1d2  ................
00000d0: d3d4 d5d6 d7d8 d9da dbdc ddde dfe0 e1e2  ................
00000e0: e3e4 e5e6 e7e8 e9ea ebec edee eff0 f1f2  ................
00000f0: f3f4 f5f6 f7f8 f9fa fbfc fdfe ff0a       ..............

Try it online!

How it works

256,                Push the range [0 ... 255].
    X>              Remove the first item (0).
      10-           Remove 10 (0x0a).
         [D]/       Split at occurrences of 13 (0x0d).
             Aa*    Join, separating by 10 (0x0a).
                :c  Cast all integers to character.
                e#  Begins a comment, terminated by the linefeed at the very end.
\$\endgroup\$
5
\$\begingroup\$

Brain-Flak, Riley

()((((((()()()){}){}){})()){}{}){({}[()][((((((()()()()()){}){}){})()))]{})}{}((()()()){}()){({}[()][((((((()()()){}){}()){({}[()])}{})()()))]{})}{}((((()()()()){}){}()){}){({}[()][((((((((()()()()()){}){}){}())){}{})()()))]{})}{}

Try it online!

Explanation

This was a bit easier than I had expected.

I wrote 3 separate loops to print each type of brace:

(((((()()()){}){}){})()){}{}){({}[()][((((((()()()()()){}){}){})()))]{})}{}
((()()()){}()){({}[()][((((((()()()){}){}()){({}[()])}{})()()))]{})}{}
((((()()()()){}){}()){}){({}[()][((((((((()()()()()){}){}){}())){}{})()()))]{})}{}

I used standard Mini-Flak technique to avoid using <...> monad and to be honest I never really felt the need to use the <> nilad.

This must have been extremely similar to what Riley did in the first place because when I was done I had an extra () left over. This is not a problem because () is essentially a no-op at the top level so I stuck it at the front of my program.

\$\endgroup\$
  • 1
    \$\begingroup\$ That's exactly what/how I wrote it. I needed the extra () to get everything to match up. Well done! \$\endgroup\$ – Riley Feb 28 '17 at 2:40
4
\$\begingroup\$

Haskell, 107 bytes, Laikoni

main=print$id=<<['|':[d]>>[d|i<-"$$'''',--..:<<<<====>>[[[[]]]]addddddiiiiiimnnprt|||",i==d]|d<-id['$'..]]

Plus a trailing newline.

Try it online! (needs a few seconds to run, because it loops through all unicode characters).

The program has an id (right before ['$'..]) which is not needed for the program logic, but somehow I have to spend the i and d.

\$\endgroup\$
  • \$\begingroup\$ The output is no in the same order. \$\endgroup\$ – Laikoni Feb 25 '17 at 12:31
  • 1
    \$\begingroup\$ @Laikoni: I misread the challenge. Now it's fixed. \$\endgroup\$ – nimi Feb 25 '17 at 14:25
4
\$\begingroup\$

Python, 96 bytes, Agargara

f= 'B7ofx)wdr0o{1{6{{r){1x0sD00qF1{{24}wr2wlo)y))xm2'; print''.join([r+chr(ord(r)-9)for r in f])

Try it online!

Once I noticed that some characters repeated in pairs, it was just a matter of finding a suitable ascii map between characters.

\$\endgroup\$
  • \$\begingroup\$ Congratulations! That's exactly how I wrote it. \$\endgroup\$ – Agargara Mar 6 '17 at 0:31
3
\$\begingroup\$

Pyth, 32 bytes, Rod

J+"J+J=JJ 1-2#pTN%"N #%2J=T-1pJJ

Try it online!

I don't really know Pyth that well, but I started with printing the required output and went from there.

 +"J+J=JJ 1-2#pTN%"N             # Add a '"' to the string in quotes
J                                # Assign result of above step to J
                     #           # Start an infinite loop
                      %2J=T-1    # Loops one iteration, then breaks
                                 # (I have no idea why this works)
                             pJ  # Explicitly print J
                               J # Implicitly print J
\$\endgroup\$
2
\$\begingroup\$

CJam, 46 bytes, Business Cat

93]_:c58]99]95]93]e__:c36]95]95]101]101]e_$_:c

Try it online!

93]                                             # Push [93] onto the stack
   _                                            # Copy
    :c                                          # Push ascii char 93 ']'
      58 99 95 93                               # Push these numbers...
        ]  ]  ]  ]                              # Push entire stack as array
                  e__                           # Flatten and copy
                     :c                         # Map ascii values to all elements
                       36]95]95]101]101]        # Same as above
                                        e_      # Flatten
                                          $     # Sort
                                           _    # Copy, implicitly print
                                            :c  # Map ascii values to all elements
                                                # Implicitly print
\$\endgroup\$
2
\$\begingroup\$

Octave, 91 bytes, drolex

a=['111111111123666667eeegggkkknnszEEGn};:;:'];
disp(['a=[''',a,'''];',10,[a-10,']);']]);dd

Try it online!

Very similar to the python solution in that it abuses ascii values to print the characters it needs.

\$\endgroup\$
  • \$\begingroup\$ Cracked indeed. Well done. \$\endgroup\$ – drolex Mar 7 '17 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.