# The Programming Language Quiz

Congratulations to Dennis who won both the cops' and the robbers' challenge! Calvin's Hobbies has already delivered on his promise and wrote this challenge for Dennis for winning the robbers' challenge.

Notice: This challenge is closed for further cop answers as of 2015-09-01 02:00:00 UTC. Any new answers posted will not be eligible for winning and will not count towards the robbers' scores if cracked. However, you may still post new answers for the other users' enjoyment, so that there are still some puzzles available for future visitors. These new answers are included in the "Vulnerable Cops" section of the leaderboard and their non-competing status is marked separately.

Welcome to the Cops-and-Robbers edition of The Hello World Quiz! (If you've never played the quiz, feel free to try it out for a minute or 30. You don't need to have played it for this challenge though.)

## The Cops' Challenge

1. Choose a programming language. Valid languages must have either an English Wikipedia article, an esolangs article or a Rosetta Code article at the time this challenge was posted (note that the linked lists are not necessarily complete because they are curated manually). They must also satisfy our usual standards for programming languages, so things like HQ9+ are out. Lastly, there must be a free (as in beer) interpreter or compiler available for the language (at the time this challenge was posted).
2. Write a Hello World program. That is, write a full program in the chosen language which prints Hello, World! (exactly like that, i.e. this exact byte stream) and optionally a single trailing newline to STDOUT or closest alternative.

You must not assume a REPL environment, existing boilerplate code, or non-standard compiler/interpreter flags. The program must be in the form of one or more source files (to rule out quirky languages like Folders) and must fit into your answer in full (so it must not be longer than 30,000 characters) - this shouldn't be an issue for any serious submission.

If your code contains bytes outside the printable ASCII range, please include a pastebin or hex dump to make sure your code is actually testable.

The program must terminate within 1 minute on a typical desktop PC.

That's it. The catch is that you want to obfuscate your code such that it's not obvious which language you picked. Also note that you don't want your code to accidentally be a valid Hello World program in any other language, although I expect that to be unlikely for sufficiently obfuscated programs.

You must not under any circumstances edit the source code of your submission once posted (as this may invalidate a robbers' active attempts at cracking your answer). So make sure that you golf it as well as you can (or dare) before posting. If you realise that your answer does not work after posting it, simply delete your answer and post a fixed version if you want to.

If no one finds a language your code is valid in for 7 days, you may reveal the chosen language (ideally with an explanation for your obfuscated code), which will make your answer safe. Note that your submission can still be cracked until you reveal the language.

The shortest safe submission (in bytes) wins.

### Formatting

(Feel free to skip this section and read The Robbers' Challenge if you're not planning to participate as a cop right now.)

At the bottom of this post, you'll find a Stack Snippet which generates leaderboards as well as a list of submissions which can still be cracked. For the snippet to work, it is important that you include a certain header in your answer:

# ???, [N] bytes


where [N] is the size of your code in bytes and ??? should appear literally.

• If the answer is not cracked for 7 days and you want to make your answer safe by revealing the language, simply replace the ???, e.g.

# Ruby, [N] bytes


Feel free to have the language name link to a relevant website like an esolangs page or a GitHub repository. The link will then be displayed in the leaderboard.

• If another user successfully cracked your submission (see below), please also add the language, along with a notice like

# Ruby, [N] bytes, cracked by [user]


where [user] is the name of the user who submitted the first valid crack. If the language used in the crack is different from the one you intended, I'd recommend using the robbers' guess and mentioning in the answer that you intended it to be something else. Feel free to make the user name a link to their profile page.

## The Robbers' Challenge

1. Find a vulnerable answer. That is an answer, which hasn't been cracked yet and which isn't safe yet.
2. Crack it by figuring out its language. That is, find any language in which the given program is a valid Hello World program (subject to the rules outlined in The Cops' Challenge above). It doesn't matter if this is the language the cop intended.

If you've found such a language, leave a comment with the language's name. If possible, you should include a link to an online interpreter, showing that the code actually works in that language as required.

The user who cracked the largest number of answers wins the robbers' challenge. Ties are broken by the sum of bytes of cracked answers (more is better).

Because the robbers' challenge is held exclusively in comments, there won't be any reputation incentive for the robbers. However, the Grand Master of Challenge Writing, Calvin's Hobbies, has kindly offered to write a challenge about the user who wins the robbers' challenge!

## Challenge Dashboard

The Stack Snippet below generates leaderboards for the cops and robbers and will also list all answers which can still be cracked. Let me know if anything appears not to be working properly, and I'll try to fix it as soon as possible. If you can think of additional features which would make the dashboard more useful, leave a comment as well.

/* Configuration */

var QUESTION_ID = 54807; // 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";
var DAYS_TILL_SAFE = 7;
var OVERRIDE_USER = 8478;
var CUTOFF_DATE = new Date(Date.UTC(2015, 8, 1, 2));

var MS_TILL_SAFE = DAYS_TILL_SAFE * 24 * 60 * 60 * 1000;

/* App */

// Must load over https (this comment is because I need to change 6+ chars)
return "https://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) {
if (c.owner.user_id === OVERRIDE_USER)
});
else process();
}
});
}

