Hide the Needle in the Haystack (Cops)

38

1

This is part of a 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>

Martin Ender

Posted 2017-10-07T14:13:19.783

Reputation: 184 808

1Related. (The main difference is that that one had the programs implement OEIS sequences and allowed the cracked program to output any different OEIS sequence, which makes it a lot harder for the cops to guard against unintentional cracks. It also allowed robbers to steal cracks from other robbers by finding even shorter solutions.) – Martin Ender – 2017-10-07T14:21:11.503

I would do this in Haystack but it has no documentation and I cbb looking through the code :( – Okx – 2017-10-07T15:45:21.280

@Okx https://github.com/kade-robertson/haystack/wiki/Documentation

– HyperNeutrino – 2017-10-07T15:50:33.367

To brute-force a n - byte submission, you have to check 2^n - 1 sub-programs. Each is required to complete within 5 seconds. If you check programs consecutively, you need about 7.5 days for a 17-byte submission. So this is the lower bound for an expected safe submission :-) – M.Herzkamp – 2017-10-09T15:30:33.050

1

The stack snippet gets the length wrong for this answer

– mbomb007 – 2017-10-09T20:02:23.923

@M.Herzkamp I don't think every possible subprogram must complete within 5 seconds, just the Haystack and Needle ones? – kamoroso94 – 2017-10-14T11:23:24.450

1@kamoroso94 Yes, but that means you can terminate candidate programs after 5 or 6 seconds, because if they haven't finished they can't be the solution you're looking for. – Martin Ender – 2017-10-14T11:24:50.610

What are treated as hashing, encryption or random number generation – l4m2 – 2017-12-15T18:56:57.317

You should accept this safe TI-Basic Answer at 119 bytes

– FantaC – 2018-01-17T00:06:13.603

Answers

16

Haystack, 84 bytes, Cracked

0\\1-c\
//    
?10F17+c8F+4+cd8F+3+c6-c1+c,c2+c8+c|
 0   \1++c,c|
F/c++2F8
c\8F+2+cd

Try it online!

This looks (to me) rather convoluted but if you find the right subset it's a bit too easy... oh well, just to get us started :P

HyperNeutrino

Posted 2017-10-07T14:13:19.783

Reputation: 26 575

Cracked. – fireflame241 – 2017-10-07T16:27:38.537

1@icrieverytim 1. oo cool they're both unicode glyphs 2. the current one is more scientifically accurate – HyperNeutrino – 2017-10-08T14:23:22.623

