193
\$\begingroup\$

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:

  • New answers should include a header like

    # ???, [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.

Every user only gets one guess per answer. You must not crack your own answer (obviously...).

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 ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
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 */

var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;

function answersUrl(index) {
  // 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;
}

function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}

function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}

function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });  
}

getAnswers();

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;
var OVERRIDE_REG = /^Override\s*header:\s*/i;

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

function process() {  
  console.log(answers);
  var vulnerable = [];
  var cops = [];
  var robbers_hash = {};
  
  var now = Date.now();
  
  answers.forEach(function (a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      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),
        link: a.share_link,
      });
    } 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],
          link: a.share_link,
        });
      }
    } 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,
          link: a.share_link,
        });
        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 answer = jQuery("#vulnerable-template").html();
    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!";
    
    answer = answer.replace("{{NAME}}", a.user)
                   .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)
                   .replace("{{LINK}}", a.link);
    
    answer = jQuery(answer)
    
    jQuery("#vulnerable").append(answer);
  });
  
  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 answer = jQuery("#cops-template").html();
    var size = a.size;
    if (size != lastSize)
      lastPlace = place;
    lastSize = size;
    ++place;
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    
    answer = jQuery(answer)
    
    jQuery("#cops").append(answer);
  });

  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 answer = jQuery("#robbers-template").html();
    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>';
    });
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{CRACKS}}", a.cracks)
                   .replace("{{TOTAL_SIZE}}", a.total_size)
                   .replace("{{LANGUAGES}}", languages);
    
    answer = jQuery(answer)
    
    jQuery("#robbers").append(answer);
  });
}
body { text-align: left !important}

#vulnerable-cops {
  padding: 10px;
  width: 600px;
}

#cops-leaderboard {
  padding: 10px;
  width: 600px;
}

#robbers-leaderboard {
  padding: 10px;
  width: 600px;
}

table thead {
  font-weight: bold;
}

table td {
  padding: 5px;
}

.time-ms {
  display: none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b">
<div id="vulnerable-cops">
  <h2>Vulnerable Cops</h2>
  <table class="vulnerable-cops">
    <thead>
      <tr><td>User</td><td>Size</td><td>Time Left</td></tr>
    </thead>
    <tbody id="vulnerable">

    </tbody>
  </table>
</div>
<div id="cops-leaderboard">
  <h2>Leaderboard of Safe Cops</h2>
  <table class="cops-leaderboard">
    <thead>
      <tr><td></td><td>User</td><td>Language</td><td>Size</td></tr>
    </thead>
    <tbody id="cops">

    </tbody>
  </table>
</div>
<div id="robbers-leaderboard">
  <h2>Leaderboard of Robbers</h2>
  <table class="robbers-leaderboard">
    <thead>
      <tr><td></td><td>User</td><td>Cracks</td><td>Total Size</td><td>Languages (link to answers)</td></tr>
    </thead>
    <tbody id="robbers">

    </tbody>
  </table>
</div>
<table style="display: none">
  <tbody id="vulnerable-template">
    <tr><td>{{NAME}}</td><td>{{SIZE}}</td><td style="background-color: hsl({{HUE}},100%,50%);">{{TIME}}</td><td><a href="{{LINK}}">Link</a></td><td class="time-ms">{{TIME_MS}}</td></tr>
  </tbody>
</table>
<table style="display: none">
  <tbody id="cops-template">
    <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr>
  </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>

\$\endgroup\$
  • 110
    \$\begingroup\$ One minute of silence for those only capable of Piet programming. \$\endgroup\$ – user3819867 Aug 17 '15 at 8:20
  • 20
    \$\begingroup\$ There goes my productivity! \$\endgroup\$ – Luke Aug 17 '15 at 20:30
  • 12
    \$\begingroup\$ 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. \$\endgroup\$ – kirbyfan64sos Aug 26 '15 at 19:41

212 Answers 212

1
4 5
6
7 8
2
\$\begingroup\$

Enema, 158 Bytes, cracked by Sp3000

{'&%:9]!~)|z2Vswv-,POqponl$Hj.ihf|B}:s*Q:56+3s:c33s1+Q:91+DsD2:pOQ:4s9:#[?ZBp]Q:8sO:\+DQ:\6\:UD3-Q:3-Dc-OUDOpDp9c*USXUc%cs2*49s-O" "#.;(I&%$#"?zvuPb8`qo42mZ.FhIy*@dD'<;_?!\}}