var VULNERABLE_REG = /<h\d>[?]{3},[^\n\d,]*(\d+)[^\n,]*<\/h\d>/;
var SAFE_REG = /<h\d>\s*([^\n,]*[^\s,]),[^\n\d,]*(\d+)[^\n,]*<\/h\d>/;
var CRACKED_REG = /<h\d>\s*([^\n,]*[^\s,]),[^\n\d,]*(\d+)[^\n,]*,\s*cracked\s*by\s*(.*[^\s<])<\/h\d>/i;

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

function process() {
var vulnerable = [];
var cops = [];
var robbers_hash = {};

var now = Date.now();

var body = a.body;
if(OVERRIDE_REG.test(c.body))
body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
});
var match;
if (VULNERABLE_REG.test(body)) {
vulnerable.push({
user: getAuthorName(a),
size: +body.match(VULNERABLE_REG)[1],
time_left: (a.creation_date*1000 > CUTOFF_DATE) ? Infinity : MS_TILL_SAFE - (now - a.creation_date*1000),
});
} else if (SAFE_REG.test(body)) {
if (a.creation_date*1000 < CUTOFF_DATE) {
match = body.match(SAFE_REG);
cops.push({
user: getAuthorName(a),
size: +match[2],
language: match[1],
});
}
} else if (CRACKED_REG.test(body)) {
if (a.creation_date*1000 < CUTOFF_DATE) {
match = body.match(CRACKED_REG);
var language = match[1];
var size = +match[2];
var user = match[3];
if (/<a/.test(user)) user = jQuery(user).text();
var robber = robbers_hash[user] || {
user: user,
cracks: 0,
total_size: 0,
languages: [],
};
++robber.cracks;
robber.total_size += size;
robber.languages.push({
language: language,
});
robbers_hash[user] = robber;
}
}
})

console.log(vulnerable);
console.log(cops);
console.log(robbers_hash);

vulnerable.sort(function (a, b) {
var aB = a.time_left,
bB = b.time_left;
return aB - bB
});

vulnerable.forEach(function (a) {
var time = a.time_left;
var time_string = "";
if (time == Infinity)
time_string = "Answer is not competing";
else if (time > 0) {
time_string += ((time / (1000 * 60 * 60 * 24))|0) + "d ";
time %= 1000 * 60 * 60 * 24;
time_string += ((time / (1000 * 60 * 60))|0) + "h ";
time %= 1000 * 60 * 60;
time_string += ((time / (1000 * 60))|0) + "m ";
time %= 1000 * 60;
time_string += ((time / (1000))|0) + "s";
}
else
time_string = "Cop may reveal language!";

.replace("{{SIZE}}", a.size)
.replace("{{TIME}}", time_string)
.replace("{{TIME}}", a.time_left)
.replace("{{HUE}}", a.time_left <= 0 ? 0 : a.time_left == Infinity ? 160 : a.time_left/MS_TILL_SAFE*80+40)

});

