Explain xkcd: It's 'cause you're dumb.
Lisp is a computer programming language with highly regular syntax. The language's most notable feature is that programs take the same form as the language's primary data structure (the list). This blurs the line between code and data and permits programs to inspect and even alter their own source code, thereby opening up opportunities for metaprogramming. Lisp is also a functional programming language (more or less), meaning that programs are expressed in terms of lambda calculus, a mathematical framework for computation.
The phrase A suffusion of blue is a reference to Douglas Adams' book The Long Dark Tea-Time of the Soul. In it, an I Ching calculator calculates everything above the value of 4 is a suffusion of yellow.
In the comic, Cueball marvels at the fundamental and complete nature of the language of creation that he sees in his dream. In the Lisp programming language, "car" is a fundamental function which produces the first item in a list. The line "My God, It's full of 'car's" is a pun, most likely referring to the movie 2010, the sequel to 2001: A Space Odyssey (movie). In the book 2001: A Space Odyssey (novel) when astronaut David Bowman accidentally activates a star gate he exclaims as he enters it "The thing's hollow — it goes on forever — and — oh my God - it's full of stars!", although he does not say anything in the first movie during the final sequence.
Cueball's remarks about patterns, metapatterns, and the disappearance of syntax are reactions to the elegant simplicity of the Lisp programming language.
God replies that the universe was actually hacked together with the programming language Perl. Perl employs an idiosyncratic syntax which borrows from a number of other languages. Although a versatile language often employed for assembling projects quickly (some might say "hastily"), the language has a reputation for being ugly and inelegant. It was famously described as a "Swiss-Army chainsaw", because it is very powerful but also unwieldy and unattractive.
The joke is that the Creator, like many software developers, was in a bit of a hurry and chose to throw something together rather sloppily.
The title text continues the analogy by suggesting that the theory of quantum mechanics was written in regular expressions ("regexes"), a complex language for pattern matching used heavily in Perl. Regular expressions are often criticized as being a write-only language, that is, a language so complicated that any significant program cannot be understood by anybody (often not even the original author). Documentation is essential to assist in the understanding of complex regular expressions. The title text claims that at some point, the documentation for quantum mechanics was lost, which explains why quantum mechanics is so bizarre and complex.
- [Floating in space.]
- Speaker: Last night I drifted off while reading a Lisp book.
- Cueball: Huh?
- Speaker: Suddenly, I was bathed in a suffusion of blue.
- [Floating in space before a vast concept tree.]
- Speaker: At once, just like they said, I felt a great enlightenment. I saw the naked structure of Lisp code unfold before me.
- Cueball: My God
- Cueball: It's full of 'car's
- Speaker: The patterns and metapatterns danced. Syntax faded, and I swam in the purity of quantified conception. Of ideas manifest.
- [Close-up of floating in space before part of a concept tree.]
- Truly, this was the language from which the gods wrought the Universe.
- [Floating in space with God appearing through a line of clouds.]
- God: No, it's not.
- Cueball: It's not?
- God: I mean, ostensibly, yes. Honestly, we hacked most of it together with Perl.
add a comment! ⋅ refresh comments!
I reckon I disagree with this:
In the comic, Cueball marvels at the fundamental and complete nature of the language of creation that he sees in his dream, the ultimate low level language, before being told by God that the universe was mostly built using a high level programming language, perl.
But, despite it's age, Lisp is also a high-level language and lispers probably spend more of their time dealing with higher-level abstractions than perlists.
What's causing the narrator's marvel in the comic is that Lisp has a very elegant (almost non-existent) syntax and the language has a very close relationship with the underlying syntactical structure of the program, and that thinking about it does tend to give suitably-minded hackers feelings of awe and reverence, once they grok it. Even Larry Wall, the creator of Perl, will readily concede that Lisp is beautiful.
Perl, on the other hand, has masses of totally unrelated syntactical bits and pieces drawn from almost everywhere (basic syntax from C, a bunch of environment variables from shell or awk, an inline documentation format, inline regular expressions, formats borrowed from Fortran, bolted-on pseudo-OO from god-knows-where, you name it), so the language, is huge, messy, non-orthogonal, and ugly - but it does have the advantage that if you need a small job done, you can usually get it done in perl rather fast, at the cost, perhaps, of maintainability for long-term or large projects.
So the narrator dreams that the entire universe was created using the cleanest, most elegant and beautiful computer language so far discovered, one which allows the user to create software in terms of high-level abstractions if he or she chooses to; but in reality, God tells him it was a quick-dirty hack-job done in the dirtiest, ugliest - but effective nonetheless - language around. 126.96.36.199 (talk) (please sign your comments with ~~~~)
- I think that A) you've missed the point of that statement, and B) If you believe the explanation to be inaccurate or incomplete you are fully encouraged to edit it. Also, Perl is not the dirtiest, ugliest language around. There are innumerable contenders, but I'd say Brainfuck is definitely in the running, and I personally would say that Java is in there too. lcarsos_a (talk) 05:03, 26 January 2013 (UTC)
- Perl isn't a bad language. The regular expressions that it offers are fantastic, and it's at least consistent. Java's a slow messy and vulnerability-ridden language, but I'd have to go with PHP for the most awful, broken and incomplete piece of crap you could possibly use. Literally has no redeeming features outside of momentum and inexplicably widespread support. Davidy22[talk] 05:44, 26 January 2013 (UTC)
- I never said Perl was bad. I need to teach myself Perl. and that Regular Expressions as we know them today came from Perl, is evidence enough that Perl is a wonderful language. And, I'll agree with you that PHP is an ugly, ugly, disgusting piece of trash. As someone who's had to do OO-PHP, just don't, run far away. I did. I ran to Ruby on Rails, and my life, as a web developer, has been heavenly. lcarsos_a (talk) 07:03, 26 January 2013 (UTC)
Lisp, the "ultimate low level language"? Ok, whoever wrote that really does not know what he/she is talknig about.
One of the most valuable characteristics of Lisp is the fact that is can be used in functional paradigm. Perl can also be used that way, but is considered a more hackish language and not as elegant as Lisp.
Perl language can solve problems with different methods, and the phrase "ostensibly, yes. Honestly, we hacked most of it together with perl" means that the universe was created with perl, but trying to use Lisp way of programing (probably functional paradigm), instead of actually doing it on Lisp (probably for speed)
Oh, in case is not clear to somebody, Lisp is a HIGH LEVEL LANGUAGE.
Java and php would have to compete for the title of the "the dirtiest, ugliest - but effective nonetheless - language around"
188.8.131.52 18:32, 18 April 2013 (UTC)
Ok, somewhat a Perl-head here, but not going to add to the arguments about that. Instead: I think "My God, it's full of stars!" is not a quote from 2001 (where I'm fairly sure there's no broadcast dialoguge at all after Hal is silenced), but from the sequal, 2010, in the part where they 'review' the final recordings of the 2001 mission. But I really need someone who has these two films at hand to check before amending the explanation.
(Oh, go on then. Can I nominate Ada as the most godawful 'proper' language? Not as awkward as COBOL can be (for a proper programmer who doesn't need the "Business Orientated" tendencies), but has just the right (or wrong) mix of strictness to get my back up even while maintaining a pretence of being readable. Mind you, it's 20 years since I've used it, so memories about it may be distorted or outdated.) 184.108.40.206 21:50, 21 June 2013 (UTC)
Java is much more elegant and far less hacky than C++, and it's much faster than some people like to admit. It amazes me how many people complain about how "slow" it is, but have nothing but praise for languages like Python. Of course, C++ is much easier to optimize where time is critical. </minirant> 220.127.116.11 13:59, 3 August 2013 (UTC)
There is a direct reference to the "Lisp epiphany" that many non-LISP programmers are said to experience upon realizing how heavily influenced LISP was by mathematical logic. This is explained far better in a later explanation. It could be brought in here. --Quicksilver (talk) 03:37, 24 August 2013 (UTC)
I don't know whether it's important or not, but the line "My God, it's full of stars!" is the title of a chapter in The Little Schemer, which is considered (IMO) a classic CompSci book. If Randall has, by chance, read the book he may have also pulled the inspiration from there as well as 2001. I don't know whetiher this warrents a trivia block or not. 18.104.22.168 06:34, 27 October 2013 (UTC)
- the quote comes from the book, not the movie. 22.214.171.124 (talk) (please sign your comments with ~~~~)
Lisp is the best language, unfortunately it's not that widely used.
Lisp is a high and low level language.
The worst programming language ever has to be Kodu game lab. Or possibly Malbodge. 126.96.36.199 (talk) (please sign your comments with ~~~~)
Perl is the language designed for the convenience of use. It mimics the natural language in the sense that it has great many slightly different features but each feature makes the most sense for its intended use and allows to write the easily understandable programs. An example of opposite is Pascal, which is a tiny language (i.e. "elegant" in the terms of its creator) but you can't do may things with it at all, and for what you can do, you have to turn yourself inside out. Lisp started in 1950s kind of like Pascal but then collected great many different features over time, each one to fix some of its inborn limitations. You still have to turn yourself inside out when you write in Lisp but nowadays there are great many ways to do so. If you wonder, Pascal had been extended as well, and Delphi is an example of an overgrown Pascal. 188.8.131.52 21:56, 29 January 2014 (UTC)
About the 2001 quote... I have the October 1968 Arrow paperback edition (09 001530 4) by A.C.Clarke and on page 221 Dave Bowman remarks "The thing's hollow - it goes on for ever - and - oh my God - it's full of stars!". So yes, in the movie this line was never used but in Clarke's novelization of his and Kubrick's screenplay it's there. Fast forward to 1984 with the release of 2010 and the filmmakers decided to put this soundbite in the intro to good effect. So yes it was never in the 2001 movie and was in the 2010 movie but as aforementioned, it was in the 2001 book. Squirreltape
) 20:18, 25 February 2014 (UTC)