I actually took the Malbolge program from one of the solutions and modified it somewhat. {} denotes a comment and is ignored. . ends the program. Removing extraneous code gives us

:s*Q:56+3s:c33s1+Q:91+DsD2:pOQ:4s9:#[?ZBp]Q:8sO:\+DQ:\6\:UD3-Q:3-Dc-OUDOpDp9c*USXUc%cs2*49s-O" "#.

The important thing to note is that :a...Q: will redefine a to ... Unfortunately I couldn't figure out a way to redefine something else to use for Q (or :), so the giveaway here was a bunch of :...Q: commands

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Well, it's NOT Headsecks..., and not Golfscript. \$\endgroup\$ – mbomb007 Aug 20 '15 at 16:42
  • \$\begingroup\$ Was not written as Malbolge, does it produce the expected output? \$\endgroup\$ – Fongoid Aug 20 '15 at 16:59
  • \$\begingroup\$ @Fongoid I'd imagine not, since there are only a handful of known valid malbodge programs anyway. It's meant to be very difficult to write anything at all in. \$\endgroup\$ – Jwosty Aug 20 '15 at 19:11
  • \$\begingroup\$ @Jwosty There are Malbolge generators than can create programs with arbitrary constant output (up to a certain length), so there's more than a handful. But yes, writing valid Malbolge by accident is highly unlikely to happen. \$\endgroup\$ – Dennis Aug 20 '15 at 20:10
  • 2
    \$\begingroup\$ I believe this works in Enema \$\endgroup\$ – Sp3000 Aug 23 '15 at 13:29
2
\$\begingroup\$

Arduino, 101 bytes, cracked by Shebang

int i=0;
void setup(){Serial.begin(9600);}
void loop(){if(i==0){Serial.println("Hello, World!");i+=1;}}

If only Python had brackets... Would be so much easier for golfing... sigh

Hundredth answer!!

| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

PowerShell, 20 Bytes, Cracked by Dennis

(Another) Last-minute entry!

'Hello, '+"World!`n"

Now GolfScript-immune!

Yes, yet another PowerShell program. :)

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I think this works in PowerShell. \$\endgroup\$ – Dennis Aug 31 '15 at 19:38
  • 1
    \$\begingroup\$ @Dennis Confirmed. It works. \$\endgroup\$ – mbomb007 Aug 31 '15 at 19:39
  • \$\begingroup\$ @Dennis Yay! Guessed correctly! \$\endgroup\$ – AdmBorkBork Aug 31 '15 at 19:42
2
\$\begingroup\$

az, 18 bytes, cracked by nimi

"Hello, World".33.
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Is this by any chance FALSE? \$\endgroup\$ – Alex A. Aug 31 '15 at 17:19
  • \$\begingroup\$ . is output as integer in FALSE. This interpreter prints Hello, Worldundefined33. \$\endgroup\$ – Dennis Aug 31 '15 at 17:23
  • \$\begingroup\$ It was a shot in the dark. :P \$\endgroup\$ – Alex A. Aug 31 '15 at 17:26
  • \$\begingroup\$ It runs in az \$\endgroup\$ – nimi Sep 1 '15 at 5:13
  • \$\begingroup\$ @nimi That was the intended solution. \$\endgroup\$ – Dennis Sep 1 '15 at 5:14
2
\$\begingroup\$

Microscript, 20 bytes

'H"ello, World!"fPa'

'H writes the character H into the first register.

"ello, World!" pushes the remaining characters of the desired output on the stack.

f reverses the entire stack, P prints the character in the first register and a the characters on the stack.

Finally, ' crashes the interpreter, which would print 72 (the character code of H) if not halted by h.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Is this FlogScript? \$\endgroup\$ – mbomb007 Aug 31 '15 at 3:58
  • \$\begingroup\$ No, FlogScript uses {} for strings. \$\endgroup\$ – Dennis Aug 31 '15 at 4:04
  • \$\begingroup\$ It just reminded me of it, b/c Pa prints an array. \$\endgroup\$ – mbomb007 Aug 31 '15 at 16:38
2
\$\begingroup\$

Self-modifying Brainfuck, 92 bytes

Windows line endings are required (\r\n).

<o[-]<[-]<[-]<[-]
<<<<<<<--
<<<<<<[.>]
<<<<<<<<--
<<<<<<<<<<-
<+[]
o"Hello,"World!,rPP

Explanation:

In this language, the code itself if placed on the tape, such that the last character is one to the left of the initial pointer. Non-BF characters are still in their places on the tape. They are skipped for execution, but can be modified by increment/decrement operations to change them into commands. They can also be output. So the program <[.<]\x00!dlroW olleH (\x00 represents a null byte) would also be valid, if the comma wasn't necessary.