cops.sort(function (a, b) {
var aB = a.size,
bB = b.size;
return aB - bB
});

var place = 1;
var lastSize = null;
var lastPlace = 1;
cops.forEach(function (a) {
var size = a.size;
if (size != lastSize)
lastPlace = place;
lastSize = size;
++place;
.replace("{{NAME}}", a.user)
.replace("{{LANGUAGE}}", a.language)
.replace("{{SIZE}}", a.size)

});

var robbers = [];
for (var r in robbers_hash)
if (robbers_hash.hasOwnProperty(r))
robbers.push(robbers_hash[r]);

robbers.sort(function (a, b) {
var aB = a.cracks,
bB = b.cracks,
aC = a.total_size,
bC = b.total_size;
return (bB - aB) || (bC - aC);
});

place = 1;
var lastCracks = null;
lastSize = null;
lastPlace = 1;
robbers.forEach(function (a) {
var cracks = a.cracks;
var size = a.total_size;
if (size != lastSize || cracks != lastCracks)
lastPlace = place;
lastSize = size;
lastCracks = cracks;
++place;
var languages = "";
var first = true;
a.languages.forEach(function (l) {
if (!first) {
languages += ", ";
}
first = false;
var lang = l.language;
if (/<a/.test(lang)) lang = jQuery(l.language).text();
languages += '<a href="' + l.link + '">' + lang + '</a>';
});
.replace("{{NAME}}", a.user)
.replace("{{CRACKS}}", a.cracks)
.replace("{{TOTAL_SIZE}}", a.total_size)
.replace("{{LANGUAGES}}", languages);

});
}
body { text-align: left !important}

#vulnerable-cops {
width: 600px;
}

width: 600px;
}

width: 600px;
}

font-weight: bold;
}

table td {
}

.time-ms {
display: none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="vulnerable-cops">
<h2>Vulnerable Cops</h2>
<table class="vulnerable-cops">
<tr><td>User</td><td>Size</td><td>Time Left</td></tr>
<tbody id="vulnerable">

</tbody>
</table>
</div>
<tr><td></td><td>User</td><td>Language</td><td>Size</td></tr>
<tbody id="cops">

</tbody>
</table>
</div>
<tbody id="robbers">

</tbody>
</table>
</div>
<table style="display: none">
<tbody id="vulnerable-template">
</tbody>
</table>
<table style="display: none">
<tbody id="cops-template">
</tbody>
</table>
<table style="display: none">
<tbody id="robbers-template">
<tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{CRACKS}}</td><td>{{TOTAL_SIZE}}</td><td>{{LANGUAGES}}</td></tr>
</tbody>
</table>

• One minute of silence for those only capable of Piet programming. – user3819867 Aug 17 '15 at 8:20
• There goes my productivity! – Luke Aug 17 '15 at 20:30
• I think I might start debating whether or not I should start using Foo as a cuss word... "Oh, Foo! You little FOO!!" Yup, fits perfectly. – kirbyfan64sos Aug 26 '15 at 19:41

# ksh, 20 bytes, cracked by nimi

!;echo Hello, World!


Another variation.

• It works in ksh – nimi Aug 31 '15 at 18:20
• @nimi Did the original !echo Hello, World!; work in ksh? – mbomb007 Aug 31 '15 at 18:26
• No, the original didn't work. – nimi Aug 31 '15 at 18:27
• @nimi Then why do these work? – mbomb007 Aug 31 '15 at 18:29
• ; separates commands. The original failed with !echo: not found, i.e. there's no command !echo. – nimi Aug 31 '15 at 18:30

# ???, 22 bytes

write('Hello, World!')

• Is this Io, or a fork? – galexite Aug 28 '15 at 13:04
• Still. It works in Io. – galexite Aug 28 '15 at 13:22
• @georgeunix Io seems to require double quotes. – Dennis Aug 28 '15 at 23:37
• The seven days have passed. Your submission will be safe as soon as you reveal the intended language. – Dennis Sep 4 '15 at 19:11
• Have you gotten around to revealing the language yet? – MilkyWay90 Jul 1 '19 at 16:56