CSE341: Programming Languages, Summer 2019
Announcements
Announcements
- [8/19/19] Please fill out the Course Evaluation to provide your feedback to the course staff.
- [8/14/19] Sample final exams posted.
- [8/12/19] Homework 6 and Homework 7 posted.
Homework 6 is optional. It will be worth some extra credit, but should probably not
be prioritized over completing Homework 7 or preparing for the final exam. See the spec for details.
- [8/5/19] Homework 5 posted.
- [7/31/19] Midterm exam and solutions posted.
- [7/29/19] Homework 4 posted.
- [7/21/19] There will be an optional midterm exam review session on Tuesday, July 23 from 12:00pm-2:00pm
in LOW 101.
A large part of this session will involve going over the Fall 2017 midterm
exam. It is HIGHLY RECOMMENDED that you work through that exam before the session.
- [7/18/19] Sample midterm exams posted.
- [7/11/19] Homework 3 posted.
- [7/3/19] Brett will not hold office hours on July 5 as he is out of town. Instead, Dan Grossman will
hold office hours from 1:00-2:00pm in CSE2 309.
- [7/3/19] Section for July 4 is cancelled due to the university holiday.
- [7/3/19] Homework 2 posted.
- [6/26/19] Homework 1 posted.
- [6/24/19] Homework 0 posted.
- [6/24/19] Welcome to CSE 341!
Course Info
Course Information
Lecture: Monday, Wednesday, Friday 12:00-1:00 ECE 037
Section: Thursday 12:00-1:00, MOR 230 (Brendan)
Office Hours:
Brett: Fridays, 2:00pm-3:00pm, CSE 446
Brendan: Mondays, 11:00am-12:00pm, CSE2 152
Svetoslav: Wednesdays, 1:00pm-2:00pm, CSE2 152
Materials
Course Materials
This list should accurately reflect the past, but may not accurately predict the future.
Please allow at least 24 hours after class for any changes or new materials to be posted.
- Unit 1: ML Functions, Tuples, Lists, and More
Reading Notes
Videos
- L1. Course Mechanics, ML Variable Bindings (Jun 24)
slides:
pptx
pdf
pdf6up
code: sml
- L2. Functions, Pairs, Lists (Jun 26 - Jun 28)
slides:
pptx
pdf
pdf6up
code: sml
- S1. Emacs, SML Mode, Shadowing, Error Messages (Jun 27)
slides:
pptx
pdf
code:
errors
errors fixed
- L3. Local Bindings, Options, Benefits of No Mutation (Jun 28 - Jul 1)
slides:
pptx
pdf
pdf6up
code: sml
-
- Unit 2: Datatypes, Pattern Matching, Tail Recursion, and More
Reading Notes
Videos
- L4. Records, Datatypes, Case Expressions (Jul 3)
slides:
pptx
pdf
pdf6up
code: sml
- L5. More Datatypes and Pattern Matching (Jul 5)
slides:
pptx
pdf
pdf6up
code: sml
- S2. Type Synonyms, Polymorphism, & More (N/A)
Cancelled due to holiday. Content covered in S1 and L5.
- L6. Nested Pattern-Matching, Exceptions, Tail Recursion (Jul 8)
slides:
pptx
pdf
pdf6up
code: sml
-
- Unit 3: First-Class Functions and Closures
Reading Notes
Videos
- L7. First-Class Functions (Jul 10)
slides:
pptx
pdf
pdf6up
code: sml
- S3. Pattern Matching and Tail Recursion (Jul 11)
slides:
pptx
pdf
code:
code
- L8. Lexical Scope and Function Closures (Jul 12)
slides:
pptx
pdf
pdf6up
code: sml
- L9. Function-Closure Idioms (Jul 15)
slides:
pptx
pdf
pdf6up
code: sml
-
- Unit 4: ML Modules, Type Inference, Equivalence, and More
Reading Notes
Videos
- L10. ML Modules (Jul 17)
slides:
pptx
pdf
pdf6up
code: sml
- S4. Higher-Order Functions, Closures (Jul 18)
slides:
pptx
pdf
code:
starter code
completed code
- L11. Type Inference (Jul 19)
slides:
pptx
pdf
pdf6up
code: sml
- L12. Equivalence (Jul 19 - Jul 22)
slides:
pptx
pdf
pdf6up
-
- S5. Midterm Review (Jul 25)
-
- Unit 5: Racket, Delaying Evaluation, Memoization, Macros
Reading Notes
Videos
- L13. Racket Introduction (Jul 22 - Jul 29)
slides:
pptx
pdf
pdf6up
code: rkt
- L14. Thunks, Laziness, Streams, Memoization (Jul 29 - Jul 31)
slides:
pptx
pdf
pdf6up
code: rkt
- L15. Macros (Material covered in S6)
slides:
pptx
pdf
pdf6up
code: rkt
- S6. Delayed Evaluation, Thunks and Streams, Macros (Aug 1)
slides:
pptx
pdf
code:
rkt
-
- Unit 6: Structs, Implementing Languages, Static vs. Dynamic Typing
Reading Notes
Videos
- L16. Datatype-Style Programming With Lists or Structs (Aug 2)
slides:
pptx
pdf
pdf6up
code: rkt
sml
- L17. Implementing Languages Including Closures (Aug 5)
slides:
pptx
pdf
pdf6up
code: rkt
- L18. Static vs. Dynamic Typing (Aug 7)
slides:
pptx
pdf
pdf6up
- S7. Legal ASTs, Macros as Functions, and More (Aug 8)
slides:
pdf
code:
rkt
-
- Unit 7: Ruby, Object-Oriented Programming, Subclassing
Reading Notes
Videos
- L19. Introduction to Ruby and OOP (Aug 9 - Aug 12)
slides:
pptx
pdf
pdf6up
code: lec19_silly.rb
lec19_example.rb
- L20. Arrays & Such, Blocks & Procs, Inheritance & Overriding (Aug 12)
slides:
pptx
pdf
pdf6up
code: rb
Some of the material in L20 will be covered in S8 instead
- L21. Dynamic Dispatch Precisely, and Manually in Racket (Aug 14)
slides:
pptx
pdf
pdf6up
code: rb
sml
rkt
- S8. Ruby arrays, hashes, ranges, blocks, and more (Aug 15)
slides:
pdf
code:
rb
-
- Unit 8: Program Decomposition, Mixins, Subtyping, and More
Reading Notes
Videos
- L22. OOP vs. Functional Decomposition; Adding Operators & Variants; Double-Dispatch (Aug 14 - Aug 16)
slides:
pptx
pdf
pdf6up
code stage A:
sml
rb
java
code stage B:
sml
rb
java
code stage C:
sml
rb
java
- L23. Multiple Inheritance, Mixins, Interfaces, Abstract Methods (Aug 16 - Aug 19)
slides:
pptx
pdf
pdf6up
code: rb
- L24. Subtyping (not covered)
slides:
pptx
pdf
pdf6up
- L25. Subtyping for OOP; Comparing/Combining Generics and Subtyping (not covered)
slides:
pptx
pdf
pdf6up
-
- L26. Course Victory Lap (Aug 21)
slides:
pptx
pdf
pdf6up
-
- S10. Final Exam Review
Homework
Homework Assignments
Turn in assignments (exception HW0) via Gradescope
-
Homework 0 (on-line survey worth 0 points), “due” Friday June 28, 11:59PM
-
-
Homework 1, due Friday, July 5, 11:59PM
-
-
Homework 2, due Friday, July 12, 11:59PM
- hw2.zip (contains 10 files, only 2-3 of which you need to modify)
-
-
Homework 3, due Friday, July 19, 11:59PM
-
-
Homework 4, due Monday, August 5, 11:59PM
-
-
Homework 5, due Monday, August 12, 11:59PM
-
-
Homework 6 (OPTIONAL), due Friday, August 16, 11:59PM
-
-
Homework 7, due Monday, August 19, Tuesday, August 20, 11:59PM
Links
Links to Other Resources
The course materials on this page (lectures, sections, homeworks,
installation instructions, videos) are designed to provide what you
need for the course except for some details that you can look up in
standard-library documentation or users' guides for particular
languages. Links for such information is below. We also provide
links to useful books and tutorials that provide alternate
explanations. We will not follow any textbooks closely, but you may
still find them useful. Suggestions for additional links are
welcome.
SML resources:
www.smlnj.org (links to many things, including the next three resources)
user's guide
standard-library documentation
tutorials, books, and documentation
Elements of ML Programming, ML'97 Edition,
Jeffrey D. Ullman, 1998.
This is a textbook that takes a different approach but does cover some of the same material.
Check the errata page to avoid bugs.
Racket resources:
The Racket Guide
racket-lang.org, particularly the Docs button
Ruby resources:
Programming Ruby 1.9 & 2.0: The Pragmatic Programmers' Guide, Dave Thomas et al.
Check the errata page to avoid bugs.
ruby-doc.org
Ruby home page