199
\$\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\$
3
  • 114
    \$\begingroup\$ One minute of silence for those only capable of Piet programming. \$\endgroup\$ Commented Aug 17, 2015 at 8:20
  • 22
    \$\begingroup\$ There goes my productivity! \$\endgroup\$
    – Luke
    Commented Aug 17, 2015 at 20:30
  • 14
    \$\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\$ Commented Aug 26, 2015 at 19:41

215 Answers 215

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

Var'aQ (English), 40 bytes, cracked by jimmy23013

"JudgHello, Worldkbicf" 4 16 strcut disp

I'm gonna try and make every program I post here 40 bytes from now on. :D

\$\endgroup\$
4
  • \$\begingroup\$ Is this MUF? \$\endgroup\$ Commented Aug 17, 2015 at 7:25
  • \$\begingroup\$ @MartinBüttner Nope \$\endgroup\$
    – Beta Decay
    Commented Aug 17, 2015 at 7:26
  • 3
    \$\begingroup\$ Is this var'aq? \$\endgroup\$
    – jimmy23013
    Commented Aug 17, 2015 at 12:37
  • \$\begingroup\$ @jimmy23013 Well done :) \$\endgroup\$
    – Beta Decay
    Commented Aug 17, 2015 at 18:55
7
\$\begingroup\$

Enema, 21 bytes, cracked by Sp3000

"!dlroW ,olleH"[DZBO]

How it works

"!dlroW ,olleH" Push those characters (including a null byte) on the stack.
[               Infinite loop:
  D               Duplicate the topmost element on the stack.
  Z               If it is non-zero, skip the next instruction.
    B             Break out of the loop.
  O             Output as a character.
]
\$\endgroup\$
3
  • \$\begingroup\$ Well, in Microscript, this would print 0\n, after pushing a bunch of numbers onto the stack. \$\endgroup\$ Commented Aug 21, 2015 at 22:57
  • 1
    \$\begingroup\$ I believe this works in Enema \$\endgroup\$
    – Sp3000
    Commented Aug 23, 2015 at 13:03
  • \$\begingroup\$ @Sp3000 That's correct. \$\endgroup\$
    – Dennis
    Commented Aug 23, 2015 at 14:56
7
\$\begingroup\$

Dogless, 85 Bytes, cracked by Sp3000

abcdef|ghijkl|mn"op"|<$gA$me>|<$kl$dl>|<$nH$jo>|<$er>|<$cd$AW>|<$hx$fo>|$a!$i,$x $b\?

Dogless is a self-modifying language.

Execution begins at the first |, and all | after the first are ignored. Everything in "double quotes" is also ignored. < is a meta instruction that executes the next instruction in the context of the source code before the IP. $ takes two arguments, and replaces the first occurence of the first letter with the second letter. > is a meta instruction that executes the next instruction in the context of the source code after the IP. (Which is always a |, which are ignored). Finally, ? reverses the entire code.

After execution is complete, dogless prints out its remaining source code, which in this case is Hello, World!

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Would this be dogless? \$\endgroup\$
    – Sp3000
    Commented Aug 22, 2015 at 23:59
  • \$\begingroup\$ Indeed it is :) \$\endgroup\$
    – Fongoid
    Commented Aug 24, 2015 at 2:43
7
\$\begingroup\$

Linotte, 34 bytes

/**"!"**/ :
    "Hello, World!"!

No real obfuscation here, just relying on the low notoriety of the language and its ! print command. The non-breaking thin space provided an unusual program name (a normal space is not allowed) and the commented out "!" is obviously a FOO safeguard.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Lol. Nice quick addition to prevent it working in Foo. \$\endgroup\$
    – mbomb007
    Commented Aug 25, 2015 at 21:05
  • 3
    \$\begingroup\$ There seems to be a \u202f char just before the colon - is this intended? \$\endgroup\$
    – Sp3000
    Commented Aug 25, 2015 at 22:35
  • \$\begingroup\$ @Sp3000 Absolutely. Well spotted. \$\endgroup\$
    – Evpok
    Commented Aug 25, 2015 at 22:39
  • \$\begingroup\$ In that case, just to check: are there any non-ASCII chars or unprintables in here? Stack Exchange sometimes messes with those, so I just want to make sure that it didn't. \$\endgroup\$
    – Sp3000
    Commented Aug 25, 2015 at 22:44
  • \$\begingroup\$ @Sp3000 Nope. That's the only non-ASCII character. \$\endgroup\$
    – Evpok
    Commented Aug 25, 2015 at 22:50
7
\$\begingroup\$

DB2, 20 bytes

!echo Hello, World!^

