~/talk

Down the Oregon Trail with Functional C#

Talkat NDC Oslo 2022 · 2022-09-26..09-30· [c-sharp, functional-programming]
slides:none on file

Recreates the 1975 Oregon Trail by rewriting ~5k lines of HP Time‑Share BASIC into modern C# and ships a playable console version; enforces near 100% unit test coverage and wraps IO with discriminated unions so inputs are Maybe<string> / Result types; models game State as immutable record types, injects time and RNG services for deterministic tests, reproduces the typing-based shooting minigame, and documents compromises (one try/catch, a few while loops instead of tail-call optimization). Gameplay works and is substantially shorter and more testable than the original.

AI-written summary · about

  1. 0:00Introduction
  2. 5:21What is functional programming
  3. 8:53Functional C# compromises
  4. 11:21Oregon Trail history
  5. 17:17Original gameplay and code
  6. 23:00Functional input handling
  7. 33:14Inventory with immutability
  8. 41:18Game state recursion
  9. 44:48Shooting minigame logic
  10. 47:33Trail random events
  11. 51:44Legacy features and future
  12. 54:33Book and resources
  13. 59:10Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.