Jump to content

Impromptu (programming environment)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Pygy (talk | contribs) at 09:20, 14 June 2011 (Illustration: Sample performance. (restored the Study in Keith video).). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

This article is about the programming language. For other uses, see Impromptu (disambiguation).
Impromptu
ParadigmFunctional, multi-paradigm
Designed byAndrew Sorensen
First appeared2005
Stable release
2.5
Typing disciplineDynamic & static
OSMac OS X
Websitehttp://impromptu.moso.com.au/

Impromptu is a Mac OS X programming environment for live programming. Impromptu is a Scheme language environment, which is a member of the Lisp family of languages. Impromptu's Scheme Interpreter was initially built from the TinyScheme 1.35 baseline, but it has been substantially modified since.

Description

The environment allows to make changes to a program at runtime, so variables and functions may be redifined and the changes take effect immediately. A programmer can also create and schedule code for future execution, as well as data events such as notes and graphics objects. Once an event is scheduled, execution continues. Looping is performed by using an idiom called "temporal recursion" which works by having a function asynchronously schedule a future call to itself as its final action.

The library allows to communicate with Audio Units for audio synthesis, and to graphics layers such as QuickTime, Quartz, Core Image, OpenGL for video composition. Code written in Objective-C can be called from the editor, and also Objective-C frameworks can perform calls to the Scheme interpreter. It includes a static type inferencing compiler for a minimal functional language similar to Scheme, but it is designed for dynamic systems programming. The compiler uses LLVM for backend compilation to x86.

Sample Performance

A Study in Keith is a live coding performance in Impromptu by Andrew Sorensen. For the first two minutes, the performer writes the program that will produce the introduction of the piece. From then on, he modifies the code on the fly in order to evolve the composition.

References

Papers by Andrew Sorensen

Independent academic sources referencing Impromptu

Other sources

See also