Woe is me. At least I'm learning a lot of information really quickly for this challenge.

Yay! It didn't get cracked! Considering how long I spent searching for a way to make it work only in DB2, it was worth it. I'll add more of an explanation later.

Explanation

  • !echo prints text
  • ^ is an escape character, but nothing follows, so it is ignored. A second carat would be necessary to print it.
  • This is where I first started looking into it, though it ended up being more complex getting it to work only in DB2. I was running variations like mad.
\$\endgroup\$
4
  • \$\begingroup\$ All my shells either print the caret or substitute it with something else. At least on my computer, this does not work in IPython. +1 for persistence. \$\endgroup\$
    – Dennis
    Commented Aug 31, 2015 at 19:33
  • \$\begingroup\$ @Dennis FINALLY! \$\endgroup\$
    – mbomb007
    Commented Aug 31, 2015 at 19:38
  • \$\begingroup\$ Is this Cmd? It's the only thing I can think of that treats ^ specially. I'm likely wrong, though... \$\endgroup\$ Commented Aug 31, 2015 at 19:54
  • 1
    \$\begingroup\$ @kirbyfan64sos Nope. Cmd prints More? like it wants more commands to follow, and upon finishing, declares that !echo is not recognized as a command or file. \$\endgroup\$
    – mbomb007
    Commented Aug 31, 2015 at 19:58
7
\$\begingroup\$

QBasic (QB64), 87 bytes

Should be GolfScript-proof now.

5735816763073854918203775149089!?; "Hello, World!"
Outputs::Screen '$hello, $world\x21'

Nobody noticed the ? hiding in there!? ;^)

Breakdown:

  • 5735816763073854918203775149089! is a line number. The ! is a type suffix that indicates single-precision numbers, but I never knew you could use it on line numbers too.
  • ? is a shortcut for PRINT. The PRINT statement separates multiple expressions with ; when they should be printed with no space in between. If a ; is at the end, it suppresses the final newline. If it's at the beginning, evidently, it's legal syntax that has no effect.

