Where are we and where do we go from here?

So we have seen that programming languages are notations to express computations, we have seen that programs are things that are written according to this notation, we have seen that programs can be executed to perform a computation, and we have seen that computations are operations over some data. We have seen two examples of programs, interpreters and compilers, that respectively execute and translate other programs. And we have seen how interpreters can execute interpreters and compilers, and how compilers can translate interpreters and compilers. (So now would probably be a good time to take a break and rewatch The Matrix, The Thirteenth Floor, Inception, Paprika, Caprica, eXistenZ, or even, hey, Last Action Hero. And of course, there is always Snow Crash.)

All of that, however, does not quite tell us what a computation is, nor what a notation for computation could be. But they come hand in hand, just like language and thought (one uses language to express one’s thoughts, but one needs to have thoughts to express them in a language). A next lecture note reviews typical notions of computation and the corresponding style of notation: imperative, declarative, etc.

A plea for precision

CONSTANT VIGILANCE!

Alastor “Mad Eye” Moody

A program is something written in a programming language, and a compiler translates a program from one programming language to another. So please pretty please resist the all-too-frequent sloppiness of saying that compilers compile programming languages or that languages run, because they don’t. This nonsense not only hints at muddled thinking, and muddled thinking (“a programming language is when...”, “programming is when...”) does not scale at all in the long run, though it makes for very short job interviews. As Boileau wrote in his Art of Poetry, “what is well understood is delivered clearly”, a French alexandrine. When communicating something, the measure of our understanding is the clarity of our discourse.

So let’s not talk about IT Technology either, nor about online web services, flying UFOs (or unidentified UFO objects, for that matter), and other redundant pleonasms.

Exercise 12

Find a known pleonasm (e.g., an ATM machine, but an automated ATM machine would work too) and invent a plausible one (e.g., a travel journey-quest trip).

Suggestions:

  • Be original. (So the examples in the Wikipedia page about pleonasms are out.)
  • Be mindful. (In the past, several students here at Yale-NUS College pointed out that each of “Ramen noodles” and “Chai tea” is a pleonasm; that was clever.)
  • Be creative. (For example, something like “manga cartoons from Japan” would be good.)

Food for thought:

  • Are your pleonasms syntactic (acronym-based) or semantic (e.g., self-referential)?
RIP In Peace

—Anon.

Exercise 13

Is each of the following terms a pleonasm, a contradiction, or neither?

  1. A good bon mot.
  2. A bad bon mot.
  3. An unsolved mystery.
  4. A solved mystery.
  5. The Solipsists Club.
  6. Count Dracula shaves himself very carefully in front of the mirror.

Exercise 14

Are the following sentences self-referential? (Don’t over-think your answer: these are not trick questions.)

  1. This sentence no verb.
  2. #hashtag
  3. “Français” means “French” in French.
  4. Fashion is what goes out of fashion. (Coco Chanel)
  5. I never would want to join a club who would have me as a member. (Groucho Marx)
  6. At Yale-NUS College, Intro to CS is as easy as one two one two.
  7. Two women walk into a bar and talk about the Bechdel-Wallace test.
  8. Know thyself.
  9. My tailor is rich.

Justify each of your answers.

In English every word can be verbed.

Alan Perlis‘s programming epigram #59

Exercise 15

Are the following sentences self-referential? (Don’t over-think your answer: these are not trick questions.)

  1. This sentence has has too many verbs.
  2. PLEASE WRITE IN LOWER CASE.
  3. What does the French sentence “Je ne sais pas.” mean in English?
  4. We hold these truths to be self-evident. (The United States Declaration of Independence)
  5. The mandatory exercises may feel beneath you, but you should do them anyhow, so that the exam is not above you.
  6. We should not be blind to our own blindness.
  7. It won’t make any difference. (Newt)
  8. Syntactic mispelings.
  9. Semantic nonsense.
  10. But I know it. I know I know. (Luisa Rey)
  11. I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know I know. (Bill Withers)
  12. This is not a pipe. (René Magritte)
  13. This is a pipe.
  14. The speaker is on speaker.
  15. So your answer is “No”?
  16. Does your parrot bite? (Treasure Island)
  17. Think about this.
  18. The present sentence is not clear.
  19. We learn from experience that [people] never learn anything from experience. (George Bernard Shaw)
  20. Spanish spinach.
  21. Spanish spinach.
  22. Spanish spinach.

Exercise 16

Facetiously, Mimer asks Sigbjørn the Fearless whether there exists a word in English that contains all of the vowels “a”, “e”, “i”, “o”, “u”, and “y”, in that order. Does there exist such a word in English?

Possible answers:

  • Yes. Constant vigilance!
  • No.
  • I cannot possibly know this, and furthermore this facetious question about reference is nefariously out of scope in an introductory course about Computer Science.
“Mad Eye” Moody: SOMETHING WRONG WITH YOUR CAPSLOCK KEY?

Exercise 17

Cyrano de Bergerac meets Pinocchio, and they chit-chat amicably. (Cyrano knows full well that Pinocchio’s nose grows whenever he tells a lie, and that it doesn’t whenever he tells the truth.)

Pinocchio takes his handkerchief and sneezes into it. Without removing his handkerchief, he says: “My nose is growing.”

Should Cyrano believe Pinocchio? That is to say: is Pinocchio telling the truth?

Possible answers:

  • Yes he should. If anyone knows his nose, it is Pinocchio.
  • No he should not. If Pinocchio’s nose is growing, he is telling a lie.
  • There is not enough information to say one way and not the other.
  • There is enough information to say both ways: it is a paradox.
  • This is such an insensitive question.

Exercise 18

Pinocchio meets Cyrano de Bergerac, and they chit-chat amicably.

Facetiously, Pinocchio takes his handkerchief and covers his nose with it. Without removing his handkerchief, he says: “My nose is not growing.”

Should Cyrano believe Pinocchio? That is to say: is Pinocchio telling the truth?

Possible answers:

  • Yes he should, because Pinocchio is telling the truth and his nose is not growing.
  • No he should not, because Pinocchio is not telling the truth and his nose is actually growing.
  • There is not enough information to say one way and not the other.
  • There is enough information to say both ways: it is a paradox.
  • Pinocchio should not pick his nose.
Harald: Is the sentence “This is a paradox.” a paradox?
Alfrothul: And what about “This is not a paradox.”?
Loki: I love you guys.

Exercise 19: The bigger the nose, the louder the sneeze

Playfully, Pinocchio announces that he going to sneeze really, really loudly. Is he going to sneeze loudly?

Exercise 20

Reflecting on the notion of definition, as documented in the accompanying slides, compose a definition with your eyes open:

  1. by genus and species (i.e., by type and differences), and
  2. using (some or all of) the four causes.

A remark

The present lecture notes are peppered with Wikipedia pointers. Acquire a sense of the raison d’être of these pointers by following several of them.

Version

Added the playful exercise about Pinocchio [30 Jan 2021]

Created [17 Jan 2021]