In this program, the rPP, and the o's are misdirection, as well as the seemingly infinite loop: []. The program starts by zeroing the last four characters, moving left to the middle quote, and changing it to a space. Then, I move left to the start of the string to print and print it. Finally, I move left to the comma and change it so it won't be executed, continue left, and pacify the infinite loop.

Edit: I just noticed that after a user told me which line endings were Windows (comment no longer exists), I had forgotten to adjust the code by one byte (an extra <) to compensate last week. If anyone tried SMBF and didn't get it to work because of that, let me know.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Does SMBF require Windows line endings or did you just design the program like that? \$\endgroup\$ – Dennis Sep 3 '15 at 19:44
  • \$\begingroup\$ @Dennis I just designed it like that. :D (But it does matter, since either one you choose, you have to use the correct number of < or >.) \$\endgroup\$ – mbomb007 Sep 3 '15 at 19:44
2
\$\begingroup\$

Whenever, 63 bytes, cracked by Unrelated String

103857392 defer (2) 23423423;
978651423 print("Hello, World!");

Okay, I checked and this doesn't work in Proton or Foo. Hopefully, this will be harder to crack.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I haven't actually tried it, but this looks exactly like Whenever. \$\endgroup\$ – Unrelated String Aug 16 '19 at 0:30
  • 1
    \$\begingroup\$ @UnrelatedString That's correct! \$\endgroup\$ – MilkyWay90 Aug 16 '19 at 2:56
2
\$\begingroup\$

Whitespace, 168 bytes cracked by pppery

Looks like:

  print("Hello World")





Try it to find out

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Works in Whitespace \$\endgroup\$ – pppery May 29 at 20:00
  • \$\begingroup\$ Nice job! I thought that would be tough. \$\endgroup\$ – Ari May 29 at 20:26
  • \$\begingroup\$ It wasn't. You threw me off for a moment, though, as I was about to say "this works in Python, and the fact that it does makes this answer so obvious it's not a serious contender and subject to deletion", before realizing it doesn't actually work in Python because of the leading whitespace. \$\endgroup\$ – pppery May 29 at 21:21
  • \$\begingroup\$ Yeah, I started with no spaces and unfortunately Python doesn't care about trailing whitespace. \$\endgroup\$ – Ari May 30 at 0:29
2
\$\begingroup\$

???, 1628 bytes

version=NotImplemented #7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7
#Hello World, version 1. 25. 15

["Hello, World!"]  #Initialize output list. However, a weird quirk makes this at most 25% likely to actually output.
["Hello, World!"]  #To increase the maximum probability, we can add more copies. This one increases the maximum to 34%.
['']               #This clears the variable to be used in the future.
exec("H='Hello, World!'"[52: 199: 1],globals()) #Create the variable we want to output (and make sure we get only the right characters).
H = "Hello, World!"#Doing things in exec() statements isn't the best idea, so we should move it outside.
backwards=" "      #Erase the "backwards" variable to make sure our output isn't printed
c=1,222, 222       #Every character (length-1 string) should be printed with as much certainty (probability as close to 1) as possible, so we want a big number here.
B="@["             #Get bounds on uppercase letters
b="`{"             #Get bounds on lowercase letters
for char in H:
    assert ord(char) in range(ord(b[0])+ord(B[0])) #Make sure that the output is valid (i.e. each character is less than 124 and more than 52 - 25)
    assert char!=1    #The first character is invalid, and we don't want that!
    print(char,end=backwards) #At this point, the character must be valid, so it is printed.
"""
50 ca 34 88 52 49 25 0a 52 38 b1 53 92 1a 43 76
43 99 34 34 25 25 52 52 44 a1 01 33 c0 b1 34 11
10 44 50 c1 44 34 1f 05 ff 44 99 35 89 53 88 01
55 75 f3 25 1e 0a d1 30 30 ab 40 d4 3c 20 04 5f
e1 31 b5 1c 40 14 3e 0d 13 43 e2 e1 f0 20 27 40 
3b""" #Hex dump included for future reference.

(Note that the entire code block is part of the code.)

Try it online! (in the wrong language)

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Is it Python 3? \$\endgroup\$ – Ari Aug 1 at 14:47
  • \$\begingroup\$ No, in Python 3 the output is H e l l o , W o r l d ! (because the backwards variable is a space, not the empty string). \$\endgroup\$ – Pizgenal Filegav Aug 1 at 16:57
