Write-once data: writing Perl like Haskell
By Aaron Crane (arc) from Edinburgh.pm, London.pm
Date: Saturday, 12 December 2015 11:30
Duration: 50 minutes
Target audience: Intermediate
Language: English
Tags: architecture concurrency design functional haskell immutability perl
Languages like Haskell and Idris don’t have “variables” in the same way that Perl does: once a name has been associated with a value, it has that same value immutably and forever. This approach is perhaps surprising, but it has some big advantages: it’s much easier to reason about what your program’s doing, especially for data that’s being accessed from multiple processes.
This talk offers a case study of a piece of real-world Perl software that scrapes rich, detailed information from web pages published by the Scottish and UK parliaments, and presents it to commercial customers. The software is designed around this idea of never changing data once it’s been assigned, and makes full use of that fact to promote highly concurrent operation. This turns out to be a fruitful approach to software design, even in a language like Perl, which has none of Haskell’s features for working with immutable data.
Attended by: Gianni Ceccarelli (dakkar), Tom Hukins, Lukas Mai (mauke), osfameron, Chris Jack, Pete Barlow, Job van Achterberg (jkva), Marco Fontani (mfontani), Anton Oussik, Smylers, Dagfinn Ilmari Mannsåker (ilmari), Borkur Gudjonsson, Anatolie Mazur (Mask), vytas, Filippo Biondi (fedelippo), Lance Wicks, o, Aaron Crane (arc), steve mynott (itz), Pavel Vodopyan, Eduard Wulff, Dinis Rebolo (drebolo), DrForr, Mihai Pop, David Wickens, Hugo Areias (hugoareias), Christopher Hanna (Chad), Katherine Spice, Daniel Collins (solemnwarning), James Mastros (theorbtwo), Andreas Specht (ac0v), André Walker, Victor Churchill, Brian Kelly, Michael Jemmeson (michael),