>

  • Yeah, I know, they look really cool. :P I found them in this gold mine of a Unicode block. Don't be surprised if they end up in Neon's code page. 2. TBH, the old one looked better IMO. :P
  • – totallyhuman – 2017-10-08T14:31:41.933

    @icrieverytim I agree, but scientific accuracy > looks :P (to some extent) there's also a diagram which is a dashed hexagon inside a solid hexagon but I can't seem to find a decent image for that version. – HyperNeutrino – 2017-10-08T14:34:45.817

    1@HyperNeutrino Why do you have an interest in benzene? – Michthan – 2017-10-09T13:23:03.753

    3@Michthan Considering that I'm a neutrino, that is a good question, but I don't know :P – HyperNeutrino – 2017-10-09T13:28:20.747

    12

    Hexagony, 37 bytes

    H[@;(...e<l.a;./$.>;\sN;\ac.>).;;;._y
    

    Try it online!

    Just my obligatory Hexagony entry...

    For convenience, here is the unfolded code:

       H [ @ ;
      ( . . . e
     < l . a ; . 
    / $ . > ; \ s
     N ; \ a c .
      > ) . ; ;
       ; . _ y
    

    How this works:

    The program starts off with H, then we move to IP #5. This IP starts in the west corner, bouncing and wrapping around while executing (in effect) ;a;y;s; (so we've printed Hays). Then s gets incremented to a t by ) and printed, then we pass through Ne...(c before getting to a;c; (still bouncing around a small section of the hexagon). The program hits the _, reflects up through \ to l which gets decremented to a k by (, which passes through another \ before being printed and the program terminates on the @.

    Verbose version

    H   H is entered into the current memory cell
    [   We move to the previous instruction pointer (starting at the / and moving NE)
    /   No-op
    <   Mirrors the IP back to south-west
    /   No-op (IP now wraps to the NE corner)
    ;   Outputs H
    .   No-op
    a   a is entered into the current memory cell
    >   Mirrors the IP back to north-east
    a   a is entered into the current memory cell
    .   No-op
    ;   Outputs a (IP now wraps SE corner)
    y   y is entered into the current memory cell
    ;   Outputs y
    .   No-op
    s   s is entered into the current memory cell (IP now wraps SW corner)
    ;   Outputs s
    )   Increments the memory cell to t
    \   Mirrors the IP west
    ;   Outputs t
    N   N is entered into the current memory cell (IP now wraps to e)
    e   e is entered into the current memory cell
    ... No-ops
    (   Decrements the memory cell to d (IP now wraps to . on SE edge)
    .   No-op
    c   c is entered into the current memory cell
    a   a is entered into the current memory cell
    \   Mirrors the IP north-east
    >   Redirects the IP east
    ;   Outputs a
    \   Mirrors the IP south-west
    c   c is entered into the current memory cell
    ;   Outputs c
    _   Mirrors the IP north-west
    .\. No-ops
    l   l is entered into the current memory cell
    (   Decrements the memory cell to k (IP now wraps to . on SE edge)
    .\  No-ops
    ;   Outputs k
    .   No-op
    @   Terminates the program

    Martin Ender

    Posted 2017-10-07T14:13:19.783

    Reputation: 184 808

    3This language still cracks me up. I love you for it. – phroureo – 2017-10-09T16:44:18.590

    My brain is exploding right now. I was trying to figure this out enough to crack the code, but YEESH man. What kind of twisted guy makes this up?? – phroureo – 2017-10-13T18:10:49.990

    @phroureo ... >_> – Martin Ender – 2017-10-13T18:20:02.443

    After your answer is safe, can you give me a step-by-step on what it's doing? (Or if you already have a step-by-step somewhere one something similar, point me there?) – phroureo – 2017-10-13T18:22:33.513

    1

    @phroureo I don't mind adding an explanation of the cop program before it's safe, and I don't think I'll claim it safe anyway (I'm not too keen on winning my own challenge with a submission that I put barely any effort in). I'll try to add the explanation tomorrow. In the meantime, I'm happy to help you with Hexagony in the esolangs chatroom.

    – Martin Ender – 2017-10-13T19:44:48.503

    @phroureo you might also want to check out Timwi's Esoteric IDE – boboquack – 2017-10-17T00:48:51.090

    Cracked, finally. – Jo. – 2017-12-15T07:07:46.543

    10

    Brain-Flak, 146 bytes (Cracked)

    ([((((()()())){}){}){}](()([()](()({}([((((()()()){})))[]])[]({}({})[{}]()({}((()(({}){}){}){}){}())))[][][][][][]))[]))(((()[]){}){({}[()()])}{})
    

    Try it online!

    Intended solution, 80 bytes

    ([((((()()())){}){}){}](()([()](()({}([((((()()()){})))[]])[]({}({})[{}]()({}((()(({}){}){}){}){}())))[][][][][][]))[]))(((()[]){}){({}[()()])}{})
    ( ((   )(                  [(  (( (         )()()){})) []]   ({}(  )    ( (  ( ()(({}){}){}){}){}())))            ))    (((()[]){}){({}[()  ])}{})
    

    Post Rock Garf Hunter

    Posted 2017-10-07T14:13:19.783

    Reputation: 55 382

    Cracked – Nitrodon – 2017-10-07T21:03:03.630

    8

    JavaScript, 95 bytes (ES6), Cracked

    A function returning a string.

    f=(k=b=x=35)=>x--?f(k*74837258394056219&268435455):k&2?'N'+(k^124038877).toString(b):'Haystack'
    

    "Haystack" demo

    f=(k=b=x=35)=>x--?f(k*74837258394056219&268435455):k&2?'N'+(k^124038877).toString(b):'Haystack'
    
    console.log(f())

    Arnauld

    Posted 2017-10-07T14:13:19.783

    Reputation: 111 334

    Very nice puzzle. Cracked

    – ShreevatsaR – 2017-10-07T19:15:43.497

    8

    Haskell, 168 bytes (Cracked by nimi)

    hays=map;hay=zipWith;stack=head;h=stack{-
     hay.(hays.(stackany hay$or id).stack hay
    <*>hays(sum$stack haystack<$>hay))-}$words
     "Haystack Hayst ackH aysta ckH aystac k"
    

    Try it online! Evaluating the identifier h returns the string "Haystack", after some deletions h yields "Needle".

    Laikoni

    Posted 2017-10-07T14:13:19.783

    Reputation: 23 676

    1Cracked. Was quite some fun to solve. – nimi – 2017-10-13T13:08:12.157

    4

    Jelly, 41 bytes (Cracked)

    “¿ọ⁽ṅ*FỊ⁼g£¡#!ʋzoɦṪ£ṢÞḲÐɠ`”m3⁾“»jVḟ“¡!pṄ»
    

    Try it online!

    Happy hunting!

    Jonathan Allan

    Posted 2017-10-07T14:13:19.783

    Reputation: 67 804

    Cracked. – jacobly – 2017-10-08T14:09:55.673

    4

    Hexagony, 32 bytes. Cracked

    I couldn't solve Martin's, so I'm posting my own.

    ];N.@cl;e@;;(\H/;ya;_.>s.;t//<._
    

    Try it online!

    Here it is formatted:

       ] ; N .
      @ c l ; e
     @ ; ; ( \ H
    / ; y a ; _ .
     > s . ; t /
      / < . _ .
       . . . .
    

    My aim with this was for both solutions to use as many IPs as possible, I got 6 for Needle and only 5 for Haystack.

    H.PWiz

    Posted 2017-10-07T14:13:19.783

    Reputation: 10 962

    Cracked – boboquack – 2017-10-19T03:50:51.367

    3

    Pyth, 44 bytes (Cracked)

    Kr."Dn2û"2sf!/+rrK2 2r."EL8"2Tr."AhÐP­®Z"2
    

    Try it here.

    Mr. Xcoder

    Posted 2017-10-07T14:13:19.783

    Reputation: 39 774

    Should be easy to crack, just a first attempt :-) – Mr. Xcoder – 2017-10-07T17:10:55.487

    @_@ Why is there Jelly code – Leaky Nun – 2017-10-08T09:43:54.060

    cracked – Leaky Nun – 2017-10-08T09:51:21.820

    3

    Java (OpenJDK 8), 226 217 bytes (Cracked)

    First ever code golf, probably very easy but it was a fun challenge!

    String d(){int h=3609000-5055+911,m=557558,s=15441301-157*10000;String d="0"+h*2+""+m*20+""+s*7,x="",y;for(int g=0;g<d.length();g+=3){y="";for(int e=0;e<3;e++)y+=d.charAt(e+g);x+=(char)Integer.parseInt(y);}return x;}
    
    

    Try it online!

    Luke Stevens

    Posted 2017-10-07T14:13:19.783

    Reputation: 979

    Your TIO doesn't work. You might want to change the return new Main().d(); to System.out.print(new Main().d()); in the main-method. – Kevin Cruijssen – 2017-10-09T12:47:31.600

    @KevinCruijssen Thanks for the heads up! – Luke Stevens – 2017-10-09T13:12:00.037

    1Cracked. – milk – 2017-10-09T21:57:47.760

    3

    dc, 148 bytes (Cracked)

    6 93 3 9 2 2**+*+483622 1 2 3 3*+3*+89 47*+*+3 5 2* 269 158 9**107 97*2 4*++2 3 3*+42 14 2**+*+5*+5 2148 1 6 2*+*+68262 5 280 7 2 3 3*+5 2**+*+*+*+P
    

    Try it online!

    It is rather simple, but I hope it will be at least a little fun to solve :з

    cab404

    Posted 2017-10-07T14:13:19.783

    Reputation: 141

    Cracked – agtoever – 2017-10-11T19:49:29.437

    2

    Brain-Flak, 188 bytes (Cracked)

    I only just saw Funky Computer Man's answer As I posted this.

    It is somewhat obfuscated.

    ((((((((((()()()){}){}()){}){}()){}()))<({}[(()()()()){}])(([[]]({})<>)<>)>((()()())){}{})[()]))<[[]()]>((()){}){}((){}[][(<>){}<>])(<>){}(({}<>()[()])[(((()()()){}<[()]>)<(()){}>{}){}()])
    

    Try it online!

    Intended solution, 96 bytes:

    ((((((((((()()()){}){}()){}){}()){}()))<({}[(()()()()){}])(([[]]({})<>)<>)>((()()())){}{})[()]))<[[]()]>((()){}){}((){}[][(<>){}<>])(<>){}(({}<>()[()])[(((()()()){}<[()]>)<(()){}>{}){}()])((((((((()()()){}){}){}()){}){}()<>)<>)(()()()){}())<>(((({}[()]<>)()))[(((()()()){}())()){}{}])
    (((((((( (()()()){}){}  ){}){}()){}()))      ()()                   <>)     (()()()) {}    () ) <      >((()      ((){}    <>)     )   )  (({}        )[(((()()  ){}  ()  )  () {}   ){}()])
    

    Try it online!

    H.PWiz

    Posted 2017-10-07T14:13:19.783

    Reputation: 10 962

    You mean somewhat obfuscated beyond just normal Brain-Flak obfuscation. – Gryphon – 2017-10-09T13:33:16.070

    @Gryphon Yes, I added some extra bits. – H.PWiz – 2017-10-09T15:41:58.980

    Cracked. – Nitrodon – 2017-10-15T00:15:55.397

    2

    JavaScript, 119 bytes (ES6), Cracked

    A function returning a string. Quite long and not so hard, but hopefully fun.

    _=>(+{}+['H'])[+[3]]+(+[][[]]+[])[+!!3]+(+[][[]]+['y'])[3]+(+[][[]]+['s'])[-~2]+(~![]+['t'])[2]+(+[][[]]+[])[+!!3]+'ck'
    

    "Haystack" demo

    let f =
    
    _=>(+{}+['H'])[+[3]]+(+[][[]]+[])[+!!3]+(+[][[]]+['y'])[3]+(+[][[]]+['s'])[-~2]+(~![]+['t'])[2]+(+[][[]]+[])[+!!3]+'ck'
    
    console.log(f())

    Arnauld

    Posted 2017-10-07T14:13:19.783

    Reputation: 111 334

    Cracked. The jsfuck github README.md helped a lot. – my pronoun is monicareinstate – 2017-10-08T08:16:19.240

    2

    Python 2.7.10 with Numpy 1.12.1, 208 209 bytes (cracked)

    It appears that there is a Needle and a Haystack in Numpy! Here is the Haystack; see if you can find the Needle. I hope you have as much fun searching for the Needle as I had hiding it.

    import numpy
    print "".join([dir(numpy)[int(i)][1-0] for i in numpy.poly1d([-1*1433/252e1,-3232/1920.,4026./72/2/3.,613/(6*4.)*1,-4723./1.8e2,-9763/120.,-2689/(-1+5*17.),1+138*.4*2])(numpy.arange(-12/3,13%9))])
    

    It outputs as specified:

    Haystack
    

    You can repl.it.

    agtoever

    Posted 2017-10-07T14:13:19.783

    Reputation: 2 661

    Not that it really matters, but this is 209 bytes, not 208 – caird coinheringaahing – 2017-10-08T20:12:48.517

    Cracked. – jacobly – 2017-10-09T11:32:53.290

    2

    Python 2.7.2, 103 / 117 bytes, Cracked

    Function Version (117 bytes):

    def e():
     a,b,s=20070763850923833476353301471991752,0b1010100010010011,""
     while a>0:
      s=chr(a%b)+s
      a//=b
     print s
    

    Program Version (103 bytes):

    a,b,s=20070763850923833476353301471991752,0b1010100010010011,""
    while a>0:
     s=chr(a%b)+s
     a//=b
    print s
    

    This should print Haystack well. Tested on Python Fiddle.

    Btw this is the first attempt.

    Not sure if the program version is counted as a snippet, so I put both versions here.

    Shieru Asakoto

    Posted 2017-10-07T14:13:19.783

    Reputation: 4 445

    Cracked. – jacobly – 2017-10-09T04:01:47.860

    2

    Java 8, 321 bytes, Cracked

    v->{String h="Haystack";int x=-7;return x<0?h:new String(new java.math.BigInteger(new byte[]{(byte)((~-~-~-~-~-~-~-~-~-~1^-x++*x)+151),new Byte("2"+"1+\"0+\"".length()+(x=h.length()*4/x)+"-x-7")}).toByteArray())+(new StringBuffer("hidden".substring(++x%3^4,--x-x--).replaceFirst("dd","e"+(char)(x*211%+93))).reverse());}
    

    Try it here.

    More readable:

    v->{
      String h="Haystack";
      int x=-7;
      return x<0?
              h
             :
              new String(new java.math.BigInteger(new byte[]{
                (byte)((~-~-~-~-~-~-~-~-~-~1^-x++*x)+151),
                new Byte("2"+"1+\"0+\"".length()+(x=h.length()*4/x)+"-x-7")
              }).toByteArray())
              +(new StringBuffer("hidden".substring(++x%3^4,--x-x--)
                 .replaceFirst("dd","e"+(char)(x*211%+93))
                ).reverse());
    }
    

    Not sure if it's too long/hard.. Then again, Java in general is pretty long to begin with, so hiding the 'Needle' properly of course increases the byte-count quite a bit..
    If no one cracks it, I'll add some spoiler-tips later on.

    Kevin Cruijssen

    Posted 2017-10-07T14:13:19.783

    Reputation: 67 575

    1

    The TIO has one fewer character, but cracked either way.

    – jacobly – 2017-10-09T19:44:32.500

    2

    Ruby, 185 bytes, cracked by cab404

    x='yGwztsPXhxDkBKlCYdFjQnpUROfoHvqmTgbaJSLcEiZrIAuMVNW'
    s="n=x.to_i 36;x.bytjs.jach_cons(3){|a,b,c|n+=n*b%c;n*=a^b};puts n%8675309==1388649 ?'Njjdlj':'Haystack'"
    eval s.tr ?j,s.size.chr
    

    Try it online!

    I'll try to come up with something sneaky, but for now here's a try at "simple but obnoxious."

    histocrat

    Posted 2017-10-07T14:13:19.783

    Reputation: 20 600

    Cracked: https://codegolf.stackexchange.com/a/144955/74216

    – cab404 – 2017-10-11T03:43:00.107

    1that was fun ^^ – cab404 – 2017-10-11T14:24:44.153

    Well done! Glad brute force wasn't too boring. – histocrat – 2017-10-11T16:56:28.620

    2

    T-SQL, 757 characters CRACKED

    Apologies for deleting my previous answer--I edited it too many times as I obfuscated, and didn't want to give anything away. :)

    In any case, obfuscating in SQL is a bit difficult, unless you want to do crazy stuff like this, and I wasn't that invested.

    Also, I unabashedly do not apologize for naming my variables after Dota.

    SQL Fiddle

    create table a(l int,c int)
    insert into a values (1,10),(2,1),(3,8),(4,0)
    go
    ;CREATE FUNCTION b(@ varchar(max)) returns varchar(max) as
    begin return 'char('+@+'),'''','end 
    go
    ;CREATE FUNCTION h(@ varchar(max),@a varchar(max), @b varchar(max), @c varchar(max), @d varchar(max), @e varchar(max), @f varchar(max), @g varchar(max), @h varchar(max))
    returns varchar(max) as 
    begin
    return replace(replace(replace(replace(@,@a,@b),@c,@d),@e,@f),@g,@h)
    end
    declare @x varchar(max),@ int=1,@y varchar(99)=''
    ,@D varchar(4)='Ha',@O varchar(4)='ys'
    ,@T varchar(3)='ta',@A varchar(4)='ck'
    WHILE @<=4
    BEGIN
    set @y+=(SELECT dbo.b(c+100)from a where l=@)+' '
    set @+=1
    END
    SELECT @x='select
    left(dbo.h('''+@D+@O+@T+@A+''','+ left(@y,len(@y)-1) +'),char(56))'
    execute(@x)
    

    If this is the easiest answer in this thread, you're probably right. :P It's hard to trick SQL.

    phroureo

    Posted 2017-10-07T14:13:19.783

    Reputation: 183

    shouldn't 'haystack' be 'Haystack'? – cab404 – 2017-10-11T01:58:32.843

    SQL doesn't handle capitalization very nicely (unless you specifically define the schema that it's supposed to use for the letters). I opted not to. :P – phroureo – 2017-10-11T02:55:48.330

    1@phroureo The spec does explicitly state that it must be capitalized correctly. – LyricLy – 2017-10-11T03:51:24.540

    Alright, I fixed the code above (although I didn't necessarily fix the SQL Fiddle, since it works the same). – phroureo – 2017-10-11T15:54:17.363

    1cracked (I'm sorry...) – Robert Fraser – 2017-10-15T10:53:12.650

    @RobertFraser Remember the time where I said "This may be the easiest post in this thread?" Yeah, that's why. :P – phroureo – 2017-10-16T15:53:04.813

    @phroureo Wait was that really the intended solution? I see where it selects the ascii codes for 'n', 'e', 'd', and 'l' (values in a table + 100), so it seems like you had something more exciting going on. – Robert Fraser – 2017-10-16T19:28:06.267

    It's alllllll in the obfuscation. :P – phroureo – 2017-10-16T20:08:08.053

    @RobertFraser to be fair, you picked different letters from the string for "SELECT 'Needle'" than I intended, but you got the intended solution. – phroureo – 2017-10-16T20:08:40.747

    1

    Ly, 40 bytes, cracked

    (78)"e"&p"Ha"s"yst"l"ck"&o(100)"l"l'&'o;
    

    Try it online!

    Oh boy, another Ly CNR submission. These haven't worked very well historically (possibly due to me and not the language), but we'll see how this fares and today is no exception.

    Solution:

    (78)"e"sl(100)"l"l&o;, remove XXXXXX XXXXX XXXXXX X X with seven leading spaces

    LyricLy

    Posted 2017-10-07T14:13:19.783

    Reputation: 3 313

    Cracked. – Nitrodon – 2017-10-15T06:34:05.657

    1

    Java, 345 bytes, Cracked

    import java.util.*;interface Main{static void main(String[]args){Stack<Hay>s=new Stack();s.add(new Needle());for(int i=0;i<1000;i++)s.add(new Hay());System.out.println(s.get(s.indexOf(new Hay())+1).a);}}class Needle extends Hay{{a="Needle";}}class Hay{String a="Haystack";public boolean equals(Object o){return getClass().equals(o.getClass());}}
    

    Try it online!

    Really long and probably easy to crack, but at least it's got a Stack<Hay>!

    Jonathan S.

    Posted 2017-10-07T14:13:19.783

    Reputation: 423

    very nice one! but yes, pretty easy to crack. – Titus – 2017-10-20T12:28:50.213

    0

    TI-BASIC, 119 bytes (Safe)

    Output stored in Ans.

    "TIBASIC→Str1
    length(Ans→X
    Str1
    For(I,X,2(7-4not(X-1
    Ans+sub("ACDEHKLNSTY",inString("ABCDEFGHIJK",sub("KCBADAEDJDHIGF",1+remainder(11I-1,14),1)),1
    End
    sub(Ans,1+X,length(Ans)-X
    

    Solution

    Remove characters from Str1 to give it a length of 1.

    "C→Str1
    length(Ans→X
    Str1
    For(I,X,2(7-4not(X-1
    Ans+sub("ACDEHKLNSTY",inString("ABCDEFGHIJK",sub("KCBADAEDJDHIGF",1+remainder(11I-1,14),1)),1
    End
    sub(Ans,1+X,length(Ans)-X
    

    kamoroso94

    Posted 2017-10-07T14:13:19.783

    Reputation: 739

    0

    PHP, 44 bytes, Cracked

    fairly easy to crack; but I like it.

    for($i=~1;$c=H_aNyesetdalcek[$i+=2];)echo$c;
    

    Run with -nr or try it online.

    Titus

    Posted 2017-10-07T14:13:19.783

    Reputation: 13 814

    0

    Aceto, 154 bytes (Safe)

                  27\'dNU   QJi9MLJ€{{x(}]J{'!o∑€xiDQxsJ(]sicpicp1.2sJJicp90I.2+D/edxi-'>xd80J0IJicx'NIx5sJsJidcpIcpL7sssJicpei7+ UUdJicpLI7sJicpx'p\p9*coJcU'p+\p   

    Try it online!

    'N'ed'd80J0IJic'eUpppppp Try it online!

    Explanation:
    <space>*2 - Two spaces for the hilbert curve to work right
    'N pushes 'N' onto the stack
    'e pushes 'e'
    d duplicates it
    'd pushes d
    80 pushes 8, 0
    J concats top two values
    0I pushes 0, pops, increments, pushes back on, net effect: pushes 1
    J concats to '108'
    i converts to integer
    c pops and pushes ascii equiv on stack
    'e pushes 'e' (again)
    U reverses the stack
    and the p's print out the stack
    

    FantaC

    Posted 2017-10-07T14:13:19.783

    Reputation: 1 425