CMPT 383 Lecture Notes

  1. Course Introduction [“Course Introduction” slides]
    1. This Course [This Course slides]
    2. Topics (1) [Topics (1) slides]
    3. Overall Goals [Overall Goals slides]
    4. Grades [Grades slides]
    5. Weekly Exercises [Weekly Exercises slides]
    6. Assignments [Assignments slides]
    7. Exams [Exams slides]
    8. References [References slides]
    9. Expectations [Expectations slides]
    10. What is a program? [What is a program? slides]
    11. Imperative Programming [Imperative Programming slides]
    12. Declarative Programming [Declarative Programming slides]
  2. Functional Programming & Haskell [“Functional Programming & Haskell” slides]
    1. Haskell [Haskell slides]
    2. Haskell Basics [Haskell Basics slides]
    3. Haskell Functions [Haskell Functions slides]
    4. Pattern Matching [Pattern Matching slides]
    5. Conditionals [Conditionals slides]
    6. Repetition [Repetition slides]
    7. List Comprehensions [List Comprehensions slides]
    8. Let and Where [Let and Where slides]
    9. Recursion [Recursion slides]
    10. Isn't Recursion Slow? [Isn't Recursion Slow? slides]
    11. Tail Recursion [Tail Recursion slides]
    12. Creating Tail Recursion [Creating Tail Recursion slides]
    13. Aside: C and Tail Recursion [Aside: C and Tail Recursion slides]
  3. Haskell: Types & Functions [“Haskell: Types & Functions” slides]
    1. Functions and Operators [Functions and Operators slides]
    2. Parts of Lists [Parts of Lists slides]
    3. More List Processing [More List Processing slides]
    4. Haskell Types [Haskell Types slides]
    5. Type Classes [Type Classes slides]
    6. Partially-Applied Functions [Partially-Applied Functions slides]
    7. Curried Functions [Curried Functions slides]
    8. Manipulating Functions [Manipulating Functions slides]
    9. Lambda Expressions [Lambda Expressions slides]
  4. Haskell: Expression Evaluation [“Haskell: Expression Evaluation” slides]
    1. Assignment 1 [Assignment 1 slides]
    2. Lazy Evaluation [Lazy Evaluation slides]
    3. Controlling Laziness [Controlling Laziness slides]
    4. Function Application [Function Application slides]
    5. Pure Functions [Pure Functions slides]
    6. Concurrent Programming [Concurrent Programming slides]
    7. Monads [Monads slides]
    8. Monad: Random Numbers [Monad: Random Numbers slides]
    9. Haskell Tips [Haskell Tips slides]
    10. Functional Programming Context [Functional Programming Context slides]
    11. Functional + Imperative [Functional + Imperative slides]
  5. What Do Processors Do? [“What Do Processors Do?” slides]
    1. What Does A Programming Language Do? [What Does A Programming Language Do? slides]
    2. What Does A Compiler Do? [What Does A Compiler Do? slides]
    3. What Do Processors Do? [What Do Processors Do? slides]
    4. Pipelines [Pipelines slides]
    5. SIMD [SIMD slides]
    6. Multiple Cores [Multiple Cores slides]
    7. Memory Cache [Memory Cache slides]
    8. Summary [Summary slides]
  6. Language Implementations [“Language Implementations” slides]
    1. Language Choice [Language Choice slides]
    2. Compilers & Interpreters [Compilers & Interpreters slides]
    3. Virtual Machines [Virtual Machines slides]
    4. Compiler Optimization [Compiler Optimization slides]
    5. Just-In-Time Compilation [Just-In-Time Compilation slides]
    6. Language Implementations [Language Implementations slides]
    7. A Silly Benchmark [A Silly Benchmark slides]
  7. Languages: Types & Memory [“Languages: Types & Memory” slides]
    1. Static/Dynamic Typing [Static/Dynamic Typing slides]
    2. Static/Dynamic Binding [Static/Dynamic Binding slides]
    3. Type Inference [Type Inference slides]
    4. Duck Typing [Duck Typing slides]
    5. Type Checking [Type Checking slides]
    6. Mutable/Immutable Data [Mutable/Immutable Data slides]
    7. Memory Management [Memory Management slides]
    8. Managing Memory [Managing Memory slides]
    9. Manual Memory Mgmt. [Manual Memory Mgmt. slides]
    10. Garbage Collection [Garbage Collection slides]
    11. First-Class Functions [First-Class Functions slides]
    12. Closures [Closures slides]
    13. Callbacks [Callbacks slides]
    14. Coroutines [Coroutines slides]
  8. Languages & Concurrency [“Languages & Concurrency” slides]
    1. Concurrent Programming [Concurrent Programming slides]
    2. Threads & Processes [Threads & Processes slides]
    3. Kernel/User Threads [Kernel/User Threads slides]
    4. Thread Communication [Thread Communication slides]
    5. Language Concurrency [Language Concurrency slides]
    6. Concurrency Tools [Concurrency Tools slides]
  9. Language Productivity [“Language Productivity” slides]
    1. Programmer Efficiency [Programmer Efficiency slides]
    2. Library Availability [Library Availability slides]
    3. High- vs Low-Level [High- vs Low-Level slides]
    4. Programming Paradigm [Programming Paradigm slides]
    5. Language Features [Language Features slides]
  10. Concurrent Programming & Go [“Concurrent Programming & Go” slides]
    1. Go [Go slides]
    2. Language Basics [Language Basics slides]
    3. Variables [Variables slides]
    4. Functions [Functions slides]
    5. Conditionals [Conditionals slides]
    6. Loops [Loops slides]
    7. Structs [Structs slides]
    8. Structs as Classes [Structs as Classes slides]
    9. Types [Types slides]
    10. Arrays and Slices [Arrays and Slices slides]
  11. Goroutines & Channels [“Goroutines & Channels” slides]
    1. Goroutines [Goroutines slides]
    2. Channels [Channels slides]
    3. Channel Range [Channel Range slides]
    4. Buffered Channels [Buffered Channels slides]
    5. Channel Select [Channel Select slides]
    6. Concurrency Plan [Concurrency Plan slides]
  12. Go Structs [“Go Structs” slides]
    1. Pointers [Pointers slides]
    2. Struct Pointers [Struct Pointers slides]
    3. Pass by Value [Pass by Value slides]
    4. References [References slides]
    5. Type Definitions [Type Definitions slides]
    6. Interfaces [Interfaces slides]
    7. Implementing Interfaces [Implementing Interfaces slides]
    8. Common Interfaces [Common Interfaces slides]
    9. The Empty Interface [The Empty Interface slides]
    10. Inheritance [Inheritance slides]
    11. Handling Errors [Handling Errors slides]
  13. Go Concurrency Patterns [“Go Concurrency Patterns” slides]
    1. Goroutines as Coroutines [Goroutines as Coroutines slides]
    2. WaitGroups [WaitGroups slides]
    3. Parallel Mapping [Parallel Mapping slides]
    4. Divide and Conquer [Divide and Conquer slides]
    5. Concurrent Wrap-Up [Concurrent Wrap-Up slides]
  14. Logic Programming & Prolog [“Logic Programming & Prolog” slides]
    1. Predicates [Predicates slides]
    2. Rules [Rules slides]
    3. Searching [Searching slides]
    4. Search Limits [Search Limits slides]
    5. Conclusion [Conclusion slides]
  15. Languages Matter [“Languages Matter” slides]
    1. Domain-Specific Languages [Domain-Specific Languages slides]
    2. Domain-Specific Libraries [Domain-Specific Libraries slides]
    3. Languages Don't Matter [Languages Don't Matter slides]
    4. Mixing Languages [Mixing Languages slides]
    5. Conclusion [Conclusion slides]