2
\$\begingroup\$

???, 144 bytes, Cracked by Sisyphus

Scene I
[Enter Romeo and Juliet]
the Manor is a room.
For printing the name of Manor: do nothing.
When play begins, say "Hello, World!"
[Exeunt]

I'm well aware this is an old thread - but I'm curious to see how people go with guessing this one.

Sisyphus has cracked this with Foo, this is not the language I wrote it in though.
If you wish to spoil the surprise, reveal the spoiler:

Language: Inform 7
Inform 7 is a language for making interactive fiction games.
You can use Scenes to divide up time (but is meaningless in this example), Conveniently though, comments are marked with square brackets so that was useful for adding the shakespearelang red herring.
A room for the player to exist in is needed to compile, but then we need to prevent it printing the name of the room. Finally, trigger the 'Hello, World!'

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Shakespeare Programming Language \$\endgroup\$ – Razetime Oct 11 at 5:43
  • \$\begingroup\$ shakespearelang.com \$\endgroup\$ – Razetime Oct 11 at 5:52
  • \$\begingroup\$ @Razetime You fell victim to the red herring tio.run/##JY2xCsIwFEX3fMW1c@kHuCsquOjQoXSI5tkE0vdC8gr69THidg/… \$\endgroup\$ – Scott Oct 11 at 9:17
  • \$\begingroup\$ @Razetime Seriously, did you look any farther than [Enter Romeo and Juliet]? \$\endgroup\$ – PkmnQ Oct 11 at 11:16
  • 1
    \$\begingroup\$ @PkmnQ This is my first cops and robbers challenge. Just wanted to try. \$\endgroup\$ – Razetime Oct 11 at 11:17
1
\$\begingroup\$

Ruby, 77 bytes, cracked by ProgramFOX

main = proc() {
    proc = 'Hello, World!'
}

main
    .call()
    .display()

(Poor attempt, probably should count only half crack point.)

| improve this answer | |
\$\endgroup\$
  • 2
    \$\begingroup\$ I think it's Ruby. \$\endgroup\$ – ProgramFOX Aug 17 '15 at 13:26
  • \$\begingroup\$ Of course it is. :) \$\endgroup\$ – manatwork Aug 17 '15 at 13:26
1
\$\begingroup\$

Groovy, 70 bytes, cracked by aditsu

class M{public static void main(String[]a){println("Hello, World!");}}
| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

ABAP, 42 bytes, cracked by Sp3000

REPORT ZHELLOWORLD.
WRITE 'Hello, world!'.
| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ This has a lowercase w, but I'd hazard a guess at ABAP \$\endgroup\$ – Sp3000 Aug 17 '15 at 23:56
  • \$\begingroup\$ Yes you're right :p \$\endgroup\$ – Ahmed Abdelkafi Aug 17 '15 at 23:59
1
\$\begingroup\$

unc, 137 bytes, cracked by Dennis

!include >=fgQVb%U<=
ZNVa[]<<char s():=<<27~656~653~653~666~99~87~32~666~669~653~655~88~5>>:chgf[s]:if 5:chgf[L'Hello, world!ABCDEFG']:>>
| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ Is this unc by any chance? \$\endgroup\$ – Dennis Aug 18 '15 at 3:02
  • \$\begingroup\$ @Dennis That was really really fast. :) How did you figure it out so quickly? \$\endgroup\$ – kirbyfan64sos Aug 18 '15 at 3:19
  • \$\begingroup\$ You solved a task with unc when you participated in my decathlon. \$\endgroup\$ – Dennis Aug 18 '15 at 3:20
  • \$\begingroup\$ @Dennis Ah, that was your decathlon. :/ \$\endgroup\$ – kirbyfan64sos Aug 18 '15 at 3:22
  • \$\begingroup\$ Would have solved it anyway. :) Googling the !include statement takes you directly to the esolang page. \$\endgroup\$ – Dennis Aug 18 '15 at 3:23
1
\$\begingroup\$

Python, 431 bytes, cracked by Dennis

