The Mystery String Printer (Robbers)

The cops thread can be found here: The Mystery String Printer (Cops)

• Choose a submission from the cops thread, and print out the string from an answer in that thread.
• The submission that you choose must not be safe (it must be newer than 7 days).
• Your program, function, or REPL script needs to follow the same rules as the cops thread. Just to recap:

• Your program must be ≤128 characters (if a cop's submission is in a smaller range of program lengths, your program must also be in that length range. For example, if a cop's program is ≤32 bytes, your program must be ≤32 bytes).
• The program must produce the same output every time it is run.
• No cryptographic functions.
• The program must not take input.
• No standard loopholes.
• All new submissions must use the same language. Submissions from before this rule was made are fine, even if they don't.

Scoring

Scoring works similarly for robbers, but it is slightly different:

• Cracking any program of ≤8 bytes gives 1 point.
• Cracking a ≤16 byte program gives 2 points. ≤32 bytes gives 4 points, and so on.
• Every additional submission, no matter the length, earns +5 points
• Each cop's submission can only be cracked once- only the first person to crack each submission gets the points.

Submissions

• A link to the cop's submission.
• Your program and programming language.
• Also have the cop's program length (as a power of 2) as the last number in your header.

Here is a Stack Snippet to generate leaderboards. Please leave a comment if there is a problem with the snippet. If you would like to see all open cop submissions, see the snippet in the cops' challenge.

/* Configuration */

var QUESTION_ID = 60329; // Obtain this from the url
// It will be like http://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";

/* App */

comment_page;

return "//api.stackexchange.com/2.2/questions/" + QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}

}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function(data) {
data.items.forEach(function(a) {
});
comment_page = 1;
}
});

}

jQuery.ajax({
method: "get",
dataType: "jsonp",
crossDomain: true,
success: function(data) {
data.items.forEach(function(c) {

});

else process();
}
});
}

var POINTS_REG = /(?:<=|≤|&lt;=)\s?(?:<\/?strong>)?\s?(\d+)/
var POINTS_REG_ALT = /<h\d>.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;

function getAuthorName(a) {
return a.owner.display_name;
}

function process() {

var valid = [];
var open = [];

var body = a.body;
var cracked = false;

var points = body.match(POINTS_REG);
if (!points) points = body.match(POINTS_REG_ALT);

if (points) {
var length = parseInt(points[1]);
var crackedpoints = 0;
if (length > 64) crackedpoints = 16;
else if (length > 32) crackedpoints = 8;
else if (length > 16) crackedpoints = 4;
else if (length > 8) crackedpoints = 2;
else crackedpoints = 1;

valid.push({
user: getAuthorName(a),
numberOfSubmissions: 1,
points: crackedpoints

});
}
});

var pointTotals = [];
valid.forEach(function(a) {

var index = -1;
var author = a.user;
pointTotals.forEach(function(p) {
if (p.user == author) index = pointTotals.indexOf(p);
});

if (index == -1) pointTotals.push(a);
else {
pointTotals[index].points += a.points;
pointTotals[index].numberOfSubmissions++;
}

});

pointTotals.forEach(function(a) {
a.points += +((a.numberOfSubmissions - 1) * 5);
});

pointTotals.sort(function(a, b) {
var aB = a.points,
bB = b.points;
return (bB - aB != 0) ? bB - aB : b.numberOfSubmissions - a.numberOfSubmissions;
});

