CSC151 2007S, Class 04: An Introduction to Scheme Admin: * Sorry, my weekend got eaten by statistics. Expect responses to assignment 1 later this week. * Are there questions on assignment 2? * If you work in a group, you should just turn in one assignment for the group, with everyone's name at the top. * Sleep lecture! I don't like to see emails from you at 2 a.m. * If it's my homework that's keeping you up beyond midnight, send me email at midnight that says "Sleep trumps CS" and you get a free extension. * Instructions for working at home likely to be ready early next week. * Reading for tomorrow: GIMP tools Overview: * Why use programming languages? * Scheme basics. * Scheme history. * Lab! * Reflect tomorrow. ==Programming Languages== * Formal mechanisms for expressing algorithms * For computers * For humans * Ambiguity = Death * Why not use natural language? * Ambiguous * Hard to parse * Time (subject/noun) flies (verb) like an arrow (adverbial phrase) * Fruit (adjective) flies (plural noun) like (verb) a banana (direct object) * Tens of thousands of programming languages * Amazingly, differnt opinions on what makes a programming language good * Different features appropriate for different domains * Combining doesn't work * We're using Scheme * A programming language with a lot of parentheses * Parentheses serve as a signal to the computer (and to the reader)a (SOMETHING ...) - Assumes that SOMETHING is a procedure, and attempts to apply it (+ 1 2 3) (sqrt 5) (1 + 2) - Whoops, 1 isn't a procedure BOOM * Designed as a teaching language at MIT * Simple * Not a lot of syntax * Not too many basic operations * But powerful * Based on Lisp, one of the first programming languages == Work on Lab == == Some Reflections == * How did you know that the result is correct?