This is part of a cops-and-robbers challenge. Go here for the robbers' part.
The Cops' Challenge
You should write a program or function in a language of your choice, which outputs the string Haystack
. However, it must be possible to remove some subset of characters from your program (without reordering the rest), such that the resulting string is also a valid program in the same language, which prints Needle
instead. Both programs/functions may optionally print a single trailing newline (independently of each other), but nothing else. Output is case sensitive and must follow the exact casing provided.
Your goal, of course, is to hide the "needle" very well. But note that your submission can be cracked with any valid solution, not just the one you intended.
Please include in your answer:
- The language (and version if relevant) of your submission.
- The size of the Haystack program in bytes.
- The Haystack program itself.
- The output method if it's not STDOUT.
- If possible, a link to an online interpreter/compiler for your chosen language.
Your submission may be either a program or function, but not a snippet and you must not assume a REPL environment. You must not take any input, and you may output via STDOUT, function return value or function (out) parameter.
Both programs/functions have to complete within 5 seconds on a reasonable desktop machine and need to be deterministic. You must not use built-ins for hashing, encryption or random number generation (even if you seed the random number generator to a fixed value).
In the interest of fairness, there must be a freely available interpreter or compiler for your chosen language.
An answer is cracked if the Needle program is found. If your answer has not been cracked for 7 days, you may reveal the intended Needle program in your answer, which renders your submission safe. As long as you don't reveal your solution, it may still be cracked by robbers, even if the 7 days have already passed. The shortest safe Haystack program (measured in bytes) wins.
Examples
Here are a couple of simple examples in different languages:
Ruby
Haystack: puts 1>0?"Haystack":"Needle"
Delete: XXXXXXXXXXXXXXX
Needle: puts "Needle"
Python 2
Haystack: print "kcatsyaHeldeeN"[-7::-1]
Delete: XXXXXXXX XX
Needle: print "eldeeN"[::-1]
Note that the subset of removed characters doesn't have to be contiguous.
Uncracked Submissions
<script>site = 'meta.codegolf'; postID = 5686; isAnswer = false; QUESTION_ID = 144600;</script><script src='https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js'></script><script>jQuery(function(){var u='https://api.stackexchange.com/2.2/';if(isAnswer)u+='answers/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJeRCD';else u+='questions/'+postID+'?order=asc&sort=creation&site='+site+'&filter=!GeEyUcJFJO6t)';jQuery.get(u,function(b){function d(s){return jQuery('<textarea>').html(s).text()};function r(l){return new RegExp('<pre class="snippet-code-'+l+'\\b[^>]*><code>([\\s\\S]*?)</code></pre>')};b=b.items[0].body;var j=r('js').exec(b),c=r('css').exec(b),h=r('html').exec(b);if(c!==null)jQuery('head').append(jQuery('<style>').text(d(c[1])));if (h!==null)jQuery('body').append(d(h[1]));if(j!==null)jQuery('body').append(jQuery('<script>').text(d(j[1])))})})</script>