#print          ;
"World!"#=printf;
#println"Hello,",
#/=         World
Hello          =\
World          =\
"Hello,"#=printf\
#"World,"      =;
#print          \
print      Hello,
#           print
#println"World!",
#/         =Hello
World          =\
Hello=          \
"World!";#printf\
#"Hello,"      =;
print     World,;
#/         =Hello
#/=         World
#println"World!",
print           \
#pprint "Hello,",
"Hello,";#printf\
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ That's Python 2. \$\endgroup\$ – Dennis Aug 18 '15 at 21:37
  • \$\begingroup\$ Yes, Python (2 or 3). That was incredibly quick, haha. @Dennis \$\endgroup\$ – Zach Gates Aug 18 '15 at 21:39
  • \$\begingroup\$ Not that it matters, but it doesn't work in Python 3. For starters, print would require parentheses. \$\endgroup\$ – Dennis Aug 18 '15 at 21:43
  • \$\begingroup\$ Oh, yes, you're correct. I had forgotten that I'm running 2.7 (v.s. the usual 3.4). :P My fault. @Dennis \$\endgroup\$ – Zach Gates Aug 18 '15 at 21:45
1
\$\begingroup\$

Go, 425 bytes, cracked by ProgramFOX

package main
import "os"
import "fmt"

/* Hello World routine /*
$mystring = <<< PROG //HereDoc
def printhello:
  print "Hello, World!"
  #include "iostream"
  int main (int argc, **string argv) // int main() is always needed
    cout << "Hello, World!";
    /int*/ func main() {
    fmt.Fprintf(os.Stdout, "Hello, World!")}/*;
    printf("Hello, World!");
**///PROG;

Explanation: everything is commented out except:

package main
import "os"
import "fmt"

func main() {
  fmt.Fprintf(os.Stdout, "Hello, World!")}
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I think it's Go. \$\endgroup\$ – ProgramFOX Aug 19 '15 at 9:39
  • \$\begingroup\$ @ProgramFOX dammit you're good! \$\endgroup\$ – Caltor Aug 19 '15 at 9:40
  • \$\begingroup\$ @ProgramFOX you weren't fooled by the snippets of PHP, Python or C++ :( \$\endgroup\$ – Caltor Aug 19 '15 at 9:42
  • 2
    \$\begingroup\$ Well, I saw package main and import "fmt" both uncommented at the top, so then I basically knew it :P \$\endgroup\$ – ProgramFOX Aug 19 '15 at 9:44
  • \$\begingroup\$ @ProgramFOX I only learnt the language this morning just for this purpose. Couldn't find a way to hide the package main and import lines but they look pythonic so figured I would make it look like Python hiding C++ which might all be a PHP program. Lots of spurious indenting to try and throw you off too. Ah well worth a try! lol \$\endgroup\$ – Caltor Aug 19 '15 at 9:49
1
\$\begingroup\$

Foo, 57 bytes, cracked by Dennis

program
   %put x=print x
   put "Hello, World!"
end program

It was supposed to be Zeno :P

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This prints Only Chuck Norris can divide by zero. to STDERR and Hello, World! to STDOUT in Foo, which makes this a valid (but rather boring) crack. \$\endgroup\$ – Dennis Aug 19 '15 at 15:37
  • 1
    \$\begingroup\$ @Dennis Oh right haha. Was supposed to be Zeno :/ Oh well \$\endgroup\$ – Beta Decay Aug 19 '15 at 15:50
1
\$\begingroup\$

ferNANDo, 265 bytes, cracked by jimmy23013

( main )
main = (
print("Hello,")
) + do
<> ( < [ ) v $ ^^
^^ ( ( v $ ( <> (
<> ) ( <> ) ( # ]
# ) ( [ ) ( ] #
^^ ) ( < ) ( ) )
" ^ ( v ) ) ^^ <
<> ^ ) $ " " [ <>
< ( ) ( # ) ( (
] ) ( ] ) ) ( (
] ) ) ( ] <> ( ^^
" ) ( <> ) ( ^ $
# ) ( # <> ( $ <
< " ) < ^ v ^ )
)
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Looks like ferNANDo but the w is in lowercase. \$\endgroup\$ – jimmy23013 Aug 19 '15 at 21:13
  • \$\begingroup\$ It was meant to be ferNANDo, my bad. \$\endgroup\$ – histocrat Aug 19 '15 at 21:31
1
\$\begingroup\$

small s.c.r.i.p.t., 18 bytes, cracked by Sp3000

H
ello44. World33.
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I can't actually test this one, so I'm going to take a stab and say small s.c.r.i.p.t \$\endgroup\$ – Sp3000 Aug 20 '15 at 1:09
  • \$\begingroup\$ @Sp3000 Bah, I thought this one would last longer. \$\endgroup\$ – Dennis Aug 20 '15 at 1:18
1
\$\begingroup\$

XPL0, 40 bytes, cracked by Mauris

code Text=12;
Text(0, "Hello, World!^A")