Course home page.

Schedule

WeekLecture HourDateStarting Point
11Sept 5Intro
12Sept 7Functional Programming: Haskell
23Sept 10Pattern Matching
24Sept 12Repetition
25Sept 14Isn't Recursion Slow?
36Sept 17Parts of Lists
37Sept 19Haskell Types
38Sept 21Curried Functions
49Sept 24Controlling Laziness
410Sept 26Concurrent Programming
411Sept 28Monad Example: Random Numbers
512Oct 1Functional + Imperative
513Oct 3Processors: SIMD
514Oct 5Language Choice
6Oct 8Thanksgiving holiday 🦃
615Oct 10Compiler Optimization
616Oct 12Languages: Types & Memory
717Oct 15Type Inference
718Oct 17Memory Management
719Oct 19First-Class Functions
820Oct 22Coroutines
821Oct 24Kernel/User Threads
822Oct 26midterm exam
923Oct 29no lecture
924Oct 31Language Productivity
925Nov 2Concurrent Programming & Go
1026Nov 5Go functions: defer
1027Nov 7Array Slices
1028Nov 9Channel Select
11Nov 12Remembrance Day holiday 🎖
1129Nov 14Pass by Value
1130Nov 16Interfaces
1231Nov 19Common Interfaces
1232Nov 21WaitGroups
1233Nov 23Logic Programming & Prolog
1334Nov 26no lecture
1335Nov 28Languages Matter
1336Nov 30no lecture
1437Dec 3no lecture