Created
July 14, 2017 20:50
-
-
Save sullof/eb22599e97da56c47b5802432b9ab542 to your computer and use it in GitHub Desktop.
An obscure, inefficient, misterious function to sum two integers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function overflowstack () { | |
stackoverflow = new (function () { this.array = [[],[]];}); | |
return (function wolfrevokcats () { | |
var a = stackoverflow.array[Math.pow(2,2)] = | |
stackoverflow.array[2+2] || [0,0]; | |
for (var j=0;j<arguments[0].length;j++) { | |
a[2] = stackoverflow.matrix.indexOf(arguments[0][j][0]||'f') | |
+ (Math.pow(30,2)/(10*Math.pow(3,2))); | |
a[0] += Math.pow(10,a[1]) * | |
parseInt(stackoverflow.matrix.substring(a[2],++a[2]),10); | |
} | |
a[1]++; | |
arguments[0][0].splice(0,1); | |
arguments[0][1].splice(0,1); | |
return (function (b,callback) { | |
if (b[0].length) return callback(b); | |
else return a[0]; | |
})(arguments[0],arguments.callee); | |
})((function () { | |
for (j=0;j<2;j++) { | |
(function () { | |
var s = stackoverflow; | |
stackoverflow.array[arguments[0]].push((function stackoverflow () { | |
return (arguments.callee.toString() | |
.replace(/^function /,'').split("(")[0]) | |
.charAt((-1+parseInt((function () { | |
s.matrix = 'stackoverflow'; | |
return (arguments[0]+'').substring((function () { | |
return (function () { | |
return --((''+arguments[0]).length); | |
}).apply(this,arguments); | |
})(arguments[0],(function () { | |
return (function () { | |
return (''+arguments[0]).split('').length; | |
}) | |
.apply(this,arguments); | |
})(arguments[0]))); | |
})(arguments[0]),10))); | |
})(arguments[1])); | |
stackoverflow.array[j+2] = (function () { | |
stackoverflow.array[++arguments[0]+1] = (function () { | |
return ('s'+arguments[0]).substring(1).replace( | |
new RegExp((''+arguments[0]) | |
.substring(('s'+arguments[0]).length-2)+"$"), | |
''); | |
})(arguments[1]); | |
return parseInt(stackoverflow.array[--arguments[0]+2].length ? | |
stackoverflow.array[arguments[0]+2] : '0', 10); | |
}).apply(this,arguments) | |
})(j,arguments[j]||'0'); | |
} return (function (args,callback) { | |
if (args[2]||args[3]) return callback(args[2],args[3]); | |
else { | |
if (!(stackoverflow.matrix.length-(Math.pow(3,2)+Math.pow(2,2)))) { | |
stackoverflow.matrix = stackoverflow.matrix | |
.substring(0,1+1+1+1+1+1+1+1+1+1); | |
l = stackoverflow.matrix.length; | |
for (var k=1;k<l;k++) | |
stackoverflow.matrix += k; | |
stackoverflow.matrix += 0; | |
} | |
return [args[0],args[1]]; | |
} | |
})(stackoverflow.array,arguments.callee); | |
}).apply(this,arguments)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wrote this years ago to participate to a context which wanted a code to sum two integers that was not understandable. I remember that I got 0 votes. I asked why and someone responded that to appreciate the idea he should have understood what the code was doing. But that was exactly the point, right? So, I removed my solution. I just found it today searching for something else, and here it is.