A Google TechTalk, July 23, 2016, presented by David Luposchainsky ABSTRACT: Executing lazy functional programs is often met with suspicion, as something processors somehow don't do “naturally”. In this talk, I will show just how wrong such statements are. We will take a tour through a few well-known Haskell programs in their STG representation. STG is a tiny functional language used in GHC's compiler backend. What makes STG particularly interesting is it is feels close to both Haskell and the metal, and allows us to watch how Haskell programs are executed step-by-step. Why does `foldl (+) 0` overflow, and is it the stack or the heap? How are things pushed onto the stack or allocated on the heap anyway, and what cleans them up again? How does laziness work? Why are unboxed values often faster, how does a list look like in memory, how efficient is the popular Quicksort-inspired example algorithm really? The goal of the talk is to introduce the audience into the operational semantics of Haskell, by executing a couple of small programs everyone should be familiar with, and discussing what happens during execution. The topic is suitable for audiences of all skill levels. https://wiki.haskell.org/ZuriHac2016
Get notified about new features and conference additions.