Array.prototype.eval = function() {
if(this.length <= 0) throw "[].eval()";
var f = this[0];
if(typeof(f) !== 'function') //For names not allowed in JS
f = globals[f];
if(!f)
throw "What the fuck is " + f + "?";
args = this.slice(1);
for(var i = 0; i < args.length; ++i)
if(args[i] instanceof Array)
args[i] = args[i].eval();
return f.apply(null, args);
}
display = alert;
function car(cons) { return cons.car }
function cdr(cons) { return cons.cdr }
function cons(first, second) { return { car: first, cdr: second } }
[display, ['*', 5, [car, [cons, 4, 4]]]].eval();
loeb = [ /*fuck it, I'm going to watch a film*/ ]
I'd do it in Ruby but JavaScript allows whitespace in between list elements, whereas I don't think Ruby does. As, Ruby is SLOW AS FUCK, but that's not really a problem.
Name:
Anonymous2008-08-19 16:11
Ignore the obvious error that * expects only 2 arguments, that's obviously trivial to solve in JS.
>>8
If you are the Sussman, you can judge me. If, as I suspect, you are not the Sussman, your opinion does not matter. You are unscientific and ultimately destructive.
Name:
Anonymous2008-08-19 18:15
>>9
If you are the Sussman, you can judge >>8. If, as I suspect, you are not the Sussman, your opinion does not matter.
Were >>9 the Sussman, I suspect that he would more than "suspect" that >>8 is not the Sussman. However, that is not the case, as I suspect I am the Sussman.
Name:
Anonymous2008-08-19 18:35
>>12
Considering the fact that only three people post here on /prog/ (You, Me, and The Sussman), and the fact that I am in fact The Sussman, then we are all The Sussman. This makes sense because Sussmans travel in packs.
Name:
Anonymous2008-08-19 19:04
I don't know if I'm The Sussman, but I've been known to copulate with Julie Sussman from time to time.
>>17
I am Heron of Alexandria. I have a large beard and I create mathematical formulas. If you don't repost this comment on 10 other pages, I will use my primitive steam engine to induce mold in your walls.