The second line is solely for obfuscation and Foo protection:

  • Outputs: is a label.
  • The second : is a statement separator.
  • Screen aka SCREEN, without arguments, apparently does nothing. (With arguments, it's used to change the screen mode for graphics and such-like.)
    Update: I've just discovered that this part only works in QB64. SCREEN without arguments in QBasic 1.1 on archive.org gives an "Illegal function call" error, and the help file clearly shows it as needing at least one argument.
  • ' begins a comment. Everything afterward is a red herring, which also attempts to defeat Foo via the $h part. Apparently it did its job.
\$\endgroup\$
2
  • \$\begingroup\$ I don't think too many people know QuickBasic to have noticed the ?... \$\endgroup\$ Commented Sep 3, 2015 at 18:46
  • \$\begingroup\$ @kirbyfan64sos Martin mentioned BASIC dialects as having identical shortest "Hello, World!" programs on the "Hello, World!" question, and the VBA answer there uses ?. It may not be common knowledge, but I figured there'd be enough people who knew about it that I needed to hide it pretty well. \$\endgroup\$
    – DLosc
    Commented Sep 3, 2015 at 19:41
6
\$\begingroup\$

Java, 488 bytes, cracked by Dennis

\u0070\u0075\u0062\u006c\u0069\u0063
\u0063\u006c\u0061\u0073\u0073
\u002f\u002a 
init hello:word;
\u002a\u002f Hello
\u007b\u0020\u0070\u0075\u0062\u006c\u0069\u0063  
\u0073\u0074\u0061\u0074\u0069\u0063
\u002f\u002a
set word as exec
\u002a\u002f
void main(String[] a)\u007b
\u0053\u0079\u0073\u0074\u0065\u006d\u002e
out\u002e\u0070\u0072\u0069\u006e\u0074\u006c\u006e
(\u0022\u0048\u0065\u006c\u006c\u006f \u0022+
\u002f\u002a
run hello as
\u002a\u002f\u0022World\u0022);
\u007d\u007d
\$\endgroup\$
6
  • 2
    \$\begingroup\$ Is it Java? (more chars) \$\endgroup\$
    – Dennis
    Commented Aug 17, 2015 at 14:15
  • \$\begingroup\$ @Dennis i hoped it will be more challanging \$\endgroup\$
    – user902383
    Commented Aug 17, 2015 at 14:18
  • \$\begingroup\$ damn, im so sloppy i left void main:( \$\endgroup\$
    – user902383
    Commented Aug 17, 2015 at 14:19
  • 10
    \$\begingroup\$ @user902383 The Unicode escapes are a rather well-known trick around here. ;) \$\endgroup\$ Commented Aug 17, 2015 at 15:02
  • 1
    \$\begingroup\$ @Luminous Unicode escapes. \u0000 to \u007F are ASCII characters. \$\endgroup\$
    – Dennis
    Commented Aug 17, 2015 at 23:31
6
\$\begingroup\$

dc, 36 bytes, cracked by jimmy23013

13 37~i4A6B0CA06939989941081542909BP
\$\endgroup\$
5
  • 3
    \$\begingroup\$ This is dc. (15 chars.) \$\endgroup\$
    – jimmy23013
    Commented Aug 17, 2015 at 18:46
  • \$\begingroup\$ @jimmy23013 Wow, you beat me to it. Also my first guess. \$\endgroup\$ Commented Aug 17, 2015 at 18:48
  • 2
    \$\begingroup\$ Well, that didn't last long... \$\endgroup\$
    – Dennis
    Commented Aug 17, 2015 at 18:49
  • \$\begingroup\$ How did you edit this post in grace period and leave the original in the revision history? \$\endgroup\$
    – jimmy23013
    Commented Aug 18, 2015 at 13:34
  • \$\begingroup\$ @jimmy23013 Your comment ended the grace period. \$\endgroup\$
    – Dennis
    Commented Aug 18, 2015 at 14:22
6
\$\begingroup\$

SPSS, 21 bytes, cracked by MickyT

Echo "Hello, World!".
\$\endgroup\$
8
  • \$\begingroup\$ Your code on cmd produces "Hello, World!" with the quotes, which is wrong. \$\endgroup\$
    – Nico A
    Commented Aug 17, 2015 at 22:31
  • \$\begingroup\$ (I guessed Batch, which was wrong) \$\endgroup\$
    – Alex A.
    Commented Aug 17, 2015 at 22:59
  • 1
    \$\begingroup\$ @MickyT It isn't what I had in mind. I don't have SPSS, so I have no idea if it would work. \$\endgroup\$
    – Dennis
    Commented Aug 17, 2015 at 23:17
  • 1
    \$\begingroup\$ @MickyT I've compiled GNU PSPP and it works. \$\endgroup\$
    – Dennis
    Commented Aug 17, 2015 at 23:34
  • 1
    \$\begingroup\$ @MickyT I might reuse it, so I don't want to tell right now. \$\endgroup\$
    – Dennis
    Commented Aug 17, 2015 at 23:38
6
\$\begingroup\$

FALSE, 47 bytes, cracked by Sp3000

72,101,108,108,111,44,32,87,111,114,108,100,33,
\$\endgroup\$
1
  • 6
    \$\begingroup\$ I do believe this works in FALSE \$\endgroup\$
    – Sp3000
    Commented Aug 18, 2015 at 2:06
6
\$\begingroup\$

Golfscript, 376 bytes, cracked by Peter Taylor

I won't win shortest submission but I enjoy trolling a bit :)

#include <iostream>
#include <string>
using namespace std;string 0utput("Hello, World!\n");struct my_struct{string input;};void print(string x){cout<<x;}string x="abc";int main(){cout<<"What language do you think this is?\n";my_struct M;cin>>M.input;if(M.input=="C++"||M.input=="c++"){cout<<"Haha. Guess again\n\n";main();}else print(Output);}my_struct Hello;my_struct World;

Ungolfed:

#include <iostream>
#include <string>
using namespace std;

string 0utput("Hello, World!\n");

struct my_struct{ string input; };

void print( string x ){ cout << x; }

string x = "abc";

int main(){
    cout << "What language do you think this is?\n";
    my_struct M;
    cin >> M.input;
    if( M.input == "C++" || M.input == "c++" ){
        cout << "Haha. Guess again\n\n";
        main();
    }else
        print( Output );
}
my_struct Hello;
my_struct World;
\$\endgroup\$
2
  • 4
    \$\begingroup\$ Looks like it works in GolfScript. \$\endgroup\$ Commented Aug 18, 2015 at 11:52
  • \$\begingroup\$ Jesus! Took you less than a minute. Nice work. \$\endgroup\$ Commented Aug 18, 2015 at 11:53
6
\$\begingroup\$

PowerShell, 945 bytes, cracked by MickyT

Won't win for shortest, but this was a fun diversion. Also my second submission to this particular contest, hopefully this one is a bit more obfuscated.

Code:

#   This is a   crazy-weird program [that is
#   >   than all+others and<none    -- not even
#   Fish    -- if   you can count that
#   --  I don't count   it either 
#   That's  weird - what's  this    doing   here?]>--.
$a=66
#   These [#-#] blocks are  all-comments    [meaning    everything+nothing
#   but>    c++[and somehow not c++ even    with
#   an  Include <cstd]io>] piped    > to a
#   nothing-dot like this one .     
#   Whoa    it's another    [#-#] block - wonder
#   what    [this>one+does< maybe --- nothing] Maybe>everything-.   M[a-y]be
#
#   there is a  secret+hidden [me->an-[ing in amongst
#   these   --< arrows] and >- tabs]    Can>.
#   you figure it[o-u]-t[>Withou+<  g-o-i-n-g   ca-r-a-zy?] all cooped
#   up  like a  >   less-than   dot.bracket [
    $b  = $a    -   22  ;   #WHOA
#WHOA]>
#   Where did +ha[+ come    from?   All out
#   of[<left    field] li>>ke   tha+    with    na<ry   a
#   warni+g]    that>   stuff is    happening  .
    "Hello" +   [char]$b    + " World!" 

#HolyCrapWTFEndOfLine
#P.S.-WhatIfYouTakeASpaceToMean0AndATabToMean1LikeInWhitespace-WhatThen?.
\$\endgroup\$
3
  • \$\begingroup\$ Wow, that's genius. Good luck to anyone who attempts! Perhaps you'll succeed (unlike me)... \$\endgroup\$ Commented Aug 18, 2015 at 19:14
  • \$\begingroup\$ Is it powershell? \$\endgroup\$
    – MickyT
    Commented Aug 18, 2015 at 20:10
  • 1
    \$\begingroup\$ Bah, indeed it is. ;-) I'll see if I can come up with yet another obfuscation of a PowerShell program. Three months from now, I'll write a program in python and everyone will go ballistic. ;-) \$\endgroup\$ Commented Aug 18, 2015 at 20:13
