Archive-Date: Mon, 20 Jul 1992 13:32:00 CDT Date: Mon, 20 Jul 92 13:26:48 CST From: "Jim Glover" Reply-To: LITPROG@SHSU.edu To: litprog@shsu.edu Subject: What is literate programming, anyway? Right off the bat, I have a question. Now that I have subscribed, what is literate programming, anyway? I'm serious here. I don't know what it means, but it sounds interesting. Now, let me ask your forgiveness for this one: To branch, or not to branch? That is the question. ================================================================================ Archive-Date: Mon, 20 Jul 1992 14:09:28 CDT Date: Mon, 20 Jul 1992 14:09:00 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Message-ID: <0095DDBE.6959B820.23046@SHSU.edu> Subject: RE: What is literate programming, anyway? I'm truly sorry to post such poor reply to the first message, but approximately 20 more people are on-line since this was posted originally. On Mon, 20 Jul 92 13:26:48 CST, "Jim Glover" asked: > Right off the bat, I have a question. Now that I have subscribed, > what is literate programming, anyway? I'm serious here. I don't > know what it means, but it sounds interesting. Now, let me ask > your forgiveness for this one: > To branch, or not to branch? That is the question. I, too, would truly appreciate a semi-concise definition. I know it has to do with portability, the ability of a language to port itself to another language, etc., but might someone be willing to provide the answer to what I am sure will be a FAQ for new subscribers and uninitiates, such as myself? Cameron? Don? Anyone else??? Regards and thanks for your interest in this list, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Mon, 20 Jul 1992 14:47:31 CDT Date: Mon, 20 Jul 92 12:43:22 PDT From: whenry@lindy.Stanford.EDU (homo obsolescensis) Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Subject: RE: What is literate programming, anyway? >do with portability, the ability of a language to port itself to another >language, etc., but might someone be willing to provide the answer to what >I am sure will be a FAQ for new subscribers and uninitiates, such as >myself? Cameron? Don? Anyone else??? I have nothing to contribute but do happen to have citations that will be of interest AUTHOR: Knuth, Donald Ervin, 1938- TITLE: Literate programming / Donald E. Knuth. IMPRINT: Stanford, CA : Center for the Study of Language and Information, 1991. xv, 368 p. LOCATION: Math & Comp Sci QA76.6.K644 1991 (may also be available at Stanford Bookstore) SERIES: CSLI lecture notes ; no. 27 TOPICS: Electronic digital computers--Programming. NOTES: Includes bibliographical references and index. Language: English Year: 1991 Item CSUGAKW7300-B (Books) AKW7300 (NOTIS) AUTHOR: Sewell, Wayne. TITLE: Weaving a program : literate programming in WEB / Wayne Sewell. IMPRINT: New York : Van Nostrand Reinhold, c1989. xx, 556 p. : ill. ; 24 cm. LOCATION: Math & Comp Sci QA76.73.W24S49 1989 (may also be available at Stanford Bookstore) TOPICS: WEB (Computer program language) NOTES: Bibliography: p. 539-541. Includes index. Language: English Year: 1989 Item CSUG90-B1179 (Books) AGG4591 (NOTIS) Walter Henry Stanford University Libraries ================================================================================ Archive-Date: Mon, 20 Jul 1992 14:54:19 CDT Date: Mon, 20 Jul 1992 14:50:02 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207201950.AA04665@spica.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: What is literate programming, anyway? Jim Glover (SPJRG@VM.CC.LATECH.EDU) asks what literate programming is. In Don Knuth's 1984 article "Literate Programming", in which he introduced the term, he indicated that he chose the name "literate programming" in part to contrast with "structured programming", which he apparently felt had the wrong orientation. He says: Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do. He goes on to discuss programs as literature, written for human beings to understand. He introduces WEB as a tool to assist in the secondary task of massaging human-readable programs into a form that a computer can execute. The above-referenced article, together with a lot of other writings about styles and standards for reliable software engineering, is collected in an anthology: Literate Programming, by Donald E. Knuth CSLI Lecture Notes Number 27 copyright 1992, Center for the Study of Language and Information, Leland Stanford Junior University LC catalog number QA76.6.K644 1991 ISBN 0-9370-7380-6(paper), 0-9370-7381-4 (cloth) I paid $24.95 for my (paperbound) copy. I recommend it enthusiastically. Jim also asks > To branch, or not to branch? That is the question. The longest single chapter in the above-cited book is "Structured Programming with go to Statements"; it includes a bibliography of 103 entries surveying the literature on the subject at the time of its writing (1974). Considering that this article is nearly 20 years old now, I was surprised at how much I learned from reading it. In particular it was the first time I had heard of the "situation" construct for governing flow of control. --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Mon, 20 Jul 1992 16:46:07 CDT Date: Mon, 20 Jul 92 17:29:13 EDT From: kpt@fig.citib.com (Kevin P. Tyson) Reply-To: LITPROG@SHSU.edu Message-ID: <9207202129.AA12846@raven.fig.citib.com> To: LITPROG@SHSU.edu SUBSCRIBE LITPROG "Kevin P. Tyson" ================================================================================ Archive-Date: Mon, 20 Jul 1992 22:45:55 CDT Date: Mon, 20 Jul 1992 22:43:54 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207210343.AA22940@rigel.math.uiuc.edu> To: litprog@shsu.edu Subject: What do you call a user of WEB? A vital question that must be resolved if this mailing list is to survive: what do you call a user of WEB? I favor "WEBster", myself. ;-) And is it "WEB" or "Web" or "web"? "CWEB", "Cweb", "CWeb", or "cweb"? Cheers-- --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Mon, 20 Jul 1992 23:33:30 CDT Message-ID: <9207210430.AA06381@argus.MATH.ORST.EDU> To: LITPROG@shsu.edu From: Paul Palmer Reply-To: LITPROG@SHSU.edu Subject: Re: What do you call a user of WEB? Date: Mon, 20 Jul 92 21:30:12 PDT Sender: palmerp@MATH.ORST.EDU >> >> A vital question that must be resolved if this mailing list >> is to survive: what do you call a user of WEB? >> >> I favor "WEBster", myself. ;-) >> >> And is it "WEB" or "Web" or "web"? "CWEB", "Cweb", "CWeb", or "cweb"? Yes, important questions, indeed... How's life, Cameron? Thanks for all the informative posts in c.t.t. Paul Palmer Department of Mathematics E-mail: palmerp@math.orst.edu Kidder Hall 368 Oregon State University, Corvallis, Oregon 97331-4605 ================================================================================ Archive-Date: Tue, 21 Jul 1992 08:35:20 CDT Date: Tue, 21 Jul 92 15:40:55 +0200 From: Marcus Speh Reply-To: LITPROG@SHSU.edu To: Literate Programmers Subject: Query: fweb.el; iPSC/860 (1) Using John Krommes' FWEB (v1.23) and the GNU Emacs Editor, I would like to have an elisp file "fweb.el" which accounts for the enhanced possibilities of FWEB wrt. CWEB and WEB. Thus, I would not have to switch back and forth between TeX-mode and the language mode[s, since FWEB supports ratfor, C, C++ and Fortran]. [Yes, I know there is "cweb.el", "c++-mode.el" and fortran.el] Q: Does anybody have such code/ knows someone who has it/ is currently writing it? [Otherwise please tell me why I am mistaken asking for it.] (2) I'd appreciate any information on available code in FWEB or CWEB for the iPSC/860 hypercube. Thank you in advance, Marcus Speh. =================================================================== Marcus Speh INTERnet II. Institut f. Theor. Physik BITnet Luruper Chaussee 149 DECnet <13313::SPEH> 2000 Hamburg 50/Germany Tel.(040)8998-2260 FAX:(040)8998-2267 ================================================================================ Archive-Date: Tue, 21 Jul 1992 11:11:39 CDT Date: Tue, 21 Jul 92 10:10:23 -0600 From: jongill@lilac.bldrdoc.gov (Jonathan M. Gilligan) Reply-To: LITPROG@SHSU.edu Message-ID: <9207211610.AA03334@lilac.csd.bldrdoc.gov> To: litprog@shsu.edu Subject: FWEB for the PC? I have used CWEB a bit, but am dissatisfied with the difficulties I've found using it with modular programs. I plan to try using Don Hosek's suggestions for implementing prototypes and header files, but I'm also curious about FWEB. Is FWEB small enough to compile on a PC (i.e. with 64k segments and about 600K available memory)? I am just learning C++ and it seems to me that designing class hierarchies is an extreme case of something that needs literate programming. I am now spending more time sitting with a pencil and paper sketching data structures and relations than thinking about code and it's clear to me that it will not be possible to keep track of what's what without taking a literate approach. I've been put off by the fact that every WEB program I've read starts out with the same sort of I/O code to translate between external and internal character sets (TeX, MF, bibTeX, etc.) where it would be far more efficient to have an I/O package that you could just reference. This is along the lines of the criticism of DEK's WEB style in Programming Pearls ten years ago or so, that DEK treats a WEB program as though there were no libraries or wheels in the world. Also, I'd be very interested to hear how people deal with web files and symbolic debuggers, particularly in a DOS environment. One of the constraints that has kept me from using WEB extensively is the difficulty of getting a symbolic debugger to associate the code with the right part of the .web source file. This is exacerbated by the fact that when TANGLE is done with a file, it's pretty much unreadable and hence of little use for symbolic debugging. Finally, when writing multimodule webs, it would be desirable to include things like makefiles and module definition files in the web --- after all I consider these to be integral parts of the code, since I need them to compile it and the makefile is usually the place where we document best what the dependencies are. What are people's thoughts on these issues? ---Jon ------------------------------------------------------------------------------ Jonathan M. Gilligan Time and Frequency Division National Institute of Standards and Technology Boulder, Colorado, USA Disclaimer --- The government probably disagrees with my opinions. ================================================================================ Archive-Date: Tue, 21 Jul 1992 11:57:17 CDT Date: Tue, 21 Jul 92 19:01:55 +0200 From: Thorsten Ohl Reply-To: LITPROG@SHSU.edu To: Literate Programmers Subject: FWEB for the PC? References: <9207211610.AA03334@lilac.csd.bldrdoc.gov> >>>>> On Tue, 21 Jul 92 10:10:23 -0600, jongill@lilac.csd.bldrdoc.gov (Jonathan M. Gilligan) said: Jon> [...] but I'm also curious about FWEB. Is FWEB small enough to Jon> compile on a PC (i.e. with 64k segments and about 600K available Jon> memory)? Yes. It is known to compile with Micro$oft C 6.00 (once upon a time, it also compiled with Turbo C, but I never tried that). Jon> Also, I'd be very interested to hear how people deal with web Jon> files and symbolic debuggers, particularly in a DOS environment. Jon> One of the constraints that has kept me from using WEB Jon> extensively is the difficulty of getting a symbolic debugger to Jon> associate the code with the right part of the .web source file. FWEB inserts sync lines `#line 137 foo.web' into the code, so any compiler/debugger worth its money should respect them. And I seem to remember from my MS-DOS days that it worked ... Jon> This is exacerbated by the fact that when TANGLE is done with a Jon> file, it's pretty much unreadable and hence of little use for Jon> symbolic debugging. There's another proplem: how to distribute literate sources to illiterate users? Many people are not (yet?) willing to use the .web sources, but are also slightly offended by tangled code (iff they want to make modifications). Yes, I know, they should be taught to use change files ... Jon> Finally, when writing multimodule webs, it would be desirable to Jon> include things like makefiles and module definition files in the web Jon> --- after all I consider these to be integral parts of the code, since Jon> I need them to compile it and the makefile is usually the place where Jon> we document best what the dependencies are. FWEB plans to support Makefiles sometime in the future. The problem remains that you easily end up remaking everthing, once your .web file has changed. It would be nice if tangle/weave could operate on multiple files, such that the documentation (including the index!) would be one single document, while the code could be compiled separately. ////// Thorsten Ohl, DESY (-T-), Notkestr. 85, W-2000 Hamburg 52, F.R.G. ///////// net: ohl@crunch.ikp.physik.th-darmstadt.de, ohl@gnu.ai.mit.edu //////////////////////// voice: +49-40-8998-3699, fax: +49-40-8998-3282 ================================================================================ Archive-Date: Tue, 21 Jul 1992 12:00:39 CDT Date: Tue, 21 Jul 92 19:04:19 +0200 From: Marcus Speh Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Subject: Reply: FWEB for the PC? References: <9207211610.AA03334@lilac.csd.bldrdoc.gov> >>>>> On Tue, 21 Jul 92 10:10:23 -0600, Jonathan M. Gilligan said: Jon> [...] I'm also Jon> curious about FWEB. Is FWEB small enough to compile on a PC (i.e. with Jon> 64k segments and about 600K available memory)? Get the full FWEB distribution via anonymous FTP from: lyman.pppl.gov directory: pub/fweb/v1.23/ After unpacking the tarfile, look in the directory boot/ for portability of FWEB. In the README files, the author of FWEB, John Krommes, promises help for porting FWEB to new machines. Jon> Finally, when writing multimodule webs, it would be desirable to Jon> include things like makefiles and module definition files in the web Jon> --- after all I consider these to be integral parts of the code, since Jon> I need them to compile it and the makefile is usually the place where Jon> we document best what the dependencies are. This is no problem in FWEB anymore. See the *thick* manual for the possibilities. Jon> Disclaimer --- The government probably disagrees with my opinions. [Lucky guy if your government has opinions and not only muscles.] -msp =================================================================== Marcus Speh INTERnet II. Institut f. Theor. Physik BITnet Luruper Chaussee 149 DECnet <13313::SPEH> 2000 Hamburg 50/Germany Tel.(040)8998-2260 FAX:(040)8998-2267 ================================================================================ Archive-Date: Tue, 21 Jul 1992 12:54:10 CDT From: jfieber@sophia.smith.edu (John Fieber) Reply-To: LITPROG@SHSU.edu Message-ID: <9207211753.AA01664@sophia.smith.edu> Subject: Re: FWEB for the PC? To: LITPROG@shsu.edu Date: Tue, 21 Jul 92 13:53:24 EDT > Also, I'd be very interested to hear how people deal with web files > and symbolic debuggers, particularly in a DOS environment. One of the > constraints that has kept me from using WEB extensively is the > difficulty of getting a symbolic debugger to associate the code with > the right part of the .web source file. This is exacerbated by the > fact that when TANGLE is done with a file, it's pretty much unreadable > and hence of little use for symbolic debugging. While this is an important issue that deserves serious attention, I would like to add that since I've started using cweb, my debugger has just been collecting dust. Seems as though Knuth was right about well thought out code needing less time debugging. Web inspires well thought out code. It works for me. :) Out of curiosity, what sort of platforms are people using the various incarnations of web on? Personally I'm using cweb on an Amiga. I have fweb kicking around but have not even unpacked the archive yet. -john ===jfieber@sophia.smith.edu================================================== ================================================================================ Archive-Date: Tue, 21 Jul 1992 13:22:18 CDT Message-ID: <9207211819.AA23555@lamont.ldgo.columbia.edu> Date: Tue, 21 Jul 92 14:19:34 EDT From: fritzz@lamont.ldgo.columbia.edu (Fritz Zaucker) To: LITPROG@SHSU.edu CC: litprog@shsu.edu Subject: FWEB for the PC? Reply-To: LITPROG@SHSU.edu X-Listname: Literate Programming Discussion List Date: Tue, 21 Jul 92 19:01:55 +0200 From: Thorsten Ohl Reply-To: LITPROG@SHSU.edu References: <9207211610.AA03334@lilac.csd.bldrdoc.gov> There's another proplem: how to distribute literate sources to illiterate users? Many people are not (yet?) willing to use the .web sources, but are also slightly offended by tangled code (iff they want to make modifications). Yes, I know, they should be taught to use change files ... Hmmm, after doing an GNU EMACS indent-region on my ctangled file it actually looked pretty much ok to me. Fritz ================================================================================ Archive-Date: Tue, 21 Jul 1992 13:22:42 CDT Message-ID: <9207211819.AA23555@lamont.ldgo.columbia.edu> Date: Tue, 21 Jul 92 14:19:34 EDT From: fritzz@lamont.ldgo.columbia.edu (Fritz Zaucker) To: LITPROG@SHSU.edu CC: litprog@shsu.edu Subject: FWEB for the PC? Reply-To: LITPROG@SHSU.edu X-Listname: Literate Programming Discussion List Date: Tue, 21 Jul 92 19:01:55 +0200 From: Thorsten Ohl Reply-To: LITPROG@SHSU.edu References: <9207211610.AA03334@lilac.csd.bldrdoc.gov> There's another proplem: how to distribute literate sources to illiterate users? Many people are not (yet?) willing to use the .web sources, but are also slightly offended by tangled code (iff they want to make modifications). Yes, I know, they should be taught to use change files ... Hmmm, after doing an GNU EMACS indent-region on my ctangled file it actually looked pretty much ok to me. Fritz ================================================================================ Archive-Date: Tue, 21 Jul 1992 13:41:38 CDT Date: Tue, 21 Jul 1992 13:40:48 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu CC: krommes@princeton.edu Message-ID: <0095DE83.A32B6560.26313@SHSU.edu> Subject: Looking for Literate Programming files..... 81 subscribers in 25 hours -- unbeleeeeevable!! BTW: I am not all that news knowledgeable, please pass along word of the list to any you may think appropriate -- there have to be some comp...... groups beside comp.text.tex which might be interested. Since I am running the LITPROG list and since I already have a number of archive files on Niord.SHSU.edu (192.92.115.8), I may as well support this list and its interests as well(?) as I do my others. Presently, I have Jim Fox's C-NO-WEB (in [FILESERV.CNOWEB]) and Silvio Levy's CWEB (in [FILESERV.CWEB]) on Niord (these are also available via e-mail by including SENDME CNOWEB or SENDME CWEB in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu)). I have ftp'ed to hyman.pppl.gov and retrieved John Krommes' FWEB package, version 1.23a (April 13, 1992), and placed it in [FILESERV.FWEB]; it is avaialble in compressed tar and in ZIP formats there; due to its size, I doubt if it will ever be FILESERV'able. If you hear of updates, know of other packages I ought to have, or have any suggestions for files/packages which should be there to support LITPROG, please pass along where I can retrieve them from or send me a message and I will provide you with information about uploading to SHSU (still temporary; we will soon have a standard file on this, as well as a standard directory). Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Tue, 21 Jul 1992 14:53:16 CDT Date: Tue, 21 Jul 92 21:55:18 +0200 From: Thorsten Ohl Reply-To: LITPROG@SHSU.edu To: Literate Programming Discussion List Subject: Literate Programming in the Real World(tm) (was: FWEB for the PC?) References: <9207211756.AA23195@lamont.ldgo.columbia.edu> <9207211819.AA23555@lamont.ldgo.columbia.edu> >>>>> On Tue, 21 Jul 92 14:19:34 EDT, fritzz@lamont.ldgo.columbia.edu (Fritz Zaucker) said: tho> There's another proplem: how to distribute literate sources to tho> illiterate users? Many people are not (yet?) willing to use the tho> .web sources, but are also slightly offended by tangled code (iff tho> they want to make modifications). Yes, I know, they should be tho> taught to use change files ... Fritz> Hmmm, after doing an GNU EMACS indent-region on my ctangled file it Fritz> actually looked pretty much ok to me. Sure, that solves some of the problems. And the following make(1) rule gives me a FORTRAN source that's almost indistinguishable from some standard FORTRAN coding conventions :-). [It still has too much indentation though ...]. CLOV.FORTRAN: clov.f sed -e '/^[Cc\*]/d' -e '/^[ ]*$$/d' -e '/^[ ]*CONTINUE/d' $< \ | tr a-z A-Z > $@ Still, all the comments are gone and the source is therefore almost useless. I'm really curious about your experiences with *web in the Real World(tm). I have to confess that I frequently prototype code in FWEB, but when it comes to creating the production version, I surrender to my conservative colleagues (Physicists can be _very_ conservative :-{) and use ... umm, err, umm .. Fortran. How do you convince your illiterate colleagues of the merits of literate programming? Cheers, -tho PS: But I should really try to submit a FWEB program to Comp. Phys. Comm. one day ... ////// Thorsten Ohl, DESY (-T-), Notkestr. 85, W-2000 Hamburg 52, F.R.G. ///////// net: ohl@crunch.ikp.physik.th-darmstadt.de, ohl@gnu.ai.mit.edu //////////////////////// voice: +49-40-8998-3699, fax: +49-40-8998-3282 ================================================================================ Archive-Date: Tue, 21 Jul 1992 15:05:45 CDT Date: Tue, 21 Jul 1992 15:37:31 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: Web intro? To: LitProg Mail-List Message-ID: I have just recently begun delving into litterate programming, using FunnelWeb. It has a very nice tutorial introduction, but are there any other introductory texts, such as ``Essential LaTeX'' or ``TeX on a VaX''?114q Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Tue, 21 Jul 1992 15:20:18 CDT Date: Tue, 21 Jul 1992 13:16 PST From: Don Hosek Reply-To: LITPROG@SHSU.edu Subject: Re: FWEB for the PC? To: LITPROG@SHSU.edu Message-ID: <01GMN427SY4KANBFQS@HMCVAX.CLAREMONT.EDU> -> Also, I'd be very interested to hear how people deal with web files -> and symbolic debuggers, particularly in a DOS environment. One of the -> constraints that has kept me from using WEB extensively is the -> difficulty of getting a symbolic debugger to associate the code with -> the right part of the .web source file. This is exacerbated by the -> fact that when TANGLE is done with a file, it's pretty much unreadable -> and hence of little use for symbolic debugging. -While this is an important issue that deserves serious attention, -I would like to add that since I've started using cweb, my -debugger has just been collecting dust. Seems as though Knuth -was right about well thought out code needing less time -debugging. Web inspires well thought out code. It works for me. -:) -Out of curiosity, what sort of platforms are people using the -various incarnations of web on? Personally I'm using cweb on an -Amiga. I have fweb kicking around but have not even unpacked the -archive yet. With cweb and the Zortech debugger, I have seamless debugging. It always looks in the right place in the .w file for the line being executed. (zdb has other problems but...). On the other hand, the Turbo Debugger seems to ignore the file names on #line statements so it's useless in cweb (if you aren't pointing at another file, why even have #line statements?). Of course pascal-weavers (my nominee for what we call ourselves) are completely out of luck having no equivalent to #line. -dh Don Hosek dhosek@ymir.claremont.edu Quixote Digital Typography 714-621-1291 ================================================================================ Archive-Date: Tue, 21 Jul 1992 16:36:04 CDT Date: Tue, 21 Jul 1992 16:30:21 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207212130.AA23578@rigel.math.uiuc.edu> To: litprog@shsu.edu Subject: WEB-less literate programming Thorsten Ohl (ohl@ips102.desy.de) writes: > There's another proplem: how to distribute literate sources to > illiterate users? Many people are not (yet?) willing to use the .web > sources, but are also slightly offended by tangled code (iff they want > to make modifications). Actually, I started using c-no-web over a year before I first began to dabble in CWEB, for the same reasons that Jim Fox created it: I wanted to write well-documented, attractively typeset programs but I didn't want to (a) adopt an entirely new philosophy of programming or (b) spend time acquiring arcane skills with yet another Knuthianly quirky and idiosyncratic software system. (I think the man is brilliant but demented -- the macro-expansion semantics of TeX and Metafont are intellectually interesting, but they are hell to use for actual programming.) I see the chief value of literate programming as being the care that one is forced to take over one's code when one keeps in mind while writing it the goal of making it understandable to others. I know that the thought that someone else might see what I was doing discourages me from pulling dirty tricks and shortcuts in my code! But any idea that WEB lets one *develop* the parts of one's programs in the order that makes the most sense is just silly. My text editor lets me move up and down in my source files, thank you very much, so I can work on the parts of the code in any order I want to. The value of WEB specifically (considered as one particular tool but not the only possible tool for literate programming) is that it lets you *present* the program, after it is written, in the order that it was developed -- or in the order that makes the best presentation, which is probably NOT the order in which it was developed. So I ask myself: does that advantage outweigh the disadvantages (such as not being able to share source files with non-WEBsters, and having headaches with Makefile dependencies)? And for many projects the answer is "no, it doesn't". For those I greatly prefer c-no-web, which still lets me create attractive, legible program listings, including illustrations, mathematical derivations, or whatnot, but doesn't require me to wangle (or mangle or whatever) the source file before I can TeX it or compile it or share it with a colleague. (For those who haven't tried it, let me explain: a c-no-web file is acceptable as input to both TeX and a C compiler *without* any preprocessing!) For short programs especially, ones that a reader wouldn't really need an outline or index or roadmap to find his way around in anyway, c-no-web is the way to go. (It does let you have sections, subsections, a table of contents, and other nice features, but it doesn't do the cross-referencing that WEB-based systems do.) I might also mention the fact that c-no-web doesn't impose someone else's style of indentation on me (there are some features of the way CWEB treats C code that I *hate*), and its TeX macros are *much* easier to customize than CWEB's. (For a system whose sole purpose is to encourage clean style and good documentation in programming, CWEB uses inexcusably poorly documented TeX code, and some "features" of its typography can only be fixed by changing the grammatical productions it uses and recompiling cweave.) I realize that the above criticisms go to the existing implementation of CWEB and not to the underlying ideas. It's just offered as a quick take on my (admittedly limited) experience with these two approaches as they now exist, and doesn't in any way imply that a WEB-like system without these problems couldn't be created and be a useful tool. (In fact I do sometimes use CWEB, but I sometimes grit my teeth when I do.) I also realize that c-no-web doesn't help people who program in other languages than C. Just one man's opinion-- --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Tue, 21 Jul 1992 17:32:40 CDT Date: Tue, 21 Jul 92 17:23:59 CDT From: petcher@ebenezer.wustl.edu (Donald N. Petcher) Reply-To: LITPROG@SHSU.edu Message-ID: <9207212223.AA09403@ ebenezer.wustl.edu > To: LITPROG@shsu.edu LIST ================================================================================ Archive-Date: Wed, 22 Jul 1992 01:04:18 CDT Date: Wed, 22 Jul 1992 00:06:37 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: FunnelWeb Opinions To: LitProg Mail-List Message-ID: I have recently gotten FunnelWeb and was wondering what others thought of this package. It is the first Web implementation I have used, and I rather like it, inasmuch as I know about Web, thus far. Anyway, opinions on FunnelWEb would be appreciated. Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Wed, 22 Jul 1992 05:27:02 CDT Date: Wed, 22 Jul 92 11:24:34 BST Message-ID: <9207221024.AA18548@nnsa.dl.ac.uk> From: Dave Love Reply-To: LITPROG@SHSU.edu Sender: fx%nnsa%nnga.daresbury.ac.uk@ib.rl.ac.uk To: LITPROG@SHSU.edu Subject: noweb [was Re: FWEB for the PC?] References: <9207211610.AA03334@lilac.csd.bldrdoc.gov> <9207211805.AA14596@nnsa.dl.ac.uk> >>>>> On Tue, 21 Jul 92 19:01:55 +0200, Thorsten Ohl said: > There's another proplem: how to distribute literate sources to > illiterate users? Many people are not (yet?) willing to use the .web > sources, but are also slightly offended by tangled code (iff they want > to make modifications). Yes, I know, they should be taught to use > change files ... [...] > FWEB plans to support Makefiles sometime in the future. There's a system called `noweb' by Norman Ramsey (of SpiderWeb fame) which addresses problems of interacting with make and tangling code to a form that can be sensibly exported to the `illiterate' :-). It's unix-based (modular) and doesn't pretty-print, although you could write pretty-printing modules for it and, presumably, adapt the shell scripts to other operating systems with more or less difficulty. It's ftp-able as anonymous@princeton.edu:noweb.tar.Z, as I recall. ================================================================================ Archive-Date: Wed, 22 Jul 1992 06:46:51 CDT Date: Wed, 22 Jul 92 07:37:35 EDT From: Charles Elliott Reply-To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) To: LITPROG@SHSU.edu Would someone please post a brief paragraph on 'literate' programming for us novices ? Many of us, I am sure, are so pressed for time that we don't really have the time to devote to a scholarly article, a tutorial or independent investigation...just to see if 'literate' programming is worth serious attention. BTW the term 'illiterate' is one of opprobrium in normal use, and I'll bet other neophytes are offended by it as well. Can't you think of a better term ? 'unconvinced' ? --thanks -- Charles Elliott ----------------------------------------------------------------| Charles Elliott | cee @ cornellc | cee@cornellc.cit.cornell.edu | ----------------------------------------------------------------| ================================================================================ Archive-Date: Wed, 22 Jul 1992 07:14:05 CDT Return-Path: Date: Wed, 22 Jul 92 08:36:13 +0200 From: Reply-To: LITPROG@SHSU.edu Message-ID: <9207220636.AA17011@se.alcbel.be> To: LITPROG@SHSU.edu Subject: SUBSCRIBE LITPROG "Ronny De Winter" SUBSCRIBE LITPROG "Ronny De Winter" ================================================================================ Archive-Date: Wed, 22 Jul 1992 12:41:01 CDT Date: Wed, 22 Jul 1992 12:39:05 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207221739.AA09364@mira.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) Charles Elliott asks: > Would someone please post a brief paragraph on 'literate' programming > for us novices? [...] Literate programming is writing programs for people rather than machines. (How's that for brief? :-) ) The term was chosen (in part) to suggest going beyond "structured programming", which means programs written in a good way for machines to understand and execute, into a mode in which programs are written primarily for humans to understand and appreciate. The grungy details of massaging a human-readable exposition of an algorithm into something that a machine can digest are considered secondary, and tools like Web are supposed to take care of that for us. Literate programming means regarding programs as contributions to the literature of computer science. Knuth firmly believes that we write better programs when we address them to our peers than when we address them to our tools. He maintains that the discipline required to write programs in a way that would let others understand them, with clean exposition and attractive presentation, automatically causes us to write better programs, as a by-product, while ennobling the craft by keeping its focus directed at people rather than machines. Literate programmers buy this idea. > [...] the term 'illiterate' is one of opprobrium in normal > use, and I'll bet other neophytes are offended by it as well. This is intentional (not that offense be taken, but that 'illiterate' be a term of opprobrium). Donald Knuth explicitly stated that another factor in his choice of terminology was the intention of making programmers feel embarrassed to admit that they write 'illiterate' programs. Maybe this isn't good psychology or good PR, but it's not accidental. And since those who practice literate programming presumably do so because they do believe that it makes better programs, they probably don't mind expressing disapprobation of lesser methods (just as programmers who religiously write structured programs sneer at "spaghetti code"). So I doubt it will change. Hope this helps-- --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Wed, 22 Jul 1992 13:21:13 CDT Date: Wed, 22 Jul 1992 13:18:27 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207221818.AA09443@mira.math.uiuc.edu> To: litprog@shsu.edu Subject: New version of CWEB sample program I have created a new version of my CWEB sample program based on the calculator program from Chapter 4 of Kernighan and Ritchie's C book. This program illustrates the use of CWEB with a program that is divided into multiple, separatly compiled source files (note that all the demo programs distributed with CWEB are "monolithic"). It incidentally also shows a way of handling ANSI function prototypes in CWEB. Since it's getting largish (about 47K uncompressed), I'm planning to take George Greenwade up on his offer to house it in his archive at niord.shsu.edu (the official archive of the LITPROG list). I'll upload it ASAP; it should be available tonight or tomorrow. So please don't ask for it by email; instead fetch it by anonymous FTP or by mail request to FILESERV. Thanks! The actual Web source files haven't changed at all, but the Makefile has been substantially improved, and two new files added. The new version includes a ReadMe file that talks you through the process of ctangle'ing, cweave'ing, compiling, and TeX'ing (but assumes you know the basics of how a Makefile works), and an additional Web file whose purpose is to assemble the output (.tex and .toc files) from the separate documentation files into a single file that contains a listing for the whole program, with the tables of contents, indexes, and lists of sections grouped together. This project was created with the intention of having it serve as a model or template that can be copied to give a CWEB programmer a pre-built scaffold with which to erect his own programs. It is exhaustively (or perhaps exhaustingly ;-) ) documented. Input from several "beta testers" has been very helpful in creating this improved version, and I intend to continue improving it if feedback continues to come in. Thanks to everyone who has expressed interest and devoted time to helping make this a useful example for CWEB novices! --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Wed, 22 Jul 1992 13:33:47 CDT Date: Wed, 22 Jul 92 13:27:59 CST From: "Jim Glover" Reply-To: LITPROG@SHSU.edu To: litprog@shsu.edu Subject: How 'bout examples? I have anxiously awaited a good explanation of what literate programming is, and I think I have been able to piece it together out of what I've read so far, to an extent. But now, what I'd like to see to complete my mental picture is some kind of example. Could someone please post 20 or 30 lines of this new style of code which is supposed to be so much easier for us humans to understand? Thanks! ================================================================================ Archive-Date: Wed, 22 Jul 1992 13:51:51 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) To: LITPROG@SHSU.edu Date: Wed, 22 Jul 92 19:48:12 BST Sender: tim@maths.tcd.ie Message-ID: <9207221948.aa20969@salmon.maths.tcd.ie> > Literate programming is writing programs for people rather than machines. > (How's that for brief? :-) ) I suppose everyone knows the reference: @book{knuth92 author = {Donald E. Knuth}, title = {Literate Programming}, publisher = {CSLI}, address = {Stanford}, year = {1992}} Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Wed, 22 Jul 1992 14:57:42 CDT Date: Wed, 22 Jul 1992 14:55:53 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Message-ID: <0095DF57.4B08BB60.29897@SHSU.edu> Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) On Wed, 22 Jul 92 07:37:35 EDT, Charles Elliott asked: > Would someone please post a brief paragraph on 'literate' programming for > us novices? Not exactly a brief paragraph, but as I've been collecting various WEB packages (a post soon -- wellll, sometime this month -- will tell you about them -- logon via anonymous ftp to Niord.SHSU.edu [192.92.115.8] and issue the command DIR *WEB*.DIR -- those are the WEB-related directories), I found a relatively nice, somewhat short commentary on this in chapter 1 of Ross N. Williams' FunnelWeb package user's manual (in funnelweb/userman/u_ch1.tex of [FILESERV.FUNNELWEB]FUNNELWEB-V1_0.ZIP and *.TAR_Z -- a May 27, 1992, file). Don't have time to de-Tex-ify it; believe you can get the gist of it, though. Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{What is Literate Programming?} \x{literate programming} A traditional computer program consists of a text file containing program code. Scattered in amongst the program code are comments which describe the various parts of the code. In \newterm{literate programming} the emphasis is reversed. Instead of writing code containing documentation, the literate programmer writes documentation containing code. No longer does the English commentary injected into a program have to be hidden in comment delimiters at the top of the file, or under procedure headings, or at the end of lines. Instead, it is wrenched into the daylight and made the main focus. The \dq{program} then becomes primarily a document directed at humans, with the code being herded between \dq{code delimiters} from where it can be extracted and shuffled out sideways to the language system by literate programming tools. The effect of this simple shift of emphasis can be so profound as to change one's whole approach to programming. Under the literate programming paradigm, the central activity of programming becomes that of conveying meaning to other intelligent beings rather than merely convincing the computer to behave in a particular way. It is the difference between performing and exposing a magic trick.\x{magic trick} In order to program in a literate style, particular tools are required.\xx{tools}{literate programming} The traditional approach (used in the FunnelWeb system) is to have some sort of text-file-in/text-file-out utility that reads a literate program (containing a program commentary peppered with scraps of program text) and writes out a file containing all the program code and a file containing typesetter commands representing the entire input document, documentation, code, and all (\figarchitecture{}). \begin{figure}[htbp] \begin{verbatim} +-----------------------------------------+ | File containing the program description | | peppered with scraps of program code. | | This is what the programmer works on. | | (e.g. sloth.web) | +-----------------------------------------+ | v o---------------------------o | Literate Programming Tool | o---------------------------o | +-------------------+-------------------+ | | v v +------------------+ +----------------------------------+ | Traditional | | Documentation file suitable for | | Computer Program | | input into a typesetting program | | (e.g. sloth.c) | | (e.g. sloth.tex) | +------------------+ +----------------------------------+ \end{verbatim} \mylabel{\figarchitecture{}: Traditional architecture of literate% WRAPPED-GDG programming tools.}{% % Literate programming tools could be organized in a number of ways. However, to fit in with current file and command line based environments, most tools conform to the traditional architecture shown here in which the user feeds in a file containing a literate program, and the literate programming utility generates program files and a documentation file. % } \end{figure} Given the coming age of hypertext\x{hypertext} systems, this is probably not the best approach. However, it does mesh beautifully with current text files and command line interfaces, the expectation of linear presentations in the documents we read, and the particular requirements of current programming languages and typesetting systems. It is certainly not a bad approach. With this structure in place, the literate programming system can provide far more than just a reversal of the priority of comments and code. In its full blown form, a good literate programming facility can provide total support for the essential thrust of literate programming, which is that computer programs should be written more for the human reader than for the compiler. In particular, a literate programming system can provide:\xs{literate programming}{facilities} \narrowthing{Re-ordering of code:}{Programming languages often force the programmer to give the various parts of a computer program in a particular order.\xx{program}{ordering} For example, the Pascal\x{Pascal} programming language\paper{BSI82} imposes the ordering: constants, types, variables, procedures, code. Pascal also requires that procedures appear in an order consistent with the partial ordering imposed by the static call graph (but forward declarations allow this to be bypassed). In contrast, the literate style requires that the programmer be free to present the computer program in any order whatsoever. The facility to do this is implemented in literate programming tools by providing text \i{macros} that can be defined and used in any order.} \narrowthing{Typeset code and documentation:}{Traditionally program listings are dull affairs consisting of pages of fan-form paper imprinted with meandering coastlines of structured text in a boring font. In contrast, literate programming systems are capable of producing documentation that is superior in two ways. First, because most of the documentation text is fed straight to the typesetter, the programmer can make use of all the power of the underlying typesetter, resulting in documentation that has the same presentation as an ordinary typeset document. Second, because the literate programming utility sees all the code, it can use its knowledge of the programming language and the features of the typesetting language to typeset the program code as if it were appearing in a technical journal. It is the difference between:} \begin{verbatim} while sloth Subject: WEB for Macintosh, Turbo C++ To: litprog@shsu.edu I have a few pesky questions that members of this list could perhaps answer: 1. Where can I get a version of WEB that is compiled for use on a Mac, preferably for use with Lightspeed Pascal? I have looked long and hard for such an item, but I have not been able to find it. 2. Any recommendations on versions of WEB to use with Borland's Turbo C++ on a DOS machine? Will CWEB work OK with C++? 3. Can someone describe the capabilities of FWEB? What languages does it work with and on which machines? Thanks in advance, Rob ............................................................................ : Robert Beezer : Internet: beezer@ups.edu : : Dept. of Mathematics and CS : Voice: 206.756.3564 : : University of Puget Sound : Fax: 206.756.3500 : : Tacoma, WA 98416 : : ............................................................................ ================================================================================ Archive-Date: Wed, 22 Jul 1992 16:33:48 CDT Date: Wed, 22 Jul 1992 16:33:13 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: litprog@SHSU.edu Message-ID: <0095DF64.E35F8760.30105@SHSU.edu> Subject: KR-CWEB-SAMPLE on FILESERV/Niord Cameron Smith forwarded his samples, as he promised in an earlier posting today. Below is the description file with retrieval instructions. Thanks to Cameron for sharing this example of literate programming!! --George =========================================================================== KR-CWEB-SAMPLE -------------- The KR-CWEB-SAMPLE package includes a sample of CWEB usage provided by Cameron Smith . It illustrates one way of using CWEB with multiple source files that are compiled separately. A Makefile is provided to direct the construction of the executable program and the typeset listings. This program was originally created for the enlightenment of its author, as a novice CWEB programmer, after realizing that each of the demonstration programs included in the CWEB distribution consists of a single "monolithic" source file -- which is not how most non-trivial C programs are structured. The goal of this package is to provide a simple example showing how to use CWEB for more realistic programming tasks. This program is based very closely on the calculator program from Chapter 4 of Kernighan and Ritchie's "The C Programming Language" (2nd edition). That program was chosen because it is short and easy to understand, so you can concentrate on the way it is implemented in CWEB rather than how it works (although of course you ordinarily want the focus to be exactly reversed -- on the algorithm rather than the implementation!). To retrieve the set of 7 files, include the command: SENDME KR-CWEB-SAMPLE in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). To retrieve a specific file, such as KR-CWEB-SAMPLE.README, include: KR-CWEB-SAMPLE.README in your mail message to FILESERV. The files are available individually, as well as packaged in compressed tar format and ZIP format, for anonymous ftp retrieval from Niord.SHSU.edu (192.92.115.8) in the directory [FILESERV.KR-CWEB-SAMPLE]. Files in this package: (1 Block = 512 bytes) File Blocks Save file as: ------------------------------------------------------------------------------- KR-CWEB-SAMPLE.CALC_W 17 calc.w KR-CWEB-SAMPLE.GETCH_W 6 getch.w KR-CWEB-SAMPLE.GETOP_W 7 getop.w KR-CWEB-SAMPLE.MAIN_W 7 main.w KR-CWEB-SAMPLE.MAKEFILE 12 Makefile KR-CWEB-SAMPLE.README 36 ReadMe KR-CWEB-SAMPLE.STACK_W 6 stack.w Approximate total blocks in full KR-CWEB-SAMPLE package = 91 ================================================================================ Archive-Date: Wed, 22 Jul 1992 17:15:02 CDT Date: Wed, 22 Jul 1992 17:13:09 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: litprog@SHSU.edu Message-ID: <0095DF6A.77FA2F60.30144@SHSU.edu> Subject: Intro.ps for FWEB on FILESERV/Niord Marcus Speh was kind enough to forward along the Intro.ps result of fweaving the file Intro.web in the fweb-v1.23 release. I have included this in the directory [FILESERV.FWEB] on Niord.SHSU.edu (192.92.115.8). Printed, these are only 16 pages which include a pretty (fortran) example and a brief overview. Nothing fancy: If someone just wants to see how the game goes without retrieving and unpacking FWEB, this might do it. I (ready for some convolution?) ZIPped the PS file, then UUENCODEd it so it could be available from FILESERV, as well -- the untouched Intro.ps is there for ftp purposes, though. To retrieve the file via e-mail, include: SENDME FWEB.INTRO_UUE in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). This will UUDECODE to INTRO.ZIP, which UNZIPs to INTRO.PS (wheh!). If you don't have the platform-independent ZIP and UNZIP, include: LIST ZIP LIST UNZIP in your mail message to FILESERV and information on getting it will be sent, as well. For ftp folks, look in [FILESERV.ZIP] and [FILESERV.UNZIP] on Niord for compressed tar files and ZIP files of these. These are neat utilities which allow for very portable compressed archive files!! Still collecting this stuff (but don't have a clue what it is 8-)). Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Wed, 22 Jul 1992 17:43:17 CDT Date: Wed, 22 Jul 92 16:36:40 -0600 From: jongill@lilac.bldrdoc.gov (Jonathan M. Gilligan) Reply-To: LITPROG@SHSU.edu Message-ID: <9207222236.AA10266@lilac.csd.bldrdoc.gov> To: LITPROG@SHSU.edu Subject: Literate Programming in the Real World(tm) (was: FWEB for the PC?) Charles Elliott writes: Would someone please post a brief paragraph on 'literate' programming for us novices ? Many of us, I am sure, are so pressed for time that we don't really have the time to devote to a scholarly article, a tutorial or independent investigation...just to see if 'literate' programming is worth serious attention. For a short discussion, see the book review of Knuth's Stanford Tech. Report, ``Literate Programming,'' in this Month's (August 1992) Dr. Dobb's Journal. The review is somewhat incomplete, mostly in that it does not touch on some of the shortcomings of existing literate programming systems, does not acknowledge the existence of systems other than WEB and CWEB, and doesn't mention any literature other than the Tech Report, but it gives a reasonable flavor of what the basic ideas are and it is easy to read. A much more thorough discussion, which is more involved (but you can read it easily and catch the main ideas even if you skip the hard parts) is the two-part Programming Pearls column in CACM, Vol. 29, pp. 364--369 (May, 1986) and 471--483 (June, 1986). If you want a description short enough to post, I can't improve on Cameron Smith's. Jim Glover wants examples of literate code. Again, the Programming Pearls piece is a nice place to start. It has a short and a not-so-short example, along with some very thoughtful criticism of literate programming and Knuth's programming style by Doug McIlroy of Bell labs. There are also a number of WEB programs on labrea.stanford.edu, which you can ftp anonymously. ---Jon ================================================================================ Archive-Date: Wed, 22 Jul 1992 17:43:38 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: WEB for Macintosh, Turbo C++ To: LITPROG@shsu.edu Date: Wed, 22 Jul 92 23:38:27 BST Sender: tim@maths.tcd.ie Message-ID: <9207222338.aa17154@walton.maths.tcd.ie> > 1. Where can I get a version of WEB that is compiled for use on a Mac, > preferably for use with Lightspeed Pascal? I have looked long and hard for > such an item, but I have not been able to find it. This isn't quite your question, but I ported web2c to the Mac, using Think C (v4 or v5). This included all the web programs, tangle, weave, etc. My efforts are available from ftp.maths.tcd.ie in pub/TeX/src-5.851c/16-bit . Nb In principle, this only contains the change files against Karl Berry's standard web2c-5.851c . But it should be possible to do everything in Pascal, for those of Pascalene (?) inclination. (I think Think C/Pascal from Symantec is the successor to Lightspeed.) > 2. Any recommendations on versions of WEB to use with Borland's Turbo C++ > on a DOS machine? Will CWEB work OK with C++? I'm sure there would be few problems. Turbo-C++ accepts ANSI C, and I compiled CWEB on the Mac with very few problems. My change files (small) are in the directory pub/TeX/CWEB/16-bit on the machine above. The main problem on the PC will be that some arrays are more than 64k. But I doubt if they need to be for reasonable CWEB files. After all, no-one has tex.w or mf.w, have they? > 3. Can someone describe the capabilities of FWEB? What languages does it work > with and on which machines? I must admit that I was rather shocked at the size of FWEB. Rather selfishly, I am only interested in C and C++. I wonder if FWEB would have any attractions for those like me? Of course CWEB has the great plus of association with DEK. On a different point, to me it is obvious that CWEB should be written in ANSI-C, and should be geared to producing ANSI-C output. Especially as it must be so simple to make the necessary changes. I had an argument with Karl Berry about this -- I was suggesting that web2c should produce ANSI output -- and I was surprised at Karl's view that K&R C is still the majority tongue. Here is the README file from the CWEB directory mentioned earlier. =========================================================== This directory contains CWEB change files for THINK C on the Macintosh. In addition, it contains the actual ctangle and cweave programs, in ctangle.hqx (=ctangle.sit.hqx) and cweave.hqx (=cweave.sit.hqx). If you want to re-compile ctangle and/or cweave, you will need the actual *.w CWEB files -- common.w and ctangle.w for ctangle, common.w, prod.w and cweave.w for cweave. (Nb: cweave.c only just scrapes into a THINK C segment, when all optimisations are turned on, and most other options are turned off.) Change files for the CWEB sample files treeprint, wc and wmerge are also included. Timothy Murphy 12 July 1992 =========================================================== Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Wed, 22 Jul 1992 17:51:03 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: Intro.ps for FWEB on FILESERV/Niord To: LITPROG@SHSU.edu Date: Wed, 22 Jul 92 23:48:45 BST Sender: tim@maths.tcd.ie Message-ID: <9207222348.aa06742@salmon.maths.tcd.ie> > Marcus Speh was kind enough to forward along the > Intro.ps result of fweaving the file Intro.web in the fweb-v1.23 release. Does fweave not produce TeX output? Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Wed, 22 Jul 1992 18:12:20 CDT Date: Wed, 22 Jul 1992 18:10:08 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Message-ID: <0095DF72.6D5F0FA0.30434@SHSU.edu> Subject: Re: Intro.ps for FWEB on FILESERV/Niord On Wed, 22 Jul 92 23:48:45 BST, Timothy Murphy asked: > > Marcus Speh was kind enough to forward along the > > Intro.ps result of fweaving the file Intro.web in the fweb-v1.23 release. > > Does fweave not produce TeX output? Yes, it certainly does (but it crashes out on me for some reason on processing 8-(). The file INTRO.TEX is in [FILESERV.FWEB] on Niord. Use SENDME FWEB.INTRO_TEX in the body of a mail message to FILESERV@SHSU to get the TeX output from FILESERV. George ================================================================================ Archive-Date: Wed, 22 Jul 1992 18:20:45 CDT Date: Wed, 22 Jul 1992 18:11:37 -0500 From: "Donald N. Petcher" Reply-To: LITPROG@SHSU.edu Message-ID: <199207222311.AA17459@arthur.wustl.edu> To: litprog@shsu.edu Subject: Re: WEB for Macintosh, Turbo C++ In response to Robert Beezer's question about C++ and web, and about fweb, the answer is the same for both questions (in part). Fweb which is being supported and upgraded by John Krommes is an extension of cweb that works for C, C++, Fortran, Fortran90, and Ratfor, and with some support for TeX (as a language - i.e. write literate TeX documents!). It runs on most platforms: VMS, PC, Unix, and pretty much anything that the gnu C compiler is supported for (I compiled it on an Atari ST for example). I don't think it has been ported to the Macintosh though. It can be obtained by anonymous ftp from lyman.pppl.gov (192.55.106.129) and I think it is also available at niord.shsu.edu (192.92.115.8). Cheers, Don Petcher petcher@wuphys.wustl.edu ================================================================================ Archive-Date: Wed, 22 Jul 1992 19:08:30 CDT Date: Thu, 23 Jul 92 02:11:40 +0200 From: Marcus Speh Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Subject: Re: Intro.ps for FWEB on FILESERV/Niord References: <9207222348.aa06742@salmon.maths.tcd.ie> >>>>> On Wed, 22 Jul 92 23:48:45 BST, Timothy Murphy said: > Marcus Speh was kind enough to forward along the > Intro.ps result of fweaving the file Intro.web in the fweb-v1.23 release. Tim> Does fweave not produce TeX output? Correct. I made a Postscript file out of it. To do that, you have at least to unpack the fweb distribution because a special macro is needed. I thought this might suit those which just want to have a look. The dvi to "Intro.tex" being PS'd alone is not complete [as far as I remember: I did this some time ago]. -msp =================================================================== Marcus Speh INTERnet II. Institut f. Theor. Physik BITnet Luruper Chaussee 149 DECnet <13313::SPEH> 2000 Hamburg 50/Germany Tel.(040)8998-2260 FAX:(040)8998-2267 ================================================================================ Archive-Date: Wed, 22 Jul 1992 20:49:49 CDT Date: Thu, 23 Jul 92 03:55:48 +0200 From: Thorsten Ohl Reply-To: LITPROG@SHSU.edu To: litprog@shsu.edu Subject: ANSI CWEB (was: Re: WEB for Macintosh, Turbo C++) References: <9207222338.aa17154@walton.maths.tcd.ie> >>>>> On Wed, 22 Jul 92 23:38:27 BST, Timothy Murphy said: tim> I must admit that I was rather shocked at the size of FWEB. -rwxr-xr-x 1 ohl theory 307200 Jul 23 03:27 ftangle -rwxr-xr-x 1 ohl theory 270336 Jul 23 03:28 fweave Most of FWEB's size can be attributed to the need of supporting vastly different languages. The input routines for a free form language are not usable for Fortran and vice versa. Furthermore, FWEB has a Ratfor processor build in. Which is a _big_ plus, though it is not strictly related to `literate programming'. [There also some features which I would not miss. But FWEB _is_ a useful piece of software!] tim> Rather selfishly, I am only interested in C and C++. tim> I wonder if FWEB would have any attractions for those like me? Fweave handles ANSI-C and C++ quite nicely, while stock cweave has quite some problems with prototypes. tim> Of course CWEB has the great plus of association with DEK. :-) tim> On a different point, to me it is obvious that CWEB should be tim> written in ANSI-C, and should be geared to producing ANSI-C tim> output. Especially as it must be so simple to make the necessary tim> changes. The problem is in prod.w. It seems to be _very_ easy to screw up this carefully woven web of productions ... Actually, the C++ grammar in spiderweb is not too bad, that could be a good starting point. Somebody in Denmark is working on a ANSI-C CWEB, but I have no information on his recent progress: /iesd.auc.dk:/pub: -rw-rw-r-- 1 2196 ftping 202045 Oct 1 1991 auc-cweb.tar.Z tim> I had an argument with Karl Berry about this -- I was suggesting tim> that web2c should produce ANSI output -- and I was surprised at tim> Karl's view that K&R C is still the majority tongue. Karl wants web2c to work with /bin/cc, which is _not_ ANSI on most machines. For the same reason, gcc is written in K&R C, because people would not be able to bootstrap it otherwise. Maybe you should suggest to Karl to distribute gcc with web2c ... ////// Thorsten Ohl, DESY (-T-), Notkestr. 85, W-2000 Hamburg 52, F.R.G. ///////// net: ohl@crunch.ikp.physik.th-darmstadt.de, ohl@gnu.ai.mit.edu //////////////////////// voice: +49-40-8998-3699, fax: +49-40-8998-3282 ================================================================================ Archive-Date: Thu, 23 Jul 1992 07:18:00 CDT Date: Thu, 23 Jul 92 08:25:12 +0200 From: ath@linkoping.trab.se Reply-To: LITPROG@SHSU.edu Message-ID: <9207230625.AA15460@uranus> To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) Timoty Murphy wrote: > >@book{knuth92 > author = {Donald E. Knuth}, > title = {Literate Programming}, > publisher = {CSLI}, > address = {Stanford}, > year = {1992}} Is this book/report any good? Seriously? When I first read about literate programming, I was rather impressed by the idea. However, when I tried to read some of the Pascal WEB's that Knuth wrote I was very disappointed. The only major WEBs I've studied (the TeX and METAFONT source) are not well adapted to human understanding: they present the pieces bottom up instead of top down, which would be more natural for most readers. Rather than going beyond the program structure imposed by the Pascal syntax, they submit to it, so that the TeXl WEB is not more easily read than an ordinary Pascal program: all the little pieces come first, and the main program is kept a secret till the last few lines, much like the verb in German sentences. The only difference from straight Pascal code is that there is some descriptive text - but that helps only micro-understanding of the program rather than macro-understanding: the module structure, the flow of data, etc. I don't doubt that literate programming can be good - I've just not seen example where Knuth demonstrates it convincingly. Now: is this reference an improvement? Alternatively, are there any good literate programs out there? Some that really show what's literate programming is about? I'd like to add to the references on literate programming: I recall a series on literate programming in the ACM several years ago. I can't find them again, so it must have been *several* years ago. In each article, as I recall it, a literate program by some author (Knuth, Gries, Jackson?) was presented and then someone else criticised it. I think these articles gave a pretty good insight into the mechanism of writing a literate program *as well* as that of reading one. If anyone can give a more definite reference to these articles, I would appreciate it. Anders Thulin ath@linkoping.trab.se Telia Research AB, Teknikringen 2B, S-583 30 Linkoping, Sweden ================================================================================ Archive-Date: Thu, 23 Jul 1992 08:29:24 CDT Date: Thu, 23 Jul 92 15:23:30 MEZ From: Hans-Hermann Bode Reply-To: LITPROG@SHSU.edu Subject: CWEB for ANSI C, C++, Turbo C++ To: litprog@SHSU.edu Recently, some questions came up regarding to the subjects mentioned above. I have developed a set of changefiles---adaptable to the latest version of CWEB of June/July 1992---that may help in all three cases. Here is an excerpt from the readme file: >This is the PC implementation of Silvio Levy's and Donald E. Knuth's CWEB >system, compiled and provided with changefiles for ANSI C and Turbo C++ and >a makefile for Turbo Make by Hans-Hermann Bode. The changes are appropriate >for ANSI-C compilers as well as for Turbo C++, where the latter are made >conditional (they will become effective only if the symbol __TURBOC__ is >defined, which automatically is the case when compiled with Turbo C++), so >users of other systems with ANSI-C compilers might be interested also. I don't promise that the sources now are compilable with every ANSI-C compiler without editing (there are still some calls to non-standard library functions), but the effort should be far less than starting from the original. >6. The tangle and weave processors of this PC implementation are able to >understand traditional C, ANSI C, and C++. The latter feature, however, is >just a first attempt, i.e., most C++ sources should be handled satisfactory, >but some C++ constructions may yield unpleasant results in typesetting by >CWEAVE. If you encounter problems, send a report to HHBODE@DOSUNI1.BITNET. >Note that CTANGLE always uses a default extension .c for its output file; >this may not be appropriate for C++ compilers, but you can work around this >by supplying a third argument in the command line (see cwebman). You will get such unpleasant results in particular with constructions like |template|, |try|, or |throw|, that are not implemented yet. My intention is to have a system around that can handle all three variants of C without requiring a switch command to indicate one of them explicitly. This implies that curious things like int b=a//* divide by 4 */4; may not yield the desired effect. Since in general one can easily work around this (just write |int b=a/ /* divide by 4 */4;|, if that was meant) and, moreover, such constructions from compatibility reasons should be avoided anyway, in my opinion such difficulties are not serious and I think that the advantage of a homogeneous processing is more important. The implementation (including precompiled exe files) is available as an archive file cwebpc.zip from dione.rz.uni-osnabrueck.de (in the directory pub/msdos/tex/web) and from ftp.uni-stuttgart.de (in the directory soft/tex/web/cweb). Maybe, it's also available from Niord soon. Hans-Hermann Bode Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck Tel.: (49)-541-9692545 e-mail: HHBODE@DOSUNI1.BITNET ================================================================================ Archive-Date: Thu, 23 Jul 1992 09:51:38 CDT Date: Thu, 23 Jul 92 16:45:15 MEZ From: Hans-Hermann Bode Reply-To: LITPROG@SHSU.edu Subject: Re: ANSI CWEB To: litprog@SHSU.edu Thorsten Ohl wrote: >tim> On a different point, to me it is obvious that CWEB should be >tim> written in ANSI-C, and should be geared to producing ANSI-C >tim> output. Especially as it must be so simple to make the necessary >tim> changes. > >The problem is in prod.w. It seems to be _very_ easy to screw up this >carefully woven web of productions ... Actually, the C++ grammar in >spiderweb is not too bad, that could be a good starting point. In earlier versions of CWEBPC (see another message of mine) I handled function prototypes by the following two additional rules: decl_head lpar (decl_head | int_like) comma --> decl_head lpar decl_head lpar (decl_head | int_like) rpar --> decl_head Note, that additionally in the implementation of rule 21 (cases for |int_like|) the scrap pointer |pp| has to be decreased by 2 instead of by 1 in the call to |reduce|. Furthermore, ANSI constructions like |int *const p;| will be supported by decl_head unorbinop int_like --> decl_head where the translation should be $D{U}I\ $. Finally, CWEAVE should have knowledge of some additional keywords, namely |const|, |signed|, and |volatile| (the appropriate ilk is |int_like|), as well as |elif|, |error|, and |pragma| (of ilk |if_like|). With these additions and changes I got an ANSI-CWEB that was quite satisfactory---at least for my own applications, I never got comments from others. In the latest version of CWEBPC things changed a little bit, i.e., about 15 new rules were added and about 10 of the old rules were rewritten or extended to begin C++ support---too much to post it here. Hans-Hermann Bode Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck Tel.: (49)-541-9692545 e-mail: HHBODE@DOSUNI1.BITNET ================================================================================ Archive-Date: Thu, 23 Jul 1992 10:29:38 CDT Date: Thu, 23 Jul 1992 10:25:18 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207231525.AA10220@mira.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) Anders Thulin (ath@linkoping.trab.se) writes: > I recall a series on literate programming in the ACM several years > ago. I can't find them again, so it must have been *several* years > ago. In each article, as I recall it, a literate program by some > author (Knuth, Gries, Jackson?) was presented and then someone else > criticised it. I think these articles gave a pretty good insight into > the mechanism of writing a literate program *as well* as that of > reading one. I think the CACM series you're talking about is the one that Knuth alludes to in the preface to the Literate Programming anthology that has already been cited so often in this forum. If so, the editor of that series was (according to Knuth) Chris Van Wyk, and it began not too long (he isn't specific) after the Programming Pearls columns of May and June 1986, in which Jon Bentley wrote about his impressions of LP and presented two Web programs of Knuth's and a critique of the longer one by Doug McIlroy. I've been meaning to get over to the library and chase them down; maybe I can do that this afternoon, and if so I'll post citations (unless someone else does it first). > Is this book/report any good? Seriously? > When I first read about literate programming, I was rather impressed > by the idea. However, when I tried to read some of the Pascal WEB's > that Knuth wrote I was very disappointed. [...] > I don't doubt that literate programming can be good - I've just not > seen example where Knuth demonstrates it convincingly. Now: is this > reference an improvement? The book is an anthology of writings of Knuth's published over a 20-year period. It is interesting to read in part because it gives you an impression of how a brilliant man's ideas evolved, which I think gives less gifted guys like me insights that we wouldn't perhaps be able to achieve on our own. Does it say anything that hasn't been said before? Of course not, by definition, because it's an anthology of past works. For me, the two most enlightening parts were the article "Structured Programming with go to Statements", which antedates Literate Programming by 5-10 years (it came out in 1974, five years before Knuth developed WEB and almost exactly 10 years before the "Literate Programming" article appeared), and McIlroy's incisive, balanced and erudite critique of Knuth's literate program in the Pearls column (which McIlroy praised as a piece of expository writing but which, when considered as a piece of engineering, he called "an industrial-strength Faberg\'e egg---intricate, wonderfully worked, refined beyond all ordinary desires, a museum piece from the start"). I also found the chapter on the errors of TeX valuable; it's an insightful and reflective survey of the problems encountered in a huge software engineering project. I happen to think one case study is worth a trunkful of textbooks, especially this one, because he published not only his post facto evaluation of what transpired, but also his log book, so you get a real feeling for how the project progressed. At any rate, here's a list of the chapters and their dates of original appearance; you can track 'em down separately or buy the book (or neither). Computer Programming as an Art 1974 (This was Knuth's Turing Award lecture) Structured Programming with go to Statements 1974 A Structured Program to Generate All Topological Sorting Arrangements 1974 Literate Programming 1984 Programming Pearls: Sampling May, 1986 Programming Pearls, Continued: Common Words June, 1986 How to Read a WEB 1986 (This is only 6 pages long, and is completely redundant with other material in the book. I have no idea why it was included, unless maybe to help out people who might want to read the TeX and Metafont excerpts without having read the preceding 3 chapters) Excerpts from the Programs for TeX and Metafont 1986 Mathematical Writing 1987 (This is an excerpt from course notes; you can get the full monograph from the AMS, but most of the rest has little to do with programming) The Errors of TeX 1989 The Error Log of TeX 1978-1991 (This is the complete log as of September 1991, including some hitherto unpublished material thought lost but recently discovered in the Stanford library archives) An Example of CWEB 1990 (This program, written with Silvio Levy, is the "wc" example distributed with CWEB.) Is it worth it? I thought so, but if you aren't a TeX junkie and you already understand what LP is about, maybe not. --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Thu, 23 Jul 1992 10:35:40 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: ANSI CWEB To: LITPROG@SHSU.edu Date: Thu, 23 Jul 92 16:31:31 BST Sender: tim@maths.tcd.ie Message-ID: <9207231631.aa08202@salmon.maths.tcd.ie> > With these additions and changes I got an ANSI-CWEB that was quite > satisfactory---at least for my own applications, I never got comments from > others. In the latest version of CWEBPC things changed a little bit, i.e., > about 15 new rules were added and about 10 of the old rules were rewritten > or extended to begin C++ support---too much to post it here. Surely the .ch file(s) cannot have been too large? I'd very much like to see your mods, and I'm sure others would too. Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Thu, 23 Jul 1992 10:58:56 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) To: LITPROG@SHSU.edu Date: Thu, 23 Jul 92 16:54:09 BST Sender: tim@maths.tcd.ie Message-ID: <9207231654.aa09724@salmon.maths.tcd.ie> > Rather than going beyond the program structure imposed by the Pascal > syntax, they submit to it, so that the TeXl WEB is not more easily > read than an ordinary Pascal program: all the little pieces come > first, and the main program is kept a secret till the last few lines, > much like the verb in German sentences. As I'm sure everyone on this list will know, this was a decision of Knuth's -- right or wrong -- and not a consequence of the WEB format, which allows the main program to come at the beginning or at the end. Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Thu, 23 Jul 1992 12:31:33 CDT Date: Thu, 23 Jul 1992 12:18:52 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: info-tex@SHSU.edu CC: litprog@SHSU.edu Message-ID: <0095E00A.85A0F220.422@SHSU.edu> Subject: CWEB, v 2.4, on FILESERV/Niord Hans-Hermann Bode kindly pointed out that the version of CWEB we had on FILESERV had been superceded by version 2.4 (April/June 1992). I retrieved the files from labrea and now them now available from SHSU. Attached is the description file and instructions for retrieval. My thanks to Hans-Hermann for pointing this out. Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CWEB ---- The CWEB package includes the source and example files for Silvio Levy's C language adaptation of Donald Knuth's WEB, originally written in Pascal. This package includes version 2.4, dated April-June 1992. Knuth's original Pascal programs have been entirely rewritten in C; many changes were made to take advantage of features offered by C but non-existent in Pascal. CWEB is essentially a simplified subset of WEB. CWEB does not need WEB's features for macro definition and string handling, because C and its preprocessor already take care of macros and strings. Similarly, the WEB conventions of denoting octal and hexadecimal constants by @'77 and @"3f are replaced by C's conventions \v077\v and \v0x3f\v, respectively. All other features of WEB have been retained, and a few new features have been added. To retrieve the 30 files in the CWEB package, include the command: SENDME CWEB in teh text of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). If, for some reason, you only require a specific file from this package, say CWEB.COMMON_C, include the command: SENDME CWEB.COMMON_C in your mail message to FILESERV. These files are available for anonymous ftp retrieval from Niord.SHSU.edu (192.92.115.8), either individually or in a ZIP archive, in the [FILESERV.CWEB] directory. Files in this package: (1 Block = 512 bytes) File Blocks Save file as: ------------------------------------------------------------------------------- CWEB.COMMON-VMS_CH 6 common-vms.ch CWEB.COMMON_C 34 common.c CWEB.COMMON_H 17 common.h CWEB.COMMON_W_1OF2 77 common.w (part 1 of 2) CWEB.COMMON_W_2OF2 8 (part 2 of 2) CWEB.CTANGLE-VMS_CH 3 ctangle-vms.ch CWEB.CTANGLE_C 49 ctangle.c CWEB.CTANGLE_W_1OF2 75 ctangle.w (part 1 of 2) CWEB.CTANGLE_W_2OF2 14 (part 2 of 2) CWEB.CWEAVE-VMS_CH 3 cweave-vms.ch CWEB.CWEAVE_W_1OF4 76 cweave.w (part 1 of 4) CWEB.CWEAVE_W_2OF4 77 (part 2 of 4) CWEB.CWEAVE_W_3OF4 76 (part 3 of 4) CWEB.CWEAVE_W_4OF4 48 (part 4 of 4) CWEB.CWEBMAC_TEX 25 cwebmac.tex CWEB.CWEBMAN_TEX_1OF2 77 cwebman.tex (part 1 of 2) CWEB.CWEBMAN_TEX_2OF2 55 (part 2 of 2) CWEB.CWEB_1 7 cweb.1 CWEB.CWEB_EL 19 cweb.el CWEB.MAKEFILE 9 Makefile CWEB.PROD_W 17 prod.w CWEB.README 6 README "Example" files (saved in examples subdirectory of CWEB): CWEB.EXTEX_W_EXAMPLES 25 extex.w CWEB.KSPELL_EL_EXAMPLES 20 kspell.el CWEB.MAKEFILE_EXAMPLES 2 Makefile CWEB.README_EXAMPLES 6 README CWEB.TREEPRINT_W_EXAMPLES 15 treeprint.w CWEB.WC_W_EXAMPLES 18 wc.w CWEB.WMERGE_W_EXAMPLES 45 wmerge.w CWEB.WORDTEST_W_EXAMPLES 42 wordtest.w Approximate total blocks in full CWEB package = 951 ================================================================================ Archive-Date: Thu, 23 Jul 1992 16:27:06 CDT Date: Thu, 23 Jul 1992 13:47:29 -0700 (PDT) From: BEEZER@UPS.EDU (Rob Beezer) Reply-To: LITPROG@SHSU.edu Message-ID: <920723134729.71e@UPS.EDU> Subject: ACM articles on Literate Programming To: litprog@shsu.edu Here are some references for some of the articles about literate programming from the Communications of the ACM. The last three articles contain some examples of literate programs *not* written by Knuth. Jon Bentley, Don Knuth Literate programming Communications of the ACM, 29, no. 5 (1986) 364-369 Jon Bentley, Don Knuth, Doug McIlroy A literate program Communications of the ACM, 29, no. 6 (1986) 471-483 Jon Bentley, David Gries Abstract data types Communications of the ACM, 30, no. 4 (1987) 284-290 Christopher J. Van Wyk Printing common words Communications of the ACM, 30, no. 7 (1987) 593-599 Christopher J. Van Wyk Processing transactions Communications of the ACM, 30, no. 12 (1987) 1000-1010 ............................................................................ : Robert Beezer : Internet: beezer@ups.edu : : Dept. of Mathematics and CS : Voice: 206.756.3564 : : University of Puget Sound : Fax: 206.756.3500 : : Tacoma, WA 98416 : : ............................................................................ ================================================================================ Archive-Date: Thu, 23 Jul 1992 16:35:27 CDT Date: Thu, 23 Jul 1992 16:33:57 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Message-ID: <0095E02E.2861C020.1147@SHSU.edu> Subject: RE: CWEB for ANSI C, C++, Turbo C++ On Thu, 23 Jul 92 15:23:30 MEZ, Hans-Hermann Bode posted: > Recently, some questions came up regarding to the subjects mentioned above. > I have developed a set of changefiles---adaptable to the latest version of > CWEB of June/July 1992---that may help in all three cases. Here is an > excerpt from the readme file: >..... > The implementation (including precompiled exe files) is available as an > archive file cwebpc.zip from dione.rz.uni-osnabrueck.de (in the directory > pub/msdos/tex/web) and from ftp.uni-stuttgart.de (in the directory > soft/tex/web/cweb). Maybe, it's also available from Niord soon. I went to dione.rz.uni-osnabrueck.de and fetched everything in the /pub/msdos/tex/web directory and have placed in the [FILESERV.PC-WEB] directory on Niord.SHSU.edu (192.92.115.8). This includes (the 00README. file): ****************************************************************************** Index for directory: ANONYMOUS@Niord.SHSU.edu:[FILESERV.PC-WEB] Contents: ------------------------------------------------------------------------------ Name Size Type Description ------------------------------------------------------------------------------ 00index --- A this file cwebpc.zip 304876 B ANSI-C/Turbo-C++ Implementierung von Levy/Knuth's WEB (Portierung HHBode) fwebexe.zip 780496 B FWEB System (Zielsprache Fortran) spiderpc.zip 1084447 B Spidery WEB System (Portierung HHBode) tie.zip 81867 B TIE Prozessor tpmkprog.zip 35796 B TP The Makeprog System tpweb.zip 475062 B TPWEB System (Zielsprache Turbo Pascal 6.0) ****************************************************************************** The actual files are: Directory MX_ROOT:[FILESERV.PC-WEB] 00INDEX.;1 2 23-JUL-1992 16:26:54.85 CWEBPC.README;1 16 22-JUL-1992 00:57:32.00 CWEBPC.ZIP;1 596 23-JUL-1992 16:06:23.74 CWEBPC.ZIP-LST;1 4 23-JUL-1992 16:21:15.96 FWEBEXE.README;1 6 11-JUN-1992 00:15:18.00 FWEBEXE.READ_ME;1 42 9-JUN-1992 12:13:34.00 FWEBEXE.ZIP;1 1525 23-JUL-1992 16:06:33.26 FWEBEXE.ZIP-LST;1 2 23-JUL-1992 16:22:24.54 SPIDERPC.README;1 21 1-DEC-1991 00:10:56.00 SPIDERPC.ZIP;1 2119 23-JUL-1992 16:07:00.49 SPIDERPC.ZIP-LST;1 12 23-JUL-1992 16:12:55.27 TIE.README;1 5 2-AUG-1991 10:03:34.00 TIE.ZIP;1 160 23-JUL-1992 16:07:29.07 TIE.ZIP-LST;1 2 23-JUL-1992 16:15:22.90 TPMKPROG.ZIP;1 70 23-JUL-1992 16:07:32.69 TPMKPROG.ZIP-LST;1 1 23-JUL-1992 16:23:27.70 TPWEB.README;1 4 5-DEC-1989 18:15:02.00 TPWEB.ZIP;1 928 23-JUL-1992 16:07:34.52 TPWEB.ZIP-LST;1 4 23-JUL-1992 16:24:29.12 Total of 19 files, 5519 blocks. Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Thu, 23 Jul 1992 20:24:39 CDT Date: Thu, 23 Jul 1992 18:16 PST From: Don Hosek Reply-To: LITPROG@SHSU.edu Subject: Re: CWEB for ANSI C, C++, Turbo C++ To: LITPROG@SHSU.edu Message-ID: <01GMQ73Z7Z6CANBLGS@HMCVAX.CLAREMONT.EDU> Well, I'll have to pick the files up down the line, but I'm curious to know how Mr. Bode managed to get cweb to compile with TCC: I spent a considerable amount of time trying to track down problems (complicated by the fact that the Turbo debugger apparently ignores the file part of #line statements) before finally giving up. With ZTC's 32-bit compiler, I had no problem, so I used that. Are arrays of a useful size in the 16-bit cweb? -dh ================================================================================ Archive-Date: Thu, 23 Jul 1992 20:31:52 CDT Date: Thu, 23 Jul 1992 18:23 PST From: Don Hosek Reply-To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) To: LITPROG@SHSU.edu Message-ID: <01GMQ7C9J5WOANBLGS@HMCVAX.CLAREMONT.EDU> -When I first read about literate programming, I was rather impressed -by the idea. However, when I tried to read some of the Pascal WEB's -that Knuth wrote I was very disappointed. -The only major WEBs I've studied (the TeX and METAFONT source) are not -well adapted to human understanding: they present the pieces bottom up -instead of top down, which would be more natural for most readers. -Rather than going beyond the program structure imposed by the Pascal -syntax, they submit to it, so that the TeXl WEB is not more easily -read than an ordinary Pascal program: all the little pieces come --first, and the main program is kept a secret till the last few lines, -much like the verb in German sentences. The only difference from -straight Pascal code is that there is some descriptive text - but that -helps only micro-understanding of the program rather than -macro-understanding: the module structure, the flow of data, etc. My first WEB was DVIview, a previewer for VM/CMS in which I followed a structure more like what was desired. The outline was borrowed from somewhere else, but to summarize, the only @p section read something like: @p program Dviview; @@; @@; @@; @@; begin @@; @@; @@; @@; end. Then each piece was exploded as appropriate. Aha... found it. A nice concise, well-written web: primes.web (should be distributed with every Pascal WEB distribution). Not quite the scheme above (not exactly necessary in this case), but close enough. -dh ================================================================================ Archive-Date: Fri, 24 Jul 1992 05:26:36 CDT Date: Fri, 24 Jul 92 12:22:03 +0200 From: ath@linkoping.trab.se Reply-To: LITPROG@SHSU.edu Message-ID: <9207241022.AA00607@uranus> To: LITPROG@SHSU.edu Subject: Re: Literate Programming in the Real World(tm) (was: FWEB for the PC?) Timothy Murphy writes as a reply to my earlier post: > >> Rather than going beyond the program structure imposed by the Pascal >> syntax, they submit to it, so that the TeXl WEB is not more easily >> read than an ordinary Pascal program: [ ... ] > >As I'm sure everyone on this list will know, >this was a decision of Knuth's -- right or wrong -- >and not a consequence of the WEB format, >which allows the main program to come at the beginning or at the end. Of course. But as always, people seem to learn by example. I've seen a few attempts at literary programming in Pascal, and all used exactly the same approach as in the TeXbook: main program last. When I asked why, none of the authors knew exactly why. It just turned out that way - I can only assume that it somehow is an artefact of the coding process. But since it followed the pattern of Knuth's texts, nobody thought there was anything very much wrong with it. And that is, I think, the point I'm trying to make. A literary program should be written to mirror how someone learns about a new and complex system - if necessary by lying a little (see the TeXbook). It should be designed, rather than just grow. Those LPs I've read so far do not show any clear evidence of design, or any discernible effort of trying to present things in the right order for learning. That's why I asked: are there any good literary programs around? - programs that can serve as examples of the benefits of literary programming as well as patterns to model ones own attempts at LP on. I think that giving one of those to people who ask abut literate programming will do much to demonstrate the utility of it all. P.S. We've just made some radical changes locally, and some mail have been lost. If anyone mailed any pointers to good literate programs to me, I'd appreciate if you would remail them. Anders Thulin ath@linkoping.trab.se Telia Research AB, Teknikringen 2B, S-583 30 Linkoping, Sweden ================================================================================ Archive-Date: Fri, 24 Jul 1992 06:45:42 CDT Date: Fri, 24 Jul 92 13:51:52 +0200 From: Marcus Speh Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Subject: Why Literate Programming? [was: Lit. Progr. in the Real World] References: <9207241022.AA00607@uranus> >>>>> On Fri, 24 Jul 92 12:22:03 +0200, ath@linkoping.trab.se said: ath> [...] A literary program ath> should be written to mirror how someone learns about a new and complex ath> system - if necessary by lying a little (see the TeXbook). It should ath> be designed, rather than just grow. Those LPs I've read so far do not ath> show any clear evidence of design, or any discernible effort of trying ath> to present things in the right order for learning. I think this is too restricted a use of the WEB system. I like the idea nevertheless, but: If WEB could only be used for pedagogic purposes, it could only serve as an individual toy. It is hard to convince my collaborators to make the effort to try to understand my woven files; they will only do so if I tell them: "Listen, this tool is going to increase the productivity of our group". People will have to worry less if they someone else passes them a started program, or a program to be maintained. Most code "just grows" in the first place, and I am never going to redo all that work. Note: I am not talking about a company, but about relatively large lattice field theory projects at our institute which involve frequently changing people. The pure idea of learning any new computing tool drives most of these guys mad. This is a consequence of the (still) low reputation of CS among (theoretical) physicists. Might be I misunderstood you, Anders. I do not think there is one and only "good style" in LP (besides the usual programming sins which are largely eliminated in LP anyway). I think that the value of LP code will always be dictated by the kind of application you are using it for. ath> That's why I asked: are there any good literary programs around? - ath> programs that can serve as examples of the benefits of literary ath> programming as well as patterns to model ones own attempts at LP on. ath> I think that giving one of those to people who ask abut literate ath> programming will do much to demonstrate the utility of it all. I second this point of yours! Though: There might be "good" LPs for demonstrating how the LProgrammer learnt to implement something, and there might be others which serve "group production" purposes. A third reason somebody else told me about (who is using WEB for years) is simply to have a nice documentation once he looks at old code again. It is clear that these LPs may very well violate any "good style". I guess that I have been trying hard to express with my bad English what is trivially true for any meta-language [or however the experts call systems like WEB]. Summarizing, I would rather reject any proposal for a "good style" *on top* of Literate Programming, because I want to use WEB in order to do *many* things, namely ... rewrite old code [often by others] in order to better understand it ... make code better understandable for others so that I can give it away without bad conscience, ... provide documentation for myself in case I am still in this business some years from now ;-( ... satisfy my own sick need for writing something I consider beautiful (my most objective goal *-) [ I should say that I only used FWEB so far, but the philosophy is the same everywhere, I assume.] -msp =================================================================== Marcus Speh INTERnet II. Institut f. Theor. Physik BITnet Luruper Chaussee 149 DECnet <13313::SPEH> 2000 Hamburg 50/Germany Tel.(040)8998-2260 FAX:(040)8998-2267 ================================================================================ Archive-Date: Fri, 24 Jul 1992 08:37:51 CDT Return-Path: Date: Fri, 24 Jul 92 13:53:46 +0200 From: rdwi@se.alcbel.be (Ronny De Winter) Reply-To: LITPROG@SHSU.edu Message-ID: <9207241153.AA07315@se.alcbel.be> To: LITPROG@shsu.edu Subject: UNSUBSCRIBE rdwi@se.alcbel.be from mailing list UNSUBSCRIBE rdwi@se.alcbel.be from mailing list LITPROG please Thanks, Ronny De Winter ================================================================================ Archive-Date: Fri, 24 Jul 1992 10:22:09 CDT Date: Fri, 24 Jul 92 17:17:40 MEZ From: Hans-Hermann Bode Reply-To: LITPROG@SHSU.edu Subject: Re: ANSI CWEB---Addendum To: litprog@SHSU.edu Just to tell the truth. Yesterday, I supposed the rules > decl_head lpar (decl_head | int_like) comma --> decl_head lpar > > decl_head lpar (decl_head | int_like) rpar --> decl_head to handle function prototypes. These will fail with CWEAVE, Version 2.6, since Knuth introduced the following exceptions: >The |exp| in rules 24 and 30 should not be immediately followed by >|lpar| or~|exp|. These rules are: 24 decl_head exp --> decl_head 30 typedef_like decl_head (exp | int_like) --> typedef_like decl_head Now, in a function prototype, we never get to the additional rules above if rule 24 may not be followed by an |lpar|. Moreover, from such a restriction some delicate problems arise (even for tradional C). Therefore, I decided not to change the prototype rules but not to reflect those restrictions in CWEBPC. Eventually, I could not figure out the significance of them anyway; if someone can, please tell me. Hans-Hermann Bode Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck Tel.: (49)-541-9692545 e-mail: HHBODE@DOSUNI1.BITNET ================================================================================ Archive-Date: Fri, 24 Jul 1992 10:24:49 CDT Date: Fri, 24 Jul 92 17:18:49 MEZ From: Hans-Hermann Bode Reply-To: LITPROG@SHSU.edu Subject: Re: ANSI CWEB To: litprog@SHSU.edu Timothy Murphy wrote: >> With these additions and changes I got an ANSI-CWEB that was quite >> satisfactory---at least for my own applications, I never got comments from >> others. In the latest version of CWEBPC things changed a little bit, i.e., >> about 15 new rules were added and about 10 of the old rules were rewritten >> or extended to begin C++ support---too much to post it here. > >Surely the .ch file(s) cannot have been too large? >I'd very much like to see your mods, >and I'm sure others would too. The changefiles all together have a size of approx. 85 K, from which the one for CWEAVE contributes about 35 K. This is, because they contain prototypes for all functions in the code, PC-specific stuff, and the new production rules. Thus, I would prefer if you could get them by ftp, e.g., from niord.shsu.edu. If this is impossible, try mail-server@rus.uni-stuttgart.de (send a mail containing HELP). If even that fails, send me a message and I will mail the files to you. Hans-Hermann Bode Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck Tel.: (49)-541-9692545 e-mail: HHBODE@DOSUNI1.BITNET ================================================================================ Archive-Date: Fri, 24 Jul 1992 10:25:10 CDT Date: Fri, 24 Jul 92 17:20:42 MEZ From: Hans-Hermann Bode Reply-To: LITPROG@SHSU.edu Subject: Re: CWEB for ANSI C, C++, Turbo C++ To: litprog@SHSU.edu Don Hosek was wondering: >Well, I'll have to pick the files up down the line, but I'm >curious to know how Mr. Bode managed to get cweb to compile with >TCC: I spent a considerable amount of time trying to track down >problems (complicated by the fact that the Turbo debugger >apparently ignores the file part of #line statements) before >finally giving up. With ZTC's 32-bit compiler, I had no problem, >so I used that. Are arrays of a useful size in the 16-bit cweb? Oh, I just provided prototypes for all functions in the code and declared pointers into large arrays as |huge|. More helpful in debugging than the debugger (you are right: the Turbo Debugger is useless for tangled files; fortunately, one rarely feels a need for it with WEB sources) is the compiler that gives a warning if a huge pointer is assigned to a non-huge one. The arrays have exactly the same size as in the original CWEB except for CTANGLE's |max_toks|, which has been reduced from 270000 bytes to 135000 bytes. This means, that in tangling cweave.w about 25 % of its capacity is used. One can approximate that in spite of the reduction a WEB of several 100 pages may be processed by CTANGLE. Somewhere in this range, I think, is the point where the file should be split up from other reasons, anyway. Hans-Hermann Bode Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck Tel.: (49)-541-9692545 e-mail: HHBODE@DOSUNI1.BITNET ================================================================================ Archive-Date: Fri, 24 Jul 1992 11:44:03 CDT Date: Fri, 24 Jul 92 10:42:45 -0600 From: jongill@lilac.bldrdoc.gov (Jonathan M. Gilligan) Reply-To: LITPROG@SHSU.edu Message-ID: <9207241642.AA03638@lilac.csd.bldrdoc.gov> To: LITPROG@SHSU.edu Subject: Why Literate Programming? [was: Lit. Progr. in the Real World] Marcus Speh writes >>>>> On Fri, 24 Jul 92 12:22:03 +0200, ath@linkoping.trab.se said: ath> [...] A literary program ath> should be written to mirror how someone learns about a new and complex ath> system - if necessary by lying a little (see the TeXbook). It should ath> be designed, rather than just grow. Those LPs I've read so far do not ath> show any clear evidence of design, or any discernible effort of trying ath> to present things in the right order for learning. I think this is too restricted a use of the WEB system. I like the idea nevertheless, but: If WEB could only be used for pedagogic purposes, it could only serve as an individual toy. It is hard to convince my collaborators to make the effort to try to understand my woven files; they will only do so if I tell them: "Listen, this tool is going to increase the productivity of our group". People will have to worry less if they someone else passes them a started program, or a program to be maintained. Most code "just grows" in the first place, and I am never going to redo all that work. But Anders's point is applicable here. Read TeX.web and try to get a feel for how the program runs. First you get all the global data and initialization, then you go through I/O character-set translation, etc. The main routine that links the parts together is the last thing you see. Nowhere is there an overview of what's going on or how the various phases of processing are invoked. You are drawn inexorably into the microscopic, despite what Knuth has said about a talent for programming being a talent for switching context rapidly between the forest and the trees. A good web should begin with an overview of what the program does and how the task is broken into chunks. This is important not just for pedagogy, but for the new person on the project, who needs to learn what this colossal piece of code written by her predecessors does. Here, I find myself thinking of (and agreeing with) Doug McIlroy's complaint (CACM Vol. 29, pp. 471--483 (1986)) that WEB-style literate programming would be much better if there were facilities to include diagrams to help explain what's going on. ---Jon Disclaimer --- The government probably disagrees with my opinions. ================================================================================ Archive-Date: Fri, 24 Jul 1992 14:10:04 CDT Date: Fri, 24 Jul 1992 13:56:10 -0500 From: "Donald N. Petcher" Reply-To: LITPROG@SHSU.edu Message-ID: <199207241856.AA12402@arthur.wustl.edu> To: litprog@shsu.edu Subject: Re: Literate Programming in the Real World(tm) Anders Thulin writes: >Timothy Murphy writes as a reply to my earlier post: . . . >>As I'm sure everyone on this list will know, >>this was a decision of Knuth's -- right or wrong -- >>and not a consequence of the WEB format, >>which allows the main program to come at the beginning or at the end. > >Of course. But as always, people seem to learn by example. I've seen a >few attempts at literary programming in Pascal, and all used exactly >the same approach as in the TeXbook: main program last. When I asked >why, none of the authors knew exactly why. It just turned out that >way - I can only assume that it somehow is an artefact of the coding >process. But since it followed the pattern of Knuth's texts, nobody >thought there was anything very much wrong with it. A literary program first of all is governed by personal taste as to what is readable *and* enjoyable. For example, even though I have seen many C programs that put the main program at the end, I have never been tempted to do so. The way I think when I program dictates that I put the main program *first*, whether I am programming in C or web, and when I read my own programs at a later stage, this also seems intuitive to me. Probably some others just like to start reading details and get to the main story later, and still others like to put the program in the editor and hit the "Go to end of file" key to start reading the program and perhaps also turn to the back of the book first when reading the output. (After all, some like philosophy, some like science, some like mystery novels, and some like all three depending on the mood!) I still prefer the overview to be the first thing I see. (By the same token, I find it very frustrating reading Knuth's books.) . . . >That's why I asked: are there any good literary programs around? - >programs that can serve as examples of the benefits of literary >programming as well as patterns to model ones own attempts at LP on. I >think that giving one of those to people who ask abut literate >programming will do much to demonstrate the utility of it all. > Although web has been around for quite awhile, it has not had such a following that these concepts are really fleshed out yet. We have some idea what style is for writing books, but for writing programs we still have a lot to learn and discuss. I anticipate that this group is a beginning and hope strides will be made to move toward a more uniform perspective on what tools we need to accomplish the goal, as well as an appreciation for different styles of *good* literary programs. (Speaking of tools, the issue is not settled from a programmer's standpoint either, as differences in philosophy are already reflected in the various versions of web around: e.g. fweb vs. funnel web.) Until some clearer consensus evlolves, perhaps the best we can do is submit some of our own efforts, and collectively judge what we consider good examples of literate programming. Having said that though, I would venture to guess that if I looked back over my own programs I would not feel very confident about submitting any one as my own conception of what literate programming ought to be. I don't think I have ever polished one up to that extent. Just as in writing a research paper or a novel, there are degrees along the way to a fully finished and publishable product. To that extent, I guess the major examples remain the programs TeX and Metafont, as reflecting the judgements of Knuth. After all, he did publish them. > >Anders Thulin ath@linkoping.trab.se >Telia Research AB, Teknikringen 2B, S-583 30 Linkoping, Sweden Don Petcher petcher@wuphys.wustl.edu Department of Physics Washington University Saint Louis, Missouri 63130 ================================================================================ Archive-Date: Fri, 24 Jul 1992 15:20:03 CDT Date: Fri, 24 Jul 1992 19:19:48 +0200 From: Martin Simons Reply-To: LITPROG@SHSU.edu Message-ID: <199207241719.AA05787@mail.cs.tu-berlin.de> To: LITPROG@SHSU.edu Subject: Re: CWEB for ANSI C, C++, Turbo C++ ================================================================================ Archive-Date: Fri, 24 Jul 1992 15:21:16 CDT Date: Fri, 24 Jul 1992 15:17:39 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207242017.AA10914@mira.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: ACM articles on Literate Programming Chris Van Wyk's Literate Programming column in CACM appeared four more times in addition to the ones cited yesterday by Rob Beezer: December 1988, pp. 1376-1385 (the last time a complete program appeared in this column) June 1989, pp. 740-754 (fragments of a "literate" file differencing program were published, with a critique by Harold Thimbleby, the implementor of the *first* "cweb" system, which was based on Troff rather than TeX) September 1989, pp. 1051-1055 (an article by Norman Ramsey discussing the implementation of Spider Web, the first attempt at a programming- language-independent version of Web; no program or critique appeared) March 1990, pages 361 and 365 (not inclusive; the article was divided) (this is just a brief -- and rather sullen, I thought -- note from Chris Van Wyk stating that the column was being dropped because the only people who seemed to be writing literate programs were people who had implemented literate programming systems) IMHO Chris Van Wyk didn't do a very good job with the LP column; a full year elapsed between the second and third installments, and only once was the gap less than six months. He should either have worked harder or quit sooner. Moreover, his own contributions were limited to behind-the-scenes coordination and a few paragraphs per column -- he left nearly all the writing to the guest writers and critics, and I saw no indication that in three years he had ever tried Web (or any other LP system) himself even once. I don't think he was entitled to ascribe the failure of the column to a general lack of interest in literate programming. As long as we're building a LP bibliography (if that's what we're doing), Thimbleby's article on Troff-based "cweb" ought to be mentioned; it appeared in the Computer Journal in June 1986 (volume 29 number 3, I think), on pages 201-211. This group is now, what, a week old? Do we need a FAQ list yet? 1/2 :-) --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Fri, 24 Jul 1992 16:13:25 CDT Date: Fri, 24 Jul 1992 17:10:55 -0400 From: karl@claude.cs.umb.edu (Karl Berry) Message-ID: <199207242110.AA14306@claude.cs.umb.edu> To: litprog@shsu.edu Reply-To: LITPROG@SHSU.edu subscribe litprog "Karl Berry" ================================================================================ Archive-Date: Fri, 24 Jul 1992 18:12:08 CDT Date: Fri, 24 Jul 92 16:08:31 PDT From: brad@sol.nwc.navy.mil (Bradford Clark ( Brad )) Reply-To: LITPROG@SHSU.edu Message-ID: <9207242308.AA01248@sol.nwc.navy.mil> To: LITPROG@SHSU.edu Subject: Re: Why Literate Programming? [was: Lit. Progr. in the Real World] jongill@lilac.bldrdoc.gov (Jonathan M. Gilligan) writes: >From LP-Mgr@SHSU.edu Fri Jul 24 10:25:27 1992 >X-Listname: Literate Programming Discussion List >Date: Fri, 24 Jul 92 10:42:45 -0600 >From: jongill@lilac.bldrdoc.gov (Jonathan M. Gilligan) >........ A good web should begin with an overview of what >the program does and how the task is broken into chunks. This is >important not just for pedagogy, but for the new person on the >project, who needs to learn what this colossal piece of code written >by her predecessors does. > Ditto, ditto. I always start my WEB code off with a explaination that will put the following program in context. What I would really LOVE is to be able to talk to drawings included as part of the text file. A picture is worth a thousand words. Thanks, | Brad Clark ----, __ | Code 3916 /___/ / / ' / / | NAWC-WD / \ __ ___ ___/ / / ___ __ /_/ | China Lake, CA 93555 /_____/_/ (_/__(_/__/ (____/_/__(_/ (_/ \_ | Ph: 619-939-6655 e-mail: brad.clark@nwc.navy.mil ================================================================================ Archive-Date: Fri, 24 Jul 1992 18:46:50 CDT Date: Fri, 24 Jul 1992 18:44:22 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207242344.AA01322@rigel.math.uiuc.edu> To: litprog@shsu.edu Subject: Pictures in Webs Brad Clark (brad.clark@nwc.navy.mil) writes: > What I would really LOVE is > to be able to talk to drawings included as part of the text file. A > picture is worth a thousand words. Agreed. A picture of a tricky data structure is invaluable, and sometimes indispensable. But have you tried psfig for including illustrations in your listings? I have had no trouble using it with CWEB, and the macros in cwebmac.tex appear very similar to the ones in webmac.tex. I realize the universe isn't entirely PostScript, but for lots of people it's sufficient. At any rate I thought I'd mention it. (Or did I misunderstand what you wanted? I didn't quite follow the part about "talking to drawings"; I assumed it was just a mental slip.) --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Sat, 25 Jul 1992 09:00:24 CDT Message-ID: <9207251358.AA04376@lamont.ldgo.columbia.edu> Date: Sat, 25 Jul 92 09:58:25 EDT From: fritzz@lamont.ldgo.columbia.edu (Fritz Zaucker) To: LITPROG@SHSU.edu Subject: Pictures in Webs Reply-To: LITPROG@SHSU.edu X-Listname: Literate Programming Discussion List Date: Fri, 24 Jul 1992 18:44:22 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Brad Clark (brad.clark@nwc.navy.mil) writes: > What I would really LOVE is > to be able to talk to drawings included as part of the text file. A > picture is worth a thousand words. Agreed. A picture of a tricky data structure is invaluable, and sometimes indispensable. But have you tried psfig for including illustrations in your listings? I have had no trouble using it with CWEB, and the macros in cwebmac.tex appear very similar to the ones in webmac.tex. I realize the universe isn't entirely PostScript, but for lots of people it's sufficient. At any rate I thought I'd mention it. Why PostScript? If you wanna avoid it, draw a picture with PicTeX. There is even a fig -> PicTeX converter. Fritz ================================================================================ Archive-Date: Sun, 26 Jul 1992 23:02:39 CDT Date: Sun, 26 Jul 1992 22:37:38 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: Web for Macintosh To: LitProg Mail-List Message-ID: Someone may have already asked this, but I don't remember. Is there a Web for the Macintosh (68000 chip)? I have just gotten the pre-compiled FWeb for the PC, and I really like it. Is there a pre-compiled Mac version? If anyone could point me in the right direction, I'd appreciate it. Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Sun, 26 Jul 1992 23:03:06 CDT Date: Sun, 26 Jul 1992 22:40:15 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: Epsilon Web file? To: LitProg Mail-List Message-ID: Is there a customization file for Epsilon (Emacs clone for the PC) similar to the CWeb.el file? If so, any info appreciated. Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Mon, 27 Jul 1992 07:32:22 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: Web for Macintosh To: LITPROG@SHSU.edu Date: Mon, 27 Jul 92 13:29:56 BST Sender: tim@maths.tcd.ie Message-ID: <9207271329.aa14495@salmon.maths.tcd.ie> > Someone may have already asked this, but I don't remember. Is there a Web > for the Macintosh (68000 chip)? I have just gotten the pre-compiled FWeb > for the PC, and I really like it. Is there a pre-compiled Mac version? If > anyone could point me in the right direction, I'd appreciate it. There are pre-compiled Mac versions of ctangle and cweave -- I take it that is what is meant here by Web? -- available from ftp.maths.tcd.ie in pub/TeX/CWEB/16-bit (ctangle.hqx and cweave.hqx). The (very small) change files used to create these are also there. Change files for the standard web2c distribution (from Karl Berry) are also available in pub/TeX/src-5.851c/16-bit . The port is described in MacTeX.tex in that directory. Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Mon, 27 Jul 1992 12:25:50 CDT Date: Mon, 27 Jul 1992 12:23:35 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Message-ID: <0095E32F.D83F8FA0.10549@SHSU.edu> Subject: Re: Web for Macintosh Had a little break from a few meetings, and..... On Mon, 27 Jul 92 13:29:56 BST, Timothy Murphy posted: > There are pre-compiled Mac versions of ctangle and cweave -- > I take it that is what is meant here by Web? -- > available from ftp.maths.tcd.ie in pub/TeX/CWEB/16-bit > (ctangle.hqx and cweave.hqx). > The (very small) change files used to create these are also there. The files are available from FILESERV and Niord. Attached is the description file. Time to return to meetings, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CWEB-16BIT ---------- The CWEB-16BIT package includes version 1.0 (12 July 1992) of Timothy Murphy's change files for THINK C and BinHex'ed executables for CWEB on the Macintosh. If you want to re-compile ctangle and/or cweave, you will need the actual *.w CWEB files -- common.w and ctangle.w for ctangle, common.w, prod.w and cweave.w for cweave (these are included in the CWEB distribution on FILESERV and Niord). To retrieve the set of 9 files distributed in 11 parts, include: SENDME CWEB-16BIT in the body of a mail message to FILESERV@SHSU.BITNET (FILESERV@SHSU.edu). To retrieve a specific file, such as SENDME CWEB-16BIT.WC_CH, include: SENDME SENDME CWEB-16BIT.WC_CH in your mail request to FILESERV. The individual files, along with a compressed tar archive and a ZIP archive, are available for anonymous ftp retrieval from Niord.SHSU.edu (192.92.115.8) in the [FILESERV.CWEB-16BIT] directory. Files in this package: (1 Block = 512 bytes) File Blocks Save file as: ------------------------------------------------------------------------------- CWEB-16BIT.COMMON_CH 6 common.ch CWEB-16BIT.CTANGLE_CH 7 ctangle.ch CWEB-16BIT.CTANGLE_HQX_1OF2 77 ctangle.hqx (part 1 of 2) CWEB-16BIT.CTANGLE_HQX_2OF2 7 (part 2 of 2) CWEB-16BIT.CWEAVE_CH 11 cweave.ch CWEB-16BIT.CWEAVE_HQX_1OF2 77 cweave.hqx (part 1 of 2) CWEB-16BIT.CWEAVE_HQX_2OF2 38 (part 2 of 2) CWEB-16BIT.README_TCD 2 README.TCD CWEB-16BIT.TREEPRINT_CH 3 treeprint.ch CWEB-16BIT.WC_CH 3 wc.ch CWEB-16BIT.WMERGE_CH 3 wmerge.ch Approximate total blocks in full CWEB-16BIT package = 234 ================================================================================ Archive-Date: Tue, 28 Jul 1992 23:03:33 CDT Date: Tue, 28 Jul 1992 23:53:39 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: CWeb on the Mac: Problems? To: LitProg Mail-List Message-ID: Is anyone using the CWeave and CTangle which have been ported to the Mac? I got them today, but when I run them and enter a Web file to process, all I ever get in return is (That was a fatal error, my friend). I thought it was because of the path I specified, so I tried several variations of the path, and finally moved the file into the same directory as CWeave, but I still get this error. Any ideas? Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Wed, 29 Jul 1992 00:14:33 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 06:07:45 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Tue Jul 28 23:53:39 +22313801 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from netcomsv.netcom.com by Niord.SHSU.edu (MX V3.1B) with SMTP; Tue, 28 Jul 1992 23:01:55 CDT Received: from aix3.UUCP by netcomsv.netcom.com with UUCP (4.1/SMI-4.1) id AA03367; Tue, 28 Jul 92 20:59:59 PDT Received: by aix3.ema.com (AIX 3.2/UCB 5.64/4.03) id AA26193; Tue, 28 Jul 1992 23:55:41 -0400 Date: Tue, 28 Jul 1992 23:53:39 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: CWeb on the Mac: Problems? To: LitProg Mail-List Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Is anyone using the CWeave and CTangle which have been ported to the Mac? I got them today, but when I run them and enter a Web file to process, all I ever get in return is (That was a fatal error, my friend). I thought it was because of the path I specified, so I tried several variations of the path, and finally moved the file into the same directory as CWeave, but I still get this error. Any ideas? Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Wed, 29 Jul 1992 00:53:11 CDT Date: Wed, 29 Jul 1992 00:51:09 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207290551.AA00485@mira.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: CWeb on the Mac: Problems? CC: wjg@aix3.ema.com > Is anyone using the CWeave and CTangle which have been ported to the Mac? > I got them today, but when I run them and enter a Web file to process, all > I ever get in return is (That was a fatal error, my friend). I thought it > was because of the path I specified, so I tried several variations of the > path, and finally moved the file into the same directory as CWeave, but I > still get this error. Any ideas? > Joey Gibson I tried them and had this experience. As far as I can tell, the programs expect to be given a change file and bomb if none is specified. I made an empty file named "null.ch" and I always give that as the change file when I want to process a web file without changes. Kludgy, but it works. --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Wed, 29 Jul 1992 01:15:25 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 07:07:42 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Wed Jul 29 06:07:45 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from minster.york.ac.uk by Niord.SHSU.edu (MX V3.1B) with SMTP; Wed, 29 Jul 1992 00:12:29 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 06:07:45 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Tue Jul 28 23:53:39 +22313801 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from netcomsv.netcom.com by Niord.SHSU.edu (MX V3.1B) with SMTP; Tue, 28 Jul 1992 23:01:55 CDT Received: from aix3.UUCP by netcomsv.netcom.com with UUCP (4.1/SMI-4.1) id AA03367; Tue, 28 Jul 92 20:59:59 PDT Received: by aix3.ema.com (AIX 3.2/UCB 5.64/4.03) id AA26193; Tue, 28 Jul 1992 23:55:41 -0400 Date: Tue, 28 Jul 1992 23:53:39 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: CWeb on the Mac: Problems? To: LitProg Mail-List Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Is anyone using the CWeave and CTangle which have been ported to the Mac? I got them today, but when I run them and enter a Web file to process, all I ever get in return is (That was a fatal error, my friend). I thought it was because of the path I specified, so I tried several variations of the path, and finally moved the file into the same directory as CWeave, but I still get this error. Any ideas? Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Wed, 29 Jul 1992 02:02:19 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 07:57:48 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Wed Jul 29 00:51:09 0500 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from mira.math.uiuc.edu by Niord.SHSU.edu (MX V3.1B) with SMTP; Wed, 29 Jul 1992 00:52:49 CDT Received: by mira.math.uiuc.edu id AA00485 (5.65d/IDA-1.4.3 for LITPROG@SHSU.edu); Wed, 29 Jul 1992 00:51:09 -0500 Date: Wed, 29 Jul 1992 00:51:09 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207290551.AA00485@mira.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: CWeb on the Mac: Problems? CC: wjg@aix3.ema.com > Is anyone using the CWeave and CTangle which have been ported to the Mac? > I got them today, but when I run them and enter a Web file to process, all > I ever get in return is (That was a fatal error, my friend). I thought it > was because of the path I specified, so I tried several variations of the > path, and finally moved the file into the same directory as CWeave, but I > still get this error. Any ideas? > Joey Gibson I tried them and had this experience. As far as I can tell, the programs expect to be given a change file and bomb if none is specified. I made an empty file named "null.ch" and I always give that as the change file when I want to process a web file without changes. Kludgy, but it works. --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Wed, 29 Jul 1992 02:32:15 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 08:26:50 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Wed Jul 29 07:07:42 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from minster.york.ac.uk by Niord.SHSU.edu (MX V3.1B) with SMTP; Wed, 29 Jul 1992 01:12:12 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 07:07:42 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Wed Jul 29 06:07:45 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from minster.york.ac.uk by Niord.SHSU.edu (MX V3.1B) with SMTP; Wed, 29 Jul 1992 00:12:29 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 06:07:45 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Tue Jul 28 23:53:39 +22313801 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from netcomsv.netcom.com by Niord.SHSU.edu (MX V3.1B) with SMTP; Tue, 28 Jul 1992 23:01:55 CDT Received: from aix3.UUCP by netcomsv.netcom.com with UUCP (4.1/SMI-4.1) id AA03367; Tue, 28 Jul 92 20:59:59 PDT Received: by aix3.ema.com (AIX 3.2/UCB 5.64/4.03) id AA26193; Tue, 28 Jul 1992 23:55:41 -0400 Date: Tue, 28 Jul 1992 23:53:39 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: CWeb on the Mac: Problems? To: LitProg Mail-List Message-ID: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII ================================================================================ Archive-Date: Wed, 29 Jul 1992 02:42:22 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 08:37:50 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Wed Jul 29 07:57:48 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from minster.york.ac.uk by Niord.SHSU.edu (MX V3.1B) with SMTP; Wed, 29 Jul 1992 02:02:10 CDT From: postmaster@minster.york.ac.uk Reply-To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 07:57:48 To: LITPROG@shsu.edu Message-ID: Subject: smtp mail failed Your mail to minster.york.ac.uk!dan is undeliverable. ---------- diagnosis ---------- SoftEng: Connection timed out ---------- unsent mail ---------- >From SHSU.edu!LITPROG Wed Jul 29 00:51:09 0500 1992 remote from inet Errors-To: LP-Mgr@SHSU.edu X-ListName: Literate Programming Discussion List Received: from mira.math.uiuc.edu by Niord.SHSU.edu (MX V3.1B) with SMTP; Wed, 29 Jul 1992 00:52:49 CDT Received: by mira.math.uiuc.edu id AA00485 (5.65d/IDA-1.4.3 for LITPROG@SHSU.edu); Wed, 29 Jul 1992 00:51:09 -0500 Date: Wed, 29 Jul 1992 00:51:09 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207290551.AA00485@mira.math.uiuc.edu> To: LITPROG@SHSU.edu Subject: Re: CWeb on the Mac: Problems? CC: wjg@aix3.ema.com > Is anyone using the CWeave and CTangle which have been ported to the Mac? > I got them today, but when I run them and enter a Web file to process, all > I ever get in return is (That was a fatal error, my friend). I thought it > was because of the path I specified, so I tried several variations of the > path, and finally moved the file into the same directory as CWeave, but I > still get this error. Any ideas? > Joey Gibson I tried them and had this experience. As far as I can tell, the programs expect to be given a change file and bomb if none is specified. I made an empty file named "null.ch" and I always give that as the change file when I want to process a web file without changes. Kludgy, but it works. --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Wed, 29 Jul 1992 07:58:12 CDT Date: Wed, 29 Jul 1992 07:57:48 CDT From: "George D. Greenwade" Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Message-ID: <0095E49D.0BBCAAC0.16324@SHSU.edu> Subject: RE: smtp mail failed The moral of this story is never go home or logout if you own a list, I guess. I have notified the postmaster at the site which is merrily bouncing mail back to the list that it has a configuration problem. Under the various SMTP-related RFCs, the LAST address a mailer daemon should return bounces to is the Reply-To: field, which this site was doing. The proper specification of bouncing is: Return-Path: *+ Errors-To: *+ From: Sender: * Reply-To: *+ To: (those marked by * are optional fields, those marked by + are generated by our mailer, those without marks are required and created). The Return-Path: and Errors-To: field both point to an alias, , which comes to me -- I routinely handle quite a few bounces each day from among my 11 lists; I should have been the only one to have seen these. The list address, , is included and first seen in Reply-To:, the site has a problem. Nevertheless, I apologize for the junk mail you have received -- I am quite aware that it is a terrible waste of bandwidth, as well as rather annoying. Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSU Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 P. O. Box 2118 FAX: (409) 294-3612 Sam Houston State University Internet: bed_gdg@SHSU.edu Huntsville, TX 77341 bed_gdg%SHSU.decnet@relay.the.net %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Wed, 29 Jul 1992 10:11:15 CDT Date: Wed, 29 Jul 92 16:52:59 MEZ From: Hans-Hermann Bode Reply-To: LITPROG@SHSU.edu Subject: Re: CWeb on the Mac: Problems? To: litprog@SHSU.edu Cameron Smith wrote: >I tried them and had this experience. As far as I can tell, the >programs expect to be given a change file and bomb if none is specified. >I made an empty file named "null.ch" and I always give that as the >change file when I want to process a web file without changes. >Kludgy, but it works. I happen to know approximately nothing about Macs, but it seems to me that the following statement in common.w has to be changed appropriately: if (!found_change) strcpy(change_file_name,"/dev/null"); (This is line 1007 in Version 2.4.) Hans-Hermann Bode Arbeitsgruppe Systemforschung, Universit\"at Osnabr\"uck Tel.: (49)-541-9692545 e-mail: HHBODE@DOSUNI1.BITNET ================================================================================ Archive-Date: Wed, 29 Jul 1992 11:29:19 CDT From: Timothy Murphy Reply-To: LITPROG@SHSU.edu Subject: Re: CWeb on the Mac: Problems? To: LITPROG@SHSU.edu Date: Wed, 29 Jul 92 17:24:52 BST Sender: tim@maths.tcd.ie Message-ID: <9207291724.aa12087@salmon.maths.tcd.ie> > I tried them and had this experience. As far as I can tell, the > programs expect to be given a change file and bomb if none is specified. > I made an empty file named "null.ch" and I always give that as the > change file when I want to process a web file without changes. > Kludgy, but it works. Sorry, I guess this is my fault ... The 'standard' version 'reads' from /dev/null if no change file is given. Unfortunately the Mac doesn't have such an animal, so expects a change file to be given. This should have been stated more explicitly. Timothy Murphy e-mail: tim@maths.tcd.ie tel: +353-1-2842366 (home/office) +353-1-7021507 (university) fax: +353-1-2842295 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland ================================================================================ Archive-Date: Wed, 29 Jul 1992 13:04:43 CDT Date: Wed, 29 Jul 1992 13:38:08 +22313801 (EDT From: Joey Gibson Reply-To: LITPROG@SHSU.edu Subject: No double sidedness? To: LitProg Mail-List Message-ID: Is there any way in FWeb or CWeb to turn of double sided pagination? IOW, I have no plans to print out my .dvi files double-sided, so can I turn this off, so that all page numbers are in the upper right hand corner and all section numbers are in the upper left hand corner? Joey Gibson ===> Please address all E-mail to ===> The views expressed here are not necessarily those of EMA. ================================================================================ Archive-Date: Wed, 29 Jul 1992 18:08:09 CDT Date: Wed, 29 Jul 1992 18:01:03 -0500 From: "Donald N. Petcher" Reply-To: LITPROG@SHSU.edu Message-ID: <199207292301.AA04803@arthur.wustl.edu> To: litprog@shsu.edu Subject: Re: No double sidedness? > > Is there any way in FWeb or CWeb to turn of double sided pagination? IOW, I have > no plans to print out my .dvi files double-sided, so can I turn this off, so > that all page numbers are in the upper right hand corner and all section numbers > are in the upper left hand corner? > > > Joey Gibson > > ===> Please address all E-mail to > ===> The views expressed here are not necessarily those of EMA. In fweb, the command \identicalpageheadstrue (put in TeX part at beginning of document) makes all page headers identical, but it puts the page numbers in the upper LEFT corner and the section numbers in the upper RIGHT corner. To do it the other way around you can either change the macro normaloutput in fwebmac.sty as indicated: \def\normaloutput#1#2#3{\shipout\vbox{ \ifodd\pageno\hoffset=\pageshift\fi \vbox to\fullpageheight { \iftitle\global\titlefalse \else\hbox to\pagewidth {\vbox to10pt{}% \ifidenticalpageheads#3\else % THIS WAS ORIGINALLY #2 <--------- \ifodd\pageno #3% Makes page numbers alternate left \& right. \else#2\fi \fi }% \fi \vfill#1 }}% Parameter |#1| is the page itself \global\advance\pageno by1} or you can include the above version in your TeX file as a redefinition of the macro. This is from version 1.22. If you have version 1.23 make sure it hasn't changed. I don't know if there is an 'official' way of doing this. Cheers, Don Petcher petcher@wuphys.wustl.edu Department of Physics Washington University Saint Louis, Missouri ================================================================================ Archive-Date: Fri, 31 Jul 1992 17:59:42 CDT Date: Fri, 31 Jul 1992 17:53:50 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207312253.AA11931@spica.math.uiuc.edu> To: litprog@shsu.edu REVIEW LITPROG ================================================================================ Archive-Date: Fri, 31 Jul 1992 18:05:08 CDT Date: Fri, 31 Jul 1992 18:01:55 -0500 From: Cameron Smith Reply-To: LITPROG@SHSU.edu Message-ID: <199207312301.AA11940@spica.math.uiuc.edu> To: litprog@shsu.edu Subject: Sorry! Sorry about that; I was *sure* I typed "listserv" but just after I sent the preceding I realized that I had sent it to the list instead. Curse me for a novice! BTW, is the sudden silence on this group just a result of the TUG meeting being held now, or was the storm of interest in literate programming merely a tempest in a teapot? I am new to CWEB and to literate programming generally, and I would be *very* interested to hear from people who've used literate methods to develop substantial software, especially if several people were cooperating on a project. Did LP make your programs better, easier to write, easier to debug, easier to maintain, and/or more efficient? Did it introduce any problems that you wouldn't have had if you had used traditional methods? A full-blown case study isn't necessary; anecdotes would be of interest. Equally of interest would be stories from people who tried LP and didn't like it (although maybe such people aren't on this list!). Anybody who tried WEB or CWEB or c-no-web or some such and then abandoned it, would you care to say why? Anyone want to vouchsafe a few paragraphs for the enlightenment of others? --Cameron Smith cameron@symcom.math.uiuc.edu ================================================================================ Archive-Date: Fri, 31 Jul 1992 18:25:23 CDT Date: Sat, 1 Aug 92 01:31:25 +0200 From: Marcus Speh Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Subject: Sorry! References: <199207312301.AA11940@spica.math.uiuc.edu> >>>>> On Fri, 31 Jul 1992 18:01:55 -0500, Cameron Smith said: Cam'l> Sorry about that; I was *sure* I typed "listserv" but just after Cam'l> I sent the preceding I realized that I had sent it to the list Cam'l> instead. Curse me for a novice! I'm not sure whether it is an old and outworn trick or not...for me it's a new way of getting *all* the attraction...(sorry the "Cam'l": I will write a subsequent message to excuse it as a typing error 8-)) --Marcus Speh [another novice] INTERnet P.S. BTW, what is the result of REVIEW LITPROG, Cameron... ================================================================================ Archive-Date: Fri, 31 Jul 1992 20:10:10 CDT Date: Sat, 1 Aug 92 03:09:53 +0200 From: Marcus Speh Reply-To: LITPROG@SHSU.edu To: LITPROG@SHSU.edu Subject: LitProg: A "Tempest in a Teapot"? References: <199207312301.AA11940@spica.math.uiuc.edu> Cameron, you said first: Cameron> BTW, is the sudden silence on this group just a result of the Cameron> TUG meeting being held now, or was the storm of interest in Cameron> literate programming merely a tempest in a teapot? I guess it hard in general to keep both novices and veterans together on the same mailing list. For some reason, my "anecdotes" take the form of propositions [that is so because in my recent work, it is hard to be really exact...]: PROPOSITION-1: In Literate Programming, novices either drop out before they have really started, or they become veterans quickly. PROPOSITION-2: Veteran Literate Programmers are a special brand: used to be made fun of, not appreciated as the perfectionists who many of them are, they learnt to live alone and without a mailing list for years. Now, it is hard for them to learn to live as friends... PROPOSITION-3: Programmers come in two different brands: Literate Programmers and Non-Literate Programmers [some mouth flamed the latter as "illiterates" earlier on this list - but to justify the propositional, and therefore 'neutral' character of this note, let's be nice]. Many do not know, to which side they belong - the bright or the dark one. PROPOSITION-4: Many programming people do not know that they actually perform Literal Programming. Definitely you can be a Literal Programmer without knowing of applying any of the kinds of WEB...life just may become harder for you. PROPOSITION-5: Non-Literal Programmers cannot be easily convinced that they might gain something changing side. LitProgs are often considered perfectionists, and for them Literal Programming is L'art-pour-L'art, luxury, in other words. PROPOSITION-6: Literal Programming *is* a luxury. But writing programs in an 'i-just-let-it-grow'-style is a luxury, too. Anything which stimulates me, wakes up my intellectual curiosity, is a luxury - but a necessary one. I'll rather drop the line now...I am definitely to be put into the "novice" slot of literal programming - but I have thought about it a bit - probably too much compared to the work which has come out of it yet - and probably too little to satisfy *your* needs, Big Brother. Later you said, Cameron> I'm interested to hear whether this literate Cameron> programming really is a useful tool or just something for Cameron> academics [...] who have the luxury of taking all the Cameron> time they want on any project they want to play around with. It is a useful tool for me. It definitely increased my level of reflection upon what I was doing. It saves me time because the programs mostly *do* run in the first place - it costs me time because I now like to treat many otherwise neglectable pieces of code like little diamonds - and cannot be sure that this will pay beyond the fun. It definitely costs time because I am trying to convince my colleagues that they should try *WEB, too. But I am a born missionary anyway and so this meets my needs as well. I find it important to note though, that nobody would carry out "research" knowing in advance what will be useful...I even made the experience that scientific creativity [sorry for using otherwise obscenely maltreated words in this context] directly depended on me doing the useless. But this is not a mailing list for Hegelian dialectics, I understand. I am just trying to say that the fast way is not always the best. Being a semi-novice, that is the situation I am in [sort of] - and NOW: rise, you veterans! --Marcus Speh INTERnet