# 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

# Python 3, Score:96 Cracked by pxeger

Similar to my other answer, improvements inspired by Wheat Wizard's crack. Still self-verifying.

Output viewed through hexdump (non-printable output makes it look incorrect on the terminal):

$python3 ./test4.py | hexdump -C 00000000 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 18 |................| 00000010 19 1a 1b 1c 1d 1e 1f 21 22 23 24 25 26 27 2a 2b |.......!"#$%&'*+|
00000020  2d 2f 30 31 32 33 34 35  36 37 38 39 3a 3b 3c 3d  |-/0123456789:;<=|
00000030  3e 3f 40 41 42 43 44 45  46 47 48 49 4a 4b 4c 4d  |>?@ABCDEFGHIJKLM|
00000040  4e 4f 50 51 52 53 54 55  56 57 58 59 5a 5b 5c 5d  |NOPQRSTUVWXYZ[\]|
00000050  5e 60 64 6b 70 71 76 77  78 79 7a 7b 7c 7d 7e 7f  |^dkpqvwxyz{|}~.|
00000060


Original:

Script generating script:


import re

filecode = "__builtins__.__getattribute__('globals')().__getitem__('__file__')"
code = "__builtins__.__getattribute__('open')(1,chr(119)).__getattribute__(str().join([chr(119),chr(114),chr(105),chr(116),chr(101)]))(str().join([b for b in (chr(u) for u in __builtins__.__getattribute__('range')(9,128)) if b not in __builtins__.__getattribute__(str().join((chr(111),chr(112),chr(101),chr(110))))(__file__,chr(114)).__getattribute__('read')()]))"

code = code.replace('__file__',filecode)
code = code.replace('[','(')
code = code.replace(']',')')

squots = re.compile("'([^']+)'")

dquots = re.compile('"([^"]+)"')

def fy(x):
return f"str().join(chr(b) for b in {repr(tuple([ord(x) for x in x.group(1)]))})"

def replaceliterals(x):
xx = squots.sub(fy,x)
return dquots.sub(fy,xx)

digits= re.compile("\d+")
open(1,'w').write(digits.sub(lambda x: f"len({repr(tuple([tuple()]*int(x.group(0))))})",replaceliterals(code)))


Try the result online!

• cracked – pxeger Jan 27 at 19:37

# R, Score=13

-/+0123456789


Printing characters without using digits should be tricky (and I'm pretty confident that you won't find a way to sneak in a utf8ToInt!). I wouldn't be surprised if the crack ends up completely different from my own solution.

• Robin: I hope that I have not duplicated your challenge, and that adding some extra characters to my challenge actually makes it tricker. If your secret solution will already crack my challenge, I'll withdraw it (but obviously I've already cracked yours...). – Dominic van Essen Jul 26 '20 at 13:16
• @DominicvanEssen No, my solution doesn't crack yours, so it isn't a duplicate! And I thought mine was hard... – Robin Ryder Jul 26 '20 at 13:20
• I'm trying to make a new crack to yours that doesn't give away my own one. That could even be a new challenge: 'crack X without cracking Y'... – Dominic van Essen Jul 26 '20 at 13:29
• Cracked! curious what your intended solution was. I don't think this approach will be quite so fruitful for Dominic's, though. – Giuseppe Jul 26 '20 at 15:38
• @Giuseppe Well done! I'll wait a couple of days before adding my (completely different) solution, as I might be able to channel the idea into another challenge. – Robin Ryder Jul 26 '20 at 19:32

# 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 '20 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. – The Fourth Marshal Jul 25 '20 at 20:56
• Cracked (using a fingerprint): codegolf.stackexchange.com/a/207607 – the default. Jul 26 '20 at 7:56
• This can also be done with the ORTH and the IMAP fingerprint. – ovs Jul 26 '20 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) – The Fourth Marshal Jul 26 '20 at 13:55

# C, score 2 (cracked)