6
\$\begingroup\$

Nim, 28 bytes, cracked by Mauris

("Hello,\x20".echo "World!")

Honestly not sure how hard this one is, so it'll be interesting. The \x20 is to hopefully minimise the chance of this coincidentally working in random esolangs.


The usual Nim Hello, World! is

echo "Hello, World!"

but Nim's syntax is pretty flexible, allowing for dot syntax. The parentheses were completely irrelevant.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This is Nim. --- \$\endgroup\$
    – lynn
    Commented Aug 19, 2015 at 2:33
  • \$\begingroup\$ @Mauris Correct! :) \$\endgroup\$
    – Sp3000
    Commented Aug 19, 2015 at 2:38
6
\$\begingroup\$

Tiny, 37 bytes, cracked by Sp3000

Echo "Hello," and " World!". End. "!"
\$\endgroup\$
4
  • \$\begingroup\$ Nice use of "!" to prevent this from working in Foo. :) \$\endgroup\$ Commented Aug 19, 2015 at 20:37
  • 3
    \$\begingroup\$ I love the output in GolfScript: World! World! World!! \$\endgroup\$ Commented Aug 20, 2015 at 16:27
  • 1
    \$\begingroup\$ Works in Tiny. The hardest part was trying to find an interpreter, which is available here. \$\endgroup\$
    – Sp3000
    Commented Aug 22, 2015 at 23:14
  • \$\begingroup\$ @Sp3000 After reading the esolang page, I'm not entirely sure why, but yes, it works in Tiny. \$\endgroup\$
    – Dennis
    Commented Aug 22, 2015 at 23:53
6
\$\begingroup\$

Gibberish, 60 bytes, cracked by Dennis

1 fs=[Hello, World]
2 fs.seq [33]
3 fs.@-1 x i
4 fs.prigte o

I knew it was only a matter of time once Dennis posted his own Gibberish answer.

How this works:

Gibberish is a stack-based language with single-character instructions, except for string literals enclosed in []. When in f mode, s pops a number off the stack and skips that many characters from being interpreted, so the beginning of each line is a no-op of increasing length used for obfuscation. Whitespace is also ignored. The intent was to mimic a language that had line numbers and variable assignment (although the use of fs as my fake variable name accidentally made it look like Node.js). If we remove this obfuscation, we get

[Hello, World] (push the string "Hello, World" onto the stack)
eq             (pop the string and print it)
[33]           (push the string "33" onto the stack)
1xi            (convert "33" to the number 33)
gt             (convert 33 to its ASCII character, "!")
eo             (pop "!" and print it with a trailing newline)
\$\endgroup\$
3
  • \$\begingroup\$ Is this Node JS? \$\endgroup\$ Commented Aug 20, 2015 at 23:20
  • \$\begingroup\$ It is not, sorry. \$\endgroup\$
    – histocrat
    Commented Aug 21, 2015 at 0:34
  • 2
    \$\begingroup\$ This is Gibberish. \$\endgroup\$
    – Dennis
    Commented Aug 26, 2015 at 5:03