pointTotals.forEach(function(a) {

.replace("{{NAME}}", a.user)
.replace("{{SUBMISSIONS}}", a.numberOfSubmissions)
.replace("{{POINTS}}", a.points);

});

}
body {
text-align: left !important
}
width: 240px;
float: left;
}
#open-list {
width: 450px;
float: left;
}
font-weight: bold;
vertical-align: top;
}
table td {
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<tr>

<td>Author</td>
<td>Submissions</td>
<td>Score</td>
</tr>

</tbody>
</table>
</div>

<table style="display: none">
<tr>
<td>{{NAME}}</td>
<td>{{SUBMISSIONS}}</td>
<td>{{POINTS}}</td>
</tr>
</tbody>
</table>

This contest is now closed.

Overall winner: kennytm

Most submissions: Sp3000

(Note that the amount of submissions doesn't translate exactly to the points, as the length of the cracked program is counted when calculating the score).

• Note: every additional submission earns 5 points – Daniel M. Oct 12 '15 at 20:13

MATLAB, Tom Carpenter, ≤16

v=ver;[v.Name]

Thanks Martin for helping me out with this.

Fishing, Eridan, ≤ 32

v+CCCCCCCCCCC
65617nSSP


Calculates (65617^2)^2.

Octave, flawr, ≤4

i^-i


which is equal to eπ/2 ≈ 4.8105.

• Dangit, you got it just before me! – Addison Crump Oct 11 '15 at 18:44

Groovy, quartata, ≤128

Only checked on ideone, I'm not sure if the output is the same on all platforms.

ClassLoader.systemClassLoader.packages.each{if(!(it.name=~/ls$/))println it.name[6..-1].reverse()}  The it.name=~/ls$/ is to filter out the additional org.codehaus.groovy.tools package.

• Does not output the same on my system (Oracle Java 8, Groovy 2.4.5). Don't be fooled, this isn't what it looks like. – a spaghetto Oct 11 '15 at 18:23
• Wait a second... I'm confused. I believe I might have posted the wrong string... – a spaghetto Oct 11 '15 at 18:25
• Dammit. It appears that I posted the output of an older version of my program. I'm not sure what to do. – a spaghetto Oct 11 '15 at 18:27
• @quartata I recommend correcting the output in your original post. kennytm, I recommend deleting this answer for now, trying to crack the corrected submission, and then undeleting it. Does that sound reasonable? – Alex A. Oct 11 '15 at 18:35
• @quartata Updated with the new submission (still only tested on ideone, groovy 2.4). – kennytm Oct 11 '15 at 19:00

vim, Doorknob, 16

:redi@"|Ni!
pg?G


MATLAB, Tom Carpenter, ≤4

pi^i


It's not hard when the absolute value is 1.

• Didn't think it would take long ;) – Tom Carpenter Oct 12 '15 at 2:52

Javascript, Ludovic Zenohate Lagoua, ≤64

var a="'";for(var b=11;b<2004;b+=4){a+=b;}a+="'";console.log(a);


Python 2.7.2, Beta Decay, ≤ 64

import math,re;print zip(dir(math),dir(re))


I had 2.7.10 installed, and the additional __loader__ messed with the results, but this is probably it (I had to confirm with @BetaDecay in chat).

STATA, bmarks, ≤32 bytes

set ob 82
g a=_n*9/8
set ob 99
l


This uses the free interpreter.

• This doesn't match the .s in lines 83 and after. – bmarks Oct 12 '15 at 1:36
• @bmarks Also, are you completely sure (including newlines) that the program is less than ≤ 32 bytes long? – LegionMammal978 Oct 12 '15 at 10:25
• The program (including newlines) is definitely ≤ 32 bytes long according to mothereff.in/byte-counter – bmarks Oct 12 '15 at 20:18
• @bmarks I fixed it – LegionMammal978 Oct 13 '15 at 12:12

Brainfuck, Daniel M., ≤ 64

++++++++++[->++++>++++++>++++++++>+<<<<]>.>>.<.>>++[-<++.>]


The code points are

[40, 80, 60, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104]


So we print the first three separately, then using the 80 to increment by 2 each time for the rest of the chars.

Python 2, <=8, by Clear question with examples

947**687


Factorizing this number took no time at all :-)

Hassium(in REPL), <=32 bytes, byJacob Misirian

for(i=0;i<99;i++)print(i%6==0)


Not too much fancy in this one.

AppleScript, VTCAKAVSMoACE, ≤32 bytes

repeat 409 times
log "(**)"
end


The log command actually adds comment markers (*...*) to everything it outputs to the Messages window of the script editor, but it looks like they have to be added explicitly when printing to stdout. Either way, the program is still less than 32 characters.

I'm using Digital Trauma's trick of replacing end repeat with end to save a few bytes.

EDIT: As kennytm correctly pointed out, this outputs to stderr instead of stdout. As a workaround, I can suggest the following:

osascript -e 'repeat 409
log "(**)"
end' 2>&1


Including line breaks, the script inside the single quotes is 25 bytes, Add 5 bytes for  2>&1 at the end of the command line to redirect stderr to stdout, and it's still within the 32 byte limit.

• Heh, nice one. I used Script Editor, so it did not require the end repeat with end trick. +1 – Addison Crump Oct 13 '15 at 8:57
• The times is optional. However, on El Capitan it outputs to stderr. – kennytm Oct 13 '15 at 9:57

Javascript, RononDex, ≤ 32 bytes

console.log(Math.log(42))


Very easy :-D

• That wonderful inverse calculator :) – J Atkin Oct 13 '15 at 15:31

Thue, histocrat, ≤64

a::=yellowyellowyellowredyellowred
::=
aaaaaa


><>, Fongoid, ≤ 16

'$1-:0(?;$:o3+ !


That was some nice golfing practice.

AppleScript, VTCAKAVSMoACE, ≤ 2 Bytes

