The “Let overwrite, let override” thing is a reference to this and this (see also). (And this, not the code, is what Sagebrysh is saying was enlightening.)
The Lisp code (more specifically, Scheme code) doesn’t altogether make sense, and I suspect (1) was posted mostly because “let” is a keyword in Scheme as well as a prominent part of the meme trigger phrase in those books and (2) is as much a comment on the brief thing it’s replying to as to the original story. I’ll say a few words about it anyway, but what follows is likely to be unsatisfying.
The code uses what’s possibly Scheme’s most confusing feature, namely call-with-current-continuation (commonly abbreviated call/cc) but unless I’m missing something it does so completely unnecessarily. The code posted is equivalent to this:
[EDITED to add: eww, the indentation is messed up and I don’t know how to fix it; please imagine that line 2 is indented a little relative to line 1, and lines 3 and 4 a bit further relative to line 2.]
at which point it may be worth mentioning that Scheme is an “expression-oriented” language where every language construct is an expression that has a value. In this case, let establishes a local scope (i.e., a region of the program in which particular names have values assigned to them). The particular form used here isn’t strictly legal Scheme, but by analogy with Common Lisp I believe it’s intended to create the names overwrite and override and make them both nil or something of the kind.
cond is like “if” in other languages (it’s actually a bit more powerful, but it’s used here in a way equivalent to an “if”). There had better be, as a result of code not shown here, something called meme? in existence. If it’s true (which actually means “any value other than the special one meaning false”) then the value of the let-expression will be the result of calling (overwrite it); otherwise it will be the value of it.
So it had also better have been given a value by something not shown here. But, regardless of that, this won’t work when meme? is true, because (overwrite it) will fail, because the value of overwrite at this point is nil or undefined or something of the sort.
There may be some further clever idea that I’m missing (perhaps because I haven’t actually read the Meme Wars books) and that makes it obvious what eaglejarl meant about the “overarching lambda” (lambda is used to make anonymous functions, which can be bound to variables to make onymous functions; presumably this code is meant to be wrapped up in a lambda, which perhaps gives values to meme? and it; but I have the feeling there’s a joke I’m not getting somewhere in this vicinity.
The “Let overwrite, let override” thing is a reference to this and this (see also). (And this, not the code, is what Sagebrysh is saying was enlightening.)
The Lisp code (more specifically, Scheme code) doesn’t altogether make sense, and I suspect (1) was posted mostly because “let” is a keyword in Scheme as well as a prominent part of the meme trigger phrase in those books and (2) is as much a comment on the brief thing it’s replying to as to the original story. I’ll say a few words about it anyway, but what follows is likely to be unsatisfying.
The code uses what’s possibly Scheme’s most confusing feature, namely call-with-current-continuation (commonly abbreviated call/cc) but unless I’m missing something it does so completely unnecessarily. The code posted is equivalent to this:
[EDITED to add: eww, the indentation is messed up and I don’t know how to fix it; please imagine that line 2 is indented a little relative to line 1, and lines 3 and 4 a bit further relative to line 2.]
at which point it may be worth mentioning that Scheme is an “expression-oriented” language where every language construct is an expression that has a value. In this case, let establishes a local scope (i.e., a region of the program in which particular names have values assigned to them). The particular form used here isn’t strictly legal Scheme, but by analogy with Common Lisp I believe it’s intended to create the names overwrite and override and make them both nil or something of the kind.
cond is like “if” in other languages (it’s actually a bit more powerful, but it’s used here in a way equivalent to an “if”). There had better be, as a result of code not shown here, something called meme? in existence. If it’s true (which actually means “any value other than the special one meaning false”) then the value of the let-expression will be the result of calling (overwrite it); otherwise it will be the value of it.
So it had also better have been given a value by something not shown here. But, regardless of that, this won’t work when meme? is true, because (overwrite it) will fail, because the value of overwrite at this point is nil or undefined or something of the sort.
There may be some further clever idea that I’m missing (perhaps because I haven’t actually read the Meme Wars books) and that makes it obvious what eaglejarl meant about the “overarching lambda” (lambda is used to make anonymous functions, which can be bound to variables to make onymous functions; presumably this code is meant to be wrapped up in a lambda, which perhaps gives values to meme? and it; but I have the feeling there’s a joke I’m not getting somewhere in this vicinity.
Thanks very much, this is very helpful. I had never heard of the books that I guess it looked like I was writing fanfic for!
Nor had I! Google is a wonderful thing...