
CS 313 - Fall 2021
Programming Languages
- Professor: Daniel Scharstein
- Course information
- Students
- Zoom link (requires VPN from off campus)
- Tutoring Tue 12/7, 8-9pm (206); Thu 12/9, 8-9pm (202)
Announcements
Homework
- Homework 0, due Tuesday 9/14. Results.
- Homework 1, due Wednesday 9/22. Solutions. Stories.
- Homework 2, due Wednesday 9/29. Solutions.
- Homework 3, due Wednesday 10/6. Solutions.
- Homework 4, due Wednesday 10/13. October Madness.
- Homework 5, due Wednesday 10/20 and Wednesday 10/27. Solutions.
- Homework 6, due Friday 11/5. Solutions.
- Homework 7, due Friday 11/12. Solutions.
- Homework 8, due Friday 11/19. Solutions.
- Homework 9, due Wednesday 12/1. Solutions.
- Homework 10, due Friday 12/10.
Lectures & Readings
- 9/13 - Course info, introduction (Ch 1)
- 9/15 - Syntax vs. semantics, context-free grammars, expression trees, pre-/in-/postfix (Ch 2, #YOCO)
- 9/17 - Expression grammars, history of programming languages (Ch 2.5, Ch 1)
- 9/20 - Pascal: basics, types, arrays (Ch 3.1-4, 4.1-4, 15.1, Fig 3.3, Pascal examples, Pascal tutorial, Pascal vs. C)
- 9/22 - Pascal: types, records, pointers (Ch 4.1-4, 4.7, Fig 4.1, Pascal examples)
- 9/24 - Pascal pointers, var parameters (Ch 4.7, 5.1-2, Pascal examples)
- 9/27 - Parameter passing, scope (Ch 5.2-4)
- 9/29 - C: functions, pointers, arrays (Ch 5.3-4, 4.8, 15.2, C examples)
- 10/1 - C structs; activation records (Ch 5.5-7, Figs 5.25, 5.26, C examples)
- 10/4 - Intro to OO programming and Smalltalk (Ch 7-7.3, 7.7, 15.4, Squeak, by Example)
- 10/6 - More Smalltalk, blocks (Ch 7.7, 15.4; A Little Smalltalk Ch 1-3, Squeak terse guide)
- 10/8 - Defining Smalltalk methods (Ch 7.7, 15.4; SbE 1, 3, 4, 5; examples)
- 10/11 - Defining Smalltalk classes (Ch 7.7-8; SbE 2; MyQueue)
- 10/13 - Smalltalk classes cont'd (Ch 7.7-8; IntList inital, complete)
- 10/15 - HW 5.1, OO programming in Python,
examples
10/18 - [Fall Break]
10/20 - Midterm review, study guide
10/21 - Midterm exam. Solutions. - 10/22 - Intro to Ruby (Programming Ruby, Ruby tutorials, TryRuby)
- 10/25 - More Ruby (Ruby examples, Hailstone video)
- 10/27 - Functional programming, intro to Scheme (Ch 10.1, 15.6, R5RS, pdf)
- 10/29 - Scheme: lists, car, cdr, cons, quoting, list functions (Ch 10.2-3, 10.6, 15.6)
- 11/1 - Scheme: more functions, tail recursion (Ch 10.1-3, Scheme examples)
- 11/3 - Scheme: higher-order functions, lambda (Ch 10.1, 10.6, higherorder.rkt numderiv.rkt)
- 11/5 - Scheme: let, symbolic differentiation (Ch 10.4-5, deriv.rkt)
- 11/8 - Scheme wrapup: map, reduce, fold; evaluation order; intro to ML (Ch 8.4, 15.5; ML Ch 2)
- 11/10 - ML: tuples, lists, functions (Ch 9.1-2, 9.5; ML Ch 2, Ch 3.1)
- 11/12 - ML: let, function definitions by cases, datatypes (Ch 9.2, 9.5; ML Ch 3.4, 3.3; sample.sml)
- 11/15 - ML: odds & ends, higher-order functions, Curried functions (Ch 9.3)
- 11/17 - Functional programming in Python, logic programming, intro to Prolog (Ch 11.1-2)
- 11/19 - Prolog: family tree, arithmetic, Pete's puzzle, lists (Ch 11.2-3)
- 11/22 - Prolog: list functions, tail recursion, binary search tree
(Ch 11.3-4)
11/24 - [Thanksgiving break] - 11/29 - Unification, Prolog control, rule and goal order (Ch 11.2, 11.5)
- 12/1 - Prolog: cut, negation (Ch 11.6)
- 12/3 - Searching with Prolog and Scheme
- 12/6 - Intro to Haskell (Learn You a Haskell)
- 12/8 - More Haskell (examples)
- 12/10 -
Course summary, final exam info and study guide
Links
- CS 313 compiler/interpreter installation instructions
- Online Prolog book: Learn Prolog Now!
- Teach Yourself Programming in Ten Years by Peter Norvig
- PL popularity lists: IEEE Spectrum, stackoverflow, TIOBE, PYPL, RedMonk
- If programming languages were cars, boats, Harry Potter characters, running shoes, .....
- "99 Bottles of Beer" in a lot of different programming languages
- Esolang, the esoteric programming languages wiki