­xkcd thread

For the last panel see the “halting problem”. Quick summary: there’s no way to determine in a finite length of time if an arbitrary program will enter an infinite loop.

Formally, lambda functions are functions that operate on or create other functions. Which means you can write a program that writes a program that writes a program that writes a program that … that does the work. Panel 1 is the woman saying Excel is adding this capability. She clearly doesn’t like the idea; too much room for mischief.

Panel 2: Turing Machines are a thought experiment from the 1940s that essentially demonstrates that a very very very simple “processor” can execute any conceivable algorithm given a very simple, albeit infinite, memory for program and data, and truly vast amounts of time. Any fancier computer, all the way up to a modern supercomputer, has the same range of application, and is only an improvement in efficiency, not an increase in capability.

So Mr. Hopeless Insane Programmer in the second panel is saying he uses a PC to run Excel in which he’s embedded a Turing machine simulator to painfully execute a Turing Machine model he’s defined inside his spreadsheet. Which TM might take minutes on a modern PC just to add the contents of cell A1 to A2 and stuff the answer in A3.

This is the programming equivalent of moving your car from LA to NYC by disassembling it to the last nut and bolt, putting one piece of the car in your pocket and walking from LA to NYC, setting down that part, walking home, putting another part in your pocket and walking back to NYC, etc. etc. etc.

Yes, it will get the job done. Eventually. And yes, it’s conceptually simple. But boy is it stupidly inefficient. To the 100th power.

In the third panel the woman calls him on this insane way he writes programs and he says “Turing proved all ways of doing it are all conceptually equivalent ways of doing it. So I’m just as right/wrong as any other approach to programming.”

In the 4th panel she tells him Turing, a true founding God in the Pantheon of Computer Science, would retract his equivalence proof in that face of that much insanity / concentrated wrongheadedness. As @Pleonast says, the last bit of panel 4 is our goofball essentially challenging God-Turing to make him stop. A challenge Mr. Goofball knows he himself must win, proven by Turing’s own later work on the “halting problem”. Turing is in effect hoist by his own petard/math. Hah! Take that Dr. Turing! You are defeated! Checkmate!

The hoverover text essentially grants immortality to Mr. goofball. He’s raised to the Pantheon of People Doing Programming So Badly it isn’t even Wrong!

Anybody who took and remembers much undergrad Computer Science will get it. Anyone else, not so much.

Not quite true, although there are a bunch of related concepts in play. Lambdas are anonymous functions, i.e. ones with no name. They are a necessary consequence of languages with first-class functions, which is what you’re talking about. A language with first-class functions can store functions in variables, pass them in as arguments, return them from other functions, generate them on the fly, and so on. In languages where this is a key feature, functions that are generated and only executed once is commonplace, and so there’s no need to ever give them names, any more than you have to give a name to the intermediate value of 4+5 in the expression 4+5+6.

With first-class functions as the basis for a language (as opposed to a convenience feature), things can get even weirder. Consider again the expression 4+5. Suppose that the language does not evaluate this as a whole, but instead looks at the “4+” first. What’s the “value” of that? Well, one way of looking at it is that it’s a function that adds 4 to the argument. We could have named it the plus4 function, but we don’t bother; just let it be anonymous. Then, when the compiler reaches the 5, it applies that as an argument to the plus4 function, which of course returns the value 9.

In the case of arithmetic, the result is the same as the normal way of doing things, but the same idea applies to more complex situations. The idea that each step of a computation returns a function that takes the rest of the chain as an argument is very powerful.

Yeah, thanks. I was playing a little loose with the terminology. As was Miss Ponytail.

Yeah, it’s a pretty subtle distinction and barely worth making. But I’m nothing if not pedantic :slight_smile: (I await someone coming along to make an even finer distinction here).

We’re now up to about 4 screens’ worth of pedantry to explain a 4-panel 2-stick-figure comic plus 1 throw-away line. In other words …

We’re just getting started! :wink:

Ped forth my good man!

I feel like the second panel is a callback to this comic:

I understood it enough to get a chuckle about it.

But the over explanation made it hilarious, thanks. :slight_smile:

[checks diploma] BA in Computer Science, UC Berkeley. Didn’t cover this.

If first-class functions are functions of functions, then we should be able to apply Euler-Lagrange to minimize runtime while conserving keystrokes

In about 3 weeks I am so going to pick a random neighbor and do this.

No I won’t, but I really want to.

Of course, BHG is going to be the one to brief the virii…

Now there’s a word that makes no sense…

I knew someone was going to comment on it (which is why I used it.) If enough people use a word, it becomes a cromulent[*] word, even if it makes no sense.

.

[*] a perfect example.

According to my high school Latin teacher, while “virus” didn’t have a plural in Latin, if it did have a plural, its structure was such that the plural probably would have been “vira”.

Oh, and the crazy programmer’s chance of winning against Turing is also helped immensely by the fact that Turing is dead.

I don’t understand why anybody would want to use it, since it’s so obviously wrong.

Obviously wrong things still have a tendency to spread like virii.

“When I use a word ,” Humpty Dumpty said, in rather a scornful tone, “it means just what I choose it to mean—neither more nor less.” “The question is,” said Alice, “whether you can make words mean so many different things.” “The question is,” said Humpty Dumpty, “which is to be master —that’s all.”

Lewis Carroll, Through the Looking Glass

I believe “virions” is what you’re looking for. One virion, two virions. The mass noun is virus which is neither singular nor plural or is equally both.