CSC151 2009F, Class 04: An Introduction to Scheme Admin: * Extra credit for attending any of the Rosenfield Human Rights Symposium talks over the next few days. (Jane Mayer at 4:15 today; Michael Grodin at 8:00 tonight; Lynn Hunt in the convo slot tomorrow.) * Extra credit for going on the Prairie Studies Farm Tour on Saturday. * Extra credit for supporting your colleagues: * Attending Saturday's Women's soccer game, supporting Lauren * Attending Saturday's football game, as we have at least three football players in this class. * Any other upcoming student performances / events / etc? * My notes on assignment 1 (including my answers to all of your strange questions) are now available. [Link in Assignments page.] + This is an eboard. + There are at least six different ways to find the current assignment. + Correct = Check + Most of you have no background with programming. That's fine. + A few of you have a lot of background. We'll cope. * I will go over the key concepts of today's readings and then give you a chance to ask questions before you start lab. * Reading for Friday: Programming the GIMP Tools. * Syllabus change: We had a homework scheduled for this Friday. Now we don't. * Assignment 2 is now available. It is due next Wednesday. * If you don't finish today's lab, please work on it on your own before Friday's class. * Questions? * Yes, we have a quiz on Friday * On paper * Two or three questions * Ten minutes (but you can keep working when I start talking) * On everything through today Overview: * Why use programming languages? * Scheme basics. * Scheme history. * Lab. Computer Science is the study of algorithms and data structures (whee!) * We need a way to represent algorithms and describe data structures * English is one option * But not a good one * Computer scientists have designed tens of thousands of languages for describing algorithms and data structures * Most follow a combination of four basic models of computation * Imperative (like cookbooks) * Object-oriented (describe interacting and reactive objects) * Functional - Try to think in terms of functions that we build up into complex expressions * Declarative - Programs are collections of facts * Languages have three key characteristics * Their model of comptuation (see above) * Their syntax: How you write programs in the language * Their semantics: How to determine the meaning of programs * Why not use English * It's hard to parse * Time flies like an arrow * Fruit flies like a banana * It's ambiguious * John gave a rock to Joe. I worry about him. * At Grinnell, we start with Scheme. Why? * Simplest syntax of almost any language: If you can match parens and understand a few simple rules, you can understand Scheme * Scheme has a simple definition * We find the functional paradigm a natural and important one * Screws with the minds of people with previous programming experience * An old language: Based on LISP, created in late 1950's.