id


I have no idea why this produces the output missing value; I just wrote a bash script to test all pairs of printable ASCII characters. I also found that it and me result in the output «script».

• Gah. Brute forcing. But yes, that's correct. I was originally going to do a it, me, or, in fact, name code, but « wasn't ASCII. The reason why it outputs "missing value" is that id will (almost) never throw a syntax error, but executing it on its own without a following value will cause the script, not the compiler to say that it's missing a value. id would typically be used with, say, window id 283 of app "TextEdit" to select that specific window. +1, but sad that you brute forced it. – Addison Crump Oct 16 '15 at 12:14

MATLAB, Tom Carpenter, ≤ 2

!<


Thanks to @AlexA. and @RetoKoradi for helping me test this. I don't have a Windows PC/VM...

Googling the desired output immediately revealed it as a typical Windows Cmd error. In fact,

<


produces the desired output, and a MATLAB command that is prefixed by a ! is a system command. I don't have MATLAB at hand to test this, but it should work.

• Yup. Thought that one would be quite difficult, but never mind. I'd actually used !> but both do the same thing. – Tom Carpenter Oct 17 '15 at 14:29
• Google is your foe here. Searching for the error message immediately revealed it as a typical Cmd error. – Dennis Oct 17 '15 at 14:38

><>, quartata, ≤ 32

1"qq"+\
v!?:  <$*d$-1
>~n;


I'd like to thank @quartata for make this interesting - despite being such a long number, it's actually just 13^226.

><>, Fongoid, ≤64 Bytes

"!":"~"=a$.1+:"!"(?;::1-$oo20.
"+"f8+0pa0.2-"-"c0p"3"f7+0p


A little bit hard-coded since I had room and I couldn't really think of a good way to go down once I got to ~ in the output (there probably is one and I probably just don't see it).

You can try it online here.

• That self-modifying code is pretty slick! – DLosc Oct 19 '15 at 16:19

Pip, DLosc, ≤ 2

O_


I don't really understand what the code does, but 2 characters is wide open to brute force cracking.

• I've added an explanation to the original post. – DLosc Oct 19 '15 at 16:12

Wolfram programming language, Eridan, ≤32

ContinuedFraction[Zeta[3],36]


It's sequence A013631 on OEIS.

AppleScript, VTCAKAVSMoACE, ≤64

osascript -e 'repeat with i from 688 to 195049 by 629
log i mod 1e3
end' 2>&1


Needs a redirect to stdout, similar to https://codegolf.stackexchange.com/a/60601/32353. Total size is 64.

• No, this is not correct - I do print to STDOUT. – Addison Crump Oct 16 '15 at 15:46
• @VTCAKAVSMoACE: Okay. – kennytm Oct 16 '15 at 18:27

Lua, jcgoble3, ≤ 128

x=111111111
h="haha"
p=h..3*x..2*x..h..7*x..h..2*x
q="ha"..6*x..p..p..h..6*x..h..7*x..h..4*x..h..5*x
"ha"..(q..h):rep(11)..q


124 bytes. Tested in Lua 5.3.1 REPL.

This is a cleaner version that can be executed as a single command or even a full program:

x=111111111 h="haha" p=h..3*x..2*x..h..7*x..h..2*x q=h..6*x..p..p..h..6*x..h..7*x..h..4*x..h..5*x print((q.."ha"):rep(11)..q)


125 bytes. Tested in Lua 5.3.1 REPL and ideone.

Pyth, ConfusedMr_C, ≤ 32

sm*2s_c4s_Mcd2%2_c4sCM127


Only needed 25 chars. Took some while though.

Try it online: Demonstration

The idea is to take all chars of the ranges 32-63 und 96-126 (Yes, 127 is not included), rearrange them, duplicate these strings and join them.

Self-modifying Brainfuck, mbomb007, ≤8

<[-.+<]


stdin needs to be /dev/null and disregard the output from stderr.

QBasic, DLosc, ≤16

?STRING\$(3,34)

• Aw, shoot. Not the solution I had in mind. Have a +1 anyway--I learned something. – DLosc Oct 22 '15 at 7:36

QBasic, DLosc, ≤8

?TAN(22)


Does the leading/trailing space thingy. I guess it's a QBasic quirk.

CJam, Eridan, ≤8

6C#E130#


I assumed it would be a list of numbers of the form i^j, so I did a search for those using substrings from output. I found that it was str(6 ** 12) + str(14 ** 130) using a Python script.

Python 3, ppperry, ≤32

0x1d4f620cb7a9ca2c585c639763613

• That was not what I had in mind. – pppery Oct 24 '15 at 19:26