Output {; to stdout.

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

# Python 2, Score: 7 (Cracked)

cdnsvw,


Note: There is no newline at the end

# R, Score=14 cracked by Giuseppe

0123456789([aE


My previous challenge was cracked (embarassingly within less than a day) using indexed-retrieval of the searched-for characters from within larger expressions/strings.

This challenge is intended to make that approach more difficult.

# Solution

Giuseppe's crack was different in several places, so here's the solution that I had in mind when I posed the challenge:

    # make some numbers:
zero=T-T
two=T+T
three=T+T+T
one=three-two
four=T+T+T+T
five=T+T+T+T+T
six=T+T+T+T+T+T
seven=T+T+T+T+T+T+T
eight=T+T+T+T+T+T+T+T
nine=T+T+T+T+T+T+T+T+T
ten=nine+one

# zero to nine is the first series of digits in the output string:
zerotonine=zero:nine

# 40, 69 and 91 are the ASCII values of ([ and E
forty=ten+ten+ten+ten
sixtynine=forty+ten+ten+ten-one
ninetyone=forty+forty+ten+one

# now we need to get some of the 'forbidden' functions
# first we use 'tolower' to get the (lowercase) function names of 'apropos',
# 'tail' and 'cat' (so we avoid the the lower-case letter 'a')
~=tolower
b=~'APROPOS'
A=~'A'
t=~'TAIL'
c=~'CAT'

# Now we can use 'get()' to get the functions from the names
?=get
~=?b          # apropos()
i=~'intToUtf'   # look-up the full-length 'intToUtf8' function name
!=?i          # intToUtf8()

# Now we've got 'intToUtf8()' we can create the forbidden characters
p=!forty;b=!ninetyone;e=!sixtynine

# We want to paste them all together with no separator.  Since we can't easily give
# multiple arguments to a function (because we're always replacing binary operators),
# we need to construct 'paste0'.  This is the second function looked-up using
# 'PAST' (without the final E), so we use 'tail()' to get it.
-=?t
pp=~'PAST'
ppp=pp-one
+=?ppp

# Finally, we build our string using our new 'paste0' function, and use 'cat()'
# to output it:
string=zero+one+two+three+four+five+six+seven+eight+nine+p+b+A+e
~=?c
~string


Try it online!

# Java, Score: 3 (Cracked)

.\



Round two for this solution, fixing the previous crack. As with the original, the output from my solution was to standard error.

• While I was doing research for this, I stumbled upon this, which is basically almost identical -- since I'm assuming this isn't intended either, I'm going to some time looking for something better (I'm kinda close on a reflection approach). – nthistle Jul 27 '20 at 3:10
• Cracked. @nthistle, you really helped me! – user Jul 27 '20 at 19:35
• @user Same trick I used, just in a different format; I just made my main class extend Exception, allowing me to invoke printStackTrace without a dot from its constructor. I guess I could have just reposted again blocking colons (to prevent creating an Autocloseable from a Throwable), but I think twice is enough for one solution, especially when you're that close. Good work! ...still would be interested in seeing the Reflection that nthistle was planning, though... – MCross Jul 27 '20 at 21:51
• Not sure you can use reflection for this - I just spent half the day trying to do it, but you have to use dots in Java to do anything more than this – user Jul 27 '20 at 21:53
• Yeah, the reflection ended up being a non-starter. The originally idea was basically to use method references (which you only need :: to get) to something like System.err::write and then find a way to invoke them, but invoking method references in Java basically requires ., unless I could find something in the standard library that would invoke it for me (unlikely). Likewise, you can't really use reflection to even access the err attribute of System without using a . somewhere. – nthistle Jul 27 '20 at 22:50

# Perl 5 + -p, Score: 77, Cracked!

 "#'+\-/0123456789:<>ABCDEFGHIJKLMNOPQRSTUVWXYZ\^abcdefghijklmnopqrstuvwxyz|~


Note: there is a leading space on this line. This leaves you with:

!$%&()*,.;=?@[]_{}  So much for trying to get a low score, there's too many ways to do it! ## My approach First, it's necessary to break out of the while(<STDIN>) loop using }{. My aim wasn't to stop printing, but to make generating the string difficult. Without access to any letters immediately, it's tricky, but using the trick Gilles used $_=*_ you get main::_ which provides a and : (stored in $;) which we'll need later. Accessing these is also tricky as you can't index into strings directly like you can in some languages, but we still have ? which (up until v5.22.0) works similarly to /.../ allowing us to repeatedly match a section, store in $_ (via $_=$&) and match again. a&_ yields A and using that in a range with _ (or aa/AA) produces the list of uppercase and lowercase chars needed (stored in @@ and @!), accessing the indices is a little tricky without numbers, but these can be easily generated using list lengths to generate 0-9 and then concatenation to build larger numbers, although having enough short variables to store data in is an annoying problem to have. To generate the string I used a program to build the numbers I wanted, but it would be a lot shorter using ranges and I pass the codepoints into pack (by calling CORE::pack, via &{'CORE::pack'})using C77 as the definition which stores the desired string in $_ which is implicitly printed. }{$_=*_;
?......$?;$_=$&; ?.?; @@=$&.._;
@!=(_&$&).._; ?..$?;
$_=$&;
?.?;
$;=$&;
$%=!$?;
$==()=(_,_);${$![$?]}=()=(_,_,_);
$$=()=(_,_,_,_); *=()=(_,_,_,_,_); ,=()=(_,_,_,_,_,_); .=()=(_,_,_,_,_,_,_); @=()=(_,_,_,_,_,_,_,_); }=()=(_,_,_,_,_,_,_,_,_); _=&{![=].![%.].![%..].![].;.;.@[%.*].@[?].@[=].@[%.?]}( ![=]...., {![?]}.=, {![?]}.$$,
${$![$?]}.$*,
${$![$?]}.$},
$$.{![?]},$$.$*, $$..,$$.$@,
$$.}, *.?, *.%, *.=, *.{![?]}, *.$$,
$*.$*,
$*.$,,
$*.$.,
$*.$@,
$,.$?,
$,.$=,
$,.$*,
$,.$,,
$,.$.,
$,.$@,
$,.$},
$..$?,
$..$%,
$..$=,
$..${$![$?]},
$..$$, ..*, ..,, ..., ..@, ..}, @.?, @.%, @.=, @.{![?]}, @.$$,$@.$*,$@.$,,$@.$.,$@.$@,$@.$},$}.$?,$}.$=,$}.$$, }.,, }.., }.@, }.}, %.?.?, %.?.%, %.?.=, %.?.{![?]}, %.?.$$,
$%.$?.$*,$%.$?.$,,
$%.$?.$.,$%.$?.$@,
$%.$?.$},$%.$%.$?,
$%.$%.$%,$%.$%.$=,
$%.$%.${$![$?]},$%.$%.$$, %.%.*, %.%.,, %.%.., %.%.@, %.%.}, %.=.?, %.=.%, %.=.=, %.=.$$,$%.$=.$,
)



Try it online! (with slight modifications to make it work on more moderns versions)

• Cracked. I found -p to be an extra difficulty. Was that intended, or did you intend a completely different approach for which -p would help? – Gilles 'SO- stop being evil' Jul 28 '20 at 1:19
• @Gilles'SO-stopbeingevil' Nice one! It was intended to give you an easy out, but it's not obvious, it'd possible to prepend the code with }{ and escape out of the block, apologies that it caused extra stress! I think you got all the rest of the tricks and underhanded stuff I laid out, ?...? was worrying me, I didn't know if it was too obscure! I'll share my solution later too when I'm at the computer! – Dom Hastings Jul 28 '20 at 6:18
• Hey, the fun of the search is the point. We certainly haven't reached the end. My turn to cop. Without -p, though I'm curious if a solution for -p exists without {. I made my challenge mostly because I was close to a solution without using *=, then I realized that *_ made things a lot simpler. – Gilles 'SO- stop being evil' Jul 28 '20 at 12:34

# PicoLisp , score: 1, Cracked

(


Writing lisp without parentheses is really easy, with picolisp.

• Cracked (Btw, this was fun!) – Ismael Miguel Jul 27 '20 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 '20 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 '20 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 '20 at 13:45

# 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


• Cracked – Dingus Aug 1 '20 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? – null Jul 28 '20 at 13:22
• Cracked – Dingus Aug 1 '20 at 4:20

# Fortran (GFortran), Score: 18, Cracked

Pp1234567890'"+-*/


My code outputs to STDOUT with no leading whitespace and a trailing newline.

### My solution

@Gilles'SO-stopbeingevil' used exactly the same approach in the crack, with minor differences in implementation:

 character(bit_size(i)) :: fmt, out
izero = floor(epsilon(r))  ! len_trim(achar(bit_size(i))) also works
ione = ceiling(epsilon(r)) ! len(achar(bit_size(i))) also works
itwo = ibset(izero,ione)
ithree = ibset(ione,ione)
ifour = ibset(izero,itwo)
ifive = ibset(ifour,izero)
isix = ibset(ifour,ione)
iseven = ibset(isix,izero)
ieight = ibset(izero,ithree)
inine = ibset(ieight,izero)
iten = ibset(ieight,ione)
ieleven = ibset(iten,izero)
itwelve = ibset(ieight,itwo)
ithirteen = ibset(itwelve,izero)
ifourteen = ibset(itwelve,ione)
ififteen = ibset(ifourteen,izero)
isixteen = ibset(izero,ifour)
iseventeen = ibset(isixteen,izero)
ieighteen = ibset(isixteen,ione)
fmt(ione:ione) = achar(ibset(ieight,ifive))
fmt(itwo:itwo) = achar(ibset(ione,isix))
fmt(ithree:ithree) = achar(ibset(inine,ifive))
out(ione:ione) = achar(ibset(isixteen,isix))
out(itwo:itwo) = achar(ibset(ibset(isixteen,ifive),isix))
out(ithree:ithree) = achar(ibset(iseventeen,ifive))
out(ifour:ifour) = achar(ibset(ieighteen,ifive))
out(ifive:ifive) = achar(ibset(ibset(ithree,ifour),ifive))
out(isix:isix) = achar(ibset(ibset(ifour,ifour),ifive))
out(iseven:iseven) = achar(ibset(ibset(ifive,ifour),ifive))
out(ieight:ieight) = achar(ibset(ibset(isix,ifour),ifive))
out(inine:inine) = achar(ibset(ibset(iseven,ifour),ifive))
out(iten:iten) = achar(ibset(ibset(ieight,ifour),ifive))
out(ieleven:ieleven) = achar(ibset(ibset(inine,ifour),ifive))
out(itwelve:itwelve) = achar(ibset(isixteen,ifive))
out(ithirteen:ithirteen) = achar(ibset(iseven,ifive))
out(ifourteen:ifourteen) = achar(ibset(itwo,ifive))
out(ififteen:ififteen) = achar(ibset(ieleven,ifive))
out(isixteen:isixteen) = achar(ibset(ithirteen,ifive))
out(iseventeen:iseventeen) = achar(ibset(iten,ifive))
out(ieighteen:ieighteen) = achar(ibset(ififteen,ifive))
write(isix,fmt(ione:ithree)) out(ione:ieighteen)
end


Try it online!

• Cracked. By the way, I don't know Ruby or Fortran beyond the hello world stage. It's an interesting journey. – Gilles 'SO- stop being evil' Aug 1 '20 at 16:11
• I had a feeling this was coming. Maybe now you should say didn't know. 'Hello, World!' generally doesn't take 1000+ bytes in either language :) – Dingus Aug 2 '20 at 4:09

# ><>, score: 20

0123456789abcdef&lol


Forgot the register... happy now?

# Arn, Score: 23 Cracked

15125177041707640200000


Ignore the fact that Arn has a compressed form, the ASCII-only version does not contain any of these characters

## My Solution:

(:*:*:*:*++++++++++++++++++++++++++++++++++++);o


You use the ++ prefix to increment to 18, square it 4 times, and then conver to octal.

• I do not know this language, but can we do something like 9/9+9/9+9/9+9/9+...? – the default. Aug 27 '20 at 4:00
• Can Arn please have an online interpreter? (Or one that can be run in TIO.) – null Aug 27 '20 at 5:17
• It does have an online compiler, here. – ZippyMagician Aug 27 '20 at 11:15
• Yes, @my pronoun is monicareinstate, I believe you could get that answer to work, but that is not the method I intended (so I hope you could figure out a different method). – ZippyMagician Aug 28 '20 at 2:29
• Cracked – Dingus Aug 28 '20 at 3:03

# Dotty 0.26-RC1, Score: 7 (Safe)

"+. p\{


Earlier versions may work too, like 0.25 and 0.24, but I'm not totally sure how low you can go, since Dotty's features keep changing.

Harder version, score: 8 (I still had the same solution for this, but the one above may have alternate cracks, and this doesn't allow them, hopefully.)

"+. p\{[


## Update

Since my answer's over a week old now, here's the solution I got (I'm sure it could be made shorter, but whatever)

objectMain:
@main
defmain=(Consoleout)write(newString()concat((34toChar)toString)concat((43toChar)toString)concat((46toChar)toString)concat((32toChar)toString)concat((112toChar)toString)concat((92toChar)toString)concat((123toChar)toString)getBytes)


I basically just used concat instead of +, xx.toChar.toString to get around the ", postfix and infix syntax to get around the ., and the backtick to get around the restriction on spaces.

A couple Dotty-specific features that helped: @main meant I didn't have to write (args: Array[String]), saving me [, and Dotty's new indentation-based syntax let's you use : instead of curly braces. Note that even though you see spaces here and in the playground, Dotty does let you use tabs.

Try it in Scastie

Bonus (the same thing, but no parentheses this time)

"+. p\{(


Here's my solution to it (unfortunately, the backticks were removed, because I don't know how to put code in spoilers, but imagine they were there)

 objectMain:
@main
defmain=
vala=34toChar
valb=43toChar
valc=46toChar
vald=32toChar
vale=112toChar
valf=92toChar
valg=123toChar
valh=40toChar
vali=newStringBuilder
iappendaappendbappendcappenddappendeappendfappendgappendh
valj=itoString
valk=jgetBytes
vall=Consoleout

lwritek


Scastie

# Python 3, Score: 86 Cracked by Wheat Wizard


!"#$%&'*+-/37:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\^kmpqvwxyz{|}~  Self-verifying (will not print a character in the source), new-line is part of the output set. Apologies for the squares, not sure if the codes are valid or got replaced when pasting the output into my answer. Not done with any unicode tricks. I could probably reduce my score, but choose to keep it simple instead. Original code: __builtins__.__dict__[str().join([chr(111),chr(112),chr(101),chr(110)])](1,chr(119)).__getattribute__(str().join([chr(119),chr(114),chr(105),chr(116),chr(101)]))(str().join([b for b in [chr(u) for u in range(9,128)] if b not in __builtins__.__dict__[str().join([chr(111),chr(112),chr(101),chr(110)])](__file__,chr(114)).read()]))  I think it reads itself for each iteration of the list comprehension. Had to change my editor settings to prevent it from automatically adding a newline at the end of the file. • Welcome to the site. It might be preferable to link your output on TIO or provide a list of codepoints. SE has chopped some of the unprintables - copy/pasting only shows 70 bytes. – Dingus Jan 25 at 22:33 • Thanks! for simplicity the codepoint integer values are: 9,10,11,12,10,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,37,38,39,42,43,45,47,51,55,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,92,94,96,107,109,112,113,118,119,120,121,122,123,124,125,126,127 – M Virts Jan 25 at 22:44 • This means you can use the characters (),.01245689[]_abcdefghijlnorstu or code points [0,1,2,3,4,5,6,7,8,13,32,40,41,44,46,48,49,50,52,53,54,56,57,91,93,95,97,98,99,100,101,102,103,104,105,106,108,110,111,114,115,116,117]. Also worth noting that code-point "10" (newline) appears twice in the output according to the code point list. – Wheat Wizard Jan 26 at 9:58 • Cracked. It was good fun. – Wheat Wizard Jan 26 at 10:42 • Nice! Good catch on the double newline, looks like I should have opened my output file in binary mode, the second 10 should have been a 13! – M Virts Jan 26 at 12:03 # Keg, Score: 10 Cracked doesn't\\  This'll take some extra thinking for you all. Apparently not. ¶7ƛ;¶¶Z¶ⁿ2+¶¶ • Cracked – user92069 Jul 26 '20 at 5:31 • @Third-party'Chef' beat me to it by less than a minute :) – Ethan Chapman Jul 26 '20 at 5:32 # Befunge 93, score 12 (Cracked) ,0123456789"  Not too hard to figure out in theory, but a pain to implement (at least the way I did it). # Python 2, Score: 14 (Cracked) "'0123456789dt  Note: There is no newline at the end # 05AB1E, Score: 21, Cracked X = •”“’‘Ž…„'"ഭ0123456789 A bit more difficult entry :) edit Cracked by @nthistle • Cracked – nthistle Jul 25 '20 at 23:51 • I'm thinking without blacklisting ç or some way to get arbitrary values on the stack, it's going to be difficult to stop my approach from working (and removing the ability to put arbitrary values on the stack will make it hard to do anything in 05AB1E...) – nthistle Jul 25 '20 at 23:52 • True. I'll think about that. – SomoKRoceS Jul 26 '20 at 18:45 # Ruby, Score: 7, Cracked by @Dom Hastings p<.$a1d


Attempt number 3 after being foiled by @nthistle and @Dom Hastings.

• So I've got another crack, but I'm pretty sure it's still not the one you're expecting and I don't want you to get bored of having alternative cracks, so I'm looking for more alternatives... – Dom Hastings Jul 26 '20 at 18:51
• I found another method, which could be a little closer perhaps? codegolf.stackexchange.com/a/207640/9365 – Dom Hastings Jul 26 '20 at 19:25
• That was it! Nicely researched. – histocrat Jul 26 '20 at 21:02

# J, Score: 3 (Cracked)

Aiming for a low score, so might not be hard to crack. Blocks the straight-forward ways to convert a number to a character.

au.


Only tested with j9.

• Cracked – nthistle Jul 26 '20 at 22:22

# R (with CRAN packages installed), Score: 3, cracked

([{


Yes folks, no brackets!

You may assume that any CRAN package is installed, but as per standard rules not loaded.

I haven't posted an R version number although your solution might reasonably depend on that, I'm happy to accept an answer for any version of R after 3.0.0.

Update: this is possible without using any CRAN packages, but given I originally posted this allowing CRAN packages, I won't change it.

• Cracked (no packages needed) – Robin Ryder Jul 27 '20 at 12:23

# J, Score: 3 (Cracked)

After nthisle cracked my previous challenge, here is a slightly harder challenge.

u:.

• Cracked. – Bubbler Jul 27 '20 at 14:14

# R, Score=27, cracked by Dominic van Essen

We have had several R challenges on this thread already. All the solutions needed a t (for cat, get or other functions), so here is one where you will have to avoid that letter. I also threw in a v to forbid eval, as I don't really understand all of the magic you can do with eval...

t <-
"0123456789=[\\]^_v"


• I like that the output is perfectly fine R code, but now I'm definitely not going to get any work done today. – Giuseppe Jul 27 '20 at 16:54
• I've got a solution, but I won't have time to create all the numbers by making sum(T+T+...) for a while yet... – Dominic van Essen Jul 27 '20 at 18:24
• @DominicvanEssen Note that you are allowed *, which can make it easier to represent numbers. – Robin Ryder Jul 27 '20 at 18:48
• That's a good point. I've posted an explanation of the crack now. I'll update it in a little bit by substituting in all the numbers... Hope it's Ok for now. – Dominic van Essen Jul 27 '20 at 18:55
• Good enough for me, well done! I should have disallowed more characters. My solution would allow for disallowing l and o as well; I'll probably post it tomorrow (but I don't want to flood this thread with rather similar R challenges!) – Robin Ryder Jul 27 '20 at 19:23

# TSQL (SQL server), Score: 1, Cracked

X = (

I have made a post on meta which asks what is considered SQL output, but no answer yet. Feel free to consider my post cracked on either the result-set output (1x1 or 0x1 cells only though), or the print output (print/raiserror low severity). I am not including raiserror with high severity because OP said in case we use the error output we should say so, and I don't.

My first post here, feel free to edit if I missed anything.

• – Joshua Jul 28 '20 at 16:28

# Javascript (browser), score: 34

ABDEFGINOPGTUVZ234567890tf[evalsic

I am not going throw away my chance! Yes, I like Hamilton. (You may input code in the console).

• Answer is safe. – PkmnQ Aug 18 '20 at 15:44

# Ruby, Score: 23, Cracked

cdp0123456789.'"?%([:<


Take 3, and hopefully this time I've better captured my intentions! The score has more than doubled over the previous iteration, largely thanks to the digits. Also now banned are c and d. For what it's worth, my code has hardly changed.

Previous challenges in the series:

Take 1 (score 9), cracked by @DomHastings. (@Gilles'SO-stopbeingevil' exposed another fatal flaw.)

Take 2 (score 11), cracked by @Gilles'SO-stopbeingevil'.

# Ruby, Score: 16, Cracked

cdopr.'"?%([{:<


OK, fourth and final take! The score has actually dropped now that I've realised (thanks to chief nemesis @Gilles'SO-stopbeingevil') that banning digits is redundant. But there will be no more String or Array (r), no more Float (o), and no more interpolation into regexps ({), thank you very much.

I'll surrender if this one is cracked . . . probably more like when this one is cracked :)

Previous challenges in the series:

Take 1 (score 9), cracked by @DomHastings. (@Gilles'SO-stopbeingevil' exposed another fatal flaw.)

Take 2 (score 11), cracked by @Gilles'SO-stopbeingevil'.

Take 3 (score 23), cracked by @Gilles'SO-stopbeingevil'.

### My solution

I surrender. Here is my code:


D = RUBY_DESCRIPTION
M = X=~/M/ && $& Y = X=~/Y/ &&$&
a = X=~/a/ && $& b = X=~/b/ &&$&
e = D=~/e/ && $& g = X=~/g/ &&$&
i = X=~/i/ && $& k = X=~/k/ &&$&
n = D=~/n/ && $& O = X=~/O/i &&$&
P = X=~/P/i && $& R = X=~/R/i &&$&
s = X=~/s/ && $& t = X=~/t/ &&$&
u = X=~/u/ && $& One = X=~/\w\w\w\w-/ &&$&=~/^\w/ && $& thRee = X=~/\w-/ &&$&=~/^\w/ && $& nine = X=~/\w\w\w-/ &&$&=~/^\w/ && $& sPaCe = X=~/ / &&$&
DOt = D=~/\w\s\w\D/ && $&=~/\D$/ && $& lPaRen = X=~/\WC\W/ &&$&=~/^\W/ && $& RPaRen = X=~/)/ &&$&
lsqbR = D=~/\S+$/ &&$&=~/^\W/ &&$& RsqbR = D=~/]/ &&$&
take = DOt+t+a+k+e
C = eval lPaRen+b+DOt+DOt+e+RPaRen+take+lPaRen+nine+RPaRen+lsqbR+One+RsqbR # eval "('b'..'e').take(9)[1]"
S = eval lPaRen+lPaRen+M+DOt+DOt+Y+RPaRen+take+lPaRen+nine+RPaRen+lsqbR+thRee+RsqbR+DOt+DOt+Y+RPaRen+take+lPaRen+nine+RPaRen+lsqbR+thRee+RsqbR # eval "(('M'..'Y').take(9)[3]..'Y').take(9)[3]"
PutC = P+u+t+C+sPaCe
stRing = S+t+R+i+n+g+sPaCe
suCC = DOt+s+u+C+C
zeRO = eval stRing+One+lsqbR+One+RsqbR
twO = eval stRing+One+suCC
fOuR = eval stRing+thRee+suCC
five = eval stRing+fOuR+suCC
six = eval stRing+five+suCC
seven = eval stRing+six+suCC
eight = eval stRing+seven+suCC
eval PutC+nine+nine
eval PutC+One+zeRO+zeRO
eval PutC+One+One+One
eval PutC+One+One+twO
eval PutC+One+One+fOuR
eval PutC+fOuR+six
eval PutC+nine+six
eval PutC+thRee+nine
eval PutC+thRee+fOuR
eval PutC+six+thRee
eval PutC+thRee+seven
eval PutC+fOuR+zeRO
eval PutC+nine+One
eval PutC+One+twO+thRee
eval PutC+five+eight
eval PutC+six+zeRO


Try it online!

Explanation:

The basic idea is to build the output exclusively by extracting characters from predefined strings, then using those characters to build other necessary characters using eval.

I made the mistake of extracting characters from RUBY_COPYRIGHT and RUBY_DESCRIPTION, neither of which contain the essential c. If I'd used $LOADED_FEATURES, as @Gilles'SO-stopbeingevil' did, I would have had an easier time. I also made things difficult for myself by avoiding digits. Even had digits been banned (as they were in Take 3), they can be easily derived using $\$.

RUBY_COPYRIGHT and RUBY_DESCRIPTION are strings (both added in 1.8.7) that both contain some fixed text and some version/platform-dependent text. For the Ruby version currently on TIO, these strings are as follows, with fixed text (common across all Ruby versions/platforms) indicated in bold:

RUBY_COPYRIGHT = ruby - Copyright (C) 1993-2019 Yukihiro Matsumoto
RUBY_DESCRIPTION = ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]"

I limited myself to extracting characters from the fixed parts of these strings so as not to tie the code to a particular version/platform.

I start out by grabbing a bunch of necessary letters through simple regexp matching, with the i flag used for case insensitivity to help with o, p, and r. I also grab the version-independent digits 1, 3, and 9, the space, . (for method calls), ( and ) (for grouping), and [, and ] (for indexing).

Now comes the tough part: I need a c to create either chr or putc (I used the latter) to convert numbers to their corresponding ASCII characters. I also need a way to create the remaining digits that I don't have, and sure enough the method to do that—succ—also contains c. (A synonym for succ is next, which I avoided because I couldn't get an x without using the platform-dependent x86_64-linux part of RUBY_DESCRIPTION.) Agonisingly, there are two (uppercase) Cs in RUBY_COPYRIGHT, but with no way to convert them to lowercase (you guessed it, downcase and swapcase also contain c) they're useless.

On top of that, I need an (uppercase) S to make String because succ (called via eval) ends up generating integers rather than strings.

After much wailing and gnashing of teeth, I realised that I had just enough characters to create take, fortuitously allowing me to extract c from the range ('b'..'e'). A double take was needed to get S from the range ('M'..'Y') (Matz's initials). See the comments in the code for a better idea of how this works.

With that out of the way, the rest is pretty straightforward. I make the putc, String, and succ methods by concatenating characters, use these to get the remaining digits, and then print the required characters.