Super 8 Languages for Making Movies (Functional Pearl)
Super 8 Languages for Making Movies (Functional Pearl) LEIF ANDERSEN, STEPHEN CHANG, MATTHIAS FELLEISEN, PLT @ Northeastern University, United States of America The Racket doctrine tells developers to create languages (as libraries) to narrow the gap between the terminol- ogy of a problem domain and general programming constructs. This pearl illustrates this doctrine with the creation of a relatively simple domain-specific language for editing videos. To produce the video proceedings of a conference, for example, video professionals traditionally use łnon-linearž GUI editors to manually edit each talk, despite the repetitive nature of the process. As it turns out, the task of video editing naturally splits into a declarative phase and an imperative rendering phase at the end. Hence it is natural to create a functional-declarative language for the first phase, which reduces a lot of manual labor. The implementation of this user-facing DSL, dubbed Video, utilizes a second, internal DSL to implement the second phase, which is an interface to a general, low-level C library. Finally, we inject type checking into our Video language via another DSL that supports programming in the language of type formalisms. In short, the development of the video editing language cleanly demonstrates how the Racket doctrine naturally leads to the creation of language hierarchies, analogous to the hierarchies of modules found in conventional functional languages. CCS Concepts: • Software and its engineering Ñ Functional languages; Preprocessors; Macro lan- guages; Specification languages; Designing software; • Information systems Ñ Multimedia content cre- ation;• Applied computing Ñ Media arts;• Human-centered computing Ñ Graphical user interfaces; Additional Key Words and Phrases: Domain-Specific Language, Declarative Languages, Video Editing, Syntax Elaboration, Language Oriented Design, Movies, Integrated Development Environment ACM Reference Format: Leif Andersen, Stephen Chang, Matthias Felleisen.
[Show full text]