6
\$\begingroup\$

Fishing, 139 characters, cracked by MickyT

v+C+C+C-C-C<_
NE`'etICfPlD+
@_ LHbgFl{oCC
/yCNXbejb9]3+
}j-9<]'qT,y\C
sTC+`5)GMd&]-
Xl+UpoNr60 *C
1RC!8l @*oTT-
Ir>dF&x4ZF@WC
Z{|C-C-C+C+^]

Fishing is a 2d programming language based on a fisherman fishing. The fisherman walks around on the dock. Whenever the C command is encountered; the fisherman will cast his line for an instruction.

First I started with a dock:

v+C+C+C-C-C<_
            +
            C
  C         +
  -         C
  C         -
  +         C
  C         -
  >         C
  |C-C-C+C+^]

The v><^ instructions choose which way he throws his line.
The +- instructions lengthen or shorten his line.
The |]_ instructions change which directions he is walking.
At the end of the dock, the program ends.

After I created the dock, I took the standard "Hello, World!" program(`Hello, World!`N), and put it in the locations where he would catch fish.

v+C+C+C-C-C<_
  `       l +
    H   l o C
  CN  e     +
  -      ,  C
  C `       -
  +    r    C
  C! l   o  -
  >d       WC
  |C-C-C+C+^]

After that, I simply used a program to fill in the remaining spaces with random characters.

\$\endgroup\$
4
  • \$\begingroup\$ It's not ><>, but I'm betting it's a 2D Language. \$\endgroup\$
    – mbomb007
    Commented Aug 24, 2015 at 22:44
  • \$\begingroup\$ A wild guess, is it Fishing? \$\endgroup\$
    – MickyT
    Commented Aug 25, 2015 at 19:56
  • \$\begingroup\$ @MickyT Good job, yes it is. \$\endgroup\$ Commented Aug 26, 2015 at 16:26
  • 1
    \$\begingroup\$ @mbomb007 It was the entry following Fish :P \$\endgroup\$ Commented Aug 26, 2015 at 16:38
6
\$\begingroup\$

Befalse, 205 bytes

