Today in 151: About Scheme
Overview
* Introduction to Scheme
* Short history of Scheme
* Lab
* Possibly: Reflection
+ Hardest part today?
+ Something interesting you learned
Administivia
* Experiment today: Computer as whiteboard
+ Preserves what I write (legibly!)
+ No pictures
* Note on "proper" HTML
* Questions on homework 1?
* Sam will teach cool style stuff on Monday
* Other administrative questions?
* Homework: Don't bother to read "Lists" and "Symbolic Values"
* Sam is a broken record: Surveys to be read over the weekend
* Have a good weekend
Question: Tell us about the different kinds of links in HTML.
* "General": To a page somewhere else on the World Wide Web
Such links always start with "the protocol"
http:/
https:
ftp:
mailto:
The best darn liberal arts
college in Grinnell
* "Relative": Elsewhere in your account. Simply give the
name of the file
My favorite person to pick on in this
semester's version of CS151
* "Internal": Within a page
Precede the name of the part of the page with a pound sign
Question: What do you call the thing in a tag that give
extra info, like
Answer: You call it an "attribute"
Question: How do I find out all the thousands of different
parameters I can use?
Answer: Go to
http://www.w3.org/TR/html4/
Question: What do you want for citations.
Author. Date. Title. URL if a Web page.
Stone, John David and McRitchie (2003). The Grinnell College
Department of Mathematics and Computer Science Front Door.
Web page available at http://www.cs.grinnell.edu/. Visited
24 January 2003. Last modified 22 January 2003.
About Scheme:
* Scheme is a programming language
* It is a language in which you express algorithms in a way
that the computer can understand.
* It is designed to be simple and easy to learn compared
to other programming languages.
* Simple syntax: Rules for forming "sentences"
* Here's the syntax
Open parenthesis: (
Operation: +
Arguments separated by spaces: 2 3
Close parenthesis: )
* "Add two and three": (+ 2 3)
* "Find the square root of five: (sqrt 5)
* "Add two and three, multiply the result by 5"
(* 5 (+ 2 3))
(* (+ 2 3) 5)
(5 * (+ 2 3)) NO NO NO
* Add two three and four
(+ 2 3 4)
* Quadratic equation?
Where does Scheme come from and why do we use it at Grinnell?
In the late 1950's/early 1960's computers were used for ...
* Networking (not so much)
* Number crunching: Calculation
+ Accounting
+ Physics (big big calculations)
+ Statistics, Economics, and other numerical fields
+ Fun with missle trajectories and other military apps
* Encryption/Decryption
* Business data analysis
Movement: Artificial Intelligence:
* Goals: Understand and mimic human thought
* Theory: Thought is the manipulation of abstract symbols
that are collected together.
* Need: Language that emphasizes symbols and collections
of symbols.
* John McCarthy of MIT designed LISP (LISt Processing langauge)
* Early 1980's MIT revamps intro CS curriculm using LISP
(okay, a variant): Scheme
Why Scheme at Grinnell
* Easy to learn/Simple syntax
* Puts everyone at an equal disadvantage
* Does some things easily that other languages don't
(higher-order functions) (ignore for now)
* Encourages a program design technique known as recursion