# Will it halt? (Cops)

This is the cops' thread. The robbers' thread is here.

Your challenge is to make a program that runs forever without halting1, unless it gets a particular input or inputs2. If it receives that input, it must terminate in a finite amount of time3. This is , so the shortest answer that has not been cracked by a robber within one week of posting wins. After the week has passed, please mark your answer as safe and show the halting input (in a > ! spoiler quote). If a robber cracks your submission, please mark it as cracked and show the halting input (in a > ! spoiler quote).

Submissions are preferred be runnable & crackable on TIO. Submissions not runnable or crackable on TIO are allowed, but please include instructions to download / run them.

Please make your input deterministic, and uniform across all runs. See this meta post for details.

Please, don't "implement RSA" or anything mean to the robbers. Use obscure languages and features, not boring encryption and hashing. I can't enforce this with rules, but you can expect torrential downvotes if all you do is sha(input) === "abcd1234".

1Assuming that the computer doesn't get shut down, break, get engulfed by the sun, overheat in the universe's heat death, or hit the TIO timeout of 60s.

2The program must halt on at least one input. As long as it loops forever on one input and halts on another, it works.

3This must be < 60 seconds, so that the code can be tested on TIO.

# Looking for uncracked submissions?

fetch("https://api.stackexchange.com/2.2/questions/135363/answers?order=desc&sort=activity&site=codegolf&filter=!.Fjs-H6J36vlFcdkRGfButLhYEngU&key=kAc8QIHB*IqJDUFcjEF1KA((&pagesize=100").then(x=>x.json()).then(data=>{var res = data.items.filter(i=>!i.body_markdown.toLowerCase().includes("cracked")).map(x=>{const matched = /^ ?##? ?(?:(?:(?:$|<a href ?= ?".*?">)([^$]+)(?:\]|<\/a>)(?:[$$$][a-z0-9/:\.]+[$$$])?)|([^, ]+)).*[^\d](\d+) ?$?(?:(?:byte|block|codel)s?)(?:$(?:$$.+$$)?)? ?(?:$$?(?!no[nt][ -]competing)$$?)?/gim.exec(x.body_markdown);if(!matched){return;}return {link: x.link, lang: matched[1] || matched[2], owner: x.owner}}).filter(Boolean).forEach(ans=>{var tr = document.createElement("tr");var add = (lang, link)=>{var td = document.createElement("td");var a = document.createElement("a");a.innerHTML = lang;a.href = link;td.appendChild(a);tr.appendChild(td);};add(ans.lang, ans.link);add(ans.owner.display_name, ans.owner.link);document.querySelector("tbody").appendChild(tr);});});
<html><body><h1>Uncracked Submissions</h1><table><thead><tr><th>Language</th><th>Author</th></tr></thead><tbody></tbody></table></body></html>

• @LuisMendo assuming infinite memory is fine – programmer5000 Jul 24 '17 at 16:29
• @programmer5000 Thanks for clarifying. You should incorporate all this into the challenge text. Answerers are not expected to read all comments – Luis Mendo Jul 24 '17 at 16:48
• Can we restrict the input to, say, an integer? A robber could pass in some malformed or mistyped input to terminate the program immediately. I'd either have to do lots of careful input validation, or use a language that can catch arbitrary errors. – xnor Jul 24 '17 at 18:37
• @xnor I think you're supposed to have to do the input checking. – Stephen Jul 24 '17 at 18:49
• @StepHen That works if the malformed input is still able to be parsed by the interpreter. If I enter an illegal string, R errors immediately, without even entering the function to crack. I would argue that that doesn't count as actually terminating the function. – JAD Jul 26 '17 at 5:02

# Malbolge, 128 bytes, cracked by KBRON111

(=&r:#o=~l4jz7g5vttbrpp^nllZjhhVfddRbO;:('JYX#VV~jS{Ql>jMKK9IGcFaD_X]\[ZYXWVsN6L4J\[kYEhVBeScba%_M]]~IYG3Eyx5432+rpp-n+l)j'h%B0


Have fun!

(Yes, I learned Malbolge just for this. Yes, it took an absurdly long time to finally get working. And yes, it was totally worth it.)

Wrapped, so you can see it in its full, er, "glory":

(=&r:#o=~l4jz7g5vttbrpp^nllZjhhV
fddRbO;:('JYX#VV~jS{Ql>jMKK9IGc
%_M]]~IYG3Eyx5432+rpp-n+l)j'h%B0


I used this interpreter to test it; I'm not sure if it matters, but I figured I'd specify just in case.

• That's the interpreter TIO uses btw. – Dennis Jul 25 '17 at 4:59
• oh, "Have fun" is good addition – Евгений Новиков Jul 25 '17 at 5:37
• You're a jerk. Malbolge is mean. – Draco18s no longer trusts SE Jul 25 '17 at 13:21
• I'm stamped... The farthest I got: out of 13 inputs before halt, only first and third have any impact. After thorough reverse-engineering, I found that first input has to be 6 and the third is one of the four: !, #, / and -. But the combination doesn't seem to fix the halt. I put it out here, maybe someone smarter finds a solution. If anyone wants, I will post tomorrow how I got to these inputs. EDIT: Now that I think about it, my program I wrote for purpose of reverse-engineering this might have a bug, and the first input may be something else than 6. Third character still stands. – Grzegorz Puławski Jul 26 '17 at 22:56
• – Veedrac Jul 27 '17 at 2:32

# JavaScript (ES6), 17 bytes, Cracked

x=>{for(;x==x;);}


On TIO, since I dunno how to do Node.js readline on TIO, just stick the input in the function call. This is obvious to anyone who knows it, and not to anyone who doesn't.

The answer is NaN, since in JavaScript, NaN != NaN.

• Cracked. Nice usage of a language oddity! – programmer5000 Jul 24 '17 at 16:14
• You bet :) I like how you were so confident that's what I picked that you edited it in for me :P – Stephen Jul 24 '17 at 16:15
• NaN == NaN is false in many languages other than JavaScript. I wouldn't call it a "language oddity". – Nayuki Jul 25 '17 at 3:29
• i believe NaN != NaN is a feature of floating point numbers – undergroundmonorail Jul 25 '17 at 20:39
• @undergroundmonorail: That's correct. The relation between two IEEE floating point numbers can be above, equal, below, or unordered. The comparison result is unordered if either or both operands are any kind of NaN. (IEEE 754 binary floating point has many NaN bit patterns: anything with the exponent all-ones and a non-zero mantissa is a NaN, regardless of the sign bit. There are some rules for which what goes into the "payload" of a NaN, and for propagating that through operations like + or max(), but most people don't care :P) – Peter Cordes Jul 27 '17 at 9:19

# JS (ES6), 67 bytes (Cracked)

(x,y)=>{while(x!==y||Object.is(x, y)||!isFinite(x)||!isFinite(y));}


I think i didn't mess up, it might have an easy solution that I didn't see.

I appreciate any feedback, this is one of my first posts

(+0, -0) Yep, js has a negative 0

• Cracked – Stephen Jul 24 '17 at 16:56
• I realize now that I don't need to check if x and y are finite, but I won't edit since it was already cracked. Could have been 38 bytes – Juan Tonina - Reinstate Monica Jul 24 '17 at 17:22

# Python 3.4, (40 bytes) Cracked

def f(x):
while(x==x or not x==x):pass

• Welcome to PPCG! – Martin Ender Jul 24 '17 at 20:56
• Cracked – g.rocket Jul 24 '17 at 21:31
• I feel like you should have stored x==x in a variable called to_be, so you could make a Hamlet reference. – Peter Cordes Jul 27 '17 at 9:26
• @PeterCordes But that would have made the answer uncrackable – pppery Jul 30 '17 at 3:03
• @ppperry: yeah, I noticed that after I looked at the crack. :P – Peter Cordes Jul 30 '17 at 3:06

# Javascript (NOT node.js)

x=>{while(x+"h");}


The desired submission doesn't use throw.

Hint for desired crack:

The desired submission doesn't overwrite .toString(), or use Set() either.

Desired crack:

Object.create(null)

• Correct crack link (not mine, just a link to Dom Hasting's answer) – Stephen Jul 24 '17 at 19:56
• Cracked#2 Cracked without using throw (still gives an error though) – Grant Davis Jul 24 '17 at 20:27
• Cracked again without using throw, I believe for real this time as Grant Davis' didn't work for me. Still TypeErrors. – Haumed Rahmani Jul 25 '17 at 1:19
• You could do x=>{try{for(;x+"h";)}catch(e){for(;;)}} so that any errors will result in an endless loop so missing prototype function errors (or any errors) will result in an endless loop. – Grant Davis Jul 25 '17 at 3:22
• This one only works in the browser, not sure why it does though :D – jadkik94 Jul 26 '17 at 14:00

# C (gcc), 75 bytes Cracked

#include<stdio.h>
int main(){char c[9];while(1){scanf("%8s",c);printf(c);}}


Try it online!

I've never posted in a cops-n-robbers before. Hopefully this isn't too obvious.

Solution:

An input of "%s" makes this segfault. There are several other ones that can be used; all of them are printf specifiers like "%n"
This is the classic printf vulnerability. Simply put, the format string comes straight from user input, so any printf specifiers get passed through, unsafely.

• – Conor O'Brien Jul 24 '17 at 23:06

# JavaScript (in Browser), 79 bytes Cracked

x=>{try{for(;x||x!=null||x!=void 0||x===null||x===void 0;);}catch(e){for(;;);}}


You should run it in a recent browser (like latest Firefox ESR, latest Firefox, latest Chromium). Running on old browsers (like Netscape 2, IE 4) do not count.

Note: Halted by browser due to time out do not count a halt here.

Always be careful not crash your browser when testing this codes, and happy robbing ^_^

document.all

• Can i use setTimeout? – Евгений Новиков Jul 25 '17 at 7:09
• @ЕвгенийНовиков You may call this function with any parameter. But it seems use setTimeout as parameter do not works. – tsh Jul 25 '17 at 7:15
• idea is to do var key=(()=>{setTimeout(args);return null})() and then crackme(key) – Евгений Новиков Jul 25 '17 at 9:55
• seems like cheating – Евгений Новиков Jul 25 '17 at 9:56
• Cracked – Juan Tonina - Reinstate Monica Jul 25 '17 at 16:33

# PHP (cracked by Vicente Gallur Valero), 65 bytes

<?php
parse_str($argv[1],$_);
while(!$_['(-0_0)> deal with it']);  Try it online! Harder than it may look. Edited to be possible on TIO, at the cost of a bunch of bytes. Takes input via $argv[1].

# Husk, 5 bytes Cracked

↑ε∞←ø


Try it online!

A bit of explanation, since this language is still pretty new:

←ø gets the first element of an empty list: this returns a value which can assume any type, be it a concrete type or a function, which will then be applied to the input. ∞ creates an infinite list composed by copies of the previous result (which in most cases will mean a list of infinite zeroes). ↑ε takes elements from this list as long as they are "small" i.e. their absolute value is ≤1; on an infinite list of zeroes this will never stop.

• @Veedrac that was actually my intended solution – Leo Jul 26 '17 at 8:02
• Well, then, cracked! – Veedrac Jul 26 '17 at 11:27

# Braingolf, 4 bytes (Cracked)

[1+]


Try it online!

Suuuper easy, but let's see how long it takes

-1, or any number less than 0.

• – programmer5000 Jul 24 '17 at 15:59

# Ruby, 31 bytes (cracked by Eric Duminil)

0until(3.send(gets)==5rescue p)


Try it online!

Note that this needs to be run in an environment where there's no trailing newline in the result of gets, or else it's impossible to make it halt (I think) since anything ending in a newline will error and hit the rescue.

• Cracked! – Eric Duminil Jul 24 '17 at 22:14
• Nice one by the way! No method in 3.methods returns 5 or exits the loop. – Eric Duminil Jul 24 '17 at 22:29
• Darn! I discovered the solution as well independently, but I was too focused on making it equal 5 to think that the correct answer would involve the function that it did... – Value Ink Jul 25 '17 at 3:32

export "$1"=help /bin/yes  Inspired by Dennis'. Try it online. # Bash 4.2, 14 bytes (cracked) Let's try this again. let${1,,}
yes


This doesn't work on TIO, which uses Bash 4.3. Input is via command-line arguments.

On Linux and with gcc installed, Bash 4.2.53 can be downloaded and built as follows.

curl -sSL https://ftp.gnu.org/gnu/bash/bash-4.2.53.tar.gz | tar xz
cd bash-4.2.53
./configure
make -j

• Cracked. Basically ended up reading the source. – Veedrac Jul 26 '17 at 2:39

# Retina, 78 bytes (Cracked) (Cracked with Intended Solution)

^
1
+^1(1+)
$1¶$&
s(?<=^|¶)(1+)(?=¶)(?!.*¶\1+$) ¶(?!1+$)

^(1+)¶\1$+1 11  Was pretty fun to write, hope it's fun to crack Try it online! Cracked with an unintended solution and the intended solution within a minute of each other. One posted first, one commented first. Intended solution: 11111 or the unary representation of n-1 where n is any perfect number • Cracked – mbomb007 Jul 24 '17 at 16:32 • Cracked – Kritixi Lithos Jul 24 '17 at 16:32 • So whose crack counts? (I posted the crack first, but mbomb007 commented first) – Kritixi Lithos Jul 24 '17 at 16:33 • @Cowsquack both – programmer5000 Jul 24 '17 at 16:35 # Node.js, 23 bytes (Cracked) var crackme = i=>{while({[i]:NaN}){}}  Grant Davis solution {__proto__:null} My solution {"toString":process.exit} • cracked! – Grant Davis Jul 25 '17 at 2:08 • @GrantDavis good job) Your solution works i browser too. I thought to surround it with try-catch, but refused this idea, to make a pretty code. – Евгений Новиков Jul 25 '17 at 5:32 # Java 8, 99 bytes, Cracked s->{try{Integer i=Integer.parseInt(s),c=i+32767;i+=32767;for(;i!=c;);}catch(Throwable t){for(;;);}}  This is a lambda of the type Consumer<String>. Ungolfed: s -> { try { Integer i = Integer.parseInt(s), c = i + Short.MAX_VALUE; i += Short.MAX_VALUE; while (i != c) ; } catch (Throwable t) { while (true) ; } }  Try it online! (note that the test program will crash on empty input, but the lambda itself would not!) (also, use 'arguments' not 'input' on TIO, as the test program uses arguments, not STDIN) Intended Answer: -32767; This works because Java keeps has two integer types, int and Integer. Integer is an object that wraps int. Also, Java keeps an cache of Integers that box -127 through 127. The != operator checks for identity, so through some un-boxing and auto-boxing any number x where x + 32767 is in [-127, 127] will end up being the same Integer object from the cache, and thus i != c will be false. • Cracked. – Veedrac Jul 25 '17 at 14:16 # Bash 4.2, 10 bytes (Cracked) let$1
yes


This doesn't work on TIO, which uses Bash 4.3. Input is via command-line arguments.

On Linux and with gcc installed, Bash 4.2.53 can be downloaded and built as follows.

curl -sSL https://ftp.gnu.org/gnu/bash/bash-4.2.53.tar.gz | tar xz
cd bash-4.2.53
./configure
make -j

• Cracked. You led me 'round in circles thinking this was shellshock related and linking me to a patched version :P. Count the unintended crack as petty revenge ;). – Veedrac Jul 25 '17 at 10:36
• Heh, not quite what I was going for. I posted a hardened version if you want to give it a try. – Dennis Jul 25 '17 at 13:20

## Java: 1760 (Cracked)

I feel it's too mean to golf this one, so I just obfuscated the variable names, and made it 'messy'. As a matter of fact it's so mean, that I'm going to post hints over time, just so I may see it cracked.

Hint 1: this has theoretically infinite valid inputs, but there is one that is the most 'Correct'


public class Main {

public static void main(String[] a) {
try {
while (a.length < 2) {
int i = 0;
}
boolean invalid = 1 < 0;
char l = '_';
char h = '-';
char[] DATATWO = a[0].toCharArray();
char[] DATATOW = a[1].toCharArray();
int length = DATATOW.length;
if (DATATWO.length != length) {
invalid = 1 > 0;
}
int transmissionStartIndex = 0;
for (int i = 0; i < length; i++) {
if (DATATWO[i] == l && DATATOW[i] == l) {
transmissionStartIndex = i;
break;
}
}
int DATAONE = 0, reg = 0;
boolean read = 1 < 0, full = 0 < 1;
int bytes_read = 0;
for (int i = transmissionStartIndex; i < length; i++) {
if (DATATOW[i] == l && DATATOW[i + 1] == h) {

if (bytes_read == 8) {
read = DATATWO[i] == h;
} else if (bytes_read == 9) {
invalid = (DATATWO[i] == h || invalid);
System.out.println(invalid);
} else if (bytes_read == 18) {
System.out.println(invalid);
invalid = (DATATWO[i] == h || invalid);
if (invalid) {
System.out.println("i36 " + DATATWO[i] + " " + h);
}
full = 1 > 0;
} else if (bytes_read < 8) {
DATAONE += (DATATWO[i] == h ? 1 : 0) << (7 - bytes_read);
} else if (bytes_read < 18) {
reg += (DATATWO[i] == h ? 1 : 0) << (8 - (bytes_read - 9));
} else if (bytes_read > 18) {
invalid = 1 > 0;
}
System.out.println(a[0]);
System.out.println(new String(new char[i]).replace("\0", " ") + "|");
System.out.println(a[1]);
}
}

while (!(Integer.toHexString(DATAONE).equals("0x2b") && (read)
&& Integer.toHexString(reg).equals("0xa6"))) {

System.out.println(System.currentTimeMillis());
try {
} catch (InterruptedException e) {
e.printStackTrace();
}
}

} catch (Exception e) {
while (true) {
}
}

}
}



Try it online!

• Two empty arguments seem to work – Okx Jul 24 '17 at 17:09
• Also, mind adding a tio link? I think all you'd need to do is change main to Main – Okx Jul 24 '17 at 17:24
• Cracked, apart from a bug. – user3033745 Jul 24 '17 at 17:40
• Cracked - no version specific bug. – Okx Jul 24 '17 at 17:41

# Braingolf, 18 bytes Cracked

1+[#£-0!e>:$_1>|]  Try it online! Liiiitle bit harder than the last one, I'll start writing a real one after this The answer is 163 • Man, this is probably the only surviving submission atm. Note: i doesn't work. – Erik the Outgolfer Jul 24 '17 at 17:14 • Warning: this is actually 19 bytes (£). And why doesn't -1 work? This is tricky. – Erik the Outgolfer Jul 24 '17 at 17:20 • @EriktheOutgolfer It's 17 characters and 18 bytes. – totallyhuman Jul 24 '17 at 17:25 • @totallyhuman I swear I had read "19 UTF-8 bytes, 18 chars" (userscript is enabled)... – Erik the Outgolfer Jul 24 '17 at 18:09 • Cracked – Adnan Jul 24 '17 at 18:14 ## JavaScript (ES7), 41 bytes (Hacked & Cracked) Edit: fixed to prevent it from crashing when given no input at all (thanks @totallyhuman for noticing) Several solutions probably exist, but the expected one is relatively simple. (x=0)=>{for(;~x/x.length**3!=-2962963;);}  Intended solution: "8e7" (a number in scientific notation passed as a string) Because: ~"8e7"/"8e7".length**3 = -80000001/3**3 = -80000001/27 = -2962963 • No input works on this one too, but I don't want to bother cracking it like that... Unless, that's the intended solution. :P – totallyhuman Jul 24 '17 at 17:30 • @totallyhuman Well, it's not the intended solution. :-) – Arnauld Jul 24 '17 at 17:37 • – Евгений Новиков Jul 24 '17 at 18:24 • Update: got intended 3 bytes long solution – Евгений Новиков Jul 24 '17 at 19:53 # Bash + Utils (Cracked by Dennis), 74 bytes I hope you enjoy tar, because it's the only utility you can use. cp /bin/tar . env -i PATH=$PWD I=$? /bin/bash -r -c "$1"
while :;do :;done


Try it online!

tar -cf --checkpoint=1 --checkpoint-action=exec="/bin/kill $I" . • cracked – Dennis Jul 25 '17 at 6:45 • @Dennis Nice! I posted my intended crack, which was a bit more complex. – Sisyphus Jul 25 '17 at 6:49 # Mathematica, 36 26 bytes (cracked) #0[#;$IterationLimit=∞]&


A very short loop #0[#;∞] that will just keep running itself over and over until it crashes your kernel... (The $IterationLimit is just to make sure you get stuck forever for most inputs). Try it on Wolfram Sandbox! - if you are stuck in an infinite loop, you can wait until you time out, or you can press the square "abort evaluation" icon to the left of the notebook title (unnamed). NOTE: this function changes your $IterationLimit settings.

# JavaScript (Node.js), 18 bytes (Cracked)

x=>{while(x+"h");}


Try it online! Answer:

new Buffer(268435440) throws an error when .toStringed.

• Cracked – Stephen Jul 24 '17 at 19:05
• Also, Symbol() would work. – Patrick Roberts Jul 27 '17 at 22:28

# C#, 118 bytes (Cracked)

using System;_=>{while(1>0){try{if(Nullable.GetUnderlyingType(Type.GetType(Console.ReadLine()))!=null)break;}catch{}}}


I don't expect this to last too long but it is more awkward than it appears to be.

Basically any Nullable classes full name works but it is awkward to find out as it looks like the below :
System.Nullable1[[System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
An easier way to find this string out is to do typeof(int?).FullName.

• Cracked – Luc Jul 25 '17 at 21:15

# C, 140 bytes (Cracked)

n,i;f(){float x,y,z;for(scanf("%d %d",&n,&z,x=y=0);~((int)x-(int)(1/sqrt(y*2)));x*=(1.5-y*x*x))y=(x=z)/2,i=n-((*(int*)&x)/2),x=*(float*)&i;}


Hopefully there aren't too many not-even-close-to-the-intended-inputs that make it halt, but let's see.

Try it online!

# JavaScript (ES7), 73 bytes (Cracked!)

q=>{r=(n,i=0)=>i>1e3?n:r(n*16807%(2**31-1),i+1);while(r(q)!=627804986){}}


Not wanted solutions: brute force. Desired crack involves math.

Note that there are many solutions (4194304) because of modulo.

# brainfuck, 170 bytes cracked!

>>,>,>,>,>,[-----------<-<+<--<--->>>>]<++<<+<++[----->+<]>[----------------->+++++++<]>[----->>+<<]>>[-<->]<[--->++++++<]>[--->+<]+>-[-----------------<+>]<[-->-<]>+[+-]


Try it online!

• Welcome to the site! You could save 11 bytes by removing the newlines from your code. – Post Rock Garf Hunter Jul 29 '17 at 18:00
• I forgot it was code golf, thanks! – Jerry Jul 29 '17 at 18:05
• Cracked – user202729 Jul 30 '17 at 5:21
• Valid solution! I estimate there are quite a bit of them. For anyone solving/brute-forcing, the intended one is [a-z]. – Jerry Jul 30 '17 at 13:15
• For each 4 characters, there are exactly 1 value of the last character makes the program halt. Therefore there are 256^4 = 4294967296 solutions assuming you can enter nul into brainfuck. BTW you can remove two first > save 2 bytes. – user202729 Jul 30 '17 at 15:20

# JavaScript ES6 (Node.js >= 6.0), 326 bytes (Safe)

((v,e=require('events').EventEmitter.prototype,l=_=>{while(1);},P=Proxy,p=process)=>(p.kill=p.exit,e.listeners=new P(e.listeners,{apply:(t,c,a)=>a[0]=='exit'?[]:t.apply(c,a)}),e.removeAllListeners=new P(e.removeAllListeners,{apply:(t,c,a)=>a[0]=='exit'?c:t.apply(c,a)}),p.on('exit',l),i=>{try{v(i)}catch(o){}l()}))(s=>eval(s))


Much more simplified than my other challenge was, I'm no longer attempting to obfuscate the approach for the solution, which saved me a lot of bytes. This time around, process.kill() won't work.

"delete process._events.exit;process.exit()"

Try it online!

• Woah! Nice job! – programmer5000 Aug 7 '17 at 19:09
• It looks like you're the winner, although I was expecting a much shorter code hehe – Piyin Aug 8 '17 at 15:43

# Swift 3, 14 bytes (Cracked)

while !false{}


To solve this, put your code before or after this statement.

• Your solution must:
• keep this statement intact, without modifying its code
• actually let this statement run
• Simply commenting it out, calling fatalError(), etc. before it doesn't count.
• modify the behavior of this statement to prevent it from looping forever
• The solution does not involve crashing the program.
• I don't know Swift, but I think adding a timer before this code to exit after a few seconds would meet the criteria. – user15259 Jul 28 '17 at 10:03
• @Yimin heh, clever, but it doesn't modify the semantics of this statement, which is what I was really looking for when I said "modifies the behaviour of this statement" – Alexander - Reinstate Monica Jul 28 '17 at 14:32
• Are you sure that the solution works? The interpreter is yelling ambiguous semantics at me. – Daniel Jul 28 '17 at 15:21
• @Dopapp that's what I thought would happen in my previous attempt. For some reason, it's legal to redefine new infix operators with the same type signatures as those that already exist, but attempting to do the same with a unary operator throws a compile time ambiguity error. This is intentional, and I'm sure I have a working solution – Alexander - Reinstate Monica Jul 28 '17 at 15:24
• Cracked. – Veedrac Jul 31 '17 at 3:20

# cQuents, 2 bytes (Cracked 1) (Cracked 2)

:A


Note that this will quickly hit the 128 KiB output limit on TIO, causing it to stop, but when run locally it will loop forever, except on the input that breaks it. Finding that input should be fairly easy. Until you do, :A will keep sticking its triangular tongue out at you.

Note also that this should be just A but I broke implicit modes last night. On older interpreter versions A would work fine.

Cracks:

Empty input/newline on input is a valid crack. However, barring that, by passing multiple (space separated) inputs to the program, you'll terminate it (if you give 2) or error out (if you give 3 or more).

Try it online!

• Cracked? (Errors out with empty input) – Luis Mendo Jul 24 '17 at 16:47
• Cracked? – Kritixi Lithos Jul 24 '17 at 16:47
• @crackers yep, that's a valid crack. I'll give my upvote to someone who finds the non-empty-input crack though. – Stephen Jul 24 '17 at 16:48
• Cracked (the intended way?) – PurkkaKoodari Jul 24 '17 at 17:11