Notes and Questions

Repeat question from Class 1: What other things have changed as much as (or more that!) computing power in your lifetime? (Post your guesses/answers as comments on the course blog.)

What is a language?

Languages are made of:

Primitives (almost* all languages have these) – the simplest surface forms with meaning (* surprisingly it is possible to make a powerful language without any primitives. We will see one before the end of this class!)

Means of Combination (all languages have these) – rules of production (ways to make new surface forms from ones you already have)

Backus-Naur Form (BNF): A way of describing the surface forms in a language using replacement rules in the form:

non-terminal::=replacement

The rule means whenever you have what is on the left side of the ::=, you can replace it with what is on the right side.

What strings can the following BNF grammar produce?

Sentence ::= Food Comparator Food

Food ::= Bodo’s Bagels

Food ::= Einstein’s Bagels

Comparator ::= are better than

Comparator ::= are worse than

What strings can the following BNF grammar produce?

Sentence ::= I likeFoodList

FoodList ::= Food

FoodList ::= FoodandFoodList

Food ::= Bodo’s Bagels

Food ::= Einstein’s Bagels

When learning a foreign language, which of primitives, means of combination, or means of abstraction is hardest to learn?

Are there any non-recursive natural languages?

What would happen to a society that spoke one?

What is the difference between a compiler and an interpreter?

Computers are actually pretty simple. We’re sitting here on a bench in this cafe. Let’s assume that you understood only the most rudimentary of directions and you asked how to find the rest room. I would have to describe it to you in very specific and precise instructions. I might say, “Scoot sideways two meters off the bench. Stand erect. Life left foot. Bend left knee until it is horizontal. Extend left foot and shift weight 300 centimeters forward.” and on and on. If you could interpret all those instructions 100 times faster than any other person in this cafe, you would appear to be a magician: You could run over and grab a milk shake and bring it back and set it on the table and snap your fingers, and I’d think you make the milkshake appear, because it was so fast relative to my perception. That’s exactly what a computer does. It takes these very, very simple-minded instructions – “Go fetch a number, add it to this number, put the result there, perceive if it’s greater than this other number” – but executes them at a rate of, let’s say, 1,000,000 per second. At 1,000,000 per second, the results appear to be magic. That’s a simple explanation, and the point is that people really don’t have to understand how computers work.

Steve Jobs, Interviewed in Playboy Magazine, February 1, 1985 (no pictures, other than a fully clothed one of Steve, and just a little bit of bad language) (Note: 3 months later, in May 1985, Jobs was kicked-out of Apple. If you read the whole interview, especially the part about Edwin Land, keep this in mind.)

2 Responses to “Class 2: Language”

The partner assignments for PS1 will be posted before class Monday. If you are ready to start PS1 before then (that is, you’ve finished PS0 and reading Chapters 1-3), contact me and I’ll assign you a partner earlier.