CSE341: Programming Languages, Fall 2011

Course Info

Course Information

Lecture: Monday, Wednesday, Friday 2:30-3:20 EEB 105
Section AA: Thursday 12:30-1:20, Loew 102
Section AB: Thursday 1:30-2:20, Loew 102

Office Hours:
  Dan Grossman, Allen Center 574, Mondays 10-11AM + by appointment + try coming by (please do visit!)
  TA: Ben Wood, Allen Center 216, Fridays 11AM-Noon
  TA: Lydia Duncan, Allen Center 218, Tuesdays 1:30-3:30PM
  TA: Chloe, Allen Center 002 (the lab), Wednesdays 12:15-2:15PM

Contact Info

Contact Information

Course Email List (mandatory): You should receive email sent to the course mailing list regularly (roughly at least once a day). Any important announcements will be sent to this list.

Course staff:
  All staff: cse341-staff@cs.washington.edu
  Instructor: Dan Grossman, djg and then at and then cs.washington.edu
  TA: Ben Wood, bpw and then at and then cs.washington.edu
  TA: Lydia Duncan, lydier and then at and then cs.washington.edu
  TA: Chloe, bunnyfly and then at and then cs.washington.edu
Email sent to cse341-staff@cs.washington.edu will reach the instructor and all the TAs. For questions multiple staff members can answer, we encourage you to use this email so that you get a quicker reply and the whole staff is aware of points of confusion.

Course Discussion Board (optional)

Anonymous Feedback (goes only to the instructor)

Lectures

Lecture Materials

  1. 1. 9/28: Course Mechanics, ML Variable Bindings   summary   slides: pptx   pdf   pdf6up   code: sml
  2. 2. 9/30: Functions, Pairs, Lists   summary   slides: pptx   pdf   pdf6up   code: sml
  3. 3. 10/3: Local bindings, Options, Benefits of no mutation   summary   slides: pptx   pdf   pdf6up   code: sml
  4. 4. 10/5: Records, Datatypes, Case expressions   summary   slides: pptx   pdf   pdf6up   code: sml
         we got through only slide 14; the rest moved to 10/7
  5. 5. 10/7 Pattern Matching (and the truth about function arguments)   summary   slides: pptx   pdf   pdf6up   code: sml
         we got through only slide 14; the rest moved to 10/10
  6. 6. 10/10 Tail Recursion, Accumulators, Exceptions   summary   slides: pptx   pdf   pdf6up   code: sml
         exceptions moved to 10/12
  7. 7. 10/12 Functions Taking/Returning Functions   summary   slides: pptx   pdf   pdf6up   code: sml
  8. 7.5. 10/14 Course Motivation   summary   links   slides: pptx   pdf   pdf6up
  9. 8. 10/14 Lexical Scope and Function Closures   summary   slides: pptx   pdf   pdf6up   code: sml
         we got through only slide 11; the rest moved to 10/17 (we also did lecture 7.5)
  10. 9. 10/17 Function-Closure Idioms   summary   slides: pptx   pdf   pdf6up   code: sml
         we got through only slide 10; moving references and callbacks to 10/19 and ADTs as records of functions to 10/21
  11. 10. 10/19 Type Constructors, Type Inference, The Value Restriction   summary   slides: key ppt (converted)   pdf   pdf (animation)   pdf6up   code: sml
  12. 11. 10/21 Closures-ish in Java and C   summary   slides: pptx   pdf   pdf6up   code: sml   java   c
  13. 12. 10/24 Modules   summary   slides: pptx   pdf   pdf6up   code: sml
         we got through only slide 20; the rest moved to 10/26
  14. 13. 10/26 Equivalence; Parametric Polymorphism   summary   slides: pptx   pdf   pdf6up
         we sped through the last two slides: you are not responsible for the details on them
  15. 14. 10/28 Introduction to Racket   summary   slides: pptx   pdf   pdf6up   code: rkt
         we got through only slide 21; the rest moved to 11/2
  16. X. 10/31 Midterm
  17. 15. 11/2 Mutation, Pairs, Thunks, Laziness, Streams, Memoization   summary   slides: pptx   pdf   pdf6up   code: rkt
         we got through only slide 15; we finished promises in section, covered streams in section and on 11/4, and did memoization on 11/4
  18. 16. 11/4 Macros   summary   slides: pptx   pdf   pdf6up   code: rkt
  19. 17. 11/9 Structs, Implementing Languages & Higher-Order Functions   summary   slides: pptx   pdf   pdf6up   code: rkt
         we got through only slide 15; the rest moved to 11/10
  20. 18. 11/10 (section slot) Static vs. Dynamic Typing   summary   slides: pptx   pdf   pdf6up
         we got through only slide 11; the rest moved to 11/14
  21. X. 11/14 We finished lecture 18 and did the first 3 slides of lecture 19
  22. 19. 11/16 Introduction to Ruby; Dynamic OOP; Duck Typing   summary   slides: pptx   pdf   pdf6up   code: rb
         we got through only slide 11; the rest moved to 11/18
  23. 20. 11/18 Blocks & Procs; Inheritance & Overriding   summary   slides: pptx   pdf   pdf6up   code: rb
         we got through only slide 12; the rest moved to 11/21
  24. 21. 11/21 Late Binding; OOP as a Racket pattern   summary   slides: pptx   pdf   pdf6up   code: rb   sml   rkt
         we got through only slide 12; the rest moved to 11/23
  25. 22. 11/23 Multiple Inheritance, Interfaces, Mixins   summary   slides: pptx   pdf   pdf6up   code: rb
         we got through only slide 10; the rest moved to 11/28
  26. 23. 11/28 OO vs. Functional Decomposition; Adding Operators & Variants; Double-Dispatch
         summary   slides: pptx   pdf   pdf6up   code:   stage 1:   sml   rb   java   full:   sml   rb   java
         we got through only slide 8; the rest moved to 11/30
  27. 24. 11/30 Racket Modules, Abstraction with Dynamic Types; Racket Contracts
         summary   slides: pptx   pdf   pdf6up   code (all rkt): non-modules   module   client   with-contracts   client-of-contracts
         we got through only slide 8; the rest moved to 12/2
  28. 25. 12/2 Subtyping for Records and Functions   summary   slides: pptx   pdf   pdf6up
         we got through only slide 15; the rest moved to 12/5
  29. 26. 12/5 Subtyping for OOP   summary   slides: pptx   pdf   pdf6up
         we got through only slide 11; the rest moved to 12/7
  30. 27. 12/7 Generics vs. Subtyping; Bounded Polymorphism   summary   slides: pptx   pdf   pdf6up   code: java   sml
  31. 28. 12/9 Course Victory Lap   slides: pptx   pdf   pdf6up
