Download Literate Programming FAQ
Transcript
160 Literate Programming FAQ server. On the SHSU server, the file name is FAQ.FWEB. Invoke your ftp software, open a connection to NIORD.SHSU.EDU [192.92.115.8], attach to the directory FAQ, and transfer the file FAQ.FWEB. Alternatively, send a message to the file server, FILESERV@SHSU.EDU (FILESERV@SHSU.BITNET), and include the following text in a one line message: SENDME FAQ.FWEB The file server will send the current version of the file via email. The FWEB FAQ exists in various formats, including HyperText (see other resources below). In Europe, the complete distribution can also be obtained from ftp.desy.de [131.169.10.38] in directory /pub/faq/web/fweb/. 6 All the original work revolves around a particular literate programming tool called WEB. Knuth says: The philosophy behind WEB is that an experienced system programmer, who wants to provide the best possible documentation of his or her software products, needs two things simultaneously: a language like TEX for formatting, and a language like C for programming. Neither type of language can provide the best documentation by itself; but when both are appropriately combined, we obtain a system that is much more useful than either language separately. The structure of a software program may be thought of as a web that is made up of many interconnected pieces. To document such a program we want to explain each individual part of the web and how it relates to its neighbours. The typographic tools provided by TEX give us an opportunity to explain the local structure of each part by making that structure visible, and the programming tools provided by languages such as C or Fortran make it possible for us to specify the algorithms formally and unambigously. By combining the two, we can develop a style of programming that maximizes our ability to perceive the structure of a complex piece of software, and at the same time the documented programs can be mechanically translated into a working software system that matches the documentation. One of the most important resources is the literate programming newsgroup, comp.programming.literate. You can read this newsgroup using your standard reader. Altenatively, the newsgroup is gated to a mailing list hosted by George Greenwade and Sam Houston State University. You can subscribe by sending mail to the list-server, LISTSERV@SHSU.EDU (or LISTSERV@SHSU.BITNET), and include in the message one line of text: ‘your name in quotes’ The list is unmoderated; messages sent to litprog@shsu.edu are automatically distributed to all subscribers and crossposted to comp.programming.literate. Archives of the mailing list and newsgroup are maintained on niord.shsu.edu [192.92.115.8] in the directory litprog. 5 Internet Nodes of Interest to Literate Programmers The principal nodes of interest to literate programmers are the Literate Programming Archive (LPA hereafter) and the CTAN (Comprehensive TEX Archive Network). The Literate Programming Archive is: Node: Directory: Notes: ftp.th-darmstadt.de [130.83.55.75] pub/programming/literate-programming Fastest response during off-U.S. [yep] business hours. The CTAN sites are: ftp host ftp.TeX.ac.UK ftp.Uni-Stuttgart.DE ftp.SHSU.edu IP 134.151.79.32 129.69.1.12 192.92.115.10 CTAN root pub/archive soft/tex tex-archive Institutionand Sponsors: Aston Univ./UK TEX U.G.; Univ. Stuttgart/DANTE e.V; Sam Houston State University. Other nodes and directories of interest include: niord.shsu.edu [192.92.115.8] various (do some snooping!) Has a gopher server. Node: Directory: Notes: ftp.desy.de [131.169.10.38] pub/web. Various documents, samples, and the FWEB FAQ. Has a www server, http://info.desy.de:80/ Preprint MAPS#12 (94.1); May 1994 7 How to begin literate programming A recommended book is Wayne Sewell’s (1989) ‘Weaving a Program: Literate Programming in WEB,’ Van Nostrand Reinhold, ISBN 0-442-31946-0 (pbk). Another is D.E. Knuth’s collection of articles (1992) ‘Literate Programming,’ Center for the Study of Language and Information, Stanford University, ISBN 0-937073-806 (pbk). This is more of historical interest than Sewell’s book, but is a good read. Some talk exists in the newsgroup/mailing list for a Usenet University course in literate programming. I’m sure discussion of this topic will be welcomed. If you are interested, please participate. 8 Node: Directory: Notes: What is Literate Programming? Literate programming is the combination of documentation and source together in a fashion suited for reading by human beings. In fact, literate programs should be enjoyable reading, even inviting! (Sorry Bob, I couldn’t resist!) In general, literate programs combine source and documentation in a single file. Literate programming tools then parse the file to produce either readable documentation or compilable source. The WEB style of literate programming was created by D.E. Knuth during the development of his TEX typsetting software. 4 The LitProg Newsgroup SUBSCRIBE LITPROG Bijlage J What Tools are Available A significant number of tools for literate programming are available. Most have been ported from their original systems, so support multiple computer platforms. If you are the developer of such a tool, and would like to make the software freely available, please send me email and I’ll Dutch TEX Users Group (NTG), P.O. Box 394, 1740 AJ Schagen, The Netherlands