This page collects all course reference material by topic.

Contents:

General

Materials

  1. How to Program
  2. What’s in a Type
  3. When Things Happen

Exam Info

  1. Exam 1

By Topic

topic The Plan

← Tuesday, 28 January

Slides: ➊ plan.pdf ➍ plan-4up.pdf

How to Program

topic Racket Expressions and Bindings

← Tuesday, 28 January - Friday, 31 January

Slides: ➊ racket.pdf ➍ racket-4up.pdf

Code:

Reference: How to Program (Racket) notes up through Environments, Variables, and Bindings.

topic Functions

← Friday, 31 January

Slides: ➊ racket-functions.pdf ➍ racket-functions-4up.pdf

Code:

Reference: How to Program (Racket) notes sections

topic Pairs, Lists, and GC

← Tuesday, 4 February

Slides: ➊ racket-lists.pdf ➍ racket-lists-4up.pdf

Code:

Reference: How to Program (Racket) notes section Cons and Lists

topic Local Bindings and Scope

← Friday, 7 February

Slides: ➊ racket-let.pdf ➍ racket-let-4up.pdf

Code:

Reference: How to Program (Racket) notes section Local Bindings and Scope

topic First-class and Higher-order Functions

← Friday, 7 February - Tuesday, 11 February

Slides: ➊ racket-hof.pdf ➍ racket-hof-4up.pdf

Code:

Reference: How to Program (Racket) notes section First-class and Higher-order Functions

topic Tail Recursion

← Tuesday, 11 February - Friday, 14 February

Slides: ➊ racket-tail.pdf ➍ racket-tail-4up.pdf

Code:

topic Lexical Scope and Closures

← Friday, 21 February

Slides: ➊ racket-lexical-closures.pdf ➍ racket-lexical-closures-4up.pdf

Code:

topic Immutability and Referential Transparency

← Tuesday, 25 February

Slides: ➊ racket-immutable.pdf ➍ racket-immutable-4up.pdf

What’s in a Type

topic ML and Static Types

← Tuesday, 25 February

Slides: ➊ ml.pdf ➍ ml-4up.pdf

Reference: ML Summary, Part 1

Alternative: Programming in Standard ML, Ch. 2-6

topic Datatypes, Patterns, and Parametric Polymorphism

← Friday, 28 February - Tuesday, 3 March

Slides: ➊ ml-datatypes.pdf ➍ ml-datatypes-4up.pdf

Code:

Reference: ML Summary, Part 2

Alternative: Programming in Standard ML, Ch. 7-12, 16.

topic Patterns Everywhere

← Friday, 6 March

Slides: ➊ ml-patterns.pdf ➍ ml-patterns-4up.pdf

Code:

Reference: ML Summary, Part 2

Alternative: Programming in Standard ML, Ch. 7-12, 16.

topic Currying and Partial Application

← Friday, 6 March

Slides: ➊ ml-curry.pdf ➍ ml-curry-4up.pdf

Code:

Reference: ML Summary, Part 3

topic Restricted Mutable State

← Tuesday, 10 March

Slides: ➊ ml-ref.pdf ➍ ml-ref-4up.pdf

Reference: ML Summary, Part 3

topic Type Inference

← Tuesday, 10 March

Slides: ➊ ml-inference.pdf ➍ ml-inference-4up.pdf

Code:

Reference:

ML so far:

  • Programming in SML Ch. 2-13 (everything except ADTs); 18, 19, 20, 21, 22, 32-34. (Includes extra features/details we do not cover)
  • ML Summary notes, parts 1, 2, 3, 4

topic Abstract Types

← Tuesday, 31 March - Friday, 3 April

Slides: ➊ ml-adts.pdf ➍ ml-adts-4up.pdf

Code:

Reference:

Videos:

Two parts, in order:

  1. ML Structures, Signatures, and Abstract Types

    This set of videos is by Dan Grossman, University of Washington. Our course adapts several components of Dan's course (UW CSE 341). The material and perspective on this topic are quite similar to Ben's 251 lecture, slides, and code (above), though the typical CS 251 slides are organized slightly differently. See the Reference section above for slides that match closely to these videos. (Our ML Summary notes already match.)

    1. ▸ mp4 ▸ m4v captioned Modules for Namespace Management
    2. ▸ mp4 ▸ m4v captioned Signatures and Hiding Things
    3. ▸ mp4 ▸ m4v captioned A Module Example
    4. ▸ mp4 ▸ m4v captioned Signature for Our Example
    5. ▸ mp4 ▸ m4v captioned Signature Matching
    6. ▸ mp4 ▸ m4v captioned An Equivalent Structure
    7. ▸ mp4 ▸ m4v captioned Another Equivalent Structure
    8. ▸ mp4 ▸ m4v captioned Different Modules Define Different Types
  2. A Set ADT and Closures as Data Structures: ☰ yt playlist

    1. ▸ mp4 yt Abstract Types: A Set ADT
    2. ▸ mp4 yt Abstract Types: Implementing the Set ADT with Lists
    3. ▸ mp4 yt Abstract Types: Implementing the Set ADT with Closures

