Literate Programming Workshop
It’s History
The Literate Programming Workshop (LPW) is a piece of Macintosh software that I developed around 1990. It uses MacApp 2.0 and the System 7 APIs, is written in Object Pascal and compiled to 68000 object code, and was meant to be used with the Macintosh Programmer’s Workshop. People old enough to remember these technologies know they’re all long dead. However, a bit of work on my side and lots of work on Apple’s side kept LPW running even on Mac OS X – as long as that ran on a PowerPC chip. Intel-based Macs don’t have a 68000 emulator and therefore can’t run LPW.
The Short...
LPW is a Macintosh environment for the integrated development of program source text and documentation in combined documents. It consists of a WYSIWYG word processor based on a style sheet approach, a mechanism to extract parts of the text in a document, and a project management system that handles multi-document projects. The system is designed to be used in conjunction with the Macintosh Programmer’s Workshop (MPW): It prepares raw source text for the MPW compilers, accepts MPW error messages, and shows them in the context of the original documents. Automatic indexing and hypertext features allow for easy access to both source text and documentation.
...and the Long
The Literate Programming Workshop is the only Macintosh program editor that lets you develop program source code and documentation in a single, integrated source document – and it even lets you paste in pictures!
It offers the best of both worlds:
- a word processor with multiple text styles, style sheets, automatic line breaks, full justification, graphics, and word-processor style tabs; as well as
- a program editor with program-editor style tabs, automatic indentation, project management, error message tracking, and hypertext-style access to identifier definitions.
Thus, LPW lets you capture specifications and designs along with your source code – so when it is time to add features for the next version of your software, all the information you need is right there.
Why “Literate Programming”?
The term “literate programming” was coined by Donald Knuth to describe the development of program source code and internal documentation in a single, integrated source document, from which the source code would be extracted automatically for compilation. Knuth also developed the first tool supporting literate programming, called WEB. Unfortunately, WEB is a batch system, built on top of Knuth’s TeX document formatting language. LPW, on the other hand, is a true Macintosh application: fully interactive, WYSIWYG, and easy to use.
Features
Word Processing
- Any combination of fonts, font sizes, and styles
- Style sheets for paragraph and character styles
- Full justification, left or right alignment, or centered text
- Tabs with left, right, or center alignment
- Paste in pictures to illustrate your design
- Parametrized page headers
Program Editing
- Standard equidistant program tabs
- Automatic indentation
- Supports all word processing features even for source text
Project Management
- Project document for fast access to source documents
- Lets you specify how to extract source code
Integration with MPW
- Designed to be used in conjunction with MPW
- Automatically extracts plain source text
- Limits updates to files where source code was modified – no recompilation if only documentation has changed
- Retrieves error messages and displays them in the original source document context
- Keeps track of error locations during editing
Hypertext index
- Fast access to indexed items across the entire project
- Automatic index entries for C++ and Pascal identifiers
- Manual index entries for documentation
Requirements
Literate Programming Workshop runs on any Macintosh with a Motorola 680x0 or PowerPC CPU, at least System Software 6.0, and 700KB of available main memory. As you usually would use LPW together with MPW under MultiFinder or System 7.0, your Macintosh should have at least a 68020 CPU, 4MB main memory and a hard disk. A G4 with Mac OS X 10.3 works fine too. Intel-based Macs don’t have a 68000 emulator and therefore can’t run LPW.