39
\$\begingroup\$

This is the robber's thread of a challenge. You can view the cop'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 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 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 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 this 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

Robbers will be scored by the total number of successful cracks with more cracks being better.

\$\endgroup\$
1
  • 5
    \$\begingroup\$ Congrats on an excellent challenge with high 'replay value'. I've had a lot of fun participating on both sides, digging into a couple of languages for the first time along the way. \$\endgroup\$
    – Dingus
    Aug 20 '20 at 3:22

136 Answers 136

4
\$\begingroup\$

Python 2, cracks @Mukundan314's answer

C="%x"%12
D="%x"%13
S="73"
S=getattr(*([S]+[D+"e"+C+"o"+D+"e"]))
S=S("hex")
W="77"
W=getattr(*([W]+[D+"e"+C+"o"+D+"e"]))
W=W("hex")
P1=__import__(S+"y"+S)
P2=getattr(*([P1]+[S+"t"+D+"out"]))
P3=getattr(*([P2]+[W+"rite"]))
P4="63646e7376772"+C
P5=getattr(*([P4]+[D+"e"+C+"o"+D+"e"]))
P6=P5("hex")
P3(P6)

Try it online!

Explanation: First, we can immediately figure out what builtins we have available to us with the following snippet:

for b in dir(__builtins__):
  if not any(c in b for c in "cdnsvw,"):
    print(b)

Of immediate interest is getattr. My original approach used this along with eval, but then I realized that v was banned... (c is also banned so no exec). In any case, as long as we can get arbitrary characters and we have getattr, it's game over. Of course, no c, so no chr, so how do we get arbitrary letters? Indexing into dir() is out too, because we don't have access to d.

Well, Python 2 has this neat trick where you can decode hex strings by simply doing str.decode("hex"). "decode" requires both "c" and "d", so we need to get those characters first, but fortunately they're hex digits, so we can just retrieve them with "%x"%12 and "%x"%13, respectively (Note: the reason we can do this here, but not to get dir is because decode is an attribute of strings, which we can get, whereas dir is an attribute of __builtins__, which we can't get because of the s).

The last trick is to evade , in our getattr calls, which we can do by using arg expansion on a list, which we construct by adding lists together: getattr(a,b) <=> getattr(*([a]+[b])). From here we just chain together these primitives. Translated, the answer looks like:

__import__("sys").stdout.write("63646e7376772".decode("hex"))
\$\endgroup\$
2
  • 1
    \$\begingroup\$ You can use octal codes to write "something" as "\163\157\155\145\164\150\151\156\147" etc. eliminating the need for decode. The intended solution has a very similar approach. \$\endgroup\$ Jul 27 '20 at 15:18
  • \$\begingroup\$ Ah, thanks for the tip. Nice intended solution! Good to know I wasn't too far off, though. \$\endgroup\$
    – nthistle
    Jul 27 '20 at 23:10
4
\$\begingroup\$

Java, cracks MCross's answer

class Puzzle {
  public static void main(String[] args) throws Throwable {
    try (AutoCloseable a = new Throwable() {
        {
            setStackTrace(new StackTraceElement[0]);
        }
        @Override
        public String toString() {
            return "" + (char)(46) + (char)(92);
        }
    }::printStackTrace) {}    
  }
}

All the credit goes to @nthistle, who found this resource, which I shamelessly copied.

It uses a method reference to override AutoCloseable's close method, which gets invoked at the end of a try-with-resources block. The toString method contains the actual message, and the setStackTrace part ensures it doesn't print the actual stacktrace afterwards.

\$\endgroup\$
4
\$\begingroup\$

JavaScript (Browser) (3709 bytes), cracks @Sparkles the Unicorn's answer

-693 bytes thanks to Bubbler's suggestion to use String.fromCharCode only once

console.log(String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[]))+String.fromCharCode(((+!+[])+(+!+[])+(+!+[])+(+!+[]))*([+!+[]]+[+[]])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])+(+!+[])))

Try it online!

No numbers? No problem! Also, note the suspicious lack of C and S in the output string. This immediately clued me in to String.fromCharCode – the only problem is how to produce numbers, since all number literals are banned. Fortunately, JavaScript has some really awful type juggling, so you can produce the number 3, for instance, like (+!+[])+(+!+[])+(+!+[]).

In practice, as long as ()+[]! are all allowed, you can just use JSFuck to convert the whole thing, but it really inflates the size (the version of my answer wouldn't fit in this post), and no C and S made me assume that String.fromCharCode was the intended solution anyways. I did borrow the literals for 1 and 10 in order to construct my character codes, though.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I think you could make it shorter by using String.fromCharCode only once, as it can take multiple values at once (TIO). \$\endgroup\$
    – Bubbler
    Jul 27 '20 at 23:43
  • 1
    \$\begingroup\$ Oh neat, I didn't know that. I updated the answer, but it's definitely nowhere close to optimal -- I have tons of extra parentheses floating around, and there's shorter ways to express say, 65, than (1+1+1+1+1+1)*(10)+(1+1+1+1+1). \$\endgroup\$
    – nthistle
    Jul 28 '20 at 0:11
4
\$\begingroup\$

PicoLisp, cracks @Wezl's answer

Yes, it was indeed simple! First time I heard about PicoLisp!

[prinl [char 40]][bye]

It seems to work on https://www.jdoodle.com/execute-picolisp-online/ with version 18.9.5.

PicoList output


I didn't knew ideone had PicoList prior to posting this, but, someone raised objections due to the output being : ( and not just (.

The : is the prompt for the tool used.
You can verify it in this ideone link: https://ideone.com/4vuYQL (it uses version 18.12.27).

\$\endgroup\$
5
  • \$\begingroup\$ Yes! Exactly. I was hoping someone would try out picolisp. See if you can do it without spaces. (ideone.com doesn't need [bye] at the end, and prin works as well as prinl) \$\endgroup\$
    – Wezl
    Jul 28 '20 at 14:10
  • \$\begingroup\$ @Wezl I believe it is a lot better if you post the intended solution on codegolf.stackexchange.com/a/207691 (as per the definitions of the challenge, quoting: "A crack need only work not be the intended solution."). But it's good to see you confirming my solution as a working one. \$\endgroup\$ Jul 28 '20 at 19:02
  • \$\begingroup\$ The output is : (, not (. \$\endgroup\$ Jul 30 '20 at 22:47
  • 2
    \$\begingroup\$ The output is (, the prompt is :. Check ideone.com/4vuYQL (I didn't knew before that ideone had Picolisp, which is why I didn't use it before). \$\endgroup\$ Jul 31 '20 at 13:17
  • \$\begingroup\$ On my machine and on jdoodle, the output is : (. I know that the : is meant as a prompt, but it's part of what the program prints to stdout. The ideone implemetation is a correct solution. \$\endgroup\$ Jul 31 '20 at 16:54
4
\$\begingroup\$

Ruby, cracks Dingus's third answer

ZERO = $$ - $$
S_ZERO = String ZERO
ONE = -~ZERO
S_ONE = String ONE
S_TWO = String ONE + ONE
S_THREE = String ONE + ONE + ONE
S_FOUR = String ONE + ONE + ONE + ONE
S_FIVE = String ONE + ONE + ONE + ONE + ONE
S_SIX = String ONE + ONE + ONE + ONE + ONE + ONE
S_SEVEN = String ONE + ONE + ONE + ONE + ONE + ONE + ONE
S_EIGHT = String ONE + ONE + ONE + ONE + ONE + ONE + ONE + ONE
S_NINE = String ONE + ONE + ONE + ONE + ONE + ONE + ONE + ONE + ONE

S_TWO_POINT_ZERO = String Float ONE + ONE
S_TWO_POINT_ZERO =~ /#{Array Float ONE}/
DOT = $&

$alakazam_hrto_s = nil
$_ = String global_variables
$_ =~ /#{DOT}#{DOT}/
$& =~ /#{DOT}$/
COLON = $&
$_ =~ /#{DOT}#{DOT}#{COLON}/
$& =~ /#{DOT}#{DOT}$/
$& =~ /#{DOT}/
SPACE = $&
$_ =~ /alakazam_#{DOT}#{DOT}#{DOT}#{DOT}#{DOT}#{DOT}/
$_ = $&
$_ =~ /#{DOT}#{DOT}#{DOT}#{DOT}$/
S_to_s = $&
$_ =~ /#{DOT}#{DOT}#{DOT}#{DOT}#{DOT}#{DOT}$/
$& =~ /#{DOT}#{DOT}/
$_ = eval S_ONE + S_TWO + DOT + S_to_s + SPACE + S_ONE + S_SIX
DOT_CHR = DOT + $_ + $&

f_out = eval S_ONE + S_ONE + S_TWO + DOT_CHR
f_out += eval S_ONE + S_ONE + S_SEVEN + DOT_CHR
f_out += eval S_ONE + S_ONE + S_SIX + DOT_CHR
f_out += eval S_NINE + S_NINE + DOT_CHR
f_out += SPACE

eval f_out + S_NINE + S_NINE
eval f_out + S_ONE + S_ZERO + S_ZERO
eval f_out + S_ONE + S_ONE + S_TWO
eval f_out + S_FOUR + S_EIGHT
eval f_out + S_FOUR + S_NINE
eval f_out + S_FIVE + S_ZERO
eval f_out + S_FIVE + S_ONE
eval f_out + S_FIVE + S_TWO
eval f_out + S_FIVE + S_THREE
eval f_out + S_FIVE + S_FOUR
eval f_out + S_FIVE + S_FIVE
eval f_out + S_FIVE + S_SIX
eval f_out + S_FIVE + S_SEVEN
eval f_out + S_FOUR + S_SIX
eval f_out + S_NINE + S_SIX
eval f_out + S_THREE + S_NINE
eval f_out + S_THREE + S_FOUR
eval f_out + S_SIX + S_THREE
eval f_out + S_THREE + S_SEVEN
eval f_out + S_FOUR + S_ZERO
eval f_out + S_NINE + S_ONE
eval f_out + S_FIVE + S_EIGHT
eval f_out + S_SIX + S_ZERO

Try it online!

Looking at the character set, we can call eval and we have the + operator to concatenate strings. So if we can build arbitrary one-character strings, we're done. In Ruby, creating a character from its numeric code is 123.chr, but we don't have . or c.

I browsed through the list of global variables and predefined functions to see what interesting things I could use given the available characters.

We don't have digits, but since we have arithmetic operators, that's just a minor annoyance. We create variables containing each digit as a string, for later.

Our next objective is to have a way to extract a specific character from a string, without the […] subscript operator. Almost every interesting action on a string is a (non-operator) method call, which is impossible without .. We can do regexp matching. string =~ /./ puts the first character of the string in $&, and string =~ /.$/ puts the last character in $&, but we don't have .. Let's build ..

We can take a floating point number and convert it to a string with String. But we still don't know how to extract the . from that string. There's another way to match a single character in a regexp without simply listing this character, and that's character sets: can we somehow inject [something.somethingelse] into the regexp? Yes! We can inject the value of an expression (converted to a string) with /#{expression}/. And we can build a string surrounded by brackets by building an array, which is represented as [element, ...] as a string. Match "2.0" against /[1.0]/, and we get "." in $&. Now we can extract an arbitrary character from a string with one or two regexp matches (/#{DOT}…#{DOT}/ then /#{DOT}$/ to take the Nth character, or /#{DOT}…#{DOT}$/ then /#{DOT}/ to take the Nth character from the end).

Our next objective is to construct the string ".chr", after which we can construct arbitrary characters as e.g. eval "1" + "2" + "3" + ".chr". We can have hr in the source code but we need to inject them into a string, and we need to get chr from somewhere. A convenient way to inject letters into a string is global_variables, which converts to a string that looks like

[…, :$alakazam_hrto_s, …]

So define a global variable containing hr, add a unique pattern (alakazam_) to anchor it, and match /alakazam_../ against String global_variables. While we're at it, use regexp matching to get ":" and " ", and also "to_s". We can now evaluate "12.to_s 16" to get "c" (hexadecimal representation of 12).

Now that DOT_CHR is ".chr", assemble f_out = "putc", and print the desired characters one by one given their numeric code.

\$\endgroup\$
1
  • \$\begingroup\$ This is really awesome, and much closer to what I had in mind. There are still some interesting differences though: I hadn't considered regexp interpolation and I knew I should have banned r! You also reminded me about $$, which makes banning digits redundant. So if you're not bored of this yet, I think I can make it even more rigid with a lower score. \$\endgroup\$
    – Dingus
    Aug 1 '20 at 1:27
4
\$\begingroup\$

Python 3.7, cracks water_ghosts's answer

import timeit,base64
class A:__class_getitem__=str.lower
class B:__class_getitem__=timeit.repeat
B[A["IMPORT SYS;PRINT('(NUVWXY');SYS.EXIT()"]]

Try it online

I set myself the additional challenge of golfing the solution. I tried a number of different approaches before settling on this one to minimize length; here are the ones that ended up working.

import timeit,base64
class A:__class_getitem__=base64.b32decode.__call__
class B:__class_getitem__=timeit.repeat
a=A["NFWXA33SOQQHG6LTBJYHE2LOOQUCOKDOOV3HO6DZE4UTW43ZOMXGK6DJOQUCS==="]
class C:__class_getitem__=a.decode.__call__
B[C["U8"]]
import timeit,base64
class A:__class_getitem__=chr
class B:__class_getitem__=timeit.repeat
B[A[105]+A[109]+A[112]+A[111]+A[114]+A[116]+A[32]+A[115]+A[121]+A[115]+A[10]+A[112]+A[114]+A[105]+A[110]+A[116]+A[40]+A[39]+A[40]+A[110]+A[117]+A[118]+A[119]+A[120]+A[121]+A[39]+A[41]+A[59]+A[115]+A[121]+A[115]+A[46]+A[101]+A[120]+A[105]+A[116]+A[40]+A[41]]
\$\endgroup\$
3
  • \$\begingroup\$ Your top answer uses a w in str.lower, but the others work. Nice job! Let's see if I can make a new version that blocks the timeit library... \$\endgroup\$ Aug 21 '20 at 3:01
  • \$\begingroup\$ A simpler answer. \$\endgroup\$
    – Razetime
    Aug 21 '20 at 6:03
  • \$\begingroup\$ @water_ghosts I totally didn't notice the w in the first one, thanks for pointing that out \$\endgroup\$ Aug 21 '20 at 15:35
4
\$\begingroup\$

Arn, 216 bytes, cracks @ZippyMagician's answer

one:3/3
two:(one+one)
four:(two+two)
five:(four+one)
six:(five+one)
seven:(six+one)
zero:(one-one)
[one five one two five one seven seven zero four one seven zero seven six four zero two zero zero zero zero zero]:|""

Try it!

Forming digits is easy enough since we still have access to 3, 8, and 9, as well as mathematical operations. We create an array containing the necessary digits and then join with the empty separator "" using the infix :|. Gotchas are (i) the surprisingly low precedence of + and - and (ii) the use of spaces (rather than commas) to separate array elements.

In the comments on the cop, @mypronounismonicareinstate suggested 9/9+9/9+9/9+9/9+... as a possible crack. This approach works in theory but not in the online interpreter, which switches over to scientific notation once the sum reaches 1e21.

\$\endgroup\$
1
  • \$\begingroup\$ Nice job! If I ever do another one I’ve got to remember to print all of the digits so it isn’t so easy :) \$\endgroup\$ Aug 28 '20 at 18:47
4
\$\begingroup\$

Python 3, 8065 bytes, Cracks M Virts' third answer

print(f'''{chr(len('ccccccccc'))}{chr(len('cccccccccc'))}{chr(len('ccccccccccc'))}{chr(len('cccccccccccc'))}{chr(len('ccccccccccccc'))}{chr(len('cccccccccccccc'))}{chr(len('ccccccccccccccc'))}{chr(len('cccccccccccccccc'))}{chr(len('ccccccccccccccccc'))}{chr(len('cccccccccccccccccc'))}{chr(len('ccccccccccccccccccc'))}{chr(len('cccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}{chr(len('ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'))}''')

Try it online!

Pretty self-explanatory. chr(len('')) is used to convert the length of an arbitrary string to its ASCII character, and f-strings are used to join them.

\$\endgroup\$
2
  • \$\begingroup\$ Nice! Almost cracked, if you take out the new lines in your code it will be good to go. Works just like the original \$\endgroup\$
    – M Virts
    Jan 29 at 3:48
  • \$\begingroup\$ Haha oh wait there are only new lines in the tio code! Good enough for me \$\endgroup\$
    – M Virts
    Jan 29 at 3:50
4
\$\begingroup\$

Vyxal, 29401143 bytes, lyxal get cracked on

The backbone of this solution is the generation of arbitrary negative numbers, allowing for indexing to get all the commands we need.


How negative numbers?

u     # Push -1
 .o   # Remove `0.5` Does nothing except convert to string
   Ė  # Execute

We can decrement to any number by stringing many of these snippets together into a series.

Essentially, this executes subtract, then pushes 1. The 1 is used for the next subtraction in the series. This means we need to get rid of the first subtraction in a series and the last 1 in a series.

Subtraction no

To remove the first subtraction:

k□∑∑k□∑∑

This just pushes a couple of 0s, so the first subtraction is just 0-0.

1 no

To remove the last 1:

uPĖ

This uses -1 to turn 1 into an empty string, which is then executed to remove it.

Try it Online!

Why negative numbers tho?

How do arbitrary negative numbers help us? Vyxal uses the same indexing as Python, so we can use negative numbers to index into stuff. However, to index into something, we need i. We don't have that command available to us, but it is in a couple of the builtins, specifically Fizz and aeiou, which we can make use of:

  kv              # Push `aeiou`
    ‛ouo          # Remove `ou`, giving us `aei`
        kfP       # Remove `Fizz`, giving us `ae`
kv         P      # Remove from `aeiou`, giving us `iou`
            ‛ouo  # Remove `ou`, giving us `i`

Now that we have i and any negative number, we can index into our builtins to get useful stuff. For example, we can index into 01234567 to get 1, and we can index into printable ASCII to get + and C. We can use the 1+ over and over to increment a number, then use C to convert it to a character. (Yes, I know I could just push -1 and use - instead of +, which would be a lot shorter, but that's not as fun.)

Once we have the pieces, namely arbitrary negative numbers and indexing, creating a solution becomes trivial. Here's an example for printing !: apparently the link was too long so here's a gist of the program that you can copy into the interpreter.

\$\endgroup\$
4
\$\begingroup\$

Vyxal, 97330683540476391235 bytes ,cracker'sd lyxal's answre

Sample:

ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖPĖĖ11ĖPĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖPĖk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k

How?

The first step was to create arbirtrary numbers in some way. I realised that Ė (eval) was overloaded for numbers as reciprocal, and taking the reciprocal of ko (octal digits, 01234567) with koĖĖ gave 8.100005913004317e-07, which had e and -. Both would prove to be useful.

Stripping 01234567 from printable ASCII gave something starting with 89, which I couldn't remove at that point. But I just got 8.100005913004317e-07, which contains both. If I strip that from (ascii - octal digits), and strip that from printable ASCII, I get the digits!

kPkPkoPkoĖĖPP

Try it Online!

We can get a decimal point from something like 11Ė (1/11, 0.09090909090909091), and stripping both of these from 8.100005913004317e-07 (digits, decimal point, then digits again) gives e-.

koĖĖkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPP

Try it Online!

Since e is exponentiation, we can just push a 1 before, so the e becomes a NOP, and executing this subtracts a 1, decrementing the top of stack.

We do need a better way to push a 1 though, since we have no whitespace. k1k11ooĖ solves this problem, and is nicely stackable.

So with this, we can get arbitrary negative numbers! Here's a script that generates code for a negative input.

Now, we can get e on its own by stripping -1 from e-:

koĖĖkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖP

Try it Online!

\$(-2)^{-2}\$ is 1/4, but since we have reciprocal (Ė), we can revert this back to 4. It is as a float, but by stripping 1/11 (0.090909090..., 11Ė) and re-evaling, we can turn this back into an integer:

k1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖkoĖĖkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPk1k11ooĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖk1k11ooĖk1k11ooĖkoĖĖ11ĖPkPkPkoPkoĖĖPPP11ĖPkPkPkoPkoĖĖPPPĖPĖĖ11ĖPĖ

Try it Online!

e's overload for (string, number) is to get every nth character of the string. If we pass in 4, we can get every fourth character of a string. And if we repeat this four times, we can get the first character of any string shorter than 256 chars.

This discovery breaks it all wide open. If we can get the first character of a string, we can remove it, and a new character will become the first character.

Here's a calculator for the size of a character.

The snippets are just going to look like 1111111....111LC, then summed at the end.

Final length calculation

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

Perl 5 + -p, cracks Dom Hastings's answer

BEGIN { $. = ARGU; ++$.; $_ = z - z; @{$.} = $$_; } $_ = BGOP; tr:A-P:!-;:; $z = $_; $n = $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; $z .= $n; $_ = $.; tr: -z:#-z:; $z .= $_; $_ = BLEPRU; tr:A-Z:B-Z:; $z .= $_; $_ = bdi; tr:G-z:A-z:; $z .= $_; $_ = fijlouw; tr:_-z:f-:; $z .= $_; $_= $z; 

This code must be stored in a file (-e won't work), but the file name doesn't matter. The source code must be a single line (a shebang line breaks it). A trailing newline in the source code is optional. The `` character in tr:_-z:f-: is DEL (ASCII 127); any character code above 126 would do.

-p gives us automatic printing, which is nice since the core printing functions (print, syswrite, say if we managed to define it) have forbidden names. But it requires input. Fortunately we can change where the input comes from in a BEGIN block: @ARGV specifies where the input comes from, so we set this to the script file, which is guaranteed to exist. We arrange for exactly one line of input, so the code after the BEGIN block runs exactly once and the final value of $_ will be printed at the end.

The rest is simple string processing tricks to set @ARGV and $_ without using any of the forbidden characters. Here's an expanded version with comments.

#!/usr/bin/perl -p
BEGIN {
    # Set @ARGV to $0, a file that we know contains exactly one line.
    # This assumes that perl is invoked on a script file, not with -e.
    $. = ARGU; ++$.;
    $_ = z - z;
    @{$.} = $$_;
}
# For the expanded version only: only process the first line.
print "\n" and exit if $line++;
# Build the string using tr to shift permitted characters into forbidden
# characters. Run tr on $_ since =~ isn't permitted. The . operator is
# permitted so we can concatenate the pieces the simple way.
$_ = BGOP; tr:A-P:!-;:; $z = $_;
# For the digits, arithmetic is more convenient than tr.
$n = $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; ++$.; $n .= $.; $z .= $n;
$_ = $.; tr: -z:#-z:; $z .= $_;
$_ = BLEPRU; tr:A-Z:B-Z:; $z .= $_;
$_ = bdi; tr:G-z:A-z:; $z .= $_;
$_ = fijlouw; tr:_-z:f-:; $z .= $_;
# $_ will be printed thanks to -p
$_= $z;

Try it online!

\$\endgroup\$
1
  • \$\begingroup\$ Nice work! Definitely not what I intended, so I'll add a couple more exclusions and try again! \$\endgroup\$ Jul 27 '20 at 10:59
3
\$\begingroup\$

R, cracks JDL's challenge

String to print:

([{

Solution:

"?"=intToUtf8
"+"=c
"!"=cat
!?40+91+123

Try it online!

Explanation: this code is equivalent to

cat(intToUtf8(c(40, 91, 123)))
\$\endgroup\$
6
  • 1
    \$\begingroup\$ Nice. I had this before seeing you had already cracked it! \$\endgroup\$
    – Giuseppe
    Jul 27 '20 at 12:26
  • 1
    \$\begingroup\$ @Giuseppe It looks like apropos is becoming your tool of choice! \$\endgroup\$ Jul 27 '20 at 12:28
  • \$\begingroup\$ I had originally started with magrittr::%>%` -> `%>%`` (SO comments will muck up the rendering of that one) but then realised as you did that inbuilt unary operators would be just fine \$\endgroup\$
    – JDL
    Jul 27 '20 at 12:36
  • 1
    \$\begingroup\$ @RobinRyder it's quite useful for this challenge, unsurprisingly, and even when a is banned, you can replicate it quite a lot by using ls() anyway. get is also pretty useful in conjunction to get functions back from the name. \$\endgroup\$
    – Giuseppe
    Jul 27 '20 at 14:40
  • 1
    \$\begingroup\$ @RobinRyder It seems quite ironic that @Giuseppe Cracked my second challenge (that was aimed to make indexing difficult) using indexing, whereas the solution that I had in mind actually used apropos() (after lowercasing) just to avoid this. \$\endgroup\$ Jul 27 '20 at 15:38
3
\$\begingroup\$

Perl 5 + -p, cracks Dom Hastings's third answer

Note: this solution only works in Perl up to 5.21, and prints a warning in Perl ≥5.14.

Note: this solution attempts to read from standard input. It works whether it reads empty or non-empty input, but if reading from stdin blocks, the program will block.

The code is generated by the following Perl program. It's too long to fit in a Stack Exchange answer. (It contains numbers in unary. With a small amount of effort, the numbers could be compressed to fit.)

#!/usr/bin/env perl
use warnings;
use strict;

my $output = q$ "#'+\-/0123456789:<>ABCDEFGHIJKLMNOPQRSTUVWXYZ\^`abcdefghijklmnopqrstuvwxyz|~$;

sub encode_integers {
    # Express numbers in unary: construct a list of the desired length
    # and force it into scalar context.
    $_[0] =~ s{(\d+)}{$1 ? '($==@{[_' . ',_' x ($1-1) . ']})' : '$['}eg;
}

my $code = <<'EOF';
$_ = *_;                                        # $_ = "*main::_"
# Note that bare ?REGEXP? without a leading m requires perl <5.22
m?..(.)..(..)?;                                  # $1 = "a"; $2 = "::"
@_=${1}.._;                                     # @__ = "a".."z"
$__=(____&($_[2].$_[14].$_[17].$_[4])).${2};    # $__ = "CORE::"
$___=$__.$_[2].$_[7].$_[17];                    # $___ = "CORE::chr"
$____=$__.$_[18].$_[24].$_[18].$_[22].$_[17].$_[8].$_[19].$_[4]; # $____ = "CORE::syswrite"
$_____=______&($_[18].$_[19].$_[3].$_[14].$_[20].$_[19]); # $_____ = "STDOUT"
&$____($_____,OUTPUT);                          # syswrite(STDOUT, chr(32).chr(34)...)
$_=$@;                                          # Empty $_ because -p might print it
EOF

# Remove comments and whitespace
$code =~ s/#.*//g;
$code =~ tr/ \n//d;
# Inject desired output
$code =~ s{OUTPUT}{join('.', map {sprintf('&$___(%d)', ord($_))}
                                 split(//, $output))}eg;
encode_integers($code);

# For the sake of -p, we also need to exit after the first input line.
my $exit = '$______=$__.$_[4].$_[23].$_[8].$_[19];&$______(0)';
encode_integers($exit);

print "$code;$exit}$code;{";

Try it online! — adapted for modern Perl versions, with the extra m before ?…? that isn't needed in Perl up to 5.21. (To reiterate: the version on TIO does not obey the restricted source constraint, but works in modern Perl. My solution obeys the restricted source constraint, but doesn't work in modern Perl.)

The first thing we do is obtain a string 'a'. We do this by pattern-matching on *_ which is '*main::_'. The characters m and / are forbidden, but ? is permitted, so we can use the m?…? pattern matching form. This form requires an explicit m in modern Perl, but classic Perl allowed a bare ?…? (with the risk that occasionally Perl would misparse the ? as part of the … ? … : … construct). Due to the use of this construct, the program no longer works with Perl 5.22 and above. While we're at it, we grab :: as well; this isn't strictly necessary but saves work later.

Having 'a', we can construct the range 'a'..'_' which is the list of lowercase ASCII letters from 'a' to 'z'. (It should really be 'a'..'z' but perl doesn't mind.) We can now build strings containing letters with $_[INDEX]. Positive integers are expressed as the length of the list (_,_,…,_) in scalar context.

Next we construct the names of some built-in functions from the CORE module. With the function name in $var, we can call it with &$var(…). The . concatenation operator, the chr function (expressed as CORE::chr), and the ability to express integers lets us construct arbitrary strings.

There's no CORE::print, so we use CORE::syswrite(STDOUT, …) instead.

For plain perl the work would be done. For perl -p, we need to do a bit of additional work. perl -p is equivalent to putting the source code in a while (<>) { … } loop. It's so equivalent that you can put an extra } in the source code to close the brace of the loop, followed by an extra { so that the program as a whole is syntactically correct. The structure of the program is:

while (<>) {
    print stuff; $_ = "";
    exit;
    }
    print stuff; $_ = "";
    {
} continue { print $_; }

where the indented part is the source code and the unindented part is the -p wrapper code. So if there is a line of input, the loop body is executed and the program exits. If there is no input, the loop body doesn't run, and the next instructions (the second print stuff;) are executed.

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

QBasic 1.1, cracks DLosc's second answer

The string to print is:

C,c

Solution:

X$ = MKL$(543370307)
PRINT RTRIM$(X$)

This was much trickier than the first version. This time I couldn't use a comma. That was mainly to prevent writing memory with POKE, but it also ruled out every other function with multiple arguments.

After all my initial ideas failed, I started looking for any functions that took a single argument and were even vaguely related to strings. Eventually I found the MKL$ function, which lets you encode Long values in ASCII. The documentation points out that this "can save up to 6 bytes of storage space" !

MKL$ always returns 4 bytes. If the number isn't long enough, the ASCII encoding will be padded with \0, which QBasic annoyingly prints as whitespace but doesn't trim. I ended up finding a number that gets encoded as C,c with a trailing space, so I could use RTRIM$ to remove that space, all without typing a comma.

\$\endgroup\$
1
  • \$\begingroup\$ Very nice! Pretty similar to what I had. \$\endgroup\$
    – DLosc
    Jul 29 '20 at 13:23
3
\$\begingroup\$

Ruby, cracks Dingus's answer

#!/usr/bin/env ruby
class Fixnum
  def !
    chr
  end
end
s = !112 + !46 + !96 + !39 + !92 + !34 + !63 + !37 + !40 + !91 + !58 + !60
eval !112 + !114 + !105 + !110 + !116 + !34 + s + !34

Can't call methods without .? Yes you can, if they're operators.

Try it online!

\$\endgroup\$
1
  • 1
    \$\begingroup\$ That was quick! Very clever, though again nothing like mine. I'm going to give this one more shake... \$\endgroup\$
    – Dingus
    Jul 31 '20 at 9:21
3
\$\begingroup\$

Malbolge, cracks Pizgenal Filegav's answer

String to print:

To

Solution:

DCBA@?"7[54XE7UB.-2bNMLKK8k)GXD}Ce/yba=

Try it online!

I have no idea how this works! I found the solution with this generator, then decided against posting it, since that didn't seem to fit the spirit of the challenge. But I decided I'd post it anyway when I saw Dingus's Dupdog answer, which also used generated code.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ All's fair in code golf and war ;) \$\endgroup\$
    – Dingus
    Aug 1 '20 at 7:14
  • \$\begingroup\$ That's a bit different than my original solution, but I'm not surprised there's another one. Good job! \$\endgroup\$ Aug 1 '20 at 16:51
3
\$\begingroup\$

Dupdog, 1813 bytes, cracks @HighlyRadioactive's answer

This should be really really trivial . . . The answer is suspiciously short

Safe to say this is not the intended answer then:

a?a?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a?????a???????????????????????????????????????????????????????????????????????????????????????????????????????????a?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????a

The program was created using a Python script written by @kennytm. I couldn't find a publicly available Dupdog interpreter so I rolled my own based on the language spec at Esolangs.

\$\endgroup\$
3
  • \$\begingroup\$ Hurray finally someone to crack my answer!! \$\endgroup\$
    – null
    Aug 1 '20 at 6:07
  • \$\begingroup\$ Also WHY DON'T YOUR INTERPRETER HALT AFTER OUTPUTTING A NUMBER??? (Hey wait I forgot to turn off CapsLock) \$\endgroup\$
    – null
    Aug 1 '20 at 6:24
  • \$\begingroup\$ @HighlyRadioactive Because it wasn't well tested :). Fixed. \$\endgroup\$
    – Dingus
    Aug 1 '20 at 7:22
3
\$\begingroup\$

PHP 7, 26 bytes, cracks thelmuxkriovar's answer

<?php echo~..............;

Try it online!

This solution contains unprintables so the link is to xxd output which is reversed. Actual bytes are:

<?php echo~\x99\x8a\x91\x8b\x96\x92\xd7\xd6\x84\x82\xa0\xc2\xd0\xa3;

As noted by @thelmuxkriovar this would not work on PHP 8 without quotes.

\$\endgroup\$
3
  • \$\begingroup\$ I love this solution, this is brilliant! you should edit your answer to show the hex code for the characters, however as I couldn't tell what you were trying to do until I clicked the link (fun fact, this won't work in php 8 because they changed undefined constant to an error rather than a warning) \$\endgroup\$
    – DannyM
    Aug 19 '20 at 8:41
  • 1
    \$\begingroup\$ @thelmuxkriovar Glad you liked it! I'll add the xxd data into the post too, good shout. If this isn't the intended crack, please feel free to add another banning ~ too! \$\endgroup\$ Aug 19 '20 at 8:44
  • \$\begingroup\$ done :) added ~ to the banning, good luck :) \$\endgroup\$
    – DannyM
    Aug 19 '20 at 8:52
3
\$\begingroup\$

PHP 7, 46 bytes, cracks thelmuxkriovar's second answer

<?php echo"      crACked??"^"FUNTIMK[:>4XKcA";

Try it online!

\$\endgroup\$
3
  • \$\begingroup\$ you're too fast lol, good job, this was similar to the solution I initially came up with \$\endgroup\$
    – DannyM
    Aug 19 '20 at 9:12
  • \$\begingroup\$ @thelmuxkriovar Yeah, apologies! I think I was there at the right time and had alraedy prepared the other answer when I looked at your first :) \$\endgroup\$ Aug 19 '20 at 9:18
  • 1
    \$\begingroup\$ 25 seconds from cop to crack - must be a record! \$\endgroup\$
    – Dingus
    Aug 21 '20 at 5:06
3
\$\begingroup\$

Lua, 5152 bytes, cracks @LuaNoob's fourth answer

io[([[write]])](string[string[([[gsub]])]([[chAr]],[[A]],string[([[sub]])](_VERSION,string[([[find]])]([[ccA]],[[A]]),string[([[find]])]([[ccA]],[[A]])))](string[([[find]])]([[ccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),string[([[find]])]([[ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccA]],[[A]]),tostring(string[([[find]])]([[cccccccccA]],[[A]]))))

Try it online! Works in both 5.1 (as required) and 5.3.5 (the version on TIO).

It looks like my crack for the third challenge in the series was unnecessarily convoluted. It's taken me all this time to realise that _G/getfenv() aren't even needed: string itself is a table!

As in the previous challenges, we need to create the string char. We start with chAr and replace the A with a, which is extracted as the third character of _VERSION, a global string that returns Lua 5.1 in 5.1. Once this is done, we simply pass in a list of the required ASCII codes, generated using string[([[find]])] to return the index of the first occurrence of the letter A in strings of the form ccc...A. For reasons I don't understand, the last ASCII code has to be passed to tostring or else the last character gets printed twice.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Is this even Lua at this point? 🤣 \$\endgroup\$
    – EasyasPi
    Feb 13 at 3:26
  • \$\begingroup\$ Good Job :D Im out of Ideas for now. About string, you can even do ([[]])[([[gsub]])] \$\endgroup\$
    – LuaNoob
    Feb 13 at 17:00
3
\$\begingroup\$

Lost, 8555 bytes, cracks Unrelated String's Answer

????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%
???????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?
??????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??
?????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???
????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????
???????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?????
??????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??????
?????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???????
????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????
???????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?????????
??????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??????????
?????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???????????
????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????
???????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?????????????
??????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??????????????
?????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???????????????
????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????
???????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?????????????????
??????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??????????????????
?????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???????????????????
????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????
???????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?????????????????????
??????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??????????????????????
?????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???????????????????????
????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????
???58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%?????????????????????????
??58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%??????????????????????????
?58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%???????????????????????????
58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????
8*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????5
*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58
1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*
+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1
:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+
6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:
+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6
265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+
65**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+2
5**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+26
**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265
*:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265*
:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**
2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:
+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2
:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+
65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:
5*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:6
*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65
2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*
++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2
+:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2+
:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++
83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:
3*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:8
*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83
+:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*
:6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+
6+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:
+@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6
@+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+
+6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@
6:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+
:+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6
+*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:
*38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+
38:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*
8:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*3
:++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38
++2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:
+2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:+
2*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++
*56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2
56:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*
6:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*5
:+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56
+2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:
2:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+
:**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2
**562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:
*562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:*
562+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**
62+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**5
2+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**56
+6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562
6:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+
:+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6
+1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:
1*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+
*58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1
58%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*
8%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*5
%????????????????????????????58*1+:6+265**:2+:65*2++:83*+:6+@+6:+*38:++2*56:+2:**562+6:+1*58

Try it online!

The output, even on quiet mode, is too much for tio, so if you want to run the verifier you will need to do so locally.

\$\endgroup\$
1
  • \$\begingroup\$ Doesn't actually produce the right string, but I'll mark as cracked anyways since it's not exactly hard to fix \$\endgroup\$ Aug 8 at 20:02
3
\$\begingroup\$

Vyxal O, 309544 bytes, cracks EmanresuA's sixth answer

Sample:

\ommmmmmL⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧ⌐ȧkAgkA⊍:g⊍gĖ

Full code

Yes.

\$\endgroup\$
3
+100
\$\begingroup\$

Vyxal, 9942694705621871183448638796 bytes, cracks lyxal's answer

Sample:

kPkPkPL‛∧∑ĖokPkPkPL‛∧∑ĖokPL‛∧∑ĖokPkPkPL‛∧∑ĖokPkPkPL‛∧∑ĖokPL‛∧∑ĖokPL‛∧∑ĖokPkPkPL‛∧∑ĖokPkPkPL‛∧∑ĖokPL‛∧∑ĖokPkPkPL‛∧∑ĖokPkPkPL‛∧∑ĖokPL‛∧∑ĖokPL‛∧∑ĖokPL‛∧∑ĖokPL‛∧∑Ė

Try it Online!

This is a purely theoretical program, as there is no way to run it at all.

So, basically with the snippet kPL‛∧∑Ė (explanation below), we can get the fourth character of a string.

  L     # Length of
kP      # Printable ASCII (not actually, length = 100)
      Ė # Evaluate the code snippet
   ‛∧∑  # "Big" (Compressed)
        
B   # Convert from binary - 100 -> 4
 i  # Index into string
  g # Get minimum (useless)

We can remove characters with the o command. For example, kPkPkPL‛∧∑Ėo gives us printable ASCII without a 4, meaning the fourth character of this is now 5. We can remove this and a 4 from another copy of printable ascii, making the fourth character 6. Continuing this, we can get any character in the printable ascii range, but getting the next character costs double (+8) the cost of the previous.

This makes the overhead for C (ord -> char) 171798691832 bytes. The overhead for -, meanwhile, is 11805916207174113034232 bytes.

The evaluated code is going to look something like uu-u-u-u-u-u-u-u-u-u-u-u-u-…, because I'm lazy. We then tack on a C at the end of each, add a W at the end, and sum that with , which we can directly call.

A calculation of the length can be found here. A calculator of the overhead for a single printable ascii calculator can be found here.

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

Vyxal, 464251237 bytes' ,lyxal crakcs anser

Hey look, more negative numbers and indexing into printable ascii!


How negative numbers?

kokoĖPĖkokoĖPĖkoĖĖkPkPkPkPkoPkoĖĖPPPPPkokoĖPĖkokoĖPĖkoĖĖkPkPkoPkoĖĖPPPĖkoPPkPkPkPkPkoPkoĖĖPPPPPĖ

We can decrement to any number by stringing many of these snippets together into a series.

This is pretty much the same as emanresu A's way of getting negative numbers, but modified so as not to use 1.

Try it Online!

Why negative numbers tho?

Just like before, we can make use of the negative numbers by indexing into printable ascii. This time, the only builtin that has i in it is printable ascii, but getting the i from there would probably be difficult, and I'm lazy, so I took the easy way out: inf. It turns out, Vyxal is really cursed, so we can do a bit of magic and shenanigans with some floats and casting numbers to iterables and generate a float so absurdly large that it just becomes inf. That can be cast to a string and executed to let us index.

ko           # Push `01234567`
  Ė          # Execute, gives us 1234567
   Ė         # Reciprocal
    Ė        # Reciprocal, gives us 1234567.0
     s       # Sort, gives us inf
      koP    # Strip 01234567, casts to string
         Ė   # Execute
          o  # Remove the extra 0 that was pushed

Now that we have i and any negative number, we can index into our builtins to get useful stuff. For example, we can index into 01234567 to get 1, and we can index into printable ASCII to get + and C. We can use the 1+ over and over to increment a number, then use C to convert it to a character. (Yes, I know I could just push -1 and use - instead of +, which would be a lot shorter, but that's not as fun.)

Once we have the pieces, namely arbitrary negative numbers and indexing, creating a solution becomes trivial. Here's an example for printing !: apparently the link was too long so here's a gist of the program that you can copy into the interpreter wow can you believe im using the same joke twice thats crazy also you wont actually be able to run it online since its too long so youll have to run it offline

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

Vyxal, 3407394222061762112 bytes, ccrks lllxal' [hopes and dreams]

HEY EVERY!! IT'S 3VERY BUDDY'S FAVORITE [[number 1 rated cracker 1997]]

klkW₆Ė₆₆₆ĖĖssVĖ₆VkWVkW₆Ė₆₆₆ĖĖssVĖ₆VkWVkW₆Ė₆₆₆ĖĖssVĖ₆VkWVkW₆Ė₆₆₆ĖĖssVĖ₆VkWVkW₆Ė₆₆₆ĖĖssVĖ₆VkWV₆kl₆₆₆₆ĖĖssVĖ₆VĖ₆₆₆ĖĖssVĖ₆V

Try it Online! Yeah I know there're 4's in there, [DEAL] with it.

The backbone of this solution is our good friend [inf].

We can use [inf] to index into builtins and get some [sweet commands] to execute. To get the [inf], we just exploit some [Classic Vyxal Jankness] with the s command:

       V  # Replace every...
 ₆        #  `64` in...
₆         #  `64` with...
  ₆ĖĖ     #   64.0
     s    #   jankness
      s   #   jankness

Executing the [inf] puts some [unwanted garbage] on the stack, so we remove it by removing it:

₆V  # Remove the [unwanted garbage]

Now that we can index, we can get h from [[Hyperlink Blocked]]. (Yes, this is unnecessary because it's the same as the [inf] indexing we used to get it, but you can shut up you [little slime].)

We can also do things like replace the h in [tHe AlPhAbEt] with [[Hyperlink Blocked]] repeatedly to change the length and [inf] index to get other characters, like o or C:

klkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWVkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWVkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWVkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWVkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWVkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWVkWkW₆Ė₆₆4ĖĖssVĖ₆VĖkWV₆kl₆₆₆4ĖĖssVĖ₆VĖ₆₆4ĖĖssVĖ₆V

^o Cv

klkW₆Ė₆₆4ĖĖssVĖ₆VkWVkW₆Ė₆₆4ĖĖssVĖ₆VkWVkW₆Ė₆₆4ĖĖssVĖ₆VkWVkW₆Ė₆₆4ĖĖssVĖ₆VkWVkW₆Ė₆₆4ĖĖssVĖ₆VkWV₆kl₆₆₆4ĖĖssVĖ₆VĖ₆₆4ĖĖssVĖ₆V

The last thing we need is [numbers] [numbers] [numbers] to get the characters to print. That is simple, because we can [numbers] with urL. urL is easy because o:

klklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohoklklhoklklhohoklklhoklklhohohoklklhoklklhohoklklhoklklhohohohohohohohohoho

I don't need to explain this, since anyone with a [$4.99] life can understand how it works.

The hohoho is made with the [Classic Vyxal Jankness] showed before, and it lets us do what we want to get [numbers] to get [characters] to be a

[[BIG SHOT!!!]]

[[BIG SHOT!!!!]]

[[BIG SHOT!!!!!]]

\$\endgroup\$
1
  • \$\begingroup\$ btw, the 4s in the link are just because using 64 would time out. The effect is the same, though. Also, the klklho thingy is pretty much what emanresuA used in their absurdly large answer to get C, so read that explanation instead. \$\endgroup\$ Oct 14 at 22:06
2
\$\begingroup\$

Befunge-98 (FBBI), cracks ovs' answer.

#@'+1+:00p'<1+1k

The only significant trick user here is self-modifying the , used for output into existence; I generate the characters (and the aforementioned comma) by storing the character one code point lower and adding one to it.

Try it online!

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

Befunge-93, 123 bytes, cracks Ethan Chapman's answer

!:v+
 v>$$~!~!g~!!+~!!~!g~!!-:~!!-:~!!-:~!!-:~!!-:~!!-:~!!-:~!!-:~!!-:~!!-
v>~!!~!!+~!!+~!g~!!+:~!!~!!~!!+~!!+p
vx<
>:|
  @

Note that this code does read from the input, and will break if you someone manage to input null bytes, but it performs correctly on no input, and that is allowed. "A pain to implement" was a total understatement.

Try it online!

\$\endgroup\$
7
  • \$\begingroup\$ Ah, I hadn't though of reading from no input, that does make things slightly simpler. Still looks like it wasn't very fun though. \$\endgroup\$ Jul 26 '20 at 17:25
  • \$\begingroup\$ You could always add & and ~ to the banned character list and try again. \$\endgroup\$ Jul 26 '20 at 17:26
  • \$\begingroup\$ I think banning & would be more useful than @, but sure, I'll post it. \$\endgroup\$ Jul 26 '20 at 17:28
  • \$\begingroup\$ Yes, that was a typo on my part. \$\endgroup\$ Jul 26 '20 at 17:28
  • \$\begingroup\$ Note: I'm actually going to hold off on that new post because I want to see if I can make it a little harder first \$\endgroup\$ Jul 26 '20 at 17:31
2
\$\begingroup\$

Python 2, 5271 4113 621 524 bytes, cracks Mukundan's answer

r=False+False
q=True+r
u=``[]``
s=``u``[q+q]
a=`r`
b=`q`
c=`q+q`
e=`q+q+q`
f=`q+q+q+q`
g=`q+q+q+q+q`
h=`q+q+q+q+q+q`
i=`q+q+q+q+q+q+q`
exec(eval(u[r]+s+b+g+b+s+b+g+g+s+b+h+a+s+b+g+i+s+b+h+c+s+b+h+f+s+a+f+a+s+b+h+e+s+b+i+b+s+b+h+e+s+a+i+e+s+b+h+e+s+b+i+b+s+b+h+e+s+a+g+h+s+b+h+e+s+b+h+f+s+b+f+f+s+b+g+i+s+b+h+g+s+b+h+f+s+a+g+h+s+b+h+i+s+b+h+c+s+b+g+b+s+b+h+f+s+b+f+g+s+a+g+a+s+a+f+i+s+a+f+c+s+b+e+f+s+a+f+i+s+a+h+a+s+a+h+b+s+a+h+c+s+a+h+e+s+a+h+f+s+a+h+g+s+a+h+h+s+a+h+i+s+a+i+a+s+a+i+b+s+b+f+f+s+b+h+f+s+a+f+i+s+a+g+b+u[r]))

Try it online!

I will try and golf this and add a better explanation, just wanted to get the crack out there.

Explanation

The basic idea is that in python2 ` can be used to get the string representation of an object. From this we have 3 types of character we get

  • numbers. We get numbers by adding booleans to get the desired number and then converting that to its representation. We will also use the number method for indexing.
  • '. We get this by getting the representation of False and then the representation of that string. We then take the first character of that.
  • \. We get this by taking the representation of True repeatedly until the representation has a backslash to escape a quote, we then index this.

From here we build the string

'\151\155\160\157\162\164\040\163\171\163\073\163\171\163\056\163\164\144\157\165\164\056\167\162\151\164\145\050\047\042\134\047\060\061\062\063\064\065\066\067\070\071\144\164\047\051'

Which is just a pile of octal escape codes for:

import sys;sys.stdout.write('"\'0123456789dt')

Which when run does the proper output.

\$\endgroup\$
3
  • \$\begingroup\$ May you give a documentation link about what ` does in Python2, please? \$\endgroup\$ Jul 26 '20 at 20:09
  • \$\begingroup\$ @Kowalski I can't find the documentation but it is the same as repr which is documented. It is similar to str except it gets the "representation" which is something that for ordinary types should eval to the value it is passed. \$\endgroup\$
    – Wheat Witch
    Jul 26 '20 at 23:00
  • \$\begingroup\$ thanks, I know repr. I only know Python3.x and this syntax seems ugly. \$\endgroup\$ Jul 27 '20 at 21:40
2
\$\begingroup\$

R, 79 63 bytes, Robin Ryder's answer

x=pi*pi;cat(apropos("^.$")[c(T,sum(x,T),sum(x,pi))],F:x,sep='')

Try it online!

Being allowed to use () let me use apropos to grab the length-one function names, and then just index them to get the appropriate -/+.

\$\endgroup\$
2
  • \$\begingroup\$ Well done, beautiful solution! I didn't know about apropos until today. \$\endgroup\$ Jul 26 '20 at 19:31
  • \$\begingroup\$ Nice! Interestingly, although this works on the TIO installation of R version 3.5.2 (and hence is a valid crack), it doesn't work on my own older installation of R version 3.2.1, under which apropos("^.$") lists the same set of function names in a completely different order. No idea why. \$\endgroup\$ Jul 27 '20 at 7:10
2
\$\begingroup\$

Java, cracks @MCross's answer

public class Main { public static void main(String[] args) { System\u002eout\u002eprintln("" + (char)46 + (char)10); } }

Try it online!

Definitely not the intended solution, just abuses the unicode escaping technique in Java (\u002e gets interpreted as . by the compiler). Thanks to @user from the previous Java answer (now deleted) on the cop's thread where this was the intended approach.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.