When Things Happen

topic Delayed Evaluation, Streams, Laziness

← Tuesday, 7 April - Friday, 10 April

Slides: ➊ ml-delay.pdf ➍ ml-delay-4up.pdf

Code:

Reference:

Videos: ☰ yt playlist

  1. ▸ mp4 yt Delayed Evaluation, Streams, Laziness: Delayed Evaluation with Thunks (emulating call-by-name)
  2. ▸ mp4 yt Delayed Evaluation, Streams, Laziness: Lazy Evaluation with Promises (emulating call-by-need)
  3. ▸ mp4 yt Delayed Evaluation, Streams, Laziness: Infinite Sequences with Streams

topic Parallelism

← Tuesday, 14 April

Slides: ➊ parallelism.pdf ➍ parallelism-4up.pdf

Code:

Reference: Programming in Manticore, a Heterogenous Parallel Functional Language, sections 2.3, 4, 5.3. (Skim 1)

Videos: ☰ yt playlist

  1. ▸ mp4 yt Parallelism: Parallelism vs. Concurrency
  2. ▸ mp4 yt Parallelism: Data Parallelism in Manticore
  3. ▸ mp4 yt Parallelism: Task Parallelism in Manticore
  4. ▸ mp4 yt Parallelism: Futures

topic Concurrency

← Friday, 17 April - Tuesday, 21 April

Slides: ➊ concurrency.pdf ➍ concurrency-4up.pdf

Code:

Reference:

Videos: ☰ yt playlist

  1. ▸ mp4 yt Concurrency: CML Basics
  2. ▸ mp4 yt Concurrency: Event Ordering
  3. ▸ mp4 yt Concurrency: First-Class Events and Event Combinators

Why a Broader PL Mindset

topic Static vs. Dynamic Typing

← Friday, 24 April

Slides: ➊ ml-racket-static-dynamic.pdf ➍ ml-racket-static-dynamic-4up.pdf

Reference:

Videos:

This set of videos is by Dan Grossman, University of Washington. Our course adapts several components of Dan’s course (UW CSE 341). The material and perspective on this topic are quite similar to Ben’s 251 lecture, slides, and code (above), though the typical CS 251 slides are organized slightly differently. See the Reference section above for slides and notes that match closely to these videos.

  1. ▸ mp4 ▸ m4v captioned ML Versus Racket
  2. ▸ mp4 ▸ m4v captioned What is Static Checking?
  3. ▸ mp4 ▸ m4v captioned Soundness and Completness
  4. ▸ mp4 ▸ m4v captioned Weak Typing
  5. ▸ mp4 ▸ m4v captioned Static Versus Dynamic Typing Part One
  6. ▸ mp4 ▸ m4v captioned Static Versus Dynamic Typing Part Two

topic Dynamic Dispatch

← Tuesday, 28 April

Slides: ➊ oo-dispatch.pdf ➍ oo-dispatch-4up.pdf

Reference:

Videos: ☰ yt playlist

  1. ▸ mp4 yt Dynamic Dispatch: Dynamic Dispatch (1/2)
  2. ▸ mp4 yt Dynamic Dispatch: Dynamic Dispatch (2/2)
  3. ▸ mp4 yt Dynamic Dispatch: Dynamic Dispatch vs. Lexical Scope and Closed vs. Open Extensibility

topic FP vs. OO Decomposition

← Tuesday, 28 April

Slides: ➊ oo-decomposition.pdf ➍ oo-decomposition-4up.pdf

Code:

Reference:

Videos:

This set of videos is by Dan Grossman, University of Washington. Our course adapts several components of Dan’s course (UW CSE 341). The material and perspective on this topic are quite similar to Ben’s 251 lecture, slides, and code (above), though the typical CS 251 slides are organized slightly differently. See the Code and Reference sections above for code, slides, and notes that match closely to these videos.

  1. ▸ mp4 ▸ m4v captioned OOP vs. Functional Decompositions
    • (Note: A Ruby section extends from 6:45 to 10:00, where a quick recap in Java is given. Feel free to follow the discussion without trying to follow the Ruby features, or just skip to the Java part.)
  2. ▸ mp4 ▸ m4v captioned Adding Operations or Variants

There’s more in this direction if you are curious, but these are the basics I would like you to see.

topic Deductive Programming

← Friday, 1 May

Slides: ➊ deductive.pdf ➍ deductive-4up.pdf

Code:

Reference: