Can anyone well versed in lisp explain this joke to me? I've done some reading on functional programming languages and know that CAR/CDR mean Contents of Address/Decrement Register but I still don't really understand the humour.
-
10start "scheming around" a bit and then you'll understand. hahaha. it's better than a bumper sticker that says "this programmer stops at all garbage collections." – gonzobrains Sep 29 '11 at 17:24
-
8Approximately half an hour after this question was linked to from https://news.ycombinator.com/item?id=14416846 it was put on hold. It's an 8 year old question. Annoyingly, I can't argue against the on-hold status but I don't like the vibe of putting it on hold *now*. – i336_ May 25 '17 at 14:21
-
@i336_ per the [meta discussion](https://meta.stackoverflow.com/questions/250060/should-i-flag-old-questions-that-ought-to-be-closed), it is closed to prevent new answers from clogging up the review queue. – Andrew May 25 '17 at 14:59
-
2Aren't there any other hold reasons? Opinion-based is... wrong – Entendu May 25 '17 at 15:02
-
6Shouldn't it be Protected instead? – Federico klez Culloca May 25 '17 at 15:18
3 Answers
In Lisp, a linked list element is called a CONS. It is a data structure with two elements, called the CAR and the CDR for historical reasons. (Some Common Lisp programmers prefer to refer to them using the FIRST and REST functions, while others like CAR and CDR because they fit well with the precomposed versions such as (CADR x) ≡ (CAR (CDR x)).
The joke is a parody of the bumper stickers you sometimes see on beat-up old cars saying "My other car is a Porsche/BMW/etc."
My response to this joke has always been "My other CAR is a CADR. CDR isn't a CAR at all."

- 2,651
- 1
- 22
- 25
-
2very nice, but not true. Not after `(rplacd a (car a))` it manifestly won't. :) Common LISP is not Haskell. But thanks for the explanation. +1. – Will Ness May 03 '12 at 16:42
-
-
2I didn't want to explain my joke, but... the point is that the CDR _operation_ isn't a CAR _operation_; that's a separate issue from whether or not the values are equivalent via RPLACD or whatever. – Peter S. Housel Dec 04 '14 at 21:30
-
1And also, CDR sort of sounds like the name of a sports car, echoing TVR or GT-R, so one could read the text and not even realise the deeper, LISP-y meaning. – grkvlt May 25 '17 at 12:55
-
4In case anyone wants to know, CAR stands for _Contents of the Address part of Register number_, and CDR stands for _Contents of the Decrement part of Register number_. Thanks, [Wikipedia](https://en.wikipedia.org/wiki/CAR_and_CDR#Etymology)! – kojiro May 25 '17 at 13:49
-
2
Yes, definitely a geek joke.
The names come from the IBM 704, but that's not the joke.
The joke is (bad) pun on "my other car is a ___." But the in-joke is about recursion.
When you loop/manipulate/select/invoke/more in lisp you use a combination of car (the first element in the list) and cdr (the rest of the list) to juggle functions.
So you've got a car, but your other car is your cdr because you can always get a car from a cdr since the cdr is always (in recursion) more elements. Get it? Laugh yet?
You'll probably have to learn lisp to actually chuckle a bit, or not. Of course, by then, you'll probably find yourself chuckling randomly for no apparent reason because:
Lisp makes you loopy.

- 12,613
- 4
- 24
- 16
//Coming from Scheme
Scheme has very few data structures, one of them is a tuple: '(first . second)
. In this case, car
is the first element, and cdr
is the second. This construct can be extended to create lists, trees, and other structures.
The joke isn't very funny.

- 135,331
- 41
- 252
- 292
-
Oh man... If I saw a bumper sticker with that joke I would totally scratch the word "primary" in the side with a key. – Josh Dec 08 '09 at 05:34
-
1
-
1@Ken - again, I don't know lisp, but scheme doesn't have such a complex syntax. Even lists are made of pairs. – Kobi Dec 08 '09 at 05:46
-
3Indeed, it would be more accurate to say that the tuple is `(first . second)`. The list `'(first second)` is made of two tuples, like this: `(cons first (cons second null))` – mqp Dec 08 '09 at 06:02
-
1Kobi: I know Lisp, and I'm not sure what you mean by "complex syntax". Dotted syntax is how you write pairs in Lisp, including Scheme: http://www.gnu.org/software/mit-scheme/documentation/mit-scheme-ref/Lists.html . The cdr of (first second) is (second), not second. – Ken Dec 08 '09 at 06:03
-
4So, now we get downvoted for being corrected? oh, well. The sun will shine. – Kobi Dec 08 '09 at 10:23