I've invented a new language called FunKiller, which is designed to make radiation-hardening challenges trivial and boring. This is the JavaScript interpreter:
function interpret(s) {
var lines = s.split("\n");
var max = 0;
var longestLine = ""
lines.forEach(function(l) {
if (l.length > max) {
max = l.length;
longestLine = l;
}
});
i = prompt();
eval(longestLine);
alert(o);
}
As you can tell, it just finds the longest line in the file and eval
's it. This means that I can trivially make any JS program radiation-hardened in this language:
alert(prompt()*2)
Becomes:
o=i*2
o=i*2
I certainly don't want this language to be used. Is this language valid for future challenges?