Logo
  • Home
  • Classes
  • Conveying Computing
  • Exams
  • Fractal Gallery
  • Guides
  • Problem Sets
  • Syllabus

Class 2: Language

Slides

[PPTX] [PDF (6 per page for printing)]

Assignments Due

  • Now (beginning of class): Course Pledge
  • Sunday, 28 August (5:59pm): Submit Problem Set 0

Reading

  • Now: should have finished Chapters 1 and 2 of the course book
  • Monday: Chapter 3 of course book
  • By Friday: Chapter 4 of course book, Chapters 1-3 of James Gleick’s The Information

Upcoming Help Schedule

  • Sunday, 28 August (3-5pm): Assistant Coaches’ Help Hours (Joeseph Featherston, Kristina Shichanin in Thorton Stacks) (If you haven’t already successfully submitted PS0, you should definitely take advantage of this to finish PS0!)
  • My office hours (and location) will be posted on the course site soon. If you haven’t already, submit http://www.whenisgood.net/cs1120 before 5pm today.

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)
  • Means of Abstraction (all powerful languages have these) – ways to use simple surface forms to represent complicated ones

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 like FoodList

FoodList ::= Food

FoodList ::= Food and FoodList

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.)

Print Friendly Print Get a PDF version of this webpage PDF

2 Responses to “Class 2: Language”

  1. Anonymous says:
    27 August 2011 at 3:56 pm

    When/Where should I expect my partner allocation for PS 01? I submitted my PS 0 yesterday.

    Log in to Reply
    • David Evans says:
      27 August 2011 at 4:02 pm

      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.

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.


Fall 2011

Register
Login

Help Schedule

(all in Davis Commons, except Dave's office hours in Rice 507)
Sundays, 1-6pm (Valerie/Joseph/Kristina)
Mondays, noon-1:30pm (Kristina)
Mondays, 1:15-2:00pm (Dave, Rice 507)
Tuesdays, 11am-noon (Dave, Rice 507)
Tuesdays, 5-8pm (Valerie/Jonathan)
Wednesdays, 5-6:30pm (Jiamin)
Thursdays, 9:45-11am (Dave, Rice 507)
Thursdays, 1-2:30pm (Joseph)
Thursdays, 4:30-7:30pm (Jonathan/Jiamin)
Fridays, noon-1:30pm (Peter)

Recent Posts

  • Course Wrap-Up
  • Class 41: The Cake of Computing
  • PS8 Submissions
  • Class 40: GuardRails, Big Data, and Secure Computation
  • Exam 2 Solutions

Recent Comments

  • David Evans on Problem Sets
  • jacob777 on Problem Sets
  • Prof. K.R. Chowdhary on Class 41: The Cake of Computing
  • Anon on Exams
  • Anon on Exams

Index

  • Classes
    • Class 1: Computing
    • Class 2: Language
    • Class 3: Rules of Evaluation
    • Class 4: Constructing Procedures
    • Class 5: Procedures Practice
    • Class 6: Programming with Data
    • Class 7: Programming with Lists
    • Class 8: Recursive List Procedures
    • Class 9: Consistent Hashing
  • Conveying Computing
  • Exams
  • Fractal Gallery
  • Guides
    • DrRacket Guide
    • Schemer’s Guide to Python
  • Problem Sets
    • Problem Set 0: Course Registration, Racket
    • Problem Set 1: Making Mosaics
      • PS1 Comments
    • Problem Set 2: Sequence Alignment
      • PS2 Comments
    • Problem Set 3: Limning L-System Fractals
      • PS3 – Comments
    • Problem Set 4: Constructing Colossi
      • PS4 – Comments
    • Problem Set 5: Wahoo! Auctions
      • PS5 Comments
    • Problem Set 6: Adventures in Charlottansville
      • PS6 Comments
    • Problem Set 7: Charming Snakes with Mesmerizing Memoizers
      • PS7 Comments
      • PS7 Responses
    • Problem Set 8 (Part 2): Typed Aazda
    • Problem Set 8: From Aazda to aaZda (Part 1)
      • PS8 Part 1 Comments
  • Syllabus
    • Course Pledge
  • Using These Materials

RSS BA Computer Science

RSS Jefferson’s Wheel

  • MICO Challenge in Membership Inference
  • Voice of America interview on ChatGPT
  • Uh-oh, there's a new way to poison code models
  • Trojan Puzzle attack trains AI assistants into suggesting malicious code

RSS Hacker News

  • Six Recent Studies Show an Unexpected Increase in Classical Music Listening
  • Vallejo CA police shared data in violation of state law, watchdog says
  • In-Flight Entertainment Challenge
  • DNA, AI facial reconstruction, and grit identified Somerton Man 75 years later
  • JPMorgan bought the nickel that turned out to be stones

RSS Babbage

  • And it’s goodnight from us
  • Why 10, not 9, is better than 8
  • Future, imperfect and tense
  • The paperless dilemma
  • How to judge a ’bot; why it’s covered
cs1120 | RSS | Comments RSS | Book | Using These Materials | Login | Admin | Powered by Wordpress