9
\$\begingroup\$

Cops' challenge

This challenge challenges the Cop to write a non-empty program that, when run, produces some non-empty output in language A, and, when reversed, produces some non-empty output in language B. The program may produce any output to STDERR when run in either language, but may not take input in any way.

The cop should provide the following information:

  • The forwards program
  • The output when run in language A
  • The output when run backwards in language B

Robbers should attempt to find the two languages used

Rules

  • The criteria for a valid programming language are the same as those of The Programming Language Quiz, Mark II - Cops:

  • Each answer must run in less than a minute on a reasonable PC.

  • Different versions of a language count as the same language.

  • Flags must be revealed to avoid obscure combinations.

  • Cracking a submission consists of finding any pair of programming languages that work, not just the intended ones.

An answer is safe if it is not cracked until two months after the question is posted.

An answer can not compete one month after this challenge has been posted.

Most answers cracked wins

Example robber post:

# Python 3 and brainfuck, 128 bytes, cracks [<user>'s answer](<link to cops post>)

```
print(1)#.++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
```

Python's expected output: `1`  
brainfuck's expected output: `v`

<explanation of crack>
\$\endgroup\$
0

10 Answers 10

5
\$\begingroup\$

Cracks emanresu A

Forwards is in Befunge-96, backwards is Befunge-97.

Try it online!

Try it online!

\$\endgroup\$
2
  • \$\begingroup\$ Doesn't this violate "Different versions of a language count as the same language."? \$\endgroup\$ Jun 4 at 3:11
  • \$\begingroup\$ @cairdcoinheringaahing This was my intended crack, and idk honestly - they're not "versions" in any normal sense though. \$\endgroup\$
    – emanresu A
    Jun 4 at 3:12
3
\$\begingroup\$

Cracks math junkie

Language A: Pyth

Language B: Pip

\$\endgroup\$
3
\$\begingroup\$

Cracks whqwert's answer

ioaddrsirmix

Language A: StupidStackLanguage

Language B: Deadfish~

\$\endgroup\$
3
\$\begingroup\$

Cracks Oliver F

Probably not intended.

Language A: BRASCA

Language B: Foo

\$\endgroup\$
1
  • 2
    \$\begingroup\$ I guess there are a few languages that this works for, the actual ones were Vyxal and 05AB1E, but I'll accept this answer too \$\endgroup\$
    – Oliver F
    Jun 5 at 9:06
3
\$\begingroup\$

Cracks whqwert's PLACO

Forwards PLACO: O5AB1E - Try it online!

  • This is the lowercase alphabet converted from binary when treated as base 62 digits (i.e. \$36 \times 2^{25} + 37 \times 2^{24} + \cdots + 61 \times 2^{0} = 2483027905\$).

Backwards OCALO: Noether - Try it online!

  • This is the length of the lowercase alphabet, \$26\$.

Note: Both languages will produce the given outputs with just PLAC.

\$\endgroup\$
3
\$\begingroup\$

Cracks Jonathan Allan

STINK

Language A: Japt

Language B: Seriously

\$\endgroup\$
2
\$\begingroup\$

Cracks Nobody

Language A: TrumpScript (found by searching GitHub)

Language B: A Pear Tree

\$\endgroup\$
1
  • \$\begingroup\$ NICE!!! IHATE!%CHAR \$\endgroup\$ Jun 5 at 4:09
1
\$\begingroup\$

Cracks Nobody

Language A: MarioLANG (It outputs <nul>-25<space> on TIO.)

Language B: brainfuck

\$\endgroup\$
1
\$\begingroup\$

Cracks lyxal

push 72;ll-l

Language A: Gol><>

Produces the required output (16) with just sh. According to the docs, s adds 16 to the stack. h seems to be necessary to end the program.

Language B: ;#+

Produces the required output (-1) with just -;p.

\$\endgroup\$
1
\$\begingroup\$

Cracks asdf3.14159

Forwards is Javascript, backwards is Bash
There were a lot of red herrings in this that threw me off at first but simplifying parts of it gave it away. Fun!

Am I too late to post an answer? :P

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Solved impressively quickly \$\endgroup\$
    – mousetail
    Aug 8 at 15:00
  • \$\begingroup\$ I like Javascript :) \$\endgroup\$
    – Komali
    Aug 8 at 15:12

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.