0424 (Friday, Week 3)

Edits after class look like this.

Q&A

Questions, comments, complaints?

Evaluating Recursive Functions; Persistence

"Stack space" is memory dedicated to managing any outstanding function calls during evaluation.

"Heap space" is memory dedicated to the data created during evaluation.

In general, a recursive function can quickly exhaust the stack space, so a naive implementation of an evaluator/compiler will run out of stack space very quickly. Because of that, Elm (and most other functional languages) implement an optimization for a particular class of functions, called "tail-recursive" functions, which get compiled to loops — no (recursive) function calls, so no additional stack frames. We'll talk about tail recursion in more detail later in the course.

Projects with Web Communication

Firebase is an option that may be simple to use. We'll post a tutorial if the electorate so desires (exercise your civic duty on Piazza).

Projects with Visualization

There are many interesting possibilities for visualizing the performance of data structures, using Vega-Lite or Vega or line-charts to draw charts.

Exercises

We'll use breakout rooms for ~15 minutes to discuss potential course project ideas.

Before We Meet Again

  • Read Testing
  • Start HW3
  • Prepare any topics for Q&A next time