Edit: Made immune to Foo

| improve this answer | |
\$\endgroup\$
  • 3
    \$\begingroup\$ Foo is really killing this challenge :/ \$\endgroup\$ – Sp3000 Aug 20 '15 at 2:08
  • \$\begingroup\$ How do you changed a program to not work in Foo? How does it work it Foo? \$\endgroup\$ – mbomb007 Aug 20 '15 at 2:11
  • \$\begingroup\$ The thing about Foo is that anything between "" quotes is printed, and a lot of chars are ignored. I don't know if the 0 after the parens is necessary, but if you could change it to something else it'd cause Foo to infinite loop (either that or use escapes in the string, since Foo prints literally) \$\endgroup\$ – Sp3000 Aug 20 '15 at 2:12
  • \$\begingroup\$ @Sp3000 Fixed it. \$\endgroup\$ – mbomb007 Aug 20 '15 at 2:31
  • 1
    \$\begingroup\$ I'm guessing XPL0. (It's the top result (on Rosetta Code) when Googling code Text=12.) \$\endgroup\$ – Lynn Aug 20 '15 at 3:48
1
\$\begingroup\$

Gema, 99 bytes, cracked by mbomb007

Hello = "Hello"
World = "World"

main = proc()
\B=Hello, World\!\N\
@end

= main().call().display()
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Makes me think of Ruby. \$\endgroup\$ – user42003 Aug 18 '15 at 9:07
  • \$\begingroup\$ Yepp, that was my intention, to give it a bit of Ruby-ish look. But certainly not enough for the Ruby interpreter. \$\endgroup\$ – manatwork Aug 18 '15 at 9:13
  • \$\begingroup\$ I'm gonna guess this is bash? \$\endgroup\$ – Beta Decay Aug 19 '15 at 22:21
  • \$\begingroup\$ Is it Gema ???? \$\endgroup\$ – mbomb007 Aug 20 '15 at 2:29
  • \$\begingroup\$ Correct, @mbomb007. I expected that \B to give it away much faster. (Or you just looked up the languages I used earlier…?) \$\endgroup\$ – manatwork Aug 20 '15 at 7:10
1
\$\begingroup\$

Chinese Basic, 27 bytes, cracked by Respect My Authoritah

Yay for foreign programming languages.

enter image description here Here is the hex dump, since one of the characters is blocked by SE for unknown reason:

0000000: e58d 9c3d 2248 656c 6c6f 2c20 576f 726c  ...="Hello, Worl
0000010: 6421 220a e58d b020 e58d 9c              d!".... ...
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ You should also post the code in text form, or its hex dump so others can test. \$\endgroup\$ – jimmy23013 Aug 20 '15 at 18:26
  • \$\begingroup\$ [Here](docs.google.com/document/d/17WHdDw8Abh3Vb_HpkCPMyp1KVKqzhYdNxkFfm5CGNNg) is the code in text \$\endgroup\$ – Grant Davis Aug 20 '15 at 18:35
  • \$\begingroup\$ This is Chinese BASIC \$\endgroup\$ – dramzy Aug 20 '15 at 18:40
  • \$\begingroup\$ You are correct. \$\endgroup\$ – Grant Davis Aug 20 '15 at 18:41
1
\$\begingroup\$

Spoon, 54.75 Bytes, cracked by Thomas Kwa

(438 bits)

010111111111001000111111111101000000110110010100101111111001000111111010000001101110010101111111001010001010111001010010111111111110010001100000000000000000001000000110110000010100000000000000000000000000000000000000010100101111111111100100011111110100000011011001010010111111001000111111010000001101100101011100101000000000000000000000101000000000000000000000000000101001011111111111001000110000000000000000000100000011011000001010
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I swear I might have seen this the other day... now I have to try and find it again... :( \$\endgroup\$ – mbomb007 Aug 20 '15 at 17:44
  • \$\begingroup\$ Binaryf**k? I am at work, so can't really run this. \$\endgroup\$ – dramzy Aug 20 '15 at 18:01
  • \$\begingroup\$ If it's 438 bits, then you seem to have missed 6 of them out of the post. \$\endgroup\$ – Peter Taylor Aug 20 '15 at 18:11
  • 3
    \$\begingroup\$ Is the source code actually 0 and 1 characters, or is that just the binary representation? \$\endgroup\$ – lirtosiast Aug 20 '15 at 19:52
  • 1
    \$\begingroup\$ This is Spoon, with identical code to the example. \$\endgroup\$ – lirtosiast Aug 20 '15 at 20:34
1
\$\begingroup\$

JavaScript, 350 bytes, cracked by Dennis

_0x4644=["\x47\x6F\x74\x63\x68\x61\x21","\x6F\x62\x6A\x65\x63\x74","\x6A\x71\x75\x65\x72\x79","\x66\x6E","\x32\x2E\x30\x2E\x32","\x48\x65\x6C\x6C\x6F\x2C\x20\x57\x6F\x72\x6C\x64\x21","\x6C\x6F\x67"];if( typeof $[_0x4644[3]]==_0x4644[1]){a=_0x4644[0];if($[_0x4644[3]][_0x4644[2]]==_0x4644[4]){a=_0x4644[5]}};console[_0x4644[6]](a);
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ In JavaScript it prints "Gotcha" \$\endgroup\$ – Nico A Aug 21 '15 at 0:59
  • \$\begingroup\$ Is this supposed to be jQuery? \$\endgroup\$ – Dennis Aug 21 '15 at 1:09
  • \$\begingroup\$ @TreFox I disguised this answer as a JS answer, and I was hoping Dennis would try CoffeeScript again, and get the gotcha! I didn't know enough about CS to make it CS specific. \$\endgroup\$ – Grant Davis Aug 21 '15 at 1:10
  • \$\begingroup\$ @Dennis What did it print in JQuery? \$\endgroup\$ – Grant Davis Aug 21 '15 at 1:11
  • 1
    \$\begingroup\$ This works in JavaScript w/jQuery 2.0.2. However, jQuery is neither a programming language nor a standard JavaScript library, so this answer seems to be invalid. \$\endgroup\$ – Dennis Aug 21 '15 at 16:56
1
\$\begingroup\$

Lua, 544 bytes, Cracked by Martin Büttner

load(("112.114.105.110.116.40.32.116.97.98.108.101.46.117.110.112.97.99.107.123.32.102.117.110.99.116.105.111.110.40.115.116.114.105.110.103.41.32.114.101.116.117.114.110.123.32.115.116.114.105.110.103.58.103.115.117.98.40.32.39.40.37.100.43.41.91.94.37.100.93.63.39.44.32.115.116.114.105.110.103.46.99.104.97.114.32.41.32.125.32.101.110.100.32.125.39.55.50.46.49.48.49.46.49.48.56.46.49.48.56.46.49.49.49.46.52.52.46.51.50.46.56.55.46.49.49.49.46.49.49.52.46.49.48.56.46.49.48.48.46.51.51.39.91.49.93.32.41"):gsub('(%d+)[^%d]?',string.char))()

Explanation:

load was introduced in 5.3 as a replacement to loadstring. All the numbers are the bytes of the individual code, which, when you do print instead of load, outputs:

print( table.unpack{ function(string) return{ string:gsub( '(%d+)[^%d]?', string.char ) } end }'72.101.108.108.111.44.32.87.111.114.108.100.33'[1] )

Breaking this down, we see that:

  • First it executes the anonymous function by executing table.unpack, then taking the value returned by table.unpack (i.e. the anonymous funciton) and passing the long string of numbers.
  • string:gsub takes the string, and takes every occurrence of (%d+)[^%d]? (meaning, capture a digit 1 to inf times followed be anything that's not a digit (i.e. the period separating them)) and return the character value of that.
  • Return the combination of all of those inside of a table. Access that table (via the [1] at the end, since Lua tables are 1-indexed) and print that value.
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ That would be Lua. (I think the colon gave it away.) \$\endgroup\$ – Martin Ender Aug 21 '15 at 18:21
  • \$\begingroup\$ That's definitely Lua. EDIT: @MartinBüttner Beat me to it by a few seconds! \$\endgroup\$ – kirbyfan64sos Aug 21 '15 at 18:21
  • \$\begingroup\$ @kirbyfan64sos I'm genuinely sorry... I deliberately waited a while because I get a bit of a time advantage with the answer notification... apparently I didn't wait long enough. ;) \$\endgroup\$ – Martin Ender Aug 21 '15 at 18:23
  • \$\begingroup\$ We have a winner! I thought about making it a bit less obvious, but couldn't really figure out any real way. Lua can be pretty obvious sometimes :P \$\endgroup\$ – DavisDude Aug 21 '15 at 18:45
1
\$\begingroup\$

><>, 165 bytes, cracked by plannapus

x<=== BEGIN CODE SNIPPET #54807 =======>x
!println(HelloWorld);end();/>l!/\! <.2*\
/"Hello, World!"/_b:2[=~]!^/\ w;\?!/o3a^
_<===== END CODE SNIPPET #54807 =======>_

This one took a really long time to make. Good luck.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This works in ><> (tested on fishlanguage.com/playground) \$\endgroup\$ – plannapus Aug 22 '15 at 10:43
  • \$\begingroup\$ Nice. Didn't think it wold be cracked that fast :o \$\endgroup\$ – clapp Aug 22 '15 at 10:51
  • \$\begingroup\$ Try a less well-known programming language. Most of us have seen ><> before. :D \$\endgroup\$ – mbomb007 Aug 23 '15 at 2:34
1
\$\begingroup\$

Forth, 32 bytes, cracked by BrunoLeFloch

: : : S" Hello, World!" type ; :
| improve this answer | |
\$\endgroup\$
  • 3
    \$\begingroup\$ I see your Golfscript protection ;) \$\endgroup\$ – Beta Decay Aug 19 '15 at 21:52
  • \$\begingroup\$ @BetaDecay In GolfScript it prints a leading space, though. \$\endgroup\$ – ProgramFOX Aug 19 '15 at 22:02
  • \$\begingroup\$ @Dennis Oh, right, I misunderstood that. \$\endgroup\$ – ProgramFOX Aug 19 '15 at 22:41
  • 2
    \$\begingroup\$ Forth perhaps ? \$\endgroup\$ – Bruno Le Floch Aug 22 '15 at 23:19
  • \$\begingroup\$ @BrunoLeFloch Aw, maaan! Yeah, that's it. Good job. \$\endgroup\$ – mbomb007 Aug 23 '15 at 2:28
1
\$\begingroup\$

Whitespace, 306 bytes, cracked by Dennis

Pastebin here

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



























.

This language is far too obvious, isn't it?

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Are there any tabs in there? (If so it might be good to paste an external link) \$\endgroup\$ – Sp3000 Aug 23 '15 at 5:07
  • \$\begingroup\$ ... is pastebin okay? \$\endgroup\$ – Jamie Aug 23 '15 at 5:08
  • \$\begingroup\$ This is Whitespace. \$\endgroup\$ – Dennis Aug 23 '15 at 5:09
  • \$\begingroup\$ Don't you think this is brainfuck? \$\endgroup\$ – Jamie Aug 23 '15 at 5:11
  • 2
    \$\begingroup\$ I think the Whitespace outputs a lowercase w \$\endgroup\$ – Sp3000 Aug 23 '15 at 5:12
1
\$\begingroup\$

OOC, 40 bytes, cracked by Dennis

main: func {
  "Hello, World!" print()
}

Easy? Perhaps.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This works in Foo. \$\endgroup\$ – Dennis Aug 25 '15 at 4:49
  • 3
    \$\begingroup\$ @Dennis You have to be kidding me. ಠ_ಠ \$\endgroup\$ – Alex A. Aug 25 '15 at 4:50
  • \$\begingroup\$ Also works in OOC, I think. \$\endgroup\$ – Dennis Aug 25 '15 at 4:54
  • \$\begingroup\$ @Dennis Well you got what I was going for, so I'll give that one to you. :) \$\endgroup\$ – Alex A. Aug 25 '15 at 4:55
  • \$\begingroup\$ ARGH!! How did I miss this? I've used ooc like 20 times. :/ \$\endgroup\$ – kirbyfan64sos Aug 26 '15 at 0:30
1
\$\begingroup\$

Foo, 157 bytes, cracked by Dennis

Stupid Foo.

#ifndef __linux
#include <x.h>
#define X/*\
++++++++++_++++++++++++++++++++++++....Hello World!?:Q:
#endif
    echo "Hello, World!"
    int main(){return 0;}
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ This works in Foo. \$\endgroup\$ – Dennis Aug 26 '15 at 18:58
  • \$\begingroup\$ @Dennis Am I allowed to edit it a sec? It won't change the byte count... \$\endgroup\$ – kirbyfan64sos Aug 26 '15 at 19:00
  • \$\begingroup\$ Technically no, but it's not like I'm going to beat Sp3000 anyway... \$\endgroup\$ – Dennis Aug 26 '15 at 19:02
  • \$\begingroup\$ @Dennis So I can? \$\endgroup\$ – kirbyfan64sos Aug 26 '15 at 19:04
  • \$\begingroup\$ Why not post a new answer? \$\endgroup\$ – aditsu quit because SE is EVIL Aug 26 '15 at 19:05
1
4 5
6
7 8

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.