Skip to content

The First Word Decides

Exercise: 46k_shell · Thu Nov 12 · Length: 6:02 · Lecture: Week 12 · One match, and &mut dyn Out · Explainer: The First Word Decides

A narrated walk through the explainer, for after the Nov 10 lecture and before Thursday's session: a line becomes words, and the first word picks a handler. The video starts at the keys, typed under cargo run, and the line the given read loop hands on at Enter, then steps through an example script line by line: the line's bytes, its words as a start and a length, the handler the first word picks, and what that handler writes. A broken case follows, the whole line taken as the command, with what the test printed for it in a real run. The video ends on the given test, line by line, what you write, and what the test cannot see. It shows no solution code: only the line, its words, the shell's current directory and the example tree at each step, with example names, or the test's own.

Download the video (MP4, 7 MB) · Captions (WebVTT) · All six Week 12 videos