# Print X without X (cop's thread)

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>

• @user I believe errors are considered output, by our standard rules. I defer to those, so I believe the answer is yes. – Wheat Wizard Jul 25 '20 at 15:53
• @SomoKRoceS You can use any characters. – Wheat Wizard Jul 25 '20 at 21:03
• @Discretelizard I am not AdHocGarfHunter, but if your program does anything with the input (other than completely ignoring it), it is almost certainly invalid. – the default. Jul 26 '20 at 15:09
• @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). – Wheat Wizard Jul 26 '20 at 15:23
• 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) – The Fourth Marshal Jul 27 '20 at 23:14

# ><>, score: 17 - Cracked

0123456789abcdefo


I'm going to ban you from using numbers, too! What can you do now?!

• That's just rude and mildly inconvenient. :P – lyxal Aug 12 '20 at 6:44
• @Lyxal So can you crack it? (It's not hard to anyone familiar with ><>.) – null Aug 12 '20 at 6:45
• It was extremely inconvenient, but cracked lol – lyxal Aug 12 '20 at 7:28

# ><>, score: 19

0123456789abcdeflol


I could've made it 18 but just for the lols

# PHP, Score: 1 Cracked

?


No command line flags were used.

# PHP7, score: 15 (Cracked)

funtim(){}_=/\~


# Setanta, score 3, cracked by Dingus

Probably an easy one.

N I


Here's my solution:

n:=go_téacs(go_uimh("!"))[0]sp:=go_téacs(gníomh(a){})[1]i:=go_teacs(eas@mata(1000))[0]scríobh(n+sp+i)

• Cracked – Dingus Aug 31 '20 at 5:08

# AlphaBeta, score: 12, Cracked

abcdefghijkl


I think this will get cracked quick, but I can't come up with anything else for AlphaBeta.

• Cracked – Dingus Nov 6 '20 at 9:53

0123456789 "#$&'*+-/\a • Cracked – Dingus Feb 7 at 13:01 # x86 Assembly (gcc, Linux), score: 8, safe Here is one for you x86 programmers. Textual assembly, 32-bit x86 Linux. RrL%ljJ.  Your dilemma: • You can't use any assembler directives because . is banned. • You are stuck in AT&T syntax • You can't hand-encode instructions with .byte, .asciz, etc. • Because you lack %, it is impossible to use anything that refers to registers. • You have libc, but since you can't use CALL, JMP, Jcc, LOOP or RET, it is impossible to use. • You can still INT$0x80, but since you can't refer to registers, it is impossible to set up.

If you didn't already hate AT&T syntax, you definitely will now. 😈

The header to define the function is provided for you, as well as a template on TIO.

        # String to print (w/o quotes):
#    "RrL%ljJ."
# 32-bit Linux, glhf
# theb  $est(%syntax),%ever .att_syntax prefix .globl main main:  TIO template I actually wanted this to be cracked so I can post an eviler one, but whatever. My solution: Try it online! # ARM Assembly (GAS, Linux, no libc), score: 7, safe Textual assembly, not machine code. bpsBPS.  This makes it so you can't use bx, bl blx, push, pop, svc, swi, str, stm, syscall, mrs, or any assembler directives. Good luck trying to run a syscall or switch to Thumb. 😈 You can assume your code is placed under this exact header, so don't worry about declaring the function.  .text .arch armv5te .arm .globl _start _start:  Should be pretty easy for those who are familiar with ARM's assembler. 🙂 My solution I can't get code blocks to work properly in spoilers, so here's a GitHub gist. • Code blocks in spoilers can be made by prepending the first line of code with >!<pre><code>, prepending all subsequent lines with >!, and appending </code></pre> to the last. Example: if your code was a\nb\nc\nd\ne (with \n being a newline, of course; I can't put newlines in comments so this is the closest equivalent), you would type >!<pre><code>a\n>!b\n>!c\n>!d\n>!e</code></pre> (once again, with \n being a newline). – Makonede Feb 3 at 23:08 # Rattle, Score: 35, Cracked p - ; 16.0112.01568.03136.021952.0  Note that there should be a trailing newline (technically it's impossible to do it without the trailing newline). This should be relatively easy to crack... As it's been cracked, here's my implementation - feel free to try to solve this a different way and teach yourself the language! 7|s[+]b*~,b*~*b*b*~b=+++++++++++++++++++++++++++++++++++++++++++++,++++++++++++++, There is an online interpreter available here - all you need to do is replace what's in the "code" section and hit run (I would recommend minimising the header and footer as well). Do not modify the interpreter code (i.e. don't touch the Python code in the header and footer). Good luck! # Edit I'm deciding to give out a small hint - try playing around with functions without arguments! Some functions have default values • @EasyasPi I screwed up markdown, thanks for pointing this out. I'll edit it real quick – Daniel H. Feb 11 at 3:29 • I assume this is a loophole, right?. (Interpreter code snipped because bitly hates me) 😏 – EasyasPi Feb 11 at 4:25 • @EasyasPi yes, that is a loophole... I guess I should sanitise my inputs in the next update! Definitely a creative answer though! – Daniel H. Feb 11 at 4:28 • @EasyasPi it looks like your answer still uses - though – Daniel H. Feb 11 at 4:29 • I count only 35 bytes (including the trailing newline). Are there unprintable characters hiding in there? – Dingus Feb 11 at 4:34 # Lua 5.1, Score: 35 Cracked ## Output  !"#$&'*+-./:;<=>?@GaLl\0123456789

• I count only 35 characters. Has SE gobbled an unprintable? – Dingus Feb 10 at 10:46
• Nope, you're right, its my bad. fixed – LuaNoob Feb 10 at 16:26
• Cracked – Dingus Feb 10 at 21:51

# Lua 5.1, Score: 50 Cracked

     !"#$%&'*+-./0123456789:;<=>?@G\^ajklmpqvxyz{|}  Thats a TAB and SPACE at the beginning and a new line at the end. My code to produce that is 19542 bytes long in just 1 line. Thats my last try, cause once you come behind this you can come behind everything in LUA in this Thread. Have fun :-) • Cracked. Only 5152 bytes so I guess it's not your intended solution. – Dingus Feb 13 at 3:23 # YaBASIC, Score:13 Cracked by Dingus X: The string to crack: 0 1 2 3 4 5 6 7 8 9 A a -  The language may be Basic, but is the solution? Y: The language - YaBASIC: print "Can you crack it?"  Try it online! • – Dingus Mar 1 at 12:50 • @Dingus - OK, you got it pretty quick! That's a good solution actually. Give me a sec and I'll post a harder version for you if you're interested. – Caleb Fuller Mar 1 at 12:54 # Desmos, score 16, safe 0123456789pe[]{}  You don't have access to numbers, including pi and e, nor creating arrays, nor any functions that need {}. Since Desmos doesn't have strings, strings are generally outputted as character code arrays. You may be able to find some other suitable output method, but you don't need to. Good luck! Safe: Huh, I shouldn't have used so many characters, I expected this to be cracked easily. There's a number of ways to get a 1, including but probably not limited to: f(x)=x f'(x)  and floor(random())!  (note that we can't use ceil() as it uses e) The former is what I used here. Once you have a 1, you can just add it a bunch of times and use a join() or two to make it into an array. # Dis, Score: 1, cracked by Dingus {  I have never thought of constructing the program when I posted this. PS. Rule clarification. • Output exactly a character whose codepoint is 123 in decimal integer. • Do not output else. • Then terminate the program. • No Dis implementation whose { command does putchar(codepoint of (a%256)) rather than putchar(codepoint of a); if your implementation is so, reguster A must be exactly 123 when { is executed. deleted as reference implementation, implemented in C, uses putchar(char) and char stores eight octets (maybe not on some machines). ## Intended solution *|||*__>*__>_||^___________________________*!**}}*! Try it online! Link to my interpreter, with comments. This uses that 123=11120t=1-11122t-11122t. To produce 1 I had to make 00100t first by 0-01020t-01120t-01120t. Then I did it > twice. • PS. I've just completed my program. – tail spark rabbit ear Jul 18 at 7:47 • I don't follow the last bullet point: why does it matter how the { command is implemented? You say 'when { is executed', but { can't be executed in this challenge. – Dingus Jul 20 at 14:19 • @Dingus; 1. Did I misread the specification? I couldn't see the specification that it outputs A modulo 256; or is it implicitly specified by reference implementation? 2. Outputting that character without using the character in your program is the point of my challenge. – tail spark rabbit ear Jul 20 at 22:19 • I agree that the goal is to print { without using {, and that's the root of my question. If you can't use { to begin with, I don't understand the intent behind the last bullet point. Why does it matter how { behaves (mod 256 or not) if you can't use it? – Dingus Jul 21 at 2:30 • @Dingus Deleted final bullet. – tail spark rabbit ear Jul 21 at 10:59 # Dyalog APL, score: 53 BCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz⍙3  I don't know how long this will last • – user Jan 29 at 0:57 # Wolfram Language (Mathematica), Score: 47, cracked abdfghijklmnopqrstuvwxyz { <-> , ~, &}[(*@)[]]  Fixed. # 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. • – water_ghosts Jul 29 '20 at 3:34 # 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


• – water_ghosts Jul 29 '20 at 7:40

Gforth, 3 bytes



`

(That's a space, followed by a tab, followed by a newline)

• Cracked using a vertical tab. – EasyasPi Feb 9 at 17:31