Sections

Section Materials

  1. 1. 9/29: Shadowing, Emacs, SML Mode, surprising syntax, error messages, function teaser   SML code
  2. 2. 10/6: type variables, equality types, type synonyms, basic pattern matching, exceptions   SML code
  3. 3. 10/13: more pattern matching, higher-order functions, teaser for closures, recursion challenges   SML starter code   SML solution code (including recursion challenges)
  4. 4. 10/20: SML documentation, currying and partial application, recursion challenges, zero-counting variety show   SML code
  5. 5. 10/27: Module review, exam review   SML code
  6. 6. 11/3: Thunk and promise review, streams   Racket code
  7. 7. 11/7 (lecture slot): Nesting lets/lambdas; SMELP, and SMELS (cons vs structs)   Racket code
  8. 8. 11/17: Ruby arrays, blocks, hashes, dynamic OO, docs   Ruby code
  9. 9. 12/1: Double dispatch, Visitor Pattern, the visitor pattern's dual for FP   Ruby code   SML code
  10. 10. 12/8: Final exam review, evaluations   review questions
Homeworks

Homework Assignments

Homework 0: on-line survey worth 0 points, "due" Friday September 30th

Dropbox for homework turn-in

Exams

Final: Tuesday December 13, 2:30-4:20
   unsolved   solved

Sample finals from previous offerings (some differences in syntax and topics)
   Sp11 unsolved   Sp11 solved   Sp08 unsolved   Sp08 solved   Wi08 unsolved   Wi08 solved

Midterm: Monday October 31, in class
   unsolved   solved

Sample midterms from previous offerings
   Sp11 unsolved   Sp11 solved   Sp08 unsolved   Sp08 solved   Wi08 unsolved   Wi08 solved

Software

Software Installation and Use

Setting up SML and emacs on lab machines or your personal machine

Setting up Racket and DrRacket on lab machines or your personal machine

Setting up Ruby, irb, and emacs on lab machines or your personal machine

Books+

Textbooks and Other Resources

While the other materials on this page (lectures, sections, homeworks, installation instructions) are designed to provide what you need for the course, the books/guides provide excellent alternate explanations and additional details. We will not follow them closely, but you may still find them valuable.

Elements of ML Programming, ML'97 Edition, Jeffrey D. Ullman, 1998.
 Check the errata page to avoid bugs.
 Approximately Chapters 2, 3.1-3.4, 5.1-5.5 (skip 5.2.5, 5.3.4, 5.4.4), 6.1-6.2, 7.1, 8.2, 8.5.5 overlap with the course material.

The Racket Guide
 Approximately Chapters 1-4.9.1 (skip 2.4.1-2.4.3, 3.5-3.12, 4.4.3, 4.4.4, 4.6.5), 5.1, 5.2, 6.1-6.5 (skip 6.3), 16.1-16.1.4 overlap with the course material. We might cover 10.1.

Programming with Ruby, Dave Thomas, 2005.
 Check the errata page to avoid bugs.
 Overlap with the course material is very roughly chapters 1-9 (or chapters 1-8 of the first edition), but not regular expressions and several other small topics.
 We will be using Ruby 1.8. While there are significant differences between 1.8 and 1.9 in the language, the 1.9 version of the book is still a fine resource if that's the one you happen to have.

In addition, there are many useful online resources for the languages we are using. In particular, effective use of any language involves leveraging existing libraries, which requires more library documentation than any class should cover. There are also many tutorials and guides that you may find useful.

Additional Emacs resources (beyond the basics):
  Emacs reference card (pdf)
  Emacs Reference Manual
  Emacs Wiki

Additional SML resources:
  www.smlnj.org (links to many things, including the next three resources)
  user's guide
  standard-library documentation
  tutorials, books, and documentation

Additional Racket resources:
  racket-lang.org, particularly the Documentation and Learning tabs

Additional Ruby resources:
  ruby-doc.org, including links for the library documentation and various books. You can even buy the t-shirt.
  Ruby home page
  list compiled by Stuart Reges for Spring 2010's CSE341, including lecture slides


Valid CSS! Valid XHTML 1.1