Parsing Sentences (a Joke)


Briefly, one of my favorite jokes:

A computer programmer is heading to the grocery store for necessary supplies. As they’re heading out, their spouse yells down the stairs, “Oh, hey, when you’re at the store could you grab a gallon of milk? And if they have any eggs, get a dozen!” So the programmer comes home with 12 gallons of milk.

------ divider ------

I happened to see some discussion of sentence-structure and it reminded me of this. C’mon now, that’s funny!

Comments

  1. John Morales says

    Droll, that I can’t dispute. But then, the programmer would grok the scope, no

    (Still, that’s natural language; always the implicit context)

  2. mailliw says

    A student is in the elevator when the professor of logic gets in.

    The student asks the professor “are you going up or down?”

    To which the professor replies “Yes”.

  3. mailliw says

    Why are the secret police arresting functional programmers?
    Because functional programmers are enemies of the state.

    A SQL query walks into a bar and sees two tables, it walks up to them and says “hey, can I join you?”

  4. lochaber says

    I can’t remember enough specifics to look it up, but I’ve seen a couple trolling threads on twitter and what not, where someone deliberately pitted a confusing order of operations against a confusing parenthetical (I don’t know the proper term, sorry…)

    Reading the fallout and vitriol was sorta interesting, but more fascinating was how so many people absolutely refused to acknowledge the confusing nature of the proposed equation, in favor of just demeaning any who disagreed with them as stupid and/or uneducated. Amongst other insults…

  5. says

    Three logicians walk into a bar. The barman says, ‘Does everybody want a beer?’
    The first logician says, ‘I don’t know.’
    The second logician says, ‘I don’t know.’
    The third logician says, “Yes.”

    I love jokes about the ambiguity of human language. Some Russian ones are really fun. In Russian there’s a phrase “да нет наверное,” which means literally “yes no maybe.” Separately, in Russian the word “да” means “yes,” the word “нет” means “no,” and “наверное” means “maybe.” As a phrase “да нет наверное” means “probably no.”

    Иностранец спрашивает у своей русской девушки:
    – Ты ужинать будешь?
    Она в ответ:
    – Да, нет, наверное….
    Иностранец:
    – А мы еще удивляемся, почему не можем понять их душу!?

    This joke translates as:
    A foreigner asks his Russian girlfriend,
    “Do you want a dinner?”
    She responds with, “Yes no maybe.”
    The foreigner thinks, “And we still wonder why we cannot understand their soul.”

    Here’s one more.

    Американцы создали машину, которая переводит с русского на английский.
    Машина сначала задымилась, а потом и взорвалась после разговора двух русских:
    – Ты собираешься встречать Старый Новый Год?
    – Да нет наверное…
    – Ну а че точно там известно, не известно?
    – Да поглядим, позже решим – будем не будем…

    Americans made a computer that translates from Russian to English.
    At first the computer started thinking, and then it exploded after a conversation between two Russians:
    “Are you going to celebrate the New Year?”
    “Yes no maybe.” (Meaning: “No, I guess…”)
    “But what is there known, not known?”
    “Yes we’ll take a look, afterwards we’ll decide—will be won’t be.”

    The last two lines sound perfectly normal in Russian, those are standard phrases commonly used when referring to the future. It doesn’t sound philosophical or weird in original Russian phrasing. For example, “будем не будем” that means literally “we will be we won’t be” actually means something like “we will see.”

  6. says

    I just tried to post a comment about similar jokes in Russian, and it didn’t work. Do you have some comment moderating algorithm that doesn’t like Russian jokes?

  7. says

    By the way, there was a subtle joke in my previous comment in the phrasing, “Do you have some comment moderating algorithm that doesn’t like Russian jokes?” My comment that got censored included a joke about an American-made computer exploding after being confronted with Russian language.

    As they’re heading out, their spouse yells down the stairs

    I like the gender neutral formulation. I had heard this joke before, and usually it was written so as to imply that the programmer is male and the person asking for groceries is his wife.

    Other than that, I find this joke funny, because it’s very obvious what the spouse asking for groceries actually meant and how their request was misunderstood. In real life situations ambiguous formulations are a pain in the ass and not funny at all. If you notice the ambiguity, you don’t always have an opportunity to ask for clarifications. And there are also situations where you misunderstand the meaning without even noticing that there could be a possible alternative explanation.

  8. says

    Andreas Avester@#10:
    Do you have some comment moderating algorithm that doesn’t like Russian jokes?

    Nope! Lemme go search the spam bucket.
    Probably the spam blocker has been trained to reject Russian (because spam, not politics)

    [I pulled both copies out of the spam bucket, approved them to train the algorithm, then deleted the duplicate.]

  9. Owlmirror says

    Over at languagehat — a blog dedicated to discussing different languages — the blog owner has acknowledged the continued frustration with the blog/spam software automatically moderating/spambinning/deleting-without-a-trace comments that have “too many” characters from non-Latin-character languages (I’ve seen it happen with Hebrew, Greek, and Cyrillic, and probably others). I say “too many” because a word or two does not trigger the problem, but some number of characters in a sentence? or paragraph? does. No-one is quite sure how many it characters it is.

    The author/supporter of the spam software, Akismet, will not publish the information about how many, because duh, spammers would exploit the knowledge. Security through obscurity.

    As far as I know, there is no way to “allow” multiple languages while also blocking spam.

  10. cvoinescu says

    Marcus:
    I happened to see some discussion of sentence-structure and it reminded me of this. C’mon now, that’s funny!
    *waves*

    It is funny — or was funny the first time I heard it. Now I just deadpan “you know there’s a thing called pragmatism that is essential to processing natural language, and it makes no sense that a person would make this mistake”. In fact, I’m pretty sure that’s one of the main reasons you need good AI for computers to understand human language. There are some unexceptional examples where a computer can not easily guess the referent of a pronoun [1], and some cleverly constructed examples where you can’t parse, or even “lex”, an English phrase without understanding its meaning [2].

    [1] take this:
    Alice: “Hand me the 10 spanner, please.”
    Bob: “Here you go.”
    Alice: “Large flat-blade screwdriver.”
    Alice: “Can you find the idle adjuster screw? It’s the smaller one.”
    Bob: “This one?”
    Alice: “Yes… Okay, the larger one now.”
    Alice: “Can you go inside and press on the gas a couple of times?”
    Alice: “Thank you. Let’s see…”
    Bob: “Do you think it’ll work?”

    What’s “it” in the last sentence?

    It’s none of the words that occurred recently — or at all, in this example. You can make this much longer and it’ll be even more obvious to a person, but an algorithm that naively looks for referents three, or ten, or even fifty sentences back would be stumped.

    [2] You need to understand the meaning to even tell what part of speech a word is:
    “Time flies like an arrow” (noun verb adverb article noun)
    “Fruit flies like a banana” (noun noun verb article noun)

  11. Ridana says

    “Yes we’ll take a look, afterwards we’ll decide—[we’ll see.]”

    Wow, I always thought Trumpet just did Putin’s bidding, and assumed his way of speaking was just his habitual word salad. Now I see he’s quoting Putin directly when he talks like that!

    nitpick @cvoinescu: In “Time flies like an arrow,” “like” is a preposition, not an adverb. ;)

  12. cvoinescu says

    Ridana @ #17:
    My apologies. Of course it’s a preposition. I was pretty sure, in fact, but equivalent words are not always deemed the same part of speech in different languages, so I checked a dictionary, and misread one of the examples…

  13. dangerousbeans says

    @Andreas Avester you could probably add some gender ambiguity to the joke. Change “so the programmer comes home with” to “so she comes home with”. Sadly probably wouldn’t work with they, because of society treating men as the default.

    All these jokes are great! (I’ll go be embarrassed in private now :P)

  14. says

    dangerousbeans @#19

    Sadly probably wouldn’t work with they, because of society treating men as the default.

    I’m fine with “they,” because at least it doesn’t explicitly add some gender stereotype to a joke. Sure, some bigoted people will still imagine that a joke is about some gender, but at least I won’t be annoyed and happily imagine that the joke was meant to be gender neutral.

    I strongly dislike jokes about gender stereotypes where people act according to how a sexist society expects them to act. Even noticing some gender stereotype hidden in an otherwise nice joke decreases my appreciation of said joke.

    Here is a translation of a text written by a German comedian Loriot.

    Berta: “Herrmann?”
    Hermann: “Yes?”
    Berta: “What are you up to?”
    Hermann: “Nothing.”
    Berta: “Nothing? What do you mean nothing?”
    Hermann: “I’m doing nothing.”
    Berta: “Nothing at all?”
    Hermann: “Nope.”
    Berta: “Absolutely nothing?”
    Hermann: “Nope, I’m sitting here.”
    Berta: “You’re sitting there?”
    Hermann: “Yes.”
    Berta: “But you must be doing something!”
    Hermann: “Nope.”
    Berta: “Are you thinking about anything?”
    Hermann: “Nothing special.”
    Berta: “It couldn’t hurt if you went for a walk!”
    Hermann: “Nah.”
    Berta: “I’ll bring you your coat.”
    Hermann: “No thank you.”
    Berta: “But it’s too cold without a coat!”
    Hermann: “I’m not going for a walk.”
    Berta: “But you just said you wanted to!”
    Hermann: “No, you wanted me to go for a walk!”
    Berta: “Me? I don’t care one bit whether you go for a walk!”
    Hermann: “Good.”
    Berta: “I just meant that it couldn’t hurt if you went for a walk.”
    Hermann: “No, it couldn’t hurt.”
    Berta: “So what do you want now?”
    Hermann: “I want to sit here!”
    Berta: “You could drive a woman crazy!”
    Hermann: “Ah.”
    Berta: “First you want to go for a walk, then you don’t. Then you want me to get your coat, then you don’t. What next?”
    Hermann: “I want to sit here!”
    Berta: “And now suddenly you want to sit there!”
    Hermann: “It wasn’t sudden. I’ve only wanted to sit here this whole time.”
    Berta: “Sit?”
    Hermann: “I want to sit here and relax!”
    Berta: “If you really wanted to relax, you wouldn’t be constantly trying to convince me of it!”
    Hermann: “That’s all I’m going to say.”
    Berta: “Then you’d still have time to do something you enjoy!”
    Hermann: “Yep.”
    Berta: “Are you reading anything?”
    Hermann: “Not at the moment.”
    Berta: “Then read something!”
    Hermann: “Later… maybe later.”
    Berta: “Go get a magazine!”
    Hermann: “First I just want to sit here.”
    Berta: “Do you want me to get it for you?”
    Hermann: “No, thank you.”
    Berta: “Does his majesty want to be served something? I run around here and there all day. Surely you could get up and get a magazine for yourself!”
    Hermann: “I do not want to read right now!”
    Berta: “First you want to read, then you don’t.”
    Hermann: “I just want to sit here.”
    Berta: “But you can do something you enjoy!”
    Hermann: “That’s what I’m doing!”
    Berta: “Then stop whining all the time!”
    Hermann: “…”
    Berta: “Hermann?”
    Hermann: “…”
    Berta: “Are you deaf?”
    Hermann: “Nope.”
    Berta: “You’re not doing anything you enjoy. Instead, you sit there!”
    Hermann: “I sit here because I enjoy it!”
    Berta: “Don’t be so aggressive!”
    Hermann: “I am not being aggressive.”
    Berta: “Why are you yelling at me then?”
    Hermann: “I AM NOT YELLING AT YOU!”

    Back when I was studying in Germany, I took a university course about phonetics and German pronunciation. Of course, the course included some theory about phonetics in general, but we were also expected to improve our own German pronunciation. This meant we had to practice speaking in German. In Language lessons teachers routinely give their students dialogues to read. Pretty much always female students are told to read female roles, while male students are told to read male roles.

    Overall, this course about phonetics was interesting and fun. Except for one specific lesson. Our teacher gave us this dialogue to read. She split us in pairs, each pair with a male and a female student, and of course I was told to read the female role. I decided not to make a scene and abstain from complaining about how I dislike being treated as a woman. Making scenes usually only causes more problems than they solve. Besides, if I don’t want people to perceive me as feminine, I shouldn’t give them a reason to assume that I’m emotional and can be easily hurt by something as trivial as reading a female role in a dialogue.

    Nonetheless, I was angry and annoyed. And I got grumpy. Firstly, this dialogue wasn’t funny, it was offensive, because it included stupid gender stereotypes. Secondly, teacher didn’t just treat me as a woman, she ordered me to behave as a woman and told me to read the female role together with other students, who, unlike me, actually were women (no cis male student in my group was told to read the female role, I was the only guy who had to read it). On top of that, some of the things my teacher said (jokingly) during that class implied that I could have something in common with Berta (I perceived Berta as a foolish and clueless character; I wanted to have absolutely nothing in common with her).

  15. says

    @16 cvoinescu

    Time flies like an arrow but fruit flies like a banana

    Always did love that line. Reminds me of a silly from some years ago when my then-girlfriend out of nowhere asked “Have you ever seen a banana slug?” and I instantly responded “No, but I’ve seen a fruit punch.”

Leave a Reply