Hazel: Live and Direct Functional Programming with Holes
Live programming environments aim to provide programmers (and sometimes audiences) with continuous feedback about a program’s behavior as it is being edited. The problem is that programming languages typically assign meaning only to programs that are \emph{complete}, i.e. syntactically well-formed and free of type and binding errors. Consequently, the live feedback presented to the programmer suffers from temporal or perceptive gaps.
The Hazel live functional programming environment addresses this “gap problem” from first principles: Hazel assigns rich static and dynamic meaning to every incomplete program that the programmer can construct using Hazel’s language of structured edit actions. An incomplete program is represented as an expression with \emph{holes}, where empty holes stand for missing expressions or types, and non-empty holes operate as membranes around type inconsistencies. Rather than aborting evaluation when encountering a hole instance, our approach records the environment around the hole instance – forming a hole closure – and then evaluates “around” it. These hole closures enable a fill-and-resume operation that avoids the need to restart evaluation after edits that amount to hole filling. Furthermore, various editor services can report information from hole closures to help the programmer decide how to fill the corresponding holes; we describe two such examples in this paper. First, we discuss Hazel’s live context inspector, which allows the programmer to explore values from relevant hole closures when the cursor is on a hole in the program. Second, we discuss early work on live palettes – user interfaces, which can themselves contain holes, that the programmer can directly manipulate to fill an expression hole. A live palette can use the closures associated with the hole being filled to provide specialized, concrete feedback about the dynamic consequences of the programmer’s choices. Taken together, the result is a substantially more live and direct typed functional programming experience.
Tue 6 NovDisplayed time zone: Guadalajara, Mexico City, Monterrey change
13:30 - 15:00 | |||
13:30 30mTalk | Espalier: a structured spreadsheet tool for end-user development of organizational applications LIVE Media Attached | ||
14:00 30mTalk | Hazel: Live and Direct Functional Programming with Holes LIVE Cyrus Omar University of Chicago, Ian Voysey Carnegie Mellon University, Matthew Hammer University of Colorado, Boulder, Ravi Chugh University of Chicago Pre-print | ||
14:30 30mTalk | REPLugger: a pleasant and scalable live coding editor LIVE Glen Chiacchieri Independent Researcher |