(((72)(#Print.))((101)(#Print.))((108)(#Print.))((108)(#Print.))((111)(#Print.))((44)(#Print.))((32)(#Print.))((87)(#Print.))((111)(#Print.))((114)(#Print.))((108)(#Print.))((100)(#Print.))((33)(#Print.)))

Befalse (online interpreter here) is a 2D, stack based language which terminates when we leave the codespace. We use only 1 dimension here, reading from left to right as we would do in a non-2D language.

The top stack element can be printed with the instruction .. Multi-digit numbers can be pushed on the stack in the format (number). The opening parens not followed by a digit push 0 on the stack. The ones interfering with printing are dropped with the instruction #. The rest of the characters (Print) are no-ops.

A simplified version of the code:

(72).(101).(108).(108).(111).(44).(32).(87).(111).(114).(108).(100).(33).
\$\endgroup\$
2
  • \$\begingroup\$ I think this is a BF derivative, if you enter a number, the cell will be set to the number (so 72. would print H). \$\endgroup\$ Commented Aug 25, 2015 at 0:24
  • \$\begingroup\$ It's using S-expressions, which aren't as popular as they once were. \$\endgroup\$
    – Pharap
    Commented Aug 26, 2015 at 10:32
6
\$\begingroup\$

rs, 347 bytes, cracked by Dennis

What? The traveler was shocked. Never in his life had he heard such a sentence/phrase said so beautifully.
Hello, World!
It rung like a booming echo in a field of tranquility. So strong, yet...calm. In fact, the force was so strong, it knocked down a nearby sign that said "Store/Hotel", which fell on the traveler's head and killed him. THE END!!

Pretty sure this'll get cracked quickly, but it's still pretty neat!

Well, this lasted around 5 days, which is much longer than I thought it would, especially since I created rs!

The first and third lines of the script are replacements designed so that they will never match and will do nothing. The second actually prints "Hello, World!".

\$\endgroup\$
7
  • \$\begingroup\$ Is it sed? It's a guess... \$\endgroup\$
    – galexite
    Commented Aug 28, 2015 at 13:37
  • \$\begingroup\$ If so, then the /s are a give away \$\endgroup\$
    – galexite
    Commented Aug 28, 2015 at 13:37
  • 1
    \$\begingroup\$ @georgeunix Nope. \$\endgroup\$ Commented Aug 28, 2015 at 13:38
  • \$\begingroup\$ Nope. Isn't sed. \$\endgroup\$
    – galexite
    Commented Aug 28, 2015 at 13:39
  • \$\begingroup\$ I'm not entirely sure why, but your code works in rs. \$\endgroup\$
    – Dennis
    Commented Aug 31, 2015 at 5:02
6
\$\begingroup\$

RPAL, 27 bytes

(Print'Hello, World!',',')2

This is RPAL from the PAL family. There's no real obfuscation here, just some extra (useless) code to prevent it from accidentally being a polyglot. The canonical "Hello World" program in RPAL is

Print 'Hello, World!'

This evaluates to the dummy value dummy and does the output as a side effect. Because the return value of the top level expression is always thrown away, we can make the expression more complicated and as long as we don't add any subexpressions with side effects, the output doesn't change. First I've put the Print as the first element into a pair:

( Print 'Hello, World!' , ',' )

The second element is the string ',' (but could have been any value). Then I've added the element selector 2 which chooses the second element ','. So the full expression

( Print 'Hello, World!' , ',' ) 2

returns ',' which is discarded and does some output during evaluation.

An interpreter can be found here. The interpreter is written in GNU Guile.

\$\endgroup\$
6
\$\begingroup\$

O, 30 bytes

A;"World!""kELLO, "_'k'H%rrope

My first answer to make it past the 7 days! YESSSSS!!!! For the last 30 minutes, I've been stalking this answer to wait for the time to be up. :)

I'm seriously surprised no one cracked this, though. After all, O was written by Phase, I cracked one of Dennis's answers as O, Dennis posted a Hello, World! answer in O, and I posted an answer to the comparison challenge in O.

Most of this answer is fluff. The A; pushes 10 to the stack and instantly pops it. The kELLO thing lowercases the string _ and replaces the k with an H ('k'H%). rr reverses the stack twice (therefore doing nothing), the o prints the Hello, , p prints the World!, and e pops off an empty stack, therefore causing the interpreter to crash...printing the error message to stderr, not stdout.

\$\endgroup\$
3
  • \$\begingroup\$ @Dennis To build it, try javac -cp /usr/share/maven-repo/commons-codec/commons-codec/1.9/commons-codec-1.9.jar -sourcepath src -d build src/xyz/jadonfowler/o/O.java (replacing the /usr/share/... with the full path to the Apache Common Codecs jar file, which is available in Ubuntu, my distro, as libcommons-codec-java). \$\endgroup\$ Commented Sep 2, 2015 at 17:41
  • \$\begingroup\$ @Dennis And to run it, the o script doesn't work, so you need to edit it to read java -cp "`dirname $(realpath $0)/build`" xyz.jadonfowler.o.O "$@". \$\endgroup\$ Commented Sep 2, 2015 at 17:41
  • \$\begingroup\$ Let us continue this discussion in chat. \$\endgroup\$
    – Dennis
    Commented Sep 2, 2015 at 18:22
6
\$\begingroup\$

Cardinal, 74 bytes

>~n*,n*,n*,,n*,n*,n*,n*\
- N  kx r ' uj 2r &x ]u,
O-----%x,*u,*u,*u,*u,*u<

Bad luck for me—I noticed this challenge 17 hours 35 minutes late ;) Have fun anyway!

Nobody solved this one yet, so here is the explanation. First a short introduction what Cardinal does: In Cardinal each pointer carries a stack of length 2 with an active and a passive value. The role of both can be switched. All values are unsigned 8-bit integers, so every value and program can be displayed or written using the OEM 437 codepage, which is also used by the interpreter in display mode.

OEM 437

Short explanation of the instructions I used in my code:

% create pointers moving in all 4 cardinal (hence the name) directions.
- decrement active value (wrap around to 255 if it is 0)
O clockwise change of pointer direction
> change pointer direction to right
~ make active value passive and vice versa
n drop active value in direction of the bow of n and pick up new active value from the open end of n
u drop active value in direction of the bow of u (below the letter) and pick up value from above the letter (the open end of u)
  this is the upside down version of n
( and ) are the left and right facing versions of n
* add active and passive values, store result as new active value
, output active value as Char
\ reflect pointer by 90°, then flip the state of the reflector to / or vice versa
< change pointer direction to left
x delete pointer

If no pointers are left, then the program is terminated.

Let’s unwrap the code and remove the now unnecessary direction instructions:

%------~n*,n*,n*,,n*,n*,n*,n*,n*,n*,n*,n*,n*,x
x       N  k  r   u  2  &  ]  u  x  r  j  '

First execution steps:

255            254            253                  250             0
  0              0              0         ...        0           250
 %>-----~n*,   %->----~n*,   %-->---~n*,       %----->~n*,  %------>n*,
         N             N             N                 N            N

        78            72            72
       250           250           250   ...
 %------~>*,  %------~n>,  %------~n*>
         N            N            N
                           output 'H'
                           to the console

It’s easy to see that

Nkrru2&]uxrj'

