65
\$\begingroup\$

This is the cop's thread of a challenge. You can view the robber's thread here

A pretty common beginner style question is to print some string, but there's a catch! You need to do it without using any of the characters in the string itself!

For this challenge, we will find out who is the best at printing X without X. There are two threads to this, a cop's thread and a robber's thread.

In the cop's thread (this thread), users will choose a language (which we will call Y) and a string (which we will call X) and write a program in language Y which takes no input, and outputs exactly X without using any of the characters in X. The cop will then post both X and Y without revealing the program they have written.

Robbers will select the cop's answers and write programs in language Y which take no input and output X. They will post these "cracks" as answers in their thread. A crack need only work, not to be the intended solution.

Once a cop's answer is one week old, so long as it has not been cracked, the cop may reveal their program and mark it as "safe". Safe answers can no longer be cracked and are eligible for scoring.

Cops will be scored by length of X in characters with smaller scores being better. Only safe answers are eligible for scoring.

Extra Rules

You may be as specific or precise in choosing your language as you wish. For example you may say your language is Python, or Python 3, Python 3.9 (pre-release), or even point to a specific implementation. Robber's solutions need only work in one implementation of the given language. So, for example, if you say Python is your language, a robber's crack is not required to work in all versions of Python, only one.

Since command line flags count as different languages, you should indicate specific command line flags or the possibility of command line flags as part of your language. For ease of use, I ask that you assume there are no command line flags in cases where command line flags are not mentioned.

You may choose to have your output as an error. If your intended solution does output as an error, you must indicate this in your answer.

Find Uncracked Cops

<script>site = 'meta.codegolf'; postID = 5686; isAnswer = false; QUESTION_ID = 207558;</script><script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script><script>jQuery(function(){var u='https://api.stackexchange.com/2.2/';if(isAnswer)u+='answers/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJeRCD';else u+='questions/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJO6t)';jQuery.get(u,function(b){function d(s){return jQuery('<textarea>').html(s).text()};function r(l){return new RegExp('<pre class="snippet-code-'+l+'\\b[^>]*><code>([\\s\\S]*?)</code></pre>')};b=b.items[0].body;var j=r('js').exec(b),c=r('css').exec(b),h=r('html').exec(b);if(c!==null)jQuery('head').append(jQuery('<style>').text(d(c[1])));if (h!==null)jQuery('body').append(d(h[1]));if(j!==null)jQuery('body').append(jQuery('<script>').text(d(j[1])))})})</script>

\$\endgroup\$
30
  • 1
    \$\begingroup\$ @user I believe errors are considered output, by our standard rules. I defer to those, so I believe the answer is yes. \$\endgroup\$
    – Wheat Wizard
    Jul 25 '20 at 15:53
  • 1
    \$\begingroup\$ @SomoKRoceS You can use any characters. \$\endgroup\$
    – Wheat Wizard
    Jul 25 '20 at 21:03
  • 4
    \$\begingroup\$ @Discretelizard I am not AdHocGarfHunter, but if your program does anything with the input (other than completely ignoring it), it is almost certainly invalid. \$\endgroup\$ Jul 26 '20 at 15:09
  • 2
    \$\begingroup\$ @EthanChapman Program flags are considered different languages. I had not thought if this initially so I will update the question but I will say that in order for command line flags to be used they should be explicitly allowed, either a specific flag or flags in general (as per the language vagueness rules). \$\endgroup\$
    – Wheat Wizard
    Jul 26 '20 at 15:23
  • 3
    \$\begingroup\$ Given the large number of answers to this challenge, I suggest adding the uncracked answers stack snippet to the question body, so it's easier to find uncracked cops. (I'm posting a comment rather than adding it myself due to the rule against adding leaderboards) \$\endgroup\$ Jul 27 '20 at 23:14

126 Answers 126

1 2 3 4
5
1
\$\begingroup\$

Perl 5, score: 38, safe.

No modules.

"#'$&;)+!,-./%07*245@6|89<>31:?\]^_`}~

I think this is still an easy problem.

Hint

  • Try making integers with allowed characters.
  • Then pass them to some functions.
  • Finally concatenate them with something.

Solution

There can be some solutions; one is print chr length for qw x XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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
0
\$\begingroup\$

Dyalog APL, score: 53

BCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz⍙3

I don't know how long this will last

\$\endgroup\$
1
  • \$\begingroup\$ Cracked. \$\endgroup\$
    – user
    Jan 29 at 0:57
0
\$\begingroup\$

Wolfram Language (Mathematica), Score: 47, cracked

abdfghijklmnopqrstuvwxyz
{ <-> , ~, &}[(*@)[]]

Fixed.

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

QBasic 1.1, score: 2, Cracked

Cc

I'm specifying QBasic 1.1 in order to exclude QB64 with its extra features. You can run it at Archive.org.

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

QBasic 1.1, score: 3, Cracked

C,c

POKE should be impossible now.

You can run QBasic 1.1 at Archive.org.


My solution:

 DIM outstr AS STRING * 3
 outstr = MKS$(908.6916)
 PRINT outstr
 

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

Javastack, score 16, Cracked by exedraj

1234567890"crsyo

My my, you are going to enjoy this one...

Up-to-date copy of the interpreter

Mistakes were made, but this will now work (sorry)

\$\endgroup\$
2
  • \$\begingroup\$ @downvoter why? \$\endgroup\$
    – lyxal
    Aug 8 at 1:09
  • \$\begingroup\$ diddly darn croaked \$\endgroup\$
    – lyxal
    Aug 8 at 1:34
1 2 3 4
5

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.