# 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 the have written.

Robbers will be select cop 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 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, or Python 3.9 (pre-release) or even point to a specific implementation. Robbers 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 flag 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. – Ad Hoc Garf Hunter Jul 25 at 15:53
• I didn't notice that I had to have a program that actually did the thing. It's night, so my common sense has deactivated. – PkmnQ Jul 25 at 17:28
• @Discretelizard I am not AdHocGarfHunter, but if your program does anything with the input (other than completely ignoring it), it is almost certainly invalid. – my pronoun is monicareinstate Jul 26 at 15:09
• @Discretelizard they have the requirement by default at Loopholes that are forbidden by default – my pronoun is monicareinstate Jul 26 at 15:43
• 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) – pppery Jul 27 at 23:14

# Python 3, Score: 81, Cracked

X =  abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'*,./:;<=>?@[]^_{|}~ Not terribly interesting since it has such a high score, but this should be somewhat difficult to crack... Clarification: This is in fact a full Python 3 program, running it locally with python3 print_x_out.py produces the above output for me. Likewise, the below verifier script produces no output: with open("print_x_out.py") as file: source = file.read() output = """ abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!"#$%&'*,./:;<=>?@[\]^_{|}~"""

for c in output:
if c in source:
print(f"Failed verifier check for '{c}'")


Edit: Well, that was faster than expected...

• I hope this is a program (complete program or function) and not a snippet? – user202729 Jul 25 at 15:25
• I don't think there's actually a way to output something without any letters. If the language is actually Python 3 REPL, can you label it as such? – Jo King Jul 25 at 15:29
• No, this is a full program. python3 print_x_out.py produces this output for me. – nthistle Jul 25 at 15:49
• I added this clarification to the answer -- I can assure you it is possible, but you might have to wait a week to find out how ;) – nthistle Jul 25 at 15:54
• Cracked – Luis Mendo Jul 25 at 16:09

# Javascript (Browser), score: 3, Cracked

(\)


Simple, but hard.

My solution:

Function{unescapealert%28"%28%5C%5C%29"%29}

• Cracked – nthistle Jul 25 at 18:12
• Every day I learn about more cursed JavaScript features... – nthistle Jul 25 at 18:12
• @nthistle: Ah yes javascript is turing complete in so few characters. – Joshua Jul 28 at 15:54

# Python 3.7, Score: 1 - Cracked

X = (

Same base rules as nthistle's challenge above: must be a full script, run with python3 print_x_out.py.

I believe it's not possible to use wacky non-ascii substitutes for ( in a Python 3 script, but I may be wrong (I haven't tried them all). My solution does not use that approach, anyway, and the intention is that yours should not either—now that we've seen it once, there's no fun in taking that as the easy way out for all Python 3 challenges.

I know code length is not in the rules, but as we're all golfers here I'd be curious to see how short the solution can get. FWIW mine is 104 characters (97 if we're allowing a trailing newline at the end of the output).

### Stuff you do have

I had to give you the bare minimum of main= for a complete program. I've also given you prt as extra letters, it shouldn't take much to see that this allows for print.

You also have an assortment of other symbols available to you, I'll let you figure out how to use them.

:,.[|<-]'


These are all the characters I've used, there are no unprintables present in my intended solution. However since I can't print the unprintables you are fine to use them.

For your reference here are all the functions available using only the permitted characters:

(||) (==) (<) (<=) min (-) pi tan atan (=<<) (.) map init (:) print


# Even harder Haskell, Score 82, Cracked

" !#$%&()*+/0123456789:;>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\\^_bcdefghjkloqsuvwxyz{}~"  A little while after I posted this I realized I do not need :, so this version has a : in the output as well. I have posted in this answer to prevent clutter from two nearly identical answers, but both should be crack-able separately. • Cracked (both versions) – ManfP Jul 26 at 1:34 # Mornington Crescent, Score: 4, Cracked X = myHp You may have survived the 7UBES, but the real challenge begins now. Face me in battle! First, allow me to rid us of some distractions. Four lines are closed. Over half of the special stations are unavailable. In spite of this ruin, victory remains possible. Even for the likes of you, but it won't come easily... I'll be impressed if you can cut even the tiniest bit of my Hp. Consider the language again to be defined by the linked interpreter, also available on TIO. The main challenge here was the fact that your only arithmetic operation is division, so there is no way to get the character codes by only using arithmetic operations. My solution is below is quite a bit shorter than the crack (7410 bytes after removing comments), but uses the same basic idea: first divide the character codes of some lowercase letters by 2 to get the character codes of the symbols '1' '2' '7' '9' '0'. Then, copy and concatenate these symbols to get strings '109' '121' '72' '112'. Parsing these strings to integers at Parsons green gives the character codes for m y H p, which can then be concatenated to get the result. A simple trick, but quite a piece of work to implement. In hindsight, I was lucky that I only needed 5 different number symbols and all symbols could be found on position -7 in some available station name. # "myHp" 7 and division is enough to create 2. #7 can also be used to get the lower case characters: # 2 == ord('A')//ord(' '); Goodge# Street, 7 [District] #'1' == chr(ord('c')//2); Be#contree, 7 [District] #'2' == chr(ord('e')//2); Gloucest#er Road, 7 [District] #'7' == chr(ord('o')//2); B#ow Road, 7 [District] #'9' == chr(ord('s')//2); Baron#s Court, 7 [District] #'0' == chr(ord('a')//2); W#aterloo, 7 [Northern] ###print "myHP" without using those characters ##Plan: get 2 #get 65 Take Northern Line to Bank Take District Line to Acton Town Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 65 #put 65 at Cannon Street Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street #get 32 Take District Line to Sloane Square Take District Line to Mile End Take District Line to Victoria Take Victoria Line to Seven Sisters Take Victoria Line to Victoria Take Victoria Line to Victoria Take District Line to Mile End #ACC: ' ...', End: 7 Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 32 # 65//32 == 2 Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street #ACC: 2, CS: 32 Take District Line to Southfields #Sof: 2 Take District Line to Cannon Street #CS: str ##Plan: get '1' #get 99 Take District Line to Becontree Take District Line to Mile End #ACC: 'c...', End: str Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 99 #put 99 at CS Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street #99//2 == 49 Take District Line to Southfields Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street #CS: str Take District Line to Southfields #Sof: 2 Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: '1' Take Northern Line to Bank Take Northern Line to Bank Take District Line to Kew Gardens #Ke: '1' ##Plan: get '2' #get 101 Take District Line to Gloucester Road Take District Line to Mile End Take District Line to Victoria Take Victoria Line to Seven Sisters Take Victoria Line to Victoria Take Victoria Line to Victoria Take District Line to Mile End #ACC: 'e...', End: 7 Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 101 #put 101 at CS Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street # 101//2 == 50 Take District Line to Southfields Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street #CS: str Take District Line to Southfields #Sof: 2 Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: '2' Take Northern Line to Bank Take Northern Line to Bank Take District Line to Chiswick Park #Chi: '2' ##Plan: get '7' #get 111 Take District Line to Bow Road Take District Line to Mile End Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 111 #Put 111 at CS Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street # 111//2 == 55 Take District Line to Southfields Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street #CS: str Take District Line to Southfields #Sof: 2 Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: '7' Take Northern Line to Bank Take Northern Line to Bank Take District Line to Ravenscourt Park #Ra: '7' ##Plan: get '9' #get 115 Take District Line to Barons Court Take District Line to Mile End Take District Line to Victoria Take Victoria Line to Seven Sisters Take Victoria Line to Victoria Take Victoria Line to Victoria Take District Line to Mile End #ACC: 's...', End: 7 Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 115 #Put 115 at CS Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street # 115//2 == 57 Take District Line to Southfields Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street #CS: str Take District Line to Southfields #Sof: 2 Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: '9' Take Northern Line to Bank Take Northern Line to Waterloo Take Northern Line to Bank Take District Line to Acton Town #Act: '9' ##Plan: get '0' #get 97 Take District Line to Bank Take District Line to Mile End Take District Line to Bank Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 97 #Put 97 at CS Take Northern Line to Bank Take Northern Line to Bank Take District Line to Cannon Street # 97//2 == 48 Take District Line to Southfields Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street #CS: str Take District Line to Southfields #Sof: 2 Take District Line to Bank Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: '0' Take Northern Line to Bank Take Northern Line to Bank Take District Line to Earl's Court #Earl: '0' ##Plan: get 1 # 7//2 == 3 Take District Line to Victoria Take Victoria Line to Seven Sisters Take Victoria Line to Victoria Take Victoria Line to Victoria Take District Line to Cannon Street Take District Line to Southfields Take District Line to Cannon Street #ACC: 3, CS: 2 # 3//2 == 1 Take District Line to Bank Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street Take District Line to Bank Take District Line to Cannon Street #ACC: 1, CS: 2 Take District Line to Barking #Ba: 1 ##Plan: make 109 #copy '1' Take District Line to Kew Gardens Take District Line to Paddington #ACC: 'Paddington1', Pad: '1' Take District Line to Mile End Take District Line to Barking Take District Line to Mile End #ACC: '1', End: 1 Take District Line to Kew Gardens #Ke: '1' #concat '109' Take District Line to Earl's Court Take District Line to Paddington #ACC: '10', Pad '0' Take District Line to Paddington #ACC: '010', Pad '10' Take District Line to Acton Town Take District Line to Paddington #ACC: '109', Pad '9' Take District Line to Parsons Green Take District Line to Acton Town #Act: 109 #make 72 Take District Line to Ravenscourt Park Take District Line to Paddington #ACC: '97', Pad '7' Take District Line to Chiswick Park Take District Line to Paddington #ACC: '72', Pad '2' Take District Line to Parsons Green Take District Line to Ravenscourt Park #Ra: 72 ##Plan: make 112 #Grab '2' Take District Line to Parsons Green #ACC: 10 Take District Line to Paddington #ACC: '2' , Pad 10 Take District Line to Barons Court #Ba: '2' #copy '1' Take District Line to Paddington Take District Line to Kew Gardens #Ke: 10 Take District Line to Paddington #ACC: '...1', Pad '1' Take District Line to Kew Gardens Take District Line to Mile End #ACC: 1, End: 10 Take District Line to Bank Take District Line to Mile End #End: str Take District Line to Kew Gardens Take District Line to Mile End #End: '...1' Take District Line to Bank Take District Line to Mile End #ACC: '1', End: 1 Take District Line to Paddington #ACC: '11', Pad '1' Take District Line to Cannon Street Take District Line to Paddington #ACC: '1', Pad int Take District Line to Cannon Street #Can: '1' Take District Line to Paddington #Pad: '11' Take District Line to Barons Court Take District Line to Paddington #ACC: '112', Pad '2' Take District Line to Parsons Green Take District Line to Bank #Ban: 112 #make 121 Take District Line to Cannon Street Take District Line to Paddington Take District Line to Paddington Take District Line to Parsons Green #int to char Take District Line to Bank #Ban: 121 Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Bank #Ban: 'p' Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Bank #Ban: 'y' Take District Line to Barons Court #Bar: 'p' Take District Line to Acton Town Take District Line to Bank #Ban: 109 Take District Line to Kew Gardens #Ke: 'y' Take District Line to Ravenscourt Park Take District Line to Bank #Ban: 72 Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Bank #Ban: 'm' Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Bank #Ban: 'H' Take District Line to Acton Town #Act: 'm' #Concat 'myHp' Take District Line to Paddington Take District Line to Acton Town Take District Line to Paddington #Pad: 'm' Take District Line to Kew Gardens Take District Line to Paddington Take District Line to Paddington #Pad: 'my' Take District Line to Bank Take District Line to Paddington Take District Line to Paddington #Pad: 'myH' Take District Line to Barons Court Take District Line to Paddington #ACC: 'myHp' Take District Line to Bank Take District Line to Bank Take Northern Line to Mornington Crescent  Version without comments on TIO ## The cutting room floor As much as I'd like to be able to give an encore, I'm afraid I've exhausted my material. The design-space is a bit limited both due to the fact that Mornington Crescent is a language with a simple description and few commands (unlike, say, Javascript or Perl), as well as the fact that Take Northern Line to Mornington Crescent must be present in every valid program. I can't present any challenge that is solvable only by a method different from the solutions given so far. Best I can give you is some strings that I didn't use either because they were too easy (i.e. solvable with ideas already given) or too hard. (i.e. I couldn't think of a method to solve them. Feel free to post these as a challenge here if you do!) I provide the following strings at your own risk, do with them as you please. ## Easy 1. Spy leaves open a bit too many arithmetical operators for my taste. 2. l shuts down surprisingly many lines with only a single letter, but still leaves many options open. 3. HypV is too similar to this challenge, with only a small difference in the startup due to the lack of Seven Sisters ## Hard (likely impossible) 1. SpyH closes down many pesky operators, but I don't see a way to get a 1 and am stuck without it. 2. HypVm is similar to the this challenge, but I don't see how to get a 2 without Seven Sisters here. • This is definitely much harder that the previous answer. – pppery Aug 1 at 3:25 • FWIW, the four lines are Hammersmith & City, Piccadilly, Metropolitan and Waterloo & City. – Lyxal Aug 1 at 4:46 • Cracked – pppery Aug 1 at 14:38 • That was a great challenge, I didn't managed to solve it, but I had fun trying. So if there gonna be more, please notify me :) – SomoKRoceS Aug 1 at 16:09 • @SomoKRoceS Unfortunately, this is the last one from me. I have added a few strings that I didn't end up using for various reasons. I think l is a reasonable one to try if you're new to the language. – Discrete lizard Aug 1 at 17:18 # Javascript, score: 83, cracked? (the crack is not executable like /path/to/interpreter file.js, unlike my solution, but I don't think that matters a lot) I only know one Javascript implementation where my intended solution works. !"#$%&'()*,-./0123456789:;=ABCDEFGHIJKLMNOPQRSTUVWXYZ\^_abcdefghijklmnopqrstuvwxyz


In this implementation, only five distinct characters are sufficient to represent any Javascript code. I removed some more characters to (try to) avoid giving away the answer.

The solution should be a full program, executable like this:

$/path/to/interpreter file.js  I solved this by modifying aemkei/jsfuck on GitHub, until it was able to encode JSFuck code using the 5 characters []+|>. My solution was produced by encoding console.log("the string") in JSFuck (via jscrew.it so that I do not run out of both RAM and HDD space), and then encoding the JSFuck using the modified JSFuck generator. My solution is 46 megabytes of code, its sha256sum is d0c72f380b1623f9bff06fbed03b1ecd9c7fc012c9cc1ac9d758c9a317ad6855, and it is very slow; if anybody is interested I can try to upload it somewhere. • Are these the five characters you're talking about? – PkmnQ Jul 26 at 8:36 • I might be wrong, but I think, since you listed just Javascript as the lang name (without specifying an implementation) then a crack that works in another JavaScript interpreter is fine: "Robbers solutions need only work in one implementation of the given language"? – Dom Hastings Jul 26 at 10:31 • @DomHastings It does not seem to work in Babel (it produces the scary syntax error mentioned above). – my pronoun is monicareinstate Jul 26 at 10:48 • I could make a solution withour using a generator, but then I would manually have to make every single character. Maybe a converter from JSFuck to pipeline five would be good. I think all you'd have to do is change (thing) into [thing][+[]] and change function(thing) to thing|>function. – PkmnQ Jul 26 at 12:13 • For reference, the allowed characters from ASCII 33-126 are +<>?@[]{|}~. – Calculuswhiz Jul 26 at 14:14 # R, Score 60, cracked ";<=>?@ABCDEFGHIJKLMNOPQRSVWXYZ[\\]^_abeghjklmqrsvwxyz{|}~"  Note that your output cannot have an initial [1] (as would be given by default printing). You cannot use cat because of the a, and you cannot use write because of the w. Cracked by Giuseppe. My solution: dput(intToUtf8(c(59:83,86:98,101,103:104,106:109,113:115,118:126))) • Oh good, you left us with '() at least... – Giuseppe Jul 25 at 23:52 • cracked! – Giuseppe Jul 26 at 0:23 # Ruby, Score: 7, Cracked p<.$a1s


Previous crack wasn't the intended one, so trying to head it off with another character.


!"#$%&()*+/0123456789:?;@BEDAFGHIJKLMNOPQRSTUVWXYZ\^_bcdefgjkloqsvwxyz  I've changed this one up quite a bit from my last Haskell answer. The basics are somewhat similar: • Hard to apply functions due to missing whitespace, () and $.
• No line delimiters so program must be on one line

This time I've given you some new characters to play with. Along most the characters from the last version you also get

uCh>{}~


The only character's I've taken away are :, which was already disallowed in the hard version, and tab, which neither me or the cracker used in the first place.

So how is this harder than those versions? Well this time the output is not possible in whole or in part with print, you will need to use putChar. Which you will find much less coöperative.

# Intended solution, 829 bytes

main|[ih,a,i,n,p,u,t,h,r,mm,ma,mi,mn,mp,mu,mt,mC,mh,mr,am,aa,ai,an,ap,au,at,aC,ah,ar,im,ia,ii,ip,iu,it,iC,m,ir,nm,na,ni,nn,np,nu,nt,nC]<-['-',','..],[m,a,mat,i,n,p,u,t,h,r,mm,ma,mi,mn,mp,mu,mt,mC,mh,mr,am,aa,ai,an,ap,au,at,aC,ah,ar,im,ia,ii,ip,iu,it,iC,ih,ir,nm,na,ni,nn,np,nu,nt,nC,nh,nr,pm,pa,pi,pn,pp,pu,pt,pC,ph,pr,um,ua,ui,un,up,uu,ut,uC,uh,ur,tm,ta,ti,tn,tp,tu,tt,tC,th,tr,hm,ha,hi,hn,hp,hu,ht,hC,hh,hr,rm,ra,ri,rn,rp,ru,rt,rC,rh,rr,mmm,mma,mmi,mmn,mmp,mmu,mmt,mmC,mmh,mmr,mam,maa,mai,man,map,mau]<-map{--}putChar[m..'{']=m>>a>>an>>ap>>au>>at>>aC>>ah>>ar>>ia>>ii>>ip>>iu>>ir>>nm>>na>>ni>>nn>>np>>nu>>nt>>nC>>nh>>nr>>pm>>pu>>pa>>pt>>ph>>ua>>um>>pC>>ui>>un>>up>>uu>>ut>>uC>>uh>>ur>>tm>>ta>>ti>>tn>>tp>>tu>>tt>>tC>>th>>tr>>hm>>ha>>hi>>hp>>ht>>hC>>hh>>rm>>ra>>ri>>rn>>rp>>ru>>rh>>rr>>mmm>>mmn>>mmu>>mmC>>mam>>maa>>mai>>man>>map


Try it online!

My intended solution uses the fact that {--}, that is opening and closing a comment, separates tokens, so it can be used as a substitute for space.

Although it seems unlikely anyone might ever realize this fact, it seems near impossible to construct a cop that requires this fact, so after two failed cops I am giving up that attempt. Good job to both the robbers here.

• What is preventing the use of print? The characters are still available (set("print")<=set("main")|set("putChar")) – ManfP Jul 26 at 15:35
• @ManfP The actual output can't be produced in whole or in part by print (without adding new Show instances). This is because print adds a trailing newline and the only newline in the output is the second character. No native haskell object has a show that produces a single tab or the empty string to my knowledge. – Ad Hoc Garf Hunter Jul 26 at 15:37
• Oh right! Totally missed that, was just looking at the character diff, not the actual output – ManfP Jul 26 at 21:53
• cracked – Potato44 Aug 1 at 13:05

# Ruby, score 6, cracked by @nthistle

p<.$a1  Not intended to output via error, although I also don't think it's possible to do so without a lot of other characters. • I'm not sure how you could get p<.$a1 as a ruby error, but you're fine to say so. – Ad Hoc Garf Hunter Jul 25 at 18:46
• Cracked – nthistle Jul 25 at 20:20

# International Phonetic Esoteric Language, Score: 47, Cracked

Let's throw my own language into the ring.

 !"#$%&'()*+,-.ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_  My solution: {32}{15}0ɑbesχue1søɒ{65}{32}0ɑbesχue1søɒ • Cracked, your well-documented esolangs page was your own downfall... – nthistle Jul 25 at 17:47 • aaa well that goes to show that documentation is good – bigyihsuan Jul 25 at 17:54 # Befunge 93 (FBBI), score 15 (Cracked) ,0123456789"~@!  Take two. Thanks to Befunge's limited instruction set, I expect you'll find out what I think is the only remaining way to get a non-0 value on the stack, but I don't expect you to enjoy using it. That said, it wasn't as bad as I was hoping. It should be possible to remove : and maybe some others too, but I'm not going to code it to verify by hand. Good crack, I'll post my solution here (as a TIO link, because the <pre> block didn't like it), which is along the same lines but more brute-forcey. It takes a + from the top left with g whenever it needs a new character, does some math to make that a ,, and does a little more math to place it. Then it takes a copy of that comma and turns it into whatever character it needs, then rinses and repeats. Try it online • Cracked – nthistle Jul 26 at 19:11 • I very much did not enjoy using it :) – nthistle Jul 26 at 19:11 • By the way, it looks like your solution uses an @, although it shouldn't be too hard to change to self-write that. Nice answer! – nthistle Jul 26 at 20:51 • Oops, I meant to specify & in the challenge but accidentally put @ instead. It shouldn't be hard to self-write, though, no. Fortunately the & loophole didn't come up, so it's no big deal. If I post another one with even more characters removed, I'll make sure to fix that. – Ethan Chapman Jul 26 at 20:55 # Wolfram Language (Mathematica), Score: 14, cracked Echo@Dt[0 & ]  • Can we output via SendMail? (this is the only acceptable way to output I found so far) – my pronoun is monicareinstate Jul 26 at 3:39 • @mypronounismonicareinstate standard output – att Jul 26 at 4:19 • It seems like that should maybe count as a file? I don't think output as email was explicitly brought up in there, but the idea of output as email is so hilarious to me that I really want it to be legal. – Ethan Chapman Jul 26 at 6:14 • @att by standard output, do you mean the output which is shown with -print (which is also the output shown as Out[1] in documentation examples like these)? – Ethan Chapman Jul 26 at 22:56 • @EthanChapman no additional flags needed – att Jul 27 at 2:09 # Mornington Crescent, Score: 5, Cracked X = 7UBES London's burning! A large amount of the Underground has been closed off while the authorities try to avert disaster. Amid hellfire, dare you enter... the 7UBES? As for the language definition, consider it defined by the linked interpreter (This interpreter is also used on TIO). Note that the interpreter may not fully conform to the language specification, in particular not to the forward compatibility clause, as the interpreter is not maintained in parallel with infrastructural projects taking place in the Underground. While the lack of Upminster and Upney block the easiest ways, there are quite a few options left. My solution mostly depended on Manor House while ignoring Holland Park, in contrast to @pppery. #First, place an int at Paddington, such that the string starts with our character instead of 'Paddington' Take Northern Line to Charing Cross #ACC: 67 Take Northern Line to Moorgate Take Circle Line to Moorgate Take Circle Line to Paddington #PAD: 67 ##Plan: get 120 #First, put 'Oxford Circus' on Gunnersbury Take Circle Line to Victoria Take Victoria Line to Oxford Circus Take Victoria Line to Victoria Take Victoria Line to Victoria Take District Line to Gunnersbury #Now, get 2 Take District Line to Acton Town Take Piccadilly Line to Heathrow Terminals 1, 2, 3 Take Piccadilly Line to Acton Town Take District Line to Acton Town Take District Line to Parsons Green Take District Line to Parsons Green Take District Line to Parsons Green #Get 'x...' Take District Line to Gunnersbury #ACC: 'Ox' Take District Line to Acton Town Take District Line to Acton Town Take Piccadilly Line to Turnpike Lane Take Piccadilly Line to Turnpike Lane #Get 120 Take Piccadilly Line to Holborn Take Central Line to Holborn Take Central Line to Tottenham Court Road Take Central Line to Tottenham Court Road Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 120 #Move to PR Take Northern Line to Moorgate Take Circle Line to Moorgate Take Metropolitan Line to Preston Road #PR: 120 #get 65 Take Metropolitan Line to Amersham Take Metropolitan Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Moorgate Take Circle Line to Moorgate #get '7' Take Metropolitan Line to Preston Road #ACC:55 PR:65 Take Metropolitan Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Charing Cross Take Northern Line to Charing Cross Take Northern Line to Moorgate Take Northern Line to Moorgate Take Circle Line to Paddington #PAD: '7' ##Plan: get 85 #get 4 Take District Line to Parsons Green #int from Pad triggers swap Take District Line to Parsons Green #ACC: 3 Take District Line to Wimbledon #Wi: 3 Take District Line to Acton Town Take Piccadilly Line to Heathrow Terminal 4 Take Piccadilly Line to Acton Town Take District Line to Acton Town Take District Line to Parsons Green #ACC: 4 #put 4 at MH Take District Line to Acton Town Take District Line to Acton Town Take Piccadilly Line to Manor House #get 81 Take Piccadilly Line to Holborn Take Central Line to Queensway Take Central Line to Tottenham Court Road Take Central Line to Tottenham Court Road Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 81 # ~~(81 | 4) == 85 Take Northern Line to Tottenham Court Road Take Central Line to Tottenham Court Road Take Central Line to Holborn Take Central Line to Holborn Take Piccadilly Line to Manor House #ACC: ~85, nor: 81 Take Piccadilly Line to Holborn Take Central Line to Holborn Take Central Line to Notting Hill Gate Take Central Line to Notting Hill Gate #ACC: 85 #get 'U' Take Circle Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 'U' #concat 'U' Take Northern Line to Moorgate Take Circle Line to Moorgate Take Circle Line to Paddington Take Circle Line to Paddington #PAD: '7U' ##Plan: Get 66 #get 32 Take District Line to Parsons Green #ACC: 7 Take District Line to Gunnersbury #Gu: 7 Take District Line to Richmond #Ri: 2 Take District Line to Acton Town Take Piccadilly Line to Covent Garden Take Piccadilly Line to Acton Town Take District Line to Acton Town Take District Line to Gunnersbury #ACC: 'Covent ' Take District Line to Acton Town Take District Line to Acton Town Take Piccadilly Line to Turnpike Lane Take Piccadilly Line to Turnpike Lane Take Piccadilly Line to Holborn Take Central Line to Holborn Take Central Line to Tottenham Court Road Take Central Line to Tottenham Court Road Take Northern Line to Charing Cross Take Northern Line to Charing Cross #ACC: 32 #Get 64 Take Northern Line to Moorgate Take Northern Line to Moorgate Take Metropolitan Line to Chalfont & Latimer Take Metropolitan Line to Moorgate Take Circle Line to Temple Take District Line to Richmond #ACC: 2 Take District Line to Temple Take Circle Line to Moorgate Take Circle Line to Moorgate Take Metropolitan Line to Chalfont & Latimer #ACC: 64, tim: 2 # ~~(64 | 2) == 66 Take Metropolitan Line to Rayners Lane Take Metropolitan Line to Chalfont & Latimer Take Metropolitan Line to Rayners Lane Take Metropolitan Line to Rayners Lane Take Piccadilly Line to Oakwood Take Piccadilly Line to Manor House Take Piccadilly Line to Oakwood #Oak: 81 Take Piccadilly Line to Manor House Take Piccadilly Line to Rayners Lane Take Piccadilly Line to Manor House #ACC: ~66, nor: 64 Take Piccadilly Line to Holborn Take Central Line to Holborn Take Central Line to Notting Hill Gate Take Central Line to Notting Hill Gate #ACC: 66 #get 'B' Take Circle Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Charing Cross Take Northern Line to Charing Cross #concat 'B' Take Northern Line to Moorgate Take Circle Line to Moorgate Take Circle Line to Paddington Take Circle Line to Paddington #PAD: '7UB' ##Plan: get 69 #Get 5 Take District Line to Acton Town Take Piccadilly Line to Heathrow Terminal 5 Take Piccadilly Line to Acton Town Take Piccadilly Line to Acton Town Take District Line to Parsons Green #ACC: 5 # ~~(64 | 5) == 69 Take District Line to Acton Town Take District Line to Acton Town Take Piccadilly Line to Manor House #ACC: ~69, nor: 5 Take Piccadilly Line to Holborn Take Central Line to Holborn Take Central Line to Notting Hill Gate Take Central Line to Notting Hill Gate #ACC: 69 #get 'E' Take Circle Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Charing Cross Take Northern Line to Charing Cross #concat 'E' Take Northern Line to Moorgate Take Circle Line to Moorgate Take Circle Line to Paddington Take Circle Line to Paddington #PAD: '7UBE' ##Plan: get 83 #Place 81 at nor Take District Line to Acton Town Take Piccadilly Line to Manor House #nor: 'B7UB' Take Piccadilly Line to Oakwood #ACC: 81, Oak: 5 Take Piccadilly Line to Manor House #nor: 81 #get 2 == 65 % 3 Take Piccadilly Line to Acton Town Take District Line to Wimbledon #ACC: 3 Take District Line to Temple Take Circle Line to Moorgate Take Circle Line to Moorgate Take Metropolitan Line to Preston Road #ACC: 2 # ~~(81 | 2) == 83 Take Metropolitan Line to Rayners Lane Take Metropolitan Line to Rayners Lane Take Piccadilly Line to Manor House #ACC ~83 Take Piccadilly Line to Holborn Take Central Line to Holborn Take Central Line to Notting Hill Gate Take Central Line to Notting Hill Gate #ACC: 83 #get 'S' Take Circle Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Charing Cross Take Northern Line to Charing Cross #concat 'S' Take Northern Line to Moorgate Take Circle Line to Moorgate Take Circle Line to Paddington #PAD: '7UBES' Take Circle Line to Moorgate Take Circle Line to Moorgate Take Northern Line to Mornington Crescent  Try it online! (without comments) †: Pardon me for the 1337-speak, my options are limited: each valid program in this language ends with Take Northern Line to Mornington Crescent. • Cracked – pppery Jul 28 at 17:08 # Rust, score 2 32, Cracked pw pw?@ABCDEFGHIJKLMNOPQSTUXYZ!"#$%

Pretty challenging to output to stdout without being able to type print or write!

Rust version: rustc 1.45.1 (c367798cf 2020-07-26)

# Scala, score: 2 Cracked

(.


Shouldn't be too hard to crack.

Edit: Guess I was right :/

The code I used:

 object Main extends App {
def f: String => Unit = println _
this f "\u0028\u002e"
}

• I'd crack it, but I don't know Scala. – PkmnQ Jul 25 at 16:32
• Cracked, unless the main method declaration can't use ( either (it works fine in a repl). – nthistle Jul 25 at 17:28

# Befunge 98, Score: 4, cracked

=sp,


Trying to prove ovs' claim that "I don't think this can be made harder in Befunge" wrong. (This answer may still be too easy, but I can say for sure that it is harder than the other one, because I've blocked both self-modifying code operators)

Intended solution:

"PAMI"4('+1+'o1+'r1+'<1+'+1+'ZMZZZZ@

• Are fingerprints allowed? – ovs Jul 25 at 20:52
• "You may be as specific or precise in choosing your language as you wish.". I was very un-specific about what language in the header I used, so any Befunge 98 interpreter can be used the crack this answer, regardless of what features it supports or doesn't support. – pppery Jul 25 at 20:56
• Cracked (using a fingerprint): codegolf.stackexchange.com/a/207607 – my pronoun is monicareinstate Jul 26 at 7:56
• This can also be done with the ORTH and the IMAP fingerprint. – ovs Jul 26 at 8:45
• The intended solution was using IMAP. (I was deliberately vague about whether fingerprints were allowed earlier in an attempt to avoid giving the fact that I used them away). Ah, well, this answer still served its purpose, because it lasted 13 hours, and the previous answer lasted less than an hour, so it was definitely harder) – pppery Jul 26 at 13:55

# CJam, score 6 (Cracked)

"aces'


This will more than likely get cracked, but I couldn't quite manage to make it harder. Hopefully this is difficult enough that it remains open for a little while.

Update: 5 hours, I'll take it. My solution:

1{15-}%135{48+}%1{66+}%1{10-}%

• I'd try, but I don't know CJam. It seems some things are missing from the PDF. Like the double quotes. Sure, that might be obvious, but I don't know what else is missing. – PkmnQ Jul 26 at 6:55
• Cracked – user92069 Jul 26 at 8:05
• @PkmnQ If you're referring to the PDF here, that's only meant as a cheatsheet. I use that PDF for the basics but defer to the wiki on the Sourceforge (which I thought I linked, sorry) for detailed documentation. – Ethan Chapman Jul 26 at 14:05
• @Ethan Chapman Well, time for me to learn CJam and use it for a few weeks, then change to another golfing language. – PkmnQ Jul 26 at 14:55

# C (gcc), score 4 (Cracked)

#_ep


My source code doesn't contain any of these characters and when complied and run, it outputs #_ep to stdout.

• Cracked. Interesting question, I have never had to use inline assembly before. – xibu Jul 26 at 18:19
• @xibu You got it bang on! Well done! :-) – Noodle9 Jul 26 at 19:04

# Java, Score: 3 Cracked

\[;


Hopefully, I didn't mess up this time. Have fun!

# C, score 2 (cracked)

Output {; to stdout.

Probably not that difficult, but I was quite surprised when I first saw this C feature.

# R, Score=23 cracked by Robin Ryder

0123456789+-*/^!&|%()$ This has a worse score than Robin Ryder's currently-latest R challenge, but if you crack this you'll probably crack his one, too. • Clearly, my challenge is easier, as I have a solution to mine but not yours. For yours, without (), we can't even call functions!? – Robin Ryder Jul 26 at 13:31 • @RobinRyder we have '=<>?~" so we can reassign some functions if we are clever... – Giuseppe Jul 26 at 15:16 • @Giuseppe Indeed! I'm so used to using backticks when reassigning functions that I had forgotten quotes worked as well. We are also allowed [], which should be useful. – Robin Ryder Jul 26 at 19:35 • Cracked! (with a lot of sweat!) – Robin Ryder Jul 26 at 22:11 # PicoLisp , score: 1, Cracked (  Writing lisp without parentheses is really easy, with picolisp. • Cracked (Btw, this was fun!) – Ismael Miguel Jul 27 at 18:10 • The output of the linked crack is : (, not (. If this was the intended solution, the challenge is wrong. How do you get picolisp not to display a prompt? – Gilles 'SO- stop being evil' Jul 30 at 22:49 • Comments about a cracked answer shouldn't be on thr cops' post. As you double-commented, I explained my answer there. – Ismael Miguel Jul 31 at 13:21 • @Gilles'SO-stopbeingevil' You run the program as a script like pil script.l instead of typing it in after running pil like jdoodle seems to like to do. – Wezl Jul 31 at 13:45 # APL (Dyalog Unicode), Score: 5, cracked uvUV┼  Can you generate the Unicode box-drawing character U+253C or ⎕UCS 9532 without ⎕UCS or ⎕AV? Any system variable setting (⎕IO, ⎕ML, etc.) can be used. The code should work in TIO's code section, so SALT (and user command) is not available. Since there is no trailing newline in the expected output, use ⍞-printing (which prints to STDERR). • – famous1622 Jul 28 at 23:22 # BBC Basic II, Score: 2, Cracked One more example in a "non-golfing" language: VP (I tested my program on an Acorn BBC model B emulator and on an Acorn Archimedes emulator. However, according to the BBC Basic manual I found in the internet, it should work on "modern" BBC Basic versions for the PC, too.) My solution: The solution in the crack directly writes to the display memory of the BBC model B. This means that the solution would not work on an Archimedes, an x86-based machine or on a second CPU (tube) of a BBC. My solution uses a special feature of BBC Basic: On 6502-based computers (like the BBC), the CALL command calls some assembly function located at a certain address. The value in the variable A% is written to the A register before calling the function. On non-6502 systems (ARM or x86), the CALL command normally works in a similar way; however, if the parameter is the address of an operating system routine of the 6502 operating system, the BASIC does not interpret the argument as address of an ARM or x86 assembly language routine. Instead, the CALL command will more or less emulate a call to the OS of a 6502-based computer for such arguments. For this reason CALL 65518 will always write the byte represented by the value in variable A% to the "standard output" - even on ARM-based computers where 65518 is not a valid code address! Using this feature, the solution is quite simple: 10 A%=80 20 CALL 65518 30 A%=86 40 CALL 65518 • I've never touched any assembly in my life and I'm feeling like that's what I need to do here... Slowly making progress though! – Dom Hastings Jul 27 at 18:29 • @DomHastings Maybe. You will see when the answer is cracked or one week is over. However, you should keep in mind that assembly language differs on different CPU types: I wrote in my comment that my program works on the BBC (6502 CPU), on the Archimedes (ARM CPU) and with a high probability on the PC (x86 CPU), too. – Martin Rosenau Jul 28 at 5:02 • – Dominic van Essen Jul 29 at 11:02 • Thankyou very much for this challenge! I haven't written BBC BASIC for many years, and this was a lot of nostagic fun! – Dominic van Essen Jul 29 at 11:24 ## Perl 5, Score: 80, Cracked !"'*+,-0123456789:;<?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^abcdefghijklmnopqrstuvwxyz{|~  This means that the following printable ASCII characters are permitted:  #$%&()./=>[]_}


Inspired by Dom Hastings's challenges (1, 2, 3) and my solutions (1, 2, 3).

• So, I have a solution, but it relies on an implementation detail and a low-byte char, so I imagine it's not quite right... I'm going to continue just in case I can figure out a more portable way... – Dom Hastings Jul 28 at 20:22
• @DomHastings My solution only uses ASCII characters, but I'd be curious to see what you can gain with an unprintable character: I didn't find a way to make use of one until I no longer had any use for it. My solution technically uses an implementation detail, but one that works very broadly. – Gilles 'SO- stop being evil' Jul 28 at 21:51
• Cracked, although if this isn't the intended solution, adding \x18 to the output would give me another chance to figure out how to generate a! – Dom Hastings Jul 29 at 16:56
• @DomHastings Nice! Pretty different from my solution. I'm going to make another challenge that forbids $^X, but first I want to try and see if I can close another loophole. – Gilles 'SO- stop being evil' Jul 29 at 17:49 • @DomHastings Here we go. In addition to forbidding some control variables with system-dependent content, I'm also trying to steer you away from constructing numbers as the length of a list. If you're stuck, start with / instead of ?, it lets you do pretty interesting things, but I eventually decided that it was an unnecessary indulgence. – Gilles 'SO- stop being evil' Jul 30 at 1:38 # Ruby, Score: 11, Cracked p.'"?%([:<  Take 2, after @DomHastings and @Gilles'SO-stopbeingevil' found unintended weaknesses in the original. I've fortified this version by adding p and $$$$ to the list of forbidden characters. As before, my code outputs to STDOUT with no trailing newline and works for Ruby 1.8.7 onwards. # Dirty, Score: 8 - Cracked hd of []  This is way too easy for people who knows this language... (I don't.) ## Intended Solution: 1  Yeah, you read that right. • Cracked – Dingus Aug 1 at 2:51 # Dupdog, Score: 10 - Cracked [\x0e][\x0c] [\x10][\x0e][\x18][\x16] 39  May I join the fun? Inside brackets are escape characters. Assuming linux line-breaks. ## Intended Solution ~!!?*  I love short codes. • This should be really really trivial, by the way - none of the three Dupdog commands (?!~) happens to be in the output, so basically, this is a "Print X" challenge. The answer is suspiciously short - can you find it? – HighlyRadioactive Jul 28 at 13:22 • Cracked – Dingus Aug 1 at 4:20 # Malbolge, score: 2, Cracked To  In Malbolge, the "print X" part of the challenge should be hard enough by itself. Original solution: ('&%$#"!~}|{2V0w.R?`

Try it online!

• – water_ghosts Aug 1 at 4:54