is just

Hello, World!

shifted by 6

So, after picking up every value * subtracts 6—adds ------ (or value 250 due to wrap-around) from the start—and , outputs the character.

\$\endgroup\$
6
\$\begingroup\$

///, 84 bytes

/"""""\
| _ _ |
||.|_||
||_|__|
 / \_______________
 \________________/Hello, World!

Hopefully this isn't too easy or a polyglot.

\$\endgroup\$
5
\$\begingroup\$

Javascript, 785 bytes, cracked by ProgramFOX

$=~[];$={___:++$,$$$$:(![]+"")[$],__$:++$,$_$_:(![]+"")[$],_$_:++$,$_$$:({}+"")[$],$$_$:($[$]+"")[$],_$$:++$,$$$_:(!""+"")[$],$__:++$,$_$:++$,$$__:({}+"")[$],$$_:++$,$$$:++$,$___:++$,$__$:++$};$.$_=($.$_=$+"")[$.$_$]+($._$=$.$_[$.__$])+($.$$=($.$+"")[$.__$])+((!$)+"")[$._$$]+($.__=$.$_[$.$$_])+($.$=(!""+"")[$.__$])+($._=(!""+"")[$._$_])+$.$_[$.$_$]+$.__+$._$+$.$;$.$$=$.$+(!""+"")[$._$$]+$.__+$._+$.$+$.$$;$.$=($.___)[$.$_][$.$_];$.$($.$($.$$+"\""+$.$$__+$._$+"\\"+$.__$+$.$_$+$.$$_+"\\"+$.__$+$.$$_+$._$$+$._$+(![]+"")[$._$_]+$.$$$_+"."+(![]+"")[$._$_]+$._$+"\\"+$.__$+$.$__+$.$$$+"(\\\"\\"+$.__$+$.__$+$.___+$.$$$_+(![]+"")[$._$_]+(![]+"")[$._$_]+$._$+",\\"+$.$__+$.___+"\\"+$.__$+$._$_+$.$$$+$._$+"\\"+$.__$+$.$$_+$._$_+(![]+"")[$._$_]+$.$$_$+"!\\\"\\"+$.$__+$.___+")"+"\"")())();
\$\endgroup\$
2
  • 3
    \$\begingroup\$ This is JavaScript. \$\endgroup\$
    – ProgramFOX
    Commented Aug 17, 2015 at 7:45
  • \$\begingroup\$ @ProgramFOX Correct! \$\endgroup\$
    – Fatalize
    Commented Aug 17, 2015 at 7:47
5
\$\begingroup\$

Scala, 70 bytes, cracked by Sp3000

object Main {def main(args: Array[String]) = println("Hello, World!")}
\$\endgroup\$
2
  • \$\begingroup\$ I believe this is Scala? The w is lowercased though. \$\endgroup\$
    – Sp3000
    Commented Aug 17, 2015 at 10:49
  • \$\begingroup\$ @Sp3000 You got it! \$\endgroup\$
    – Martijn
    Commented Aug 17, 2015 at 10:50
5
\$\begingroup\$

Plankalkül, 110 bytes, cracked by ProgramFOX

R1.3() => R0
'H'; 'e'; 'l'; 'l'; 'o'; ' '; 'W'; 'o'; 'r'; 'l'; 'd'; '!' => Z0[: m x sig]
R1.2(Z0) => R0
END

Might be easy, might be hard. Don't know.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ I'm guessing it's Plankalkül. \$\endgroup\$
    – ProgramFOX
    Commented Aug 17, 2015 at 14:21
  • \$\begingroup\$ @ProgramFOX Correct! \$\endgroup\$
    – user42003
    Commented Aug 17, 2015 at 16:12
5
\$\begingroup\$

ferNANDo, 717 bytes, cracked by Sp3000

from gmpy2 import*

( 'pi-binary-splitting' )
def pibs(
    a , b
  ) :
  if a==b:
    if a==0:
      return ( 1, 1, ( 13) * 1045493)

    p= ( a *(a *(a*72-108 ) +46) )
    q= ( a * ( a *a*10939058860032000 ))
    t= ( a * ( ( 20701)*26334) +13591409)
    p -= 5

    return ( p ,-q,(t*( p ) ) )

  else:
    m = ( b+ ( a )) >>1
    p,q,t = ( pibs (a , m ))
    p2,q2,t2= ( pibs ( m+1,(b ) ) )

    return ( p *p2,q*q2,(q2*t+(t2* p ) ) )

if __name__=='__main__':
  from sys import*
  import gmpy2

  digits = int(argv[1])
  (gmpy2.get_context ( ) ) .precision =int( digits *3.32192809488736235)

  p,q,t=pibs ( ( 0),mpz ( digits * 0.07051366934824486))
  c=sqrt ( ( 87) *115 ) * 426880

  print str ( q *c / t )
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Would this be ferNANDo? \$\endgroup\$
    – Sp3000
    Commented Aug 22, 2015 at 12:27
  • 1
    \$\begingroup\$ It's valid python too, just doesn't product "Hello, World!" :p \$\endgroup\$
    – primo
    Commented Aug 22, 2015 at 12:29
5
\$\begingroup\$

Julia, 60 bytes, cracked by alephalpha

#lang racket
(print (
  "Hello"*
  " , " [2:3]*
  "World!"))

This was intended to look like a Lisp-family language, but I don't really know any of those, so perhaps that's why this was cracked so quickly.

# begins a single-line comment in Julia, so #lang racket is just ignored. The print function is surrounded by parentheses which have no effect.

Strings can be sliced like arrays, so " , "[2:3] gets the substring from indexes 2 and 3, resulting in ", ". * performs string concatenation. Thus the result is just a simple call to print("Hello, World!").

\$\endgroup\$
2
  • \$\begingroup\$ I think it's Julia. \$\endgroup\$
    – alephalpha
    Commented Aug 23, 2015 at 5:54
  • \$\begingroup\$ @alephalpha Great, that lasted about 60 seconds. :P \$\endgroup\$
    – Alex A.
    Commented Aug 23, 2015 at 5:59
5
\$\begingroup\$

FlogScript, 21 bytes, cracked by Sp3000

1.{Hello, World!}PrP_
\$\endgroup\$
2
  • 3
    \$\begingroup\$ Braces, you say? Well it must be... puts on sunglasses... FlogScript \$\endgroup\$
    – Sp3000
    Commented Aug 26, 2015 at 2:23
  • \$\begingroup\$ @Sp3000 Yes, that's it... \$\endgroup\$
    – mbomb007
    Commented Aug 26, 2015 at 14:44
5
\$\begingroup\$

ILLGOL, 38 bytes, cracked by Dennis

print "Hello, World!", EoL FIN NB ":P"

ILLGOL is actually compiled into programs that can only be ran in DOS. I figured no one would dig that far. In addition, it isn't documented hardly at all. The only reason I was able to provide this code is that a Hello, World! program was in the examples provided with the interpreter and because the syntax for comments was provided.

This was a comment designed to get rid of Foo:

NB ":P"
\$\endgroup\$
4
  • \$\begingroup\$ +1 for the smiley. In another 3 days, we'll likely all end up wanting to destroy Foo. :) \$\endgroup\$ Commented Aug 26, 2015 at 19:38
  • 1
    \$\begingroup\$ This has to be ILLGOL. \$\endgroup\$
    – Dennis
    Commented Aug 27, 2015 at 1:22
  • \$\begingroup\$ @Dennis How do you know these things? \$\endgroup\$ Commented Aug 27, 2015 at 1:39
  • 3
    \$\begingroup\$ @TheNumberOne Dennis knows all. \$\endgroup\$ Commented Aug 27, 2015 at 2:00
5
\$\begingroup\$

mk, 153 bytes

Take 4! Now prints a special message in every shell I can think of (including Fish and Bash; try it) and is guarded against Foo.

#ifndef __linux
#include "x.h"
#define X/*\
a=
+++++++++++++++++++++_+++++++++++++....Hello World!?:Q:
#endif
    echo "Hell$a, World!"
    int m(){}
a=o

mk is the Plan 9 version of classic make. I had had a conversation with Martin Büttner in the comments (which later got removed by the mods :( ) about the fact that mk has no Wikipedia article (although I could've sworn it did at the time of this posting), but it is mentioned under the general make article. Since it's super similar to make, I figured it still worked. *crosses fingers*

In reality, this would also work perfectly in Posix make. Well, almost perfectly. See, there are two differences between make and mk that this depends on:

  1. Shell commands are evaluated after the file is parsed. This means that the value of a when the rule is run is o, even though it's empty until then.
  2. 4-space indentation. This one isn't really necessary. I could've easily used a tab instead, which would mean the only difference this answer depends on is #1.
\$\endgroup\$
1 2
3
4 5
8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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