Archive-Date: Wed, 01 Jun 1994 04:19:00 CDT Sender: owner-litprog@SHSU.edu From: fgartner@vax1.tcd.ie (Felix Gartner) Reply-To: LitProg@SHSU.edu, fgartner@VAX1.TCD.IE Subject: Referencing section numbers in CWEB?! Message-ID: <1994Jun1.100325.1@vax1.tcd.ie> Date: Wed, 1 Jun 1994 10:03:25 GMT To: LitProg@SHSU.EDU In my CWEB programs I sometimes would like to reference sections like I normally do it in LaTeX (with \label and \ref). For example I would like to say @ This small code fragment uses an algorithm that works in a similar manner as the one used in section xyz... where xyz is a special section number of the program. At present I always use a special index entry to point to certain sections of the program: @ Here's a neat little subroutine that uses a special algorithm... @^special algorithm@> ... @ The algorithm here is similar to another one in this program. Look under ``special alrorithm'' in the index if you want to have a look at it. Is there an easy way of referencing section numbers in CWEB? Cheers, Felix ================================================================================ Archive-Date: Wed, 01 Jun 1994 04:19:09 CDT Sender: owner-litprog@SHSU.edu From: maavl@cwi.nl (Marc van Leeuwen) Reply-To: LitProg@SHSU.edu, maavl@CWI.NL Subject: Re: Stanford GraphBase Message-ID: Date: Wed, 1 Jun 1994 09:08:08 GMT To: LitProg@SHSU.EDU In article <2s5qam$dai@latexo.cs.utexas.edu>, mcguire@cs.utexas.edu (Tommy Marcus McGuire) writes: |> I have been reading Knuth's _The Stanford GraphBase_ [...] |> it seems like Knuth does some things that are very |> bad style, such as using or even defining some item and not describing |> until later (if ever) what it is or is used for. |> |> The worst example I have run across is in GB_GRAPH, section 31: |> [...] |> [blah, blah, stuff about gb_virgin_arc, gb_new_arc, and Arcs, blah] |> #define gb_new_graph gb_nugraph /* abbreviations for Procrustian |> linkers */ |> #define gb_new_arc gb_nuarc |> #define gb_new_edge gb_nuedge |> [...] |> The only time gb_nugraph and co. show up in the index is there and in |> section 41 of GB_GRAPH, where the #defines are set up for gb_graph.h. |> Any idea what these things do or are actually for? I can see how the |> shortened forms of the names would be good for broken linkers that |> only look at the first 6 characters of an identifier and in a later message adds |> On the other hand, my original point remains: Knuth just dropped them |> in without bothering to explain them with more than a rather trivial |> comment. I had no problem with this comment; if anything it is a bit cryptic rather than trivial. Your initial analysis is quite correct, and thes lines are only there to accommodate linkers that only inspect a few initial characters of identifiers (such linkers are a nuisance, but not broken according to the ANSI/ISO standard, as long as they inspect at least 6 characters, possibly ignoring their case). Since this is just a minor portability issue (without these lines the programs will run just as well on a system whose linker does a decent job) it does not seem to require a lot of explicit attention. On the other hand, if you are aware of Knuth's style, you will know that such a comment may contain some subtle humour, as it does in this case. For those who missed the point, the reference is to the mythological chap named Procrustus who had the unpleasant habit of providing his guests with a bed whose size was ill fit to that of the guest, and then to adapt the size of the guest to that of the bed. Once the reason for these #define-s is clear, it is not difficult to see that one may immediately forget about them. There may be one exception to this though, in case you wish to use a symbolic debugger on this program: these are usually unaware of the source text before preprocessing (although they may show its lines), so to them one must refer to things like "gb_nuarc" instead of "gb_new_arc". Marc van Leeuwen CWI, Amsterdam ================================================================================ Archive-Date: Wed, 01 Jun 1994 07:35:54 CDT Sender: owner-litprog@SHSU.edu Date: Wed, 1 Jun 94 08:34:19 -0400 From: gtk@walsh.med.harvard.edu (Gregory Tucker-Kellogg) Reply-To: LitProg@SHSU.edu, gtk@WALSH.MED.HARVARD.EDU Message-ID: <9406011234.AA09769@walsh.med.harvard.edu> To: LitProg@SHSU.edu, partingr@t9.cs.man.ac.uk Subject: Re:multiple refs in section References: >>>>> Robert Partington suggests: > @ This section opens the file for reading. > @<|main| local var....@>= FILE *handle; > @= handle=fopen(filename,"r"); if(!handle) { > perror("error"); exit(1); } > where both the references are handled in the one section. It's not > a major hassle to do without it, but I don't like sections without > titles that are essentially part of the previous section. [other interesting stuff deleted for bandwidth] Yes! What you describe would be a rather fundamental improvement to cweb or any other web. Since one of the advantages of literate programming is being able to declare variables at a "natural" point in the code, it seems more than a bit kludgy to require a new section number in all cases. Besides the problems with cweave, however, I wonder how web-mode would adjust. -- Gregory W. Tucker-Kellogg Department of Biological Chemistry and Molecular Pharmacology Harvard Medical School, Boston MA 02115 (617) 432-0930 or (617) 432-3212 ================================================================================ Archive-Date: Wed, 01 Jun 1994 11:29:25 CDT Sender: owner-litprog@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Subject: Literate Programming on the World Wide Web [Revised 1 June 1994] Date: 01 Jun 1994 16:10:40 GMT Message-ID: Reply-To: LitProg@SHSU.edu, marcus@x4u.desy.de To: LitProg@SHSU.EDU Last-modified: 2 June 1994 Posting-Frequency: monthly ----------------------------------------------------------------------------- * Recent Changes [-> from the home page] ----------------------------------------------------------------------------- o NOWEB & HTML samples [-> Virtual Course] o NOWEB Goes WWW! [-> HyperLitProg] ----------------------------------------------------------------------------- * Literate Programming on the World Wide Web ----------------------------------------------------------------------------- FYI, there is a wealth of information on Literate Programming, the art of structured programming and documentation [like WEB-like systems with (La)TeX formatting] available on the World Wide Web [WWW], a distributed HyperText system, a network of documents connected by links which can be activated electronically. Examples for LitProg environments are WEB for Pascal (DEK), CWEB for C/C++ (Levy/Knuth), FWEB for C/C++/Fortran/ratfor/TeX (Krommes), various language independent tools...and many more. ----------------------------------------------------------------------------- * How to get to the Web ----------------------------------------------------------------------------- If you have a WWW browser up and running, try going to http://info.desy.de/general/users.html and look for "Literate Programming" in the panel which appears. The precise URL is http://info.desy.de/user/projects/LitProg.html If you have no clue what WWW is, you can go over the Internet with telnet info.cern.ch which brings you to the WWW Home Page at CERN. You are now using the simple line mode browser. To move around the Web, enter the numbers given after an item. To go to the Literate Programming documents, enter go http://info.desy.de/user/projects/LitProg.html This is what you should see now: ----------------------------------------------------------------------------- * What you will see here ----------------------------------------------------------------------------- Getting Start(l)ed[2] A first look into Literate Programming with WEB Course[3] Planned GNA[4] Internet course on Literate Programming Editing[5] GNU Emacs mode for WEB programming Tools[6] Common, freely available Literate Programming environments Examples[7] Literate Programming archives and selected examples Discussion[8] Discussion on LitProg takes place on a mailing list and a newsgroup Program Library[9] George D. Greenwade's Literate Programming Library at Niord.shsu.edu. Experimental service: Archive Search[10] FAQs[11] Lists of Frequently Asked Questions: General and FWEB Further Reading Nelson Beebe's Literate Programming bibliography at ftp.math.utah.edu in directory /pub/tex/bib[12](files litprog.*) HyperLitProg[13] Literate Programming using HyperText[14] Techniques OO-LitProg[15] Opinions and examples on Object-Oriented[16] Literate Programming [[Now you can continue climbing down the documentation tree by entering numbers 1-16 and follow your own interests]] ----------------------------------------------------------------------------- * More on Browsing the Web ----------------------------------------------------------------------------- A very nice way of "browsing" through WWW uses X-based tools like "tkWWW" or "NCSA Mosaic". For the latter, binaries for many platforms (ready for use) and sources are available via anonymous FTP from ftp.ncsa.uiuc.edu in directory Web/Mosaic-binaries. For vt100 terminals there is a much-used browser called "Lynx" which can be obtained by FTP from ftp2.cc.ukans.edu in the pub/lynx directory. Emacs users will like the "W3" browser, FTP to cs.indiana.edu:/pub/elisp/w3. There is a FTP repository for browser software at info.cern.ch (including a hypertext browser/editor for NeXTStep 3.0 and tkWWW). If you cannot go through TELNET, you can still retrieve WWW documents by e-mail: send Email to test-list@info.cern.ch with one or more lines of the form send [http-address] e.g. send http://info.desy.de/user/projects/LitProg.html at the bottom of the page you'll find all links of that document listed. Your mail system must have a mail gateway to internet mail. ----------------------------------------------------------------------------- * Contact for Further Information ----------------------------------------------------------------------------- Please feel free to contact me for questions, suggestions and further contributions, or just to tell me whether you found this information useful in any way. For questions related to WWW, consult the WWW-FAQ: available via anonymous FTP from rtfm.mit.edu in directory pub/usenet/news.answers/www/faq, or on WWW at URL http://www.vuw.ac.nz:80/who/Nathan.Torkington/ideas/www-faq.html Enjoy! Marcus Speh for GNA. ***************************************************************************** Copyright 1993-94 Globewide Network Academy, Inc. Distributed under the terms of the GNU Public License. Permission is granted to copy this document for free distribution so long as it remains intact and unmodified. See more on WWW at http://uu-gna.mit.edu:8001/uu-gna/index.html or get the GNA FAQ via anonymous FTP to rtfm.mit.edu [18.70.0.209] as file pub/usenet/news.answers/globewide-network-academy-faq ------------------------------------------------------------------------- END -- ---------------------------------------------------------------------- Marcus Speh, DESY Theory Group, Notkestr. 85, D-22603 Hamburg, Germany Phone: +49-40 8998 2178, Fax: +49-40 8998 2777, Private: +49-40 801392 Email: WWW: http://info.desy.de/www/marcus.html ================================================================================ Archive-Date: Thu, 02 Jun 1994 08:00:24 CDT Sender: owner-litprog@SHSU.edu From: dschau@indiana.edu (duane schau) Reply-To: LitProg@SHSU.edu, dschau@INDIANA.EDU Subject: What is the Wolf (?) test Message-ID: Date: Thu, 2 Jun 1994 12:44:59 GMT To: LitProg@SHSU.EDU Hello Everyone, I have an opportunity to do some programming at the university and am required to take a wolf test. Do you have any information on this test? Thanks ..Duane.. dschau@indiana.edu ================================================================================ Archive-Date: Thu, 02 Jun 1994 12:10:45 CDT Sender: owner-litprog@SHSU.edu From: sundermm@columbia.dsu.edu (Mark Sundermeyer) Reply-To: LitProg@SHSU.edu, sundermm@COLUMBIA.DSU.EDU Subject: Help! Date: 2 Jun 1994 17:00:23 GMT Message-ID: To: LitProg@SHSU.EDU I was wondering if anyone here can help me? I need information on the problems of being a programmer and any solutions that you have to these problems. It's for a report that I am working on. Thank you for any help that you can provide. Marc... ================================================================================ Archive-Date: Thu, 02 Jun 1994 14:49:53 CDT Sender: owner-litprog@SHSU.edu From: sundermm@columbia.dsu.edu (Mark Sundermeyer) Reply-To: LitProg@SHSU.edu, sundermm@COLUMBIA.DSU.EDU Subject: Clarifier to Help! Date: 2 Jun 1994 19:17:56 GMT Message-ID: To: LitProg@SHSU.EDU Basically, the occupational problems I might run into if I were to become a programmer. Marc... ================================================================================ Archive-Date: Thu, 02 Jun 1994 16:27:39 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 2 Jun 94 14:27:15 PDT From: bos@mdd.comm.mot.com (Mary Bos) Reply-To: LitProg@SHSU.edu, bos@MDD.COMM.MOT.COM Message-ID: <9406022127.AA23906@bb37c.mdd.comm.mot.com> To: LitProg@SHSU.edu, sundermm@COLUMBIA.DSU.EDU Subject: Re: Clarifier to Help! CC: bos@mdd.comm.mot.com Hi Marc, Occupational problems I have seen and had are: 1> Not keeping up with the technology - someday you may have to find a new job within or outside of the current company. 2> Not expanding your skill set. There are quite a few COBOL programmers wandering the streets right now. Twenty years ago this was THE language (I am an engineering programmer, so my first language was FORTRAN, closely followed by assembly languages) and it looked to keep those practicioners employed for 50 years. 3> In some groups, there is very low socialization. If you are more people oriented - you will feel like you have been exiled to a silent cloister. On the other hand, if you aren't people oriented and choose to work as a support person, you will find yourself extremely disliked by the client population even if you extrememly competent at solving the technical problems. 4> Management and programmers have some cultural clashes. If you are a good programmer and want to step up into the management, there is quite a shock about managing the communications challenged programmers. Many programmers I have worked with are brilliant but aren't necessarily team players with an authority figure but work better in a team where everyone has their expertise (peer teams) and have an organization support person. 5> Many programmers only work 3 years as a programmer with an eye on becoming a manager. It's just something to do to step up the ladder. The better programmers take two divergent paths, one group moves on into the problem domain to research and create solutions beyond the computer and the other group (such as myself) specialize and become programmers by advocation. 6) The first couple of jobs/tasks you will have as a programmer are in maintenance. Most find this to be pure drudgery and want the more sexy projects & new development. My speciality is maintenance programming (I enjoy fixing broke code, stamping out problems, and adding new features to make the tool better fit the job. My family tradition is full of toolmakers, mechanics, and build restoration crafts). Much of the code you look at was alright when it was new, but is in abysmal shape now - extremely "work hardened" and very fragile. If you are lucky the comments and documentation you can find match what is going on and explain the philosopy of the application, program, or code chunk. If you are unlucky, you have a lot of comment and documentations that are meaningless (if luckier) or don't reflect reality (if especially unlucky) and there is no one around to explain why the strange machinations are present. Legacy systems can be soooo fun. The nastier the system, the more likely newer programmers will be assigned to it. 7) My advice from one who has been there - become a domain specialist first and a very competent programmer as a close second. Programming as it is today is rapidly changing. In 20 years there may be little resemblence to the programming today. The domain will probably exist. Learn more than how to cut code for "one-shot" projects done in school. Learn such techniques as structured methods (design and coding), and object-oriented techniques (analysis, design, and coding). Take a friend's "one shot" program for a class and add an enhancement with the rule, you can't ask your friend what the program does, why it does what it does, and any other helpful hints. If you can successfully do a major enhancement without breaking the code in less than time than the friend took to write it (the friend's time does not count debugging time and testing time while your time total includes debugging and testing) and construct a set of tests to run on the program before and after to insure your enhancements are working correctly and the original functionality is still working - then I'd say you'd have a good idea of your first 6 months to 2 years of programming. If you want to simulate reality better, have the friend give a short nondescriptive paragraph of the enhancement the friend wants added to the program and let the friend decide after you finished with changes and testing if you matched the friend's perception of the needed enhancement. 8) The age old question - what's my work environment like - I've worked from having executive office for myself to a stuffy room 10' by 4' room with 7 people (that really didn't like each other) and 1 telephone. Other friends of mine have worked in a large room with 5 desks shoved side by side in a row with 10 to 20 rows in a room. Don't have gastric problems if you aren`t blessed with an aisle seat. Currently I work in an open office, I have a 10' x 10' cubicle with no top and no door, it can be a bit noisy with other conversations nearby but it's fine. Again, I'd recommend "The Psychology of Programmers" by G. Weinberg for some of what you may meet. A few thoughts. mary bos bos@mdd.comm.mot.com bos@seattleu.edu "I don't speak for Motorola and Motorola doesn't speak for me." "Old programmers never die they just get stuck in an infinite no op loop" ================================================================================ Archive-Date: Thu, 02 Jun 1994 23:22:09 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 02 Jun 1994 13:58:58 EDT Reply-To: LitProg@SHSU.edu, rdp@butler.cps.com From: rdp@butler.cps.com (Ronald David Parker) Message-ID: <2dee1de2.butler@butler.cps.com> To: litprog@shsu.edu Subject: LitProg Overview Apologies in advance for what must be a FAQ. I tried "quote site index FAQ" and many similar things to no avail. Is there a literary programming FAQ? Is there an overview and comparison of LP systems? If so, where are they? Ron Parker Butler Manufacturing Company BMA Tower -- 4th Floor rdp@butler.cps.com Post Office Box 419917 Phone: (816) 968-3537 Kansas City, Missouri 64141-0917 ================================================================================ Archive-Date: Fri, 03 Jun 1994 07:36:12 CDT Sender: owner-litprog@SHSU.edu Date: Fri, 03 Jun 1994 07:35:51 CDT From: "George D. Greenwade" Reply-To: LitProg@SHSU.edu, bed_gdg@SHSU.EDU To: LitProg@SHSU.edu, rdp@butler.cps.com CC: ctan@SHSU.edu Message-ID: <0097F63B.A4EE67E0.2807@SHSU.edu> Subject: RE: LitProg Overview On Thu, 02 Jun 1994 13:58:58 EDT, rdp@butler.cps.com (Ronald David Parker) asked on the Literate Programming Discussion List : > Apologies in advance for what must be a FAQ. I tried "quote site index > FAQ" and many similar things to no avail. Is there a literary programming > FAQ? Is there an overview and comparison of LP systems? If so, where are > they? I never thought of having the LitProg/comp.literate.programming FAQ on the CTAN (I sincerely hope the "quote..." command above revealed the TeX-FAQ* files in help/ -- if not, please contact me privately so I can investigate this further). Historically, this file has been saved on Niord.SHSU.edu in [FILESERV.FAQ]FAQ.LITPROG as identified in that document. Of course, without that document, you're kinda hosed. Since there is a close relationship between literate programming and the collection in the CTAN's web/ directories, I have added the file to the CTAN in help/LitProg.FAQ This will be updated as new versions are issued by David Thompson. Regards, George %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% George D. Greenwade, Ph.D. Internet: bed_gdg@SHSU.edu Department of Economics and Business Analysis THEnet: SHSU::BED_GDG College of Business Administration Voice: (409) 294-1266 Sam Houston State University FAX: (409) 294-3612 Huntsville, TX 77341-2118 USA %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ Archive-Date: Fri, 03 Jun 1994 12:33:55 CDT Sender: owner-litprog@SHSU.edu From: christian@wiwi1.wiwi.uni-rostock.de (Christian Steinmann) Reply-To: LitProg@SHSU.edu, christian@WIWI1.WIWI.UNI-ROSTOCK.DE Subject: Re: Writing portable code - any suggestions? Date: 3 Jun 1994 16:28:40 GMT Message-ID: <2snlno$f8l@taiwan.informatik.uni-rostock.de> To: LitProg@SHSU.EDU In article , shf@netcom.com (Stuart Ferguson) writes: > +-- fgartner@vax1.tcd.ie (Felix Gartner) writes: > | I'm currently writing a program in C that should run on a variety of UNIX > | machines. Can anybody point me to a book or document that is especially > | concerned with writing _portable_ code. (I'm using CWEB, but that doesn't > | remove the more `technical' problems of porting programs, I believe 8-) > > While this doesn't answer your question, I wanted to mention that > using literate programming does remove some of the problems with > writing portable code. ... > ... > > Using a web I have been able to conceptually isolate these parts of > the code. The first part of the document consists of system-generic > code -- the stuff that is the same on all systems. ... I don't need a web to isolate machine dependent parts in my code. I only have to choose a proper modular design to create code files which contain the pure ANSI code and few others which contain functions to cover the machine dependent features. Web and literate programming is a good idea, but I don't see a special profit in using web in a situation like that one, described above. Christian ============================================================================= Christian Steinmann e-mail: christian@wiwi1.wiwi.uni-rostock.de Universitaet Rostock | Lehrstuhl Wirtschaftsinformatik | ... avoid in all intellectual modesty 18051 Rostock | "clever constructions" like the plague. Germany | Edsger W. Dijkstra ============================================================================= ================================================================================ Archive-Date: Fri, 03 Jun 1994 16:22:30 CDT Sender: owner-litprog@SHSU.edu From: bhogan@crl.com (Bill Hogan) Reply-To: LitProg@SHSU.edu, bhogan@CRL.COM Subject: [clip] Linux' p2c clip.pas --//--> gcc Date: 3 Jun 1994 14:00:24 -0700 Message-ID: <2so5l8$qno@crl.crl.com> To: LitProg@SHSU.EDU Hello. I am trying to install clip-unix on Linux. The only Pascal support Linux provides is a Pascal-to-C translator called 'p2c'. At first glance, the only serious problem p2c appears to have in translating clip.pas involves a missing procedure ('CLOCK'). However, the problems gcc has with the output it gets from p2c appear to me to be a good deal more obscure. Naturally, I am now wondering if someone has not already done what I am contemplating. Any information that will help me answer that question will be greatly appreciated! TIA, Bill -- Bill Hogan {bhogan@crl.com} ================================================================================ Archive-Date: Mon, 06 Jun 1994 18:51:58 CDT Sender: owner-litprog@SHSU.edu From: clearing@elysius.demon.co.uk (Howard Betsworth) Subject: Software Authors! Reply-To: LitProg@SHSU.edu, clearing@elysius.demon.co.uk Date: Sat, 4 Jun 1994 23:16:05 +0000 Message-ID: <770771765snz@elysius.demon.co.uk> To: LitProg@SHSU.EDU Applications are invited from Authors of all types of Software who currently market their products using Shareware or similar methods. Clearing can help you realise the true potential of your products within the European market place. For further details email clearing@elysius.demon.co.uk. -- The Clearing Network ================================================================================ Archive-Date: Mon, 06 Jun 1994 19:11:40 CDT Sender: owner-litprog@SHSU.edu From: ara@zurich.ai.mit.edu (Allan Adler) Reply-To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU Subject: FWEB Date: 6 Jun 94 11:54:32 Message-ID: To: LitProg@SHSU.EDU Where does one get FWEB? Allan Adler ara@altdorf.ai.mit.edu ================================================================================ Archive-Date: Mon, 06 Jun 1994 20:33:14 CDT Sender: owner-litprog@SHSU.edu Date: Mon, 6 Jun 94 21:32:59 -0400 From: gtk@walsh.med.harvard.edu (Gregory Tucker-Kellogg) Reply-To: LitProg@SHSU.edu, gtk@WALSH.MED.HARVARD.EDU Message-ID: <9406070132.AA29461@walsh.med.harvard.edu> To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU Subject: Re:FWEB References: > Where does one get FWEB? > Allan Adler ara@altdorf.ai.mit.edu FTP any CTAN site. Try pip.shsu.edu:/archive/web/fweb. -- Gregory W. Tucker-Kellogg Department of Biological Chemistry and Molecular Pharmacology Harvard Medical School, Boston MA 02115 (617) 432-0930 or (617) 432-3212 ================================================================================ Archive-Date: Tue, 07 Jun 1994 02:55:23 CDT Sender: owner-litprog@SHSU.edu Date: Tue, 7 Jun 1994 09:57:01 +0200 From: Thomas.Herter@mch.sni.de Reply-To: LitProg@SHSU.edu, Thomas.Herter@MCH.SNI.DE Message-ID: <199406070757.AA09732@pgtd0143.mch.sni.de> To: LitProg@SHSU.edu, oz@URSA.SIS.YORKU.CA Subject: Re: Stanford GraphBase Content-Type: text oz@ursa.sis.yorku.ca (ozan s. yigit) writes: ozan> Tommy Marcus McGuire: ozan> ozan> I have been reading Knuth's _The Stanford GraphBase_ [...] ozan> [...] and I've noticed a couple of problems with it. ozan> ozan> you are so gentle. the book is a bucket full of of algorithmic diamonds ozan> and pearls buried in a diseaster area littered [or was it "literate"] ozan> with poor typesetting and programming. Since the beginnings of Web Knuth has been criticized again and again, but mostly only on the paper. I remember in this context J. Bentley's articles in CACM with an introduction to Web and a criticism by Doug McIllroy (which was more a clumsy reclame for Unix than a disscusion about Web). Nobody has delivered a better tool for literating programming. Although criticism is wery welcome, meanwhile after ten year of practice with the Web-family of tools it should base on... new and better programs. I believe, that criticism of this kind, like the above is not fair. To disscuss, that some constants were not used in the text or just to claim that the book if full of ``poor programming'' or similar things is very superficial. Feel free to publish algorithmic diamonds typesetted after your taste. As an example of such alternative effort to literate programming take Holub's book ``Compiler Design in C''. Holub uses two self designed tools `autopic' and `arachne' to typeset a whole book inclusive citations of the c-sources and picture inclusion for troff and pic. While Knuth prefer a ``math-like'' look of his chunks of programs, Holub is more ``listing-oriented''. The programs in his book look like regular listings, although splitted to the order corresponding to the order of the verbal explanations. What I try to outpoint, is the fact, that literating programs is partly a very individual process. Knuth said in foreword to many Web-examples, that he is NOT claiming to have discovered a kind of silver bullet to literate programming. Web is just his initial idea to document programs or to write books describing garanteed correct and running code. Everybody if free to improve his tools of even to find out a better way to literate programs. For example, I also do not like the optical appearance of the parts of code in original Web. Instead to criticize Knuth, I wrote modified webmac.tex and use my own macros instead. I am accepting the fact that Knuth has a different taste and that he has a damn good right to have individual taste because he is a creator of the tools given a gift for all of us and he is a creator of the term `literate programming'. No other author of literature and programs has combined the theoretical skills and implementation effort like Donald Knuth (N. Wirth should also be named in this context). His code is free and of uncomparable portability and quality. Of course, nobodys code is free of mistakes. Almost every bigger program can be improved or redesigned. Knuth is very open to concrete proposals of improvements, he is collecting lists of mistakes and is trying to analyse the reasons for the mistakes---look at the article ``The Errors of \TeX'', an unique effort to analyse the whole period of \TeX\ developement including diagrams showing the number of bugs found and corrected in every stage of the developement. If you have found bugs in the Stanford Graphbase or if you believe to have found out poor algorithms, just be precise and explain what kind of improvements would you like to propose. Thomas. ------------------------------------ Thomas Herter, SNI Muenchen (thomas.herter@mch.sni.de) tel +89 636 49973 ================================================================================ Archive-Date: Tue, 07 Jun 1994 02:57:15 CDT Sender: owner-litprog@SHSU.edu From: domi@grenoble.hp.com (Dominique Dumont) Reply-To: LitProg@SHSU.edu, domi@GRENOBLE.HP.COM Subject: Is there some kind of verbatim mode in web ? Date: 7 Jun 1994 07:47:32 GMT Message-ID: <2t18mk$kkf@hpscit.sc.hp.com> To: LitProg@SHSU.EDU Hello To use the format and write command in perl, we must write this kind of line : format STDOUT = @<<<<<<<<<<<<<<<<<<< @||||||||||| @>>>>>>>>>>>>>>>> @<<<<<<<<< $file, $data, @foo, $bar . this is correct perl syntax. In noweb (the system I use, but the problem might arise in other language independant webs), I must write this line within a scrap like this : format STDOUT = @@<<<<<<<<<<<<<<<<<<< @||||||||||| @@>>@>>@>>@>>@>>@>>@>>@>> @<<<<<<<<< $file, $data, @foo, $bar . unless noweb detects a scrap call. Needless to say, this is quite painfull and confusing. So could the web gurus specify a verbatim mode ( a la LaTeX ? ) Thanks for listening ----------------------------------------------------------------------------- Name: Dominique Dumont ^^^^^^ Email: Dominique_Dumont@grenoble.hp.com / O O \ HP Desk: Dominique DUMONT / HP6300/UM ( \____/ ) Address : HEWLETT PACKARD, 38053 Grenoble Cedex 09 FRANCE \______/ Tel,Telnet: (33) 76 62 57 24 - 7 779 5724 Telex,Fax: 980 124 - (33) 76 62 14 88 ----------------------------------------------------------------------------- ================================================================================ Archive-Date: Tue, 07 Jun 1994 04:21:40 CDT Sender: owner-litprog@SHSU.edu From: jacojn@inet.uni-c.dk (Jacob Nielsen) Reply-To: LitProg@SHSU.edu, jacojn@INET.UNI-C.DK Subject: Re: Is there some kind of verbatim mode in web ? Date: Tue, 7 Jun 1994 8:52:37 GMT Message-ID: <77097915721225@inet.uni-c.dk> To: LitProg@SHSU.EDU Ups, my last post came out a little fast :-( here we go again... On 7 Jun 1994 07:47:32 GMT, domi@grenoble.hp.com (Dominique Dumont) wrote: >Hello > >To use the format and write command in perl, we must write this kind of >line : >format STDOUT = >@<<<<<<<<<<<<<<<<<<< @||||||||||| @>>>>>>>>>>>>>>>> @<<<<<<<<< >$file, $data, @foo, $bar >.. > >this is correct perl syntax. In noweb (the system I use, but the problem >might arise in other language independant webs), I must write this line >within a scrap like this : > >format STDOUT = >@@<<<<<<<<<<<<<<<<<<< @||||||||||| @@>>@>>@>>@>>@>>@>>@>>@>> @<<<<<<<<< >$file, $data, @foo, $bar >.. > >unless noweb detects a scrap call. Needless to say, this is quite painfull >and confusing. It doesn't look pretty in the web source file :-( > >So could the web gurus specify a verbatim mode ( a la LaTeX ? ) Something like: '@pureCodeStart @pureCodeEnd' ?? for those that like abbreviations, something like: '@ps @pe' or '@s @e' Yet another feature (sigh) but it is a usefull feature!! I'd welcome a tool with this feature. PS: In nuweb, it wouldn't look quite as bad :-) PPS: The ideal solution would be to use a character encoding with many more characters -- that way we could use 'right angle' (\RA in noweb) and 'left angle' (\LA) to delimit scrap names; but on the other hand, I'm sure that soon there would be a programming language that used those characters :-( Regards, Jacob -- Jacob Nielsen Email: jacojn@inet.uni-c.dk (my private account) or iggjacob@bbar.dtu.dk (my account at the university) ================================================================================ Archive-Date: Tue, 07 Jun 1994 05:32:47 CDT Sender: owner-litprog@SHSU.edu From: bhogan@crl.com (Bill Hogan) Reply-To: LitProg@SHSU.edu, bhogan@CRL.COM Subject: Has funnelweb been ported to Linux? Date: 7 Jun 1994 03:10:04 -0700 Message-ID: <2t1h1s$gl1@crl2.crl.com> To: LitProg@SHSU.EDU Has funnelweb been ported to Linux or not? I took a first crack at it today, but ran aground various things the gcc compiler complained about and which caused it to refuse to output an executable file. Thank you. Bill -- Bill Hogan {bhogan@crl.com} ================================================================================ Archive-Date: Tue, 07 Jun 1994 14:48:47 CDT Sender: owner-litprog@SHSU.edu From: shf@netcom.com (Stuart Ferguson) Reply-To: LitProg@SHSU.edu, shf@NETCOM.COM Subject: Re: Writing portable code - any suggestions? Message-ID: Date: Tue, 7 Jun 1994 19:23:38 GMT To: LitProg@SHSU.EDU --- I wrote: > Using a web I have been able to conceptually isolate these parts of > the code. The first part of the document consists of system-generic > code -- the stuff that is the same on all systems. ... christian@wiwi1.wiwi.uni-rostock.de (Christian Steinmann) writes: | I don't need a web to isolate machine dependent parts in my code. I only | have to choose a proper modular design to create code files which contain | the pure ANSI code and few others which contain functions to cover the | machine dependent features. I'm writing a system-generic windows and graphics library. The ENTIRE project consists of the "few functions" which cover the machine-dependent features. The differences go way deeper than just syntax -- the very models are often incompatible. I have found literate programming to be a very powerful organizational tool in this case for the reasons I stated in my first message. -- Stuart Ferguson (shf@netcom.com) "How do you compute that? Where on the graph do `must' and `cannot' meet?" ================================================================================ Archive-Date: Tue, 07 Jun 1994 18:30:36 CDT Sender: owner-litprog@SHSU.edu Date: Tue, 7 Jun 94 19:30:14 -0400 From: gtk@walsh.med.harvard.edu (Gregory Tucker-Kellogg) Reply-To: LitProg@SHSU.edu, gtk@WALSH.MED.HARVARD.EDU Message-ID: <9406072330.AA03312@walsh.med.harvard.edu> To: Literate Programming Subject: closing a web in web-mode.el? I have been using web-mode.el for a few months (almost as long as I've been using a web). While I am pleased with web-mode, I have one problem that won't go away. To wit: is it possible to close a web file and its associated buffers without killing emacs? Whenever I have tried, I end up with error messages like "Tried to execute web-mode command in non-web buffer". What I'm looking for is some sort of "web-close-web-buffer". It may well be that this is due to my own ignorance of web-mode. Either way, I look forward to hearing of a solution. Greg -- Gregory W. Tucker-Kellogg Department of Biological Chemistry and Molecular Pharmacology Harvard Medical School, Boston MA 02115 (617) 432-0930 or (617) 432-3212 ================================================================================ Archive-Date: Wed, 08 Jun 1994 01:05:05 CDT Sender: owner-litprog@SHSU.edu From: transpak@netcom.com (Robert Inch Jr) Reply-To: LitProg@SHSU.edu, transpak@NETCOM.COM Subject: Re: FWEB Message-ID: Date: Wed, 8 Jun 1994 05:40:11 GMT To: LitProg@SHSU.EDU Allan Adler (ara@zurich.ai.mit.edu) wrote: : Where does one get FWEB? : Allan Adler : ara@altdorf.ai.mit.edu at a ctan site, e.g. ftp.shsu.edu. There's a faq at ftp.uu.net, and at rtfm.mit.edu ================================================================================ Archive-Date: Wed, 08 Jun 1994 01:22:09 CDT Sender: owner-litprog@SHSU.edu From: transpak@netcom.com (Robert Inch Jr) Reply-To: LitProg@SHSU.edu, transpak@NETCOM.COM Subject: web-mode.el problems Message-ID: Date: Wed, 8 Jun 1994 05:57:06 GMT To: LitProg@SHSU.EDU I am yet to figure out how to use the web-mode for emacs package I got, authored by bart childs. LaTeX2e in compatibility mode, doesn,t know what \Title is, and I think \makeindex comes before the \begin{document}, (or was that fweb's style?). And also, if I kill my buffer it get's stuck saying there's no buffer called, what my buffer was called before I killed it. Anyway, I've got limboL.sty, and the other one, where they're said to go...um, limboL.sty, and limboL.material, are in $(TEXINPUTS}/web-mode, and the materiasl file goes into my buffer, but LaTeX doesn't follow. I've got may tex library seyt up in 3,1415 fashion, where, texinputs ends with 2 slashes, meaning any of the subdirectories under that, and then I have a latex directory, plain, MakeIndex, etc. Any thoughts? ================================================================================ Archive-Date: Wed, 08 Jun 1994 08:29:04 CDT Sender: owner-litprog@SHSU.edu From: leland@dtd.com (Leland Woodbury) Reply-To: LitProg@SHSU.edu, leland@DTD.COM Subject: ParaSET or related tools? Date: 8 Jun 1994 13:24:14 GMT Message-ID: <2t4gpu$8jb@vw-4.dtd.com> To: LitProg@SHSU.EDU I'm interested to hear from anyone who has experience with ParaSET, a "parametric" software development toolset product sold by Software Emancipation Technology, Inc. (SET) of Waltham, MA (617-466-8600). I'm also interested to hear about any related competitive products with which you may be familiar. SET advertises ParaSET in UNIX Review and they also offer some info online via info@setech.com. The ParaSET package costs approximately $5,000 and comprises what appears to be an integrated set of alternate views of an entire software system. Views include code browser, entity relationship diagram for C++ objects/C structs, class inheritance diagram, subsystem diagram, function call tree, outline diagram, flow chart, interpreter, debugger, impact analysis/change propagation, etc. Any of these can apparently be used to modify code in which case the changes are propagated to the other views, and of course to the source itself. Links can be established so that changes to elements in the source code are reflected in related documentation. It is unclear what kind of revision control is provided or how the product may integrate with existing revision control tools. SET's textual materials on ParaSET make an impressive presentation (particularly the brochure they mailed me, more so than their UR ad or the on-line stuff), and they offer an on-site demo, but before we go that far, I'd like to hear others' experiences with the product. Thanks for whatever information you can offer about this or other similar products. -- Leland Woodbury AT&T Downtown Digital, New York City ================================================================================ Archive-Date: Wed, 08 Jun 1994 18:06:00 CDT Sender: owner-litprog@SHSU.edu From: rls@ltis.loral.com (Randy Silagi) Reply-To: LitProg@SHSU.edu, rls@LTIS.LORAL.COM Subject: Re: ParaSET or related tools? Date: 8 Jun 1994 14:28:49 -0700 Message-ID: To: LitProg@SHSU.EDU leland@dtd.com (Leland Woodbury) writes: >I'm interested to hear from anyone who has experience with ParaSET, a >"parametric" software development toolset product sold by Software >Emancipation Technology, Inc. (SET) of Waltham, MA (617-466-8600). [deleted] . . >SET's textual materials on ParaSET make an impressive presentation >(particularly the brochure they mailed me, more so than their UR ad or >the on-line stuff), and they offer an on-site demo, but before we go >that far, I'd like to hear others' experiences with the product. I found the textual materials on ParaSET do indeed make an impressive presentation. We did have them come over for on-site product demo. The product did everything that they claimed at least as far as I could tell in the 2 hour demo. They also, offered to send an Application Engineer over and try it out on our software. I thought it seemed like a great product. As far as revision control is concerned, it will use your current RCS system. ParaSET also, uses your current favorite editor, vi, EMAC, or ?? The problem we have is that it is licenced as a single user. We have a pretty small development group about 10 people, that comes to $50K. This would need to be signed by 2 president and then the corporate controller. Plus, when we looked at it, ParaSET supported mostly SUN's, it did not support the DECstation which we use mostly. Also, you need to look at how you do things now and compare that to the features offered. Like the "hot" links between the documentation and the code, looks real "cool" but, we don't do that kind of documentation anyway, so this feature is really of no use. I think their closest competitor is ObjectCenter from CenterLine Software, I think that is the company's current name. I hope that helps you. I do recommend the demo, it will be worth the 2 hours or so. +------------------------------------------------------------------+ | Randy Silagi E-Mail: rls@ltis.loral.com | Loral Test & Information Systems | 15378 Avenue of Science Phone: 619-674-5100, X4798 | San Diego, CA 92128-3407 Fax: 619-674-5145 +-------------------------------------------------------------------+ ================================================================================ Archive-Date: Thu, 09 Jun 1994 09:18:03 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 09 Jun 1994 08:37:01 EDT Reply-To: LitProg@SHSU.edu, rdp@butler.cps.com From: rdp@butler.cps.com (Ronald David Parker) Message-ID: <2df70cef.butler@butler.cps.com> To: litprog@shsu.edu Subject: Printing updated CWEB code I am using CWEB 3.0 to write my code and EmTeX to generate output. My problem, such as it is, is that I want to keep my printed ``listings'' current with the source I am writing; however, I do not want to have to print the entire listing. Is there a utility that will take two .DVI files and output just the pages which have changed? Is there a more appropriate place to ask this question? Ron Parker Butler Manufacturing Company BMA Tower -- 4th Floor rdp@butler.cps.com Post Office Box 419917 Phone: (816) 968-3537 Kansas City, Missouri 64141-0917 ================================================================================ Archive-Date: Thu, 09 Jun 1994 12:49:23 CDT Sender: owner-litprog@SHSU.edu From: gtrigge@guinevere.st.nepean.uws.edu.au (Graham Trigge) Reply-To: LitProg@SHSU.edu, gtrigge@GUINEVERE.ST.NEPEAN.UWS.EDU.AU Subject: C to LaTex converter Date: 9 Jun 1994 13:03:15 +1000 Message-ID: To: LitProg@SHSU.EDU Hi all, I am looking for a programming / pretty printer which will convert C code into LaTex code. I know such things are around for the SR programming language. If anyone knows of such a program, could they mail me at the below address. Thanks -- | Graham Trigge (a.k.a. GRAHA) | University of Western Sydney,| | E-Mail : gtrigge@st.nepean.uws.edu.au | Nepean | +-----------------------------------------+------------------------------+ | "If you untied your belly button, your arse would fall off" | ================================================================================ Archive-Date: Thu, 09 Jun 1994 13:29:57 CDT Sender: owner-litprog@SHSU.edu Message-ID: <199406091829.OAA16739@mail.med.cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Thu, 09 Jun 1994 14:32:48 -0400 To: LitProg@SHSU.edu, gtrigge@guinevere.st.nepean.uws.edu.au From: perin@med.cornell.edu (Lewis Perin) Reply-To: LitProg@SHSU.edu, perin@MED.CORNELL.EDU Subject: Re: C to LaTex converter >Hi all, > >I am looking for a programming / pretty printer which will convert C code >into LaTex code. I know such things are around for the SR programming >language. If anyone knows of such a program, could they mail me at the below >address. > I think you want c2cweb *plus* cweb (sorry, you need both.) Check the comp.programming.literate FAQ for ftp sites. Cheers, ______________________________________________________ __ perin@cumc.cornell.edu (212)746-2946 | |_ \ / : Lew Perin |__ |__ \/\/ : Home: (201)435-2679 ================================================================================ Archive-Date: Thu, 09 Jun 1994 13:34:55 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 9 Jun 94 12:35:04 MDT From: "Nelson H. F. Beebe" Reply-To: LitProg@SHSU.edu, beebe@MATH.UTAH.EDU To: LitProg@SHSU.edu, gtrigge@GUINEVERE.ST.NEPEAN.UWS.EDU.AU CC: beebe@math.utah.edu, LitProg@SHSU.EDU Subject: Re: C to LaTex converter Message-ID: >> I am looking for a programming / pretty printer which will convert C code >> into LaTex code. One solution is tgrind, an updated version of which is available on ftp.math.utah.edu in /pub/tex/pub/tgrind; tgrind knows about several languages, and produces TeX output that can be easily incorporated in LaTeX documents. Another solution is quick and dirty: make a 2-line header that looks like this: @ @c Copy this into an empty file, append a C source file to it, and run it through cweave, e.g. echo "@" >foo.w echo "@c" >>foo.w cat myfile.c >>foo.w cweave foo tex foo I expect that very similar tricks can be used with other literate programming tools that support C or C++. ======================================================================== Nelson H. F. Beebe Tel: +1 801 581 5254 Center for Scientific Computing FAX: +1 801 581 4148 Department of Mathematics, 105 JWB Internet: beebe@math.utah.edu University of Utah Salt Lake City, UT 84112, USA ======================================================================== ================================================================================ Archive-Date: Thu, 09 Jun 1994 13:35:03 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 9 Jun 94 12:35:04 MDT From: "Nelson H. F. Beebe" Reply-To: LitProg@SHSU.edu, beebe@MATH.UTAH.EDU To: LitProg@SHSU.edu, gtrigge@GUINEVERE.ST.NEPEAN.UWS.EDU.AU CC: beebe@math.utah.edu, LitProg@SHSU.EDU Subject: Re: C to LaTex converter Message-ID: >> I am looking for a programming / pretty printer which will convert C code >> into LaTex code. One solution is tgrind, an updated version of which is available on ftp.math.utah.edu in /pub/tex/pub/tgrind; tgrind knows about several languages, and produces TeX output that can be easily incorporated in LaTeX documents. Another solution is quick and dirty: make a 2-line header that looks like this: @ @c Copy this into an empty file, append a C source file to it, and run it through cweave, e.g. echo "@" >foo.w echo "@c" >>foo.w cat myfile.c >>foo.w cweave foo tex foo I expect that very similar tricks can be used with other literate programming tools that support C or C++. ======================================================================== Nelson H. F. Beebe Tel: +1 801 581 5254 Center for Scientific Computing FAX: +1 801 581 4148 Department of Mathematics, 105 JWB Internet: beebe@math.utah.edu University of Utah Salt Lake City, UT 84112, USA ======================================================================== ================================================================================ Archive-Date: Thu, 09 Jun 1994 14:03:36 CDT Sender: owner-litprog@SHSU.edu Subject: multiple module refs Message-ID: From: partingr@p4.cs.man.ac.uk (Robert Partington) Reply-To: LitProg@SHSU.edu, partingr@P4.CS.MAN.AC.UK Date: 9 Jun 94 08:13:43 GMT To: LitProg@SHSU.EDU Not that I want to keep posting this question, but... Is it possible in any literate programming scheme to have multiple module references in one section? (preferably CWEB) I mean... @ this section opens the file for reading @<|main| local variables@>= FILE *fhandle; @= fhandle=fopen("file","r"); etc. I don't like having unnamed sections tied to the previous one (purely for stylistic reasons), and I think that declaring local variables where they are used is more in keeping with the LP philosophy. I did try and hack cweave to do this (by adding @9 and making the section translator loop while it got @9's - .ch file available on request) but the section numbers of any defining references comes out too high. (ie in the above example, the @= section number is 1 too high). Any help, ideas, money :) gratefully received. rob partington phaedrus@cs.man.ac.uk partingr@cs.man.ac.uk -- Rob Partington .o 0 0 0 ____ Along the mountain road, partingr@cs.man.ac.uk _|| / __ \ Somehow it tugs at my heart: My opinions... _/o o\___ __|_||_|__ A wild violet. ~~~~~~~~\O/~~~~~~~~~~~\_______/~~~~~~~/ Matsuo Basho 1644-1694 ================================================================================ Archive-Date: Thu, 09 Jun 1994 21:24:12 CDT Sender: owner-litprog@SHSU.edu From: thompson@sun1.coe.ttu.edu Subject: comp.programming.literate FAQ Date: 10 Jun 1994 02:13:18 GMT Message-ID: Reply-To: LitProg@SHSU.edu, thompson@sun1.coe.ttu.edu To: LitProg@SHSU.EDU Archive-name: literate-programming-faq Last-modified: 1994/05/27 Version: 1.1.7 Welcome to the Literate Programming Frequently Asked Questions List ------------------------------------------------------------------- This version was created Friday - May 27, 1994, and should considered stale after 90 days. Information contained in this document is the best available at preparation. The original file was dated October 15, 1993 (just for historical purposes). Disclaimer: "This FAQ is presented with no warranties or guarantees of ANY KIND including correctness or fitness for any particular purpose. The author of this document has attempted to verify correctness of the data contained herein; however, slip-ups can and do happen. If you use this data, you do so at your own risk." Copyright 1993, 1994 David B. Thompson. All rights reserved worldwide. Permission is granted to copy this document for free distribution so long as it remains intact and unmodified. For other arrangements, contact the author/maintainer via email: thompson@sun1.coe.ttu.edu. What's New? ----------- + Deleted references to SHSU.BITNET. (Thanks, George!) = ====================================================================== * Introduction or "What's this all about?" ------------------------------------------ This document is for new and experienced users of literate programming tools. The purpose is to explain the concept of literate programming and to provide a resource for locating files of interest to literate programmers and those interested in literate programming. The Literate Programming (LitProg) Frequently Asked Questions (FAQ) list is maintained by Dave Thompson, who can be reached at: thompson@sun1.coe.ttu.edu * Preferred mailing address for FAQ related comments/questions. wqdbt@ttacs1.ttu.edu * Forwarded to my pc. Comment and constructive criticism is welcome. Direct flames to /dev/null (or > nul if you're a msdos user! ;-) If you find an error, please report it. I'm particularly interested in establishing the locations of generally available literate programming tools. If you are the author of such a tool and wish to have it included in this list, please send email. Please note this is a work-in-progress. It is *not* complete, and probably will not be complete for some months. Nevertheless, the information contained herein may be useful to some. Use it as it is intended. - ---------------------------------------------------------------------- - Typography ------------ Major sections of the FAQ are divided by double lines (====). Minor sections and other divisions are separated by single lines (----). Major topics use a "* " as a leader. Minor topics use a "- " as a leader. This should simplify searching for topics. = ====================================================================== Table of Contents: ------------------ * Introduction, or "What's this all about?" - Typography * How do I get the FAQ? - Literate Programming FAQ - FWEB FAQ * Is there a newsgroup? (The comp.programming.literate newsgroup) * What internet nodes are of interest to literate programmers? * What is literate programming? * How do I begin literate programming? * What literate programming tools are available and where are they? - APLWEB - AWEB - CLiP - CWEB - FunnelWeb - FWEB - IMPACT - lit2x - Literate Programmer's Workshop (LPW) - MapleWEB - MWEB (Schrod/Detig) - MWEB (Sewell) - noweb - nuweb - ProTeX - RWEB - SchemeWEB - Spidery WEB - WEB - WinWordWEB * Are there other tools I should know about? - C2LaTeX - c2cweb - c2man - cnoweb - FunnelWeb mode - noweb.el - nuweb.el - TIE - Web mode * What other resources are available? - World Wide Web - TeX Resources - Virtual Coursework * Are there any code examples? - Examples included with developer's tools - Cameron Smith's KR-CWEB - Stanford GraphBase * Bibliographies. * How to anonymously ftp. * Acknowledgements. * End notes. = ====================================================================== * How do I get the FAQ? ----------------------- - Literate Programming FAQ -------------------------- You have many ways to get a current copy of this FAQ. One is to use anonymous ftp (if you don't know how, see a later section in this FAQ) to connect to one of the Comprehensive TeX Arvchive Network (CTAN) sites or the Literate Programming Archive and retrieve a copy of the file. (For more information on CTAN and the literate programming archive, see the section below entitled "Internet Nodes of Interest to Literate Programmers.") An alternative is to use the fileserver at Sam Houston State University (SHSU). Send a message to FILESERV@SHSU.EDU and include in your message: SENDME LITPROG.FAQ The file server will forward a copy of the file to you via email. - ---------------------------------------------------------------------- - FWEB FAQ ---------- Marcus Speh maintains the FWEB FAQ. The current version number is 1.29. It can be retrieved in the same way as this FAQ; either by anonymous ftp or through the SHSU file server. On the SHSU server, the file name is FAQ.FWEB. Invoke your ftp software, open a connection to NIORD.SHSU.EDU [192.92.115.8], attach to the directory FAQ, and transfer the file FAQ.FWEB. Alternatively, send a message to the file server, FILESERV@SHSU.EDU, and include the following text in a one line message: SENDME FAQ.FWEB The file server will send the current version of the file via email. The FWEB FAQ exists in various formats, including HyperText (see other resources below). In Europe, the complete distribution can also be obtained from ftp.desy.de [131.169.10.115] in directory /pub/faq/web/fweb/. It is also available from the literate programming archive (LPA) in the directory LPA/Documentation/faq/fweb (see the references to LPA below for more information). Also, Marcus Speh is looking for someone willing to take over the FWEB FAQ. The text of his email message follows... "Please add to the FWEB FAQ the note that I am looking for someone to take the maintenance of the FAQ over - I am ready to assist in any way whatsoever, including tons of mail, notes for v1.29->v1.30, Texinfo sources, a WWW server and Hypertextification etc." If you're interested, send mail to marcus@x4u2.desy.de and express your willingness to serve. = ====================================================================== * Is there a newsgroup? ----------------------- One of the most important resources is the literate programming newsgroup, comp.programming.literate. You can read this newsgroup using your standard reader. Altenatively, the newsgroup is gated to a mailing list hosted by George Greenwade and Sam Houston State University. You can subscribe by sending mail to the list-server, LISTSERV@SHSU.EDU, and include in the message one line of text: SUBSCRIBE LITPROG "your name in quotes" The list is unmoderated; messages sent to litprog@shsu.edu are automatically distributed to all subscribers and cross-posted to comp.programming.literate. Archives of the mailing list and newsgroup are maintained on niord.shsu.edu [192.92.115.8] in the directory litprog. = ====================================================================== * What internet nodes are of interest to literate programmers? -------------------------------------------------------------- The principal nodes of interest to literate programmers are the Literate Programming Archive (LPA hereafter) and the CTAN (Comprehensive TeX Archive Network). The Literate Programming Archive (LPA) is: Node: ftp.th-darmstadt.de [130.83.55.75] Directory: programming/literate-programming Notes: Fastest response during off-U.S. [yep] business hours. The CTAN sites are: ftp host IP CTAN root Institution and Sponsor ------------------------------------------------------------------------- ftp.tex.ac.uk 134.151.79.32 pub/archive Aston Univ./UK TeX U.G. ftp.dante.de 129.206.100.192 soft/tex DANTE e.V. ftp.shsu.edu 192.92.115.10 tex-archive Sam Houston State Univ. Other nodes and directories of interest include: Node: niord.shsu.edu [192.92.115.8] Directory: various (do some snooping!) Notes: Has a gopher server. Node: ftp.desy.de [131.169.10.115] Directory: pub/web. Various documents, samples, and the FWEB FAQ. Notes: Has a www server, http://info.desy.de:80/ = ====================================================================== * What is Literate Programming? ------------------------------- Literate programming is the combination of documentation and source together in a fashion suited for reading by human beings. In fact, literate programs should be enjoyable reading, even inviting! (Sorry Bob, I couldn't resist!) In general, literate programs combine source and documentation in a single file. Literate programming tools then parse the file to produce either readable documentation or compilable source. The WEB style of literate programming was created by D.E. Knuth during the development of his TeX typsetting software. All the original work revolves around a particular literate programming tool called WEB. Knuth says: The philosophy behind WEB is that an experienced system programmer, who wants to provide the best possible documentation of his or her software products, needs two things simultaneously: a language like TeX for formatting, and a language like C for programming. Neither type of language can provide the best documentation by itself; but when both are appropriately combined, we obtain a system that is much more useful than either language separately. The structure of a software program may be thought of as a web that is made up of many interconnected pieces. To document such a program we want to explain each individual part of the web and how it relates to its neighbours. The typographic tools provided by TeX give us an opportunity to explain the local structure of each part by making that structure visible, and the programming tools provided by languages such as C or Fortran make it possible for us to specify the algorithms formally and unambigously. By combining the two, we can develop a style of programming that maximizes our ability to perceive the structure of a complex piece of software, and at the same time the documented programs can be mechanically translated into a working software system that matches the documentation. Another author (Eric W. van Ammers) wrote me a short article treating his opinions on literate programming. The text follows: First observation on LP About 90% of the disussion on this list is about problems with applying some WEB-family member to a particular programming language or a special documentation situation. This is ridiculous, I think. Let me explain shortly why... Lemma 1: I have proposed for many years that programming has nothing to do with programming langauges, i.e. a good programmer makes good programs in any language (given some time to learn the syntax) and a bad programmer will never make a good program, no matter the language he uses (today many people share this view, fortunately). Lemma 2: Literate Programming has (in a certain way not yet completely understood) to do with essential aspects of programming. Conclusion 1: A LP-tool should be independent of programming language. Lemma 3: It seems likely that the so called BOOK FORMAT PARADIGM [ref. 1] plays an important role in making literate programs work. Lemma 4: There are very many documentation systems currently being used to produce documents in the BOOK FORMAT. Conclusion 2: A LP-tool should be independent of the documentation system that the program author whishes to use. My remark some time ago that we should discuss the generic properties of an LP-tool was based on the above observation. References: [1] Paul W. Oman and Curtus Cook. Typographical style is more than cosmetic. CACM 33, 5, 506-520 (May 1990) Second observation on LP The idea of a literate program as a text book should be extendend even further. I would like to see a literate program as an (in)formal argument of the correctness of the program. Thus a literate program should be like a textbook on mathematicics. A mathematical textbook explains a theory in terms of lemma and theorems. But the proofs are never formal in the sense that they are obtaind by symbol manipulation of a proof checker. Rather the proofs are by so called "informal rigour", i.e. by very precise and unambiguous sentences in a natural language. Eric W. van Ammers Department of Computer Science Wageningen Agricultural University Dreijenplein 2 E-mail: ammers@rcl.wau.nl 6703 HB Wageningen voice: +31 (0)8370 83356/84154 The Netherlands fax: +31 (0)8370 84731 = ====================================================================== * How do I begin literate programming? -------------------------------------- A recommended book is D.E. Knuth's collection of articles (1992) "Literate Programming," Center for the Study of Language and Information, Stanford University, ISBN 0-937073-80-6 (pbk). This book gives insight into Knuth's thoughts as he developed the web system of literate programming (and TeX for typesetting). It does not document methods for literate programming. A recommended book is Wayne Sewell's (1989) "Weaving a Program: Literate Programming in WEB," Van Nostrand Reinhold, ISBN 0-442-31946-0 (pbk). This book focuses on using Knuth's web system. Some talk exists in the newsgroup/mailing list for a Usenet University course in literate programming. I'm sure discussion of this topic will be welcomed. If you are interested, please participate. = ====================================================================== * What literate programming tools are available and where are they? ------------------------------------------------------------------- A significant number of tools for literate programming are available. Most have been ported from their original systems, so support multiple computer platforms. If you are the developer of such a tool, and would like to make the software freely available, please send me email and I'll reply with a form (like those below) for you to fill in. (Or short-circuit the process and kludge a form from below. :-) - ---------------------------------------------------------------------- - APLWEB -------- Developer: Christoph von Basum Version: Unknown Hardware: MSDOS Languages: IBM APL2 and STSC APL Formatter: Plain TeX Availability: Anonymous ftp from: LPA:/apl watserv1.uwaterloo.ca:/languages/apl/aplweb Readme: Unknown Description: None available. Support: Unknown Note: The status of this particular package is unknown. - ---------------------------------------------------------------------- - AWEB ------ Developer: Unknown Version: Unknown Hardware: Unknown Languages: Ada Formatter: Unknown Availability: Anonymous ftp from: LPA:/ada/web Readme: Unknown Description: None available Support: Not supported. - ---------------------------------------------------------------------- - CLiP ------ Developer: E.W. van Ammers and M.R. Kramer Version: Unknown Hardware: Vax/VMS, Unix, and MS-DOS Languages: Any programming language. Formatter: Any formatter (TeX, LaTeX, Troff, Runoff, etc) or any wordprocessor including WYSIWYG systems (Word Perfect, Win Word, Ami Pro, Word, etc.) Availability: Anonymous ftp from: sun01.info.wau.nl:/CLIP/ms_dos MS-DOS version sun01.info.wau.nl:/CLIP/vax_vms VAX/VMS version CTAN:/web/clip LPA:/machines/ms-dos LPA:/machines/vax Readme: With bundle above Description: CLiP does not use explicite commands to perform the extraction process. Rather it recognizes pseudostatemens written as comments in the programming language in question. CLiP distinguishes pseudostatments from ordinary comments because the former comply with a a particular style. This style can be adjusted to suit virtually any programming language. The CLiP approach to LP makes the system extremely versatile. It is independent of programming language and text processing environment. We designed CLiP to be compatible with hypertext systems as well but we have not yet experimented with this form of documentation. Features: + CLiP imposes virtually no limitations on the text-processing system used to produce the documentation. If the text-processor supports these items you can + structure the documentation according to your own taste. + include drawings, pictures, tables etc. + disclose your documentatio my means of X-ref tables, Indexes, Table of contents, Table of tables, Table of figures, etc. + typeset the documented code. + Extracts any number of modules from a maximum of 64 source files. + No pretty-printing. Code from the source files is copied "as is" to the module. + Appearance of code segments in the documentation matches those of the modules to ease the identification of code segements. + Supports partially specified data types. + Comprehensive user manual (preliminary version) and technical description. - No automatic generation of a X-ref table for program identifiers. Support: Bugs, problems and assistance by e-mail: ammers@rcl.wau.nl - ---------------------------------------------------------------------- - CWEB ------ Developer: Silvio Levy and D.E. Knuth Version: 3.0 Hardware: Unix systems (dos and amiga ports available) Languages: C and C++ Formatter: Plain TeX and LaTeX. Availability: Anonymous ftp from: labrea.stanford.edu:/pub/cweb LPA:/c.c++ CTAN:/web/c_cpp/cweb DOS version in CTAN:/web/c_cpp/cwb30p8c DOS version in LPA:/machines/ms-dos Amiga version CTAN:/web/c_cpp/AmigaCWEB Mac port of CTANGLE in LPA:/machines/mac LaTeX support in LPA:/c.c++ Readme: Bundled with above Description: No description provided. Support: Bugs to levy@math.berkeley.edu Note: A fork of CWEB 3.x was developed by Marc van Leeuwen which implements several changes to CWEB. It is available for anonymous ftp from ftp.cwi.nl:pub/cweb. The principle changes are: - Scans include files for typedef definitions - Grammar and formatting rules are well separated, allowing for run-time selection of a rule set (via command line option) - New manual. - ---------------------------------------------------------------------- - FunnelWeb ----------- Developer: Ross N. Williams: ross@guest.adelaide.edu.au Version: Unknown Hardware: MSDOS, Mac, VMS, Sun. Other ports reported. Languages: No restrictions. Formatter: Plain TeX for printing. Otherwise, no restrictions. Availability: Anonymous ftp from: CTAN:/web/funnelweb LPA:/independent ftp.adelaide.edu.au:/pub/funnelweb Readme: With bundle above. Description: FunnelWeb is a production-quality literate-programming tool that emphasises simplicity and reliability. Everything about FunnelWeb, from the simplicity of its language to the comprehensive tutorial in the user's manual, has been designed to make this as simple, as practical, and as usable a tool as possible. Features: + Provides a simple macro preprocessor facility. + Can produce typeset documentation. + Runs on Sun, VMS VAX, Macintosh, PC, and others. + Portable C source code distributed under GNU licence. + Comprehensive user's manual including tutorial. + Programming-language independent. + Can generate multiple output files. + Allows complete control over the output text. + Regression test suite with over 200 tests. + Fully worked example (in /pub/funnelweb/examples). - Requires TeX to produce typeset documentation. - Typesets program code using TT font only. Support: No formal support available. Mailing list maintained with about 50 subscribers. Informal assistance available from mailing list. - ---------------------------------------------------------------------- - FWEB ------ Developer: John A. Krommes Version: 1.30a (1.40 for the experienced, patient, and brave) Hardware: Unix, VMS, and DOS platforms (anything with ANSI C) Languages: C, C++, Fortran-77, Fortran-90, Ratfor, TeX; also, a language-independent mode. Formatter: Plain TeX and LaTeX. Availability: Anonymous ftp from: ftp.pppl.gov:/pub/fweb CTAN:/web/fweb LPA:/fweb DOS version in LPA:/machines/ms-dos Readme: In bundle with above. Description: It also has a well-developed user's manual and its own FAQ (see above). Beginning with 1.40, documentation is maintained in gnu texinfo format. It runs on most platforms: VMS, PC, UNIX, and pretty much anything that the GNU C compiler (GCC) is supported for. Features: + Processes multiple languages during a single run (so one can mix C and Fortran, for example). + Language-independent mode (v1.40). + Ability to turn off pretty-printing (v1.40). + Built-in Ratfor translator. + Built-in macro preprocessor (closely follows ANSI C, with extensions). + A style file that allows the user to adjust many parameters and behavior patterns of FWEB. + Various operator-overloading features that provide additional pretty-printing capabilities to languages such as C++ and Fortran-90. + Numerous miscellaneous features and command-line options. Support: Bug reports and suggestions to krommes@princeton.edu - ---------------------------------------------------------------------- - IMPACT -------- Developer: Timothy Larkin, from Levy/Knuth CWEB 3.1 Version: 1.0 Hardware: Macintosh; requires AppleEvents. Languages: C, C++ Formatter: TeX Availability: CTAN archives Readme: A short readme file is included in the SEA archive. Description: IMPACT implements CTangle from the Levy/Knuth CWEB 3.1. It operates as a foreground program, tangling files selected from the Mac File Picker. Or it can operate in the background, tangling files in response to odoc events sent by other applications, such as editors. Support: I welcome any reports of bugs. The product will be updated as new versions of the CWEB appear. Other features may be added as users suggest them. - ---------------------------------------------------------------------- - lit2x ------- Developer: Unknown Version: Unknown Hardware: Unknown Languages: Unknown Formatter: Unknown Availability: Anonymous ftp from: LPA:/independent Readme: Unknown Description: None available Support: Unknown - ---------------------------------------------------------------------- - Literate Programmer's Workshop (LPW) -------------------------------------- Developer: Norbert Lindenberg Version: 1.1 Hardware: Apple Macintosh Languages: C++, Object Pascal & others Formatter: self-contained WYSIWYG system Availability: Anonymous ftp from: LPA:/machines/mac CTAN:/web/lpw ftp.apple.com:/pub/literate.prog Readme: With bundle above. Also comes with 38-page manual. Description: The Literate Programming Workshop is an environment for the integrated development of program source text and documentation in combined documents. It consists of a WYSIWYG word processor based on a style sheet approach, a mechanism to extract parts of the text in a document, and a project management system that handles multi-document projects. The system is designed to be used in conjunction with the Macintosh Programmer's Workshop: it prepares raw source text for the MPW compilers, accepts MPW error messages, and shows them in the context of the original documents. Automatic indexing and hypertext features allow for easy access to both source text and documentation. LPW is shareware. Support: Bugs, problems, and questions to lpw@aol.com. - ---------------------------------------------------------------------- - MapleWEB ---------- Developer: Unknown Version: Unknown Hardware: Unknown Languages: Maple Formatter: Unknown Availability: Anonymous ftp from: LPA:/maple Readme: Unknown Description: None Support: Unknown - ---------------------------------------------------------------------- - MWEB (Schrod/Detig) --------------------- Developer: Joachim Schrod Version: Unknown Hardware: Unknown Languages: Modula-2 Formatter: Unknown Availability: Anonymous ftp from: LPA:/modula-2 Readme: Unknown Description: None Support: Not supported. - ---------------------------------------------------------------------- - MWEB (Sewell) --------------- Developer: Sewell Version: Unknown Hardware: Unknown Languages: Modula-2 Formatter: Unknown Availability: Anonymous ftp from: LPA:/modula-2 Readme: Unknown Description: None Support: Not supported. - ---------------------------------------------------------------------- - noweb ------- Developer: Norman Ramsey Version: 2.5a Hardware: Unix and DOS platforms. Languages: All programming languages. Formatter: Plain TeX and LaTeX formatters. Availability: Anonymous ftp from: CTAN:/web/noweb LPA:/independent DOS version also in LPA:/machines/ms-dos also bart.kean.edu:/pub/leew Last recourse, use bellcore.com:/pub/norman Readme: With bundle above. Description: noweb is designed to meet the needs of literate programmers while remaining as simple as possible. Its primary advantages are simplicity, extensibility, and language-independence. noweb uses 5 control sequences to WEB's 27. noweb now supports indexing and identifier cross-reference. The simple noweb manual is only 2 pages; documenting the full power of noweave and notangle requires another 3 pages. noweb works ``out of the box'' with any programming language, and its formatter-dependent part is a 60-line nawk program. The primary sacrifice relative to WEB is the loss of prettyprinting. Support: email to the author - ---------------------------------------------------------------------- - nuweb ------- Developer: Preston Briggs: preston@cs.rice.edu Version: 0.87 Hardware: Unix systems: Sparcs, RS/6000s, HPs; (!) MSDOS and Amiga. Languages: Any programming language or combination of programming languages. Formatter: Latex Availability: Anonymous ftp from: Unix: CTAN:/web/nuweb DOS: CTAN:/web/nuweb-pc LPA:/independent Amiga: CTAN:/web/nuweb/nuweb_ami Amiga: wuarchive.wustl.edu/pub/aminet Readme: Send mail to preston@cs.rice.edu Description: A single program that takes a web file written in a combination of latex and any programming language(s) and produces a latex file that can be pretty printed and a set of files containing code for compilation/interpretation by the appropriate language processors. Strengths include speed, simplicity, multiple languages, nice indices and cross-references, latex. Doesn't require any special macros or macro files. Drawbacks: latex-dependent, no code pretty printing, harder to make indices than cweb. More good stuff: nice support for make, doesn't reformat source files, so they're easy to debug. Lots of control without too much effort. That is, it doesn't do too much! Future directions... Very little change planned, except perhaps refinements in the indexing software. Support: Hack it yourself or send e-mail to preston@cs.rice.edu - ---------------------------------------------------------------------- - ProTeX -------- Developer: Eitan Gurari Version: Unknown Hardware: Unknown Languages: Unknown Formatter: TeX Availability: Anonymous ftp from: LPA:/independent Readme: Unknown Description: There is a book published on using ProTeX, @Book{Gurari:TLD94, author = "Eitan M. Gurari", title = "{\TeX} and {\LaTeX}: Drawing and Literate Programming", publisher = pub-MH, year = "1994", address = pub-MH:adr, bibdate = "Wed Sep 29 17:55:14 1993", acknowledgement = ack-nhfb, } Support: Unknown - ---------------------------------------------------------------------- - RWEB ------ Developer: Unknown Version: Unknown Hardware: Unknown Languages: Unknown Formatter: Unknown Availability: Anonymous ftp from: LPA:/reduce Readme: Unknown Description: Web generator in AWK. Support: Unknown - ---------------------------------------------------------------------- - SchemeWEB ----------- Developer: John D. Ramsdell Version: 2.0 Hardware: Unix and DOS platforms Languages: Any dialect of Lisp. Formatter: LaTeX. Availability: The Unix version is in the Scheme Repository and it is available via anonymous ftp from: cs.indiana.edu:pub/scheme-repository/new/schemeweb.sh LPA:/lisp CTAN:web/schemeweb The DOS version is part of the PCS/Geneva Scheme system which is available via anonymous ftp from: cui.unige.ch:/pub/pcs LPA:/machines/ms-dos Readme: In bundle with above. Description: SchemeWEB is a Unix filter that allows you to generate both Lisp and LaTeX code from one source file. The generated LaTeX code formats Lisp programs in typewriter font obeying the spacing in the source file. Comments can include arbitrary LaTeX commands. SchemeWEB was originally developed for the Scheme dialect of Lisp, but it can easily be used with most other dialects. Support: Bug reports to ramsdell@triad.mitre.org. - ---------------------------------------------------------------------- - SpideryWEB ------------ Developer: Norman Ramsey Version: Unknown Hardware: Unix and DOS platforms Languages: Most Algol-like languages, including C, Ada, Pascal, Awk, and many others. Formatter: Plain TeX and latex for text formatters. Availability: Anonymous ftp from: CTAN LPA:/spiderweb Readme: In distribution. Description: A system for building language-dependent WEBs. Spider is frozen; no further development is planned. Support: Bug reports to spider-bugs@oracorp.com. - ---------------------------------------------------------------------- - WEB ----- Developer: Donald Knuth Version: Unknown Hardware: Unknown Languages: Pascal Formatter: TeX (of course! ;-) Availability: Anonymous ftp from: LPA:/pascal Readme: Unknown Description: This is the original software that started it all. The original TeX processor was written in WEB. Support: None known. - ---------------------------------------------------------------------- - WinWordWEB ------------ Developer: Lee Wittenberg Version: Unknown Hardware: Needs Microsoft Word for Windows, v.2.x, and, of course, MS-Windows 3.x. Languages: Any programming language. Formatter: Word for Windows 2.x for text formatting and file maintenance. Availability: Anonymous ftp from: bart.kean.edu:pub/leew LPA:/machines/ms-dos World-Wide Web (WWW) Readme: WORDWEB.DOC in the downloadable package describes the system. Description: WinWordWEB is a set of a Word for Windows macros (plus a paragraph style) that provide a crude literate programming environment. The ``look and feel'' of the system is based on Norman Ramsey's noweb, but can easily be modified to suit individual tastes. Support: None. WinWordWEB was written as a prototype to see if a WYSIWYG literate programming system was possible. It is intended as a jumping off point for future work by others. However, the system is surprisingly usable as it stands, and the author is interested in hearing from users (satisfied and dissatisfied). Anyone interested in actively supporting (and improving) the product should contact the author via email. = ====================================================================== * Are there other tools I should know about? -------------------------------------------- First of all, I'll list some not-quite-literate-programming tools. Some may consider these to be pretty-printers. Others may call them literate programming tools. In any event, they don't seem to be quite in the same category as the tools listed above, so I'll include them here. - C2LaTeX --------- Developer: John D. Ramsdell Version: Unknown Hardware: Unix Languages: C Formatter: LaTeX but it's easy to change the formatter. Availability: Anonymous ftp from omnigate.clarkson.edu:/pub/tex/tex-programs/c2latex. Readme: Absent. Documentation is in the C source for c2latex. Description: C2latex provides simple support for literate programming in C. Given a C source file in which the comments have been written in LaTeX, c2latex converts the C source file into a LaTeX source file. It can be used to produce typeset listings of C programs and/or documentation associated with the program. C2latex produces LaTeX source by implementing a small number of rules. A C comment that starts at the beginning of a line is copied unmodified into the LaTeX source file. Otherwise, non-blank lines are surrounded by a pair of formatting commands (\begin{flushleft} and \end{flushleft}), and the lines are separated by \\*. Each non-blank line is formatted using LaTeX's \verb command, except comments within the line are formatted in an \mbox. Support: Send bug reports to ramsdell@mitre.org. - ---------------------------------------------------------------------- - c2cweb -------- Developer: Werner Lemberg Version: 1.1 Hardware: DOS, OS/2, Unix (presumed) -- source included Languages: C, C++ Formatter: TeX Availability: Anonymous ftp from CTAN:/web/c_cpp Readme: In distribution. Description: c2cweb will transform plain C or C++ code into a CWEB file to get a pretty formatted output. A modified CWEAVE (which transforms the CWEB file into a TeX file, see below) is included also. Support: Werner Lemberg - ---------------------------------------------------------------------- - c2man ------- Developer: Graham Stoney Version: Unknown Hardware: Presumably anything with a C compiler. Languages: C Formatter: nroff -man, texinfo Availability: Anonymous ftp from ftp.wustl.edu: /usenet/comp.sources.reviewed/volume03/c2man* ftp.informatik.uni-stuttgart.de: /pub/archive/comp.sources/reviewed/c2man* Readme: Unknown Description: The primary philosophy here is to use the programming language as far as possible to express the programmer's intentions, and to use comments only when the programming language is not sufficiently expressive. A comment can then become part of the language grammar which is recognised by a "documentation compiler". This tool parses a superset of the programming language and can automatically generate documentation in human-readable form by associating the programmer's comments with the objects in the code by their context. Support: Unknown. - ---------------------------------------------------------------------- - cnoweb -------- Developer: Jim Fox Version: 1.4 (January 4, 1991) Hardware: Anything with C and TeX. Languages: C Formatter: Plain TeX. Availability: Anonymous ftp from: CTAN LPA:/c.c++ Readme: Unknown, cnoweb.tex contains documentation. Description: cnoweb is as it's name describes: write C, not web. No tangling or weaving is implemented. Documentation (between standard /* */ delimiteres) is written in TeX. cnoweb provides typesetting of documentation, an table of contents of routines, and pretty-printing of C source. Support: None known. - ---------------------------------------------------------------------- - Funnelweb Mode ---------------- Developer: Daniel Simmons Version: Unknown Availability: Litprog archives (was in email) Anonymous ftp from: ftp.imada.ou.dk Description: The other day I did a quick hack to nuweb.el as included with the nuweb distribution so as to make a funnelweb-mode.el. I've only used it briefly, and I'm sure that it can be improved quite a bit. I've been thinking about adding support for folding on sections, a pull-down menu to select macro definitions (like the recent functions posted to gnu.emacs.sources for a C function definition pull-down menu) and some kind of tags support for funnelweb. Support: Unknown - ---------------------------------------------------------------------- - noweb.el ---------- Developer: Bruce Stephens Version: Unknown. Availability: LitProg archives (in an email message). Description: This is a very simple mode I just hacked up. There's a lot wrong with it, but I thought others may be interested, even as it stands. It *requires* text properties, and assumes those used in GNU Emacs 19.22; it'll quite likely work with Lucid Emacs, but I haven't tried it. I use it with auctex8.1 and cc-mode 3.229, both of which are loaded separately (I think my emacs is dumped with them, in fact). The idea is to have one mode (which calls itself c-mode, but actually has LaTeX-mode keybindings) generally (this means that the code is hilighted nicely), and have the code chunks use a different keymap. Support: Email to ddw@sunbim.be - ---------------------------------------------------------------------- - nuweb.el ---------- Developer: Dominique de Waleffe Version: 1.15 (2.0 RSN) Availability: Anonymous ftp from: LPA CTAN Description: Provides a major mode extending Auctex for editing nuweb files. Main features (in 2.0): - Edit scrap bodies in a separate buffer in a different mode (selected using emacs defaults for files, specific indication -*-mode-*-, or a buffer-local variable) - Extends Auctex commands so that nuweb is called before LaTeX, - Easy navigation on scrap definition and use points. Support: Email to ddw@sunbim.be - ---------------------------------------------------------------------- - TIE ----- Developer: Unknown Version: Unknown Hardware: Unknown Availability: Anonymous ftp from: LPA:/Tools Readme: Unknown Description: This software merges change files. Support: Unknown - ---------------------------------------------------------------------- - Web mode ---------- Developer: Bart Childs Version: Unknown Tools supported: web, fweb, cweb, funnelweb Availability: Anonymous ftp from ftp.cs.tamu.edu:pub/tex-web/web/EMACS.web-mode thrain.anu.edu.au:pub/web/EMACS.web-mode Description: This version works with versions 18 and 19 of Emacs to be best of my knowledge. I have cleaned up a number of documentation items ... In the same directory is wm_refcard.tex which is an edited version of the famous one to include some web-mode commands. The files limbo* are related to its use and notice that half them have an uppercase L in them for LaTeX. The setup is based upon the fact that we (I am not alone here) primarily use FWEB for C and Fortran programming. We are using version 1.40 of FWEB although John Krommes warns that it is not mature and the manual is not yet updated. The info files are! We are using LaTeX almost exclusively. That will likely change and we will revert to version 1.30 if the final form of 1.40 cannot return to the simple section numbers and avoid the HORRIBLE LATEX 0.1.7.2.4.6 type section numbers. Support: Unknown = ====================================================================== * What other resources are available? ------------------------------------- - World Wide Web ---------------- An untapped resource (by me anyway ;-) is the World Wide Web. Marcus Speh has expended considerable effort in this regard. If you're connected to WWW, then access: http://info.desy.de/user/projects/LitProg.html If you aren't connected to WWW, telnet to info.cern.ch and explore. You can reach Marcus' literate programming pages by typing: go http://info.desy.de/user/projects/LitProg.html Help for people who have only Email and neither WWW nor telnet, can be obtained by Email from TEST-LIST@INFO.CERN.CH by sending a message, SEND , for example, SEND http://info.desy.de/user/projects/LitProg.html to retrieve the LitProg library page. A help file can be retrieved by sending a message to the list server above with the text HELP in the body of the message. Instructions will be returned by email. For literate programming documents, you can try anonymous ftp to ftp.desy.de [131.169.10.115] and get the file: /pub/userWWW/projects/Announce/LitProg.txt - ---------------------------------------------------------------------- - TeX Resources --------------- Another resource of interest to literate programmers is the info-tex mailing list. If you're using (La)TeX as your typsetting system and have access to internet, then you should investigate this mailing list. Mail list service is available through the SHSU list-server. To subscribe, send a message to LISTSERV@SHSU.EDU, and include in the message one line of text: SUBSCRIBE INFO-TEX "your name in quotes" The list is unmoderated; messages sent to info-tex@shsu.edu are automatically distributed to all subscribers and cross-posted to comp.text.tex. Archives of the mailing list and newsgroup are maintained on niord.shsu.edu [192.92.115.8] in the directory info-tex. Another reason the TeX resources should be important is that so many of the literate programming tools rely on either plain TeX or LaTeX as their text formatter. (La)TeX software systems exist for most computing platforms. These systems can be found on CTAN and other major archive sites. Use archie to find them or simply ftp to one of the CTAN sites and browse. - ---------------------------------------------------------------------- - Virtual Coursework -------------------- Marcus Speh plans an introductory course on Literate Programming on the Internet, part of the first semester of "Global Network Academy" [GNA], a non-profit corporation incorporated in the state of Texas, affilated with the Usenet University project. The texts/sample programs for this class will be made available via the World-Wide Web. A special room on GNA Virtual Campus will be staffed by a consultant in one to two hour shifts. Students with questions can telnet to the virtual campus and ask questions of the staff there. If you are interested in registering for the course either as a student or as a consultant, please contact marcus@x4u.desy.de. You will receive a standard reply message; no further action will be taken until June 94. Interested parties can check teh hypertext notes for the ongoing C++ Course done in a similar fashion, at URL http://info.desy.de/pub/uu-gna/html/cc/index.html [Editor's note: Because of workload, Marcus requests that email inquiries be limited to a statement of interest for either a student or consultant position until June 1994.] = ====================================================================== * Are there any code examples? ------------------------------ Examples of web programs are included with the FWEB, CWEB, and noweb distributions. nuweb is written in itself. Cameron Smith converted the K&R calculator program into a literate program. It can be retrieved by anonymous ftp from: niord.shsu.edu [192.92.115.8] directory kr-cweb-sample as krcwsamp.zip or from LPA/Documentation Ross Williams has released a funnelweb example. You can retrieve this file from node ftp.adelaide.edu.au [129.127.40.3] as /pub/funnelweb/examples/except.* This file should be on CTAN as well. Lee Wittenberg has posted a few litprog examples. They are available via anonymous ftp from: bart.kean.edu:/pub/leew/samples.LP The Stanford GraphBase is a large collection of programs by Don Knuth for doing all kinds of computations and games with graphs; it is written in (Levy/Knuth) CWEB. More details in the distribution. It is available via anonymous ftp from: labrea.stanford.edu:/pub/sgb = ====================================================================== * Bibliographies ---------------- Nelson Beebe has collected an extensive bibliography treating literate programming. His work is available for anonymous ftp from ftp.math.utah.edu [128.110.198.2] in directory /pub/tex/bib as files: litprog.bib litprog.ltx litprog.twx. Although I have not verified this, LPA is an alternate source for these files. Note that they are updated frequently (Nelson says several times each week), so be sure to get a fresh copy before extensive use. Joachim Schrod indicates that these files may be updated daily and can be retrieved via anonymous ftp at LPA/documentation. = ====================================================================== * How to anonymously ftp ------------------------ Pretty much everything mentioned here is available by anonymous FTP. FAQ lists cross-posted to news.answers and rec.answers can be gotten from rtfm.mit.edu [18.70.0.209], under /pub/usenet/news.answers or under /pub/usenet/more.specific.group.name "anonymous FTP" is just a way for files to be stored where anyone can retrieve them over the Net. For example, to retrieve the latest version of the literate programming FAQ, do the following: > ftp rtfm.mit.edu /* connect to the site; message follows */ > anonymous /* type this when it asks for your name */ > /* type your address as the password */ > cd /pub/usenet /* go to the directory you want to be */ > cd comp.programming.literate /* one level down (no slash). */ > dir /* look at what's there */ > get literate-progamming-faq /* get the file; case-sensitive */ > quit /* stop this mysterious thing */ If your FTP program complains that it doesn't know where the site you want to use is, type the numerical address instead of the sitename: > ftp 18.70.0.209 /* connect with numerical address */ If you don't have ftp access, send e-mail to mail-server@rtfm.mit.edu with the single word "help" in the body of the message. Getting binary files (executables, or any compressed files) is only slightly more difficult. You need to set binary mode inside FTP before you transfer the file. > binary /* set binary transfer mode */ > ascii /* set back to text transfer mode */ FAQs and spoiler lists are generally ascii files; everything else is generally binary files. Some common extensions on binary files in archive sites are: .Z Compressed; extract with uncompress .tar.Z Compressed 'tape archive'; uncompress then untar or tar -xvf .gz or .z Gnu gzip; use gunzip (available from prep.gnu.ai.mit.edu) .sit (Mac) StufIt archive .zip Extract with Zip or Unzip .zoo Yet another archive/compress program .lhe (Amiga) ? .lzh Lha archive program. .arj (PC) Arj archive program. .exe (PC) Sometimes self-extracting archives-just execute them. .uue or .UUE Transfer as text file; use uudecode to convert to binary .hqx (Mac) BinHex format; transfer in text mode Generic help can be found in the FAQs of comp.binaries. for how to transfer, extract, and virus-check binary files. (At rtfm.mit.edu) If you can't FTP from your site, use one of the following ftp-by-mail servers: ftpmail@decwrl.dec.com ftpmail@src.doc.ic.ac.uk ftpmail@cs.uow.edu.au ftpmail@grasp.insa-lyon.fr For complete instructions, send a message reading "help" to the server. If you don't know exactly what you're looking for, or exactly where it is, there are programs and servers that can help you. For more info, send e-mail to mail-server@rtfm.mit.with with the body of the message reading send usenet/news.answers/finding-sources Thanks to Aliza R. Panitz (the "buglady") for this text. I copied it verbatim from her post on faq-maintainers with only minor modifications. = ====================================================================== * Acknowledgements ------------------ This document would not have happened without the help of many people. Among them are Marcus Speh, George Greenwade, Rob Beezer, Joachim Schrod, Piet van Oostrum, and Ross N. Williams. A special thanks to Aliza R. Panitz for the text describing how to execute an anonymous ftp for files of interest. Any omissions from these acknowledgements should be considered an act of stupidity on my part. Of course, the authors of literate programming tools mentioned above all play a vital role in the vitality of literate programming. Furthermore, participants in the comp.programming.literate newsgroup (and associated mailing list) all contributed in various fashions. Thank all of you. = ====================================================================== * End notes ----------- This document will continue to evolve. I'm planning on adding entries for additional literate programming tools and will expand the sections on examples as more examples become available. Tools I will include are WEB (the original pascal version) for starters. Others will be added as I find and document them. Omission of a particular tool should not be considered a snub in any sense--simply an error or oversight on my part. = End of File ========================================================== ================================================================================ Archive-Date: Fri, 10 Jun 1994 00:19:07 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: Is there some kind of verbatim mode in web ? Message-ID: CC: Dominique Dumont Date: Fri, 10 Jun 1994 02:47:20 GMT To: LitProg@SHSU.EDU In article <2t18mk$kkf@hpscit.sc.hp.com>, Dominique Dumont wrote: >format STDOUT = >@@<<<<<<<<<<<<<<<<<<< @||||||||||| @@>>@>>@>>@>>@>>@>>@>>@>> @<<<<<<<<< >$file, $data, @foo, $bar Agony! Damn perl anyway --- you should be using Icon :-) OK, I see two answers: change the scrap delimiter <<...>> to something like <#...#> or some other sufficiently unlikely string, or switch to nuweb, which would make this problem much less painful. To implement the first alternative, change lines 127, 130, and 259 of markup.nw and build yourself a new versino of markup. If I get sufficient email convincing me it would be useful, I'll make the scrap delimiters configurable at run time by a command-line option (just what noweave needs, another option...). ================================================================================ Archive-Date: Fri, 10 Jun 1994 04:43:12 CDT Sender: owner-litprog@SHSU.edu From: AStirnem@maths.exeter.ac.uk Reply-To: LitProg@SHSU.edu, AStirnem@MATHS.EXETER.AC.UK Date: Fri, 10 Jun 94 10:29:43 +0100 Message-ID: <18964.9406100929@noether.maths.exeter.ac.uk> To: LitProg@SHSU.edu, partingr@project4.computer-science.manchester.ac.uk CC: LitProg@SHSU.EDU Subject: multiple module refs > Is it possible in any literate programming scheme to have multiple module > references in one section? (preferably CWEB) Noweb allows this syntax. For instance: ----------------- begin example ------------------------- @ Access homogeneous parts. <>= class hpol; <>= #include "hpol.h" // from hpol import hpol <>= hpol operator()(const int d) const; <<*>>= hpol series::operator()(const int d) const { /* ... */ } ------------------ end example ----------------------------- For me, this was a reason for switching to noweb. I do think that this is an important feature. I always felt that the refinement structure is only a part of the story. There is complementary structure you might call the ``boiler plate'' with chunk names like. <> <> <> <> <> You create these standard slots and afterwards emit code into them. I think it is good style to keep semantically related code close together in the source file, even if it is going to be spread out over the whole compilable file. Cheers, Andreas. ================================================================================ Archive-Date: Fri, 10 Jun 1994 09:26:40 CDT Sender: owner-litprog@SHSU.edu From: jacojn@inet.uni-c.dk (Jacob Nielsen) Reply-To: LitProg@SHSU.edu, jacojn@INET.UNI-C.DK Subject: Re: multiple module refs Date: Fri, 10 Jun 1994 14:12:16 GMT Message-ID: <7712575368801@inet.uni-c.dk> To: LitProg@SHSU.EDU On 9 Jun 94 08:13:43 GMT, rob partington wrote: >Not that I want to keep posting this question, but... > >Is it possible in any literate programming scheme to have multiple module >references in one section? (preferably CWEB) Yes; at least it works in nuweb and noweb -- the two tools I have tried. This is because these tools does not enforce a particular style that the document should have. CWEB (and WEB) enforce a style which, if I understand you correctly, only allows for one module reference per section. Perhaps the LaTeX support for CWEB (by Joachim Schrod, I believe) eliminates the problem. There is also another CWEB called cweb-leeuwen -- I cannot remember what it can do but you could get lucky :-) > [example deleted] > >I don't like having unnamed sections tied to the previous one (purely for >stylistic reasons), and I think that declaring local variables where they >are used is more in keeping with the LP philosophy. Hear, hear ! > >I did try and hack cweave to do this (by adding @9 and making the section >translator loop while it got @9's - .ch file available on request) but the >section numbers of any defining references comes out too high. (ie in the >above example, the @= section number is 1 too high). When you say the section number is 1 to high, does that mean that you want the section numbers of <|main|...> and to be the same ? If that is the case, then what happens with the crossreferences ?? Jacob -- Jacob Nielsen Email: jacojn@inet.uni-c.dk (my private account) or bc898574@bbar.dtu.dk (my account at the university) ================================================================================ Archive-Date: Fri, 10 Jun 1994 14:08:49 CDT Sender: owner-litprog@SHSU.edu From: d3h486@reverse.pnl.gov (John L Daschbach) Reply-To: LitProg@SHSU.edu, d3h486@REVERSE.PNL.GOV Subject: Controlling FWEB pretty printing? Date: 10 Jun 1994 18:48:37 GMT Message-ID: To: LitProg@SHSU.EDU My quick look at some of the FWEB documentation has not yet revealed to me whether the formatting of C outut can be controlled by the user using FWEB. Without trying to start a flame war, I really don't like the output formatting with regards to braces and indenting. The default uses up a lot of real estate on the page and makes nested if/else statements hard to follow. What I would like is something like: for (i=1; i < limit; i++ ) { x = function_foo(y[i]); for (i=j; j < j_limit; j++ ) { test = bar(x); if ( test < 0.0 ) { do_lo_ball(test); else if ( test < 1.0 ) { do_mid_ball(test); { else if ( test < 10.0 ) { do_norm_ball(test); } else { do_hi_ball(test); } } } Is it possible to modify FWEB via the allowed customization options to do this? If not, is there another web which someone would recomend to do this? -John ================================================================================ Archive-Date: Fri, 10 Jun 1994 16:13:16 CDT Sender: owner-litprog@SHSU.edu From: utcke@worf.ti1.tu-harburg.de () Reply-To: LitProg@SHSU.edu, utcke@WORF.TI1.TU-HARBURG.DE Subject: Re: web-mode Date: 1 Jun 1994 17:05:05 GMT Message-ID: <2sif41$ipj@rztsun.tu-harburg.de> To: LitProg@SHSU.EDU Got them. And: sorry, my news reader does not allow me to cancal the previous article. Sven ================================================================================ Archive-Date: Fri, 10 Jun 1994 16:20:58 CDT Sender: owner-litprog@SHSU.edu From: utcke@tu-harburg.d400.de (Sven Utcke) Reply-To: LitProg@SHSU.edu, utcke@TU-HARBURG.D400.DE Subject: web-mode Date: 1 Jun 1994 09:58:58 GMT Message-ID: <2shm52$g9m@rztsun.tu-harburg.de> To: LitProg@SHSU.EDU Hi, I tried to reach the author of "web-mode" Mark B. Motl but couldn't get through. So maybe a kind soul out there can help me? I've been using his "web-mode" (1.61, 16.12.92) for the best part of the last year and really grown to love it. However, 3 weeks ago I started a new job and had to work - on new machines (IBM's rs6000 running AIX instead of SUN's) - with emacs 19.16.5 instead of 18.57.1 and --- "web-mode" doesn't work any more. Precisely: When inserting a module name with @< I won't get a list of used module names any more. Well, I still get a list, but it only contains the very first letter of each module name (and each letter only ones). The newly inserted name will appear correctly, but only during this session, starting a new session will screw this name too. Does anyone out there know why this happens? Is it emacs 19 doing this? If so, is there a fix? (If not: is there a fix?) I would really appreciate it if someone could help me! Thanks Sven --- utcke@tu-harburg.d400.de sven@robots.ox.ac.uk ================================================================================ Archive-Date: Fri, 10 Jun 1994 16:24:20 CDT Sender: owner-litprog@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Re: Is there some kind of verbatim mode in web ? Date: 10 Jun 1994 21:12:22 GMT Message-ID: <2takvm$v98@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article , norman@flaubert.bellcore.com (Norman Ramsey) writes: [Mail to you bounced. Error message: The original message was received at Fri, 10 Jun 1994 14:39:48 -0400 from flaubert.bellcore.com [192.4.7.45] ----- The following addresses had delivery problems ----- "|/usr/public/pkg/mh-6.8.1/lib/slocal -user norman -verbose 2>>/u/norman/slocal.log 1>&2" (unrecoverable error) (expanded from: ) ] > If I get sufficient email > convincing me it would be useful, I'll make the scrap delimiters > configurable at run time by a command-line option This is one mail in favor. I don't like << ... >> anyhow for other reasons, and then I could distribute noweb sources to other people without distributing a modified noweb as well... Cheers, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Fri, 10 Jun 1994 23:39:59 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: Is there some kind of verbatim mode in web ? Message-ID: CC: Joachim Schrod Date: Sat, 11 Jun 1994 03:54:32 GMT To: LitProg@SHSU.EDU I asked for email on the topic of making <<...>> a run-time option in noweb. I should never ask for email, because >[Mail to Norman Ramsey bounced] We lost power (including cooling) this morning and had to turn off the UPS because the machine room got too hot. Bringing everythign back up gracefully and getting mail to work took til mid-afternoon, but it is now safe to send me email again. ================================================================================ Archive-Date: Fri, 10 Jun 1994 23:50:20 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: Controlling FWEB pretty printing? Message-ID: Date: Sat, 11 Jun 1994 03:58:57 GMT To: LitProg@SHSU.EDU >is there another web which someone would recomend to >[customize prettyprinting]? Spidery WEB was designed precisely to make it easy for you to customize prettyprinting. It suffers from many of the same problems as its relatives in the WEB family, but it does a good job with prettyprinting customization (if I do say so myself). It's available from CTAN in web/spiderweb. ================================================================================ Archive-Date: Sat, 11 Jun 1994 00:00:38 CDT Sender: owner-litprog@SHSU.edu From: coker@cherrypit.Princeton.EDU (David A. Coker) Reply-To: LitProg@SHSU.edu, coker@CHERRYPIT.PRINCETON.EDU Subject: Re: Controlling FWEB pretty printing? Message-ID: <1994Jun10.231644.19541@Princeton.EDU> Date: Fri, 10 Jun 1994 23:16:44 GMT To: LitProg@SHSU.EDU John, I'm sure the FWEB macros could be changed to accomplish what you are looking for. This was my biggest complaint with FWEB when I first started using it. However, a quick fix for your problem regarding the the use of real estate is to do the following with regards to the braces: for(i=1;i Date: Sun, 12 Jun 94 08:13:00 +0600 To: LitProg@SHSU.EDU Ok, all you fellow programmers. I'm a self taught C programmer, been using a shareware compiler for awhile, and am going to buy a Borland compiler. The programs that I am working on, for now, will be for DOS and will work in conjunction with IBM's SCREEN READER(TM) program for the blind. What I need to know is which compiler to purchase. IE: Borland C+, C++, Turbo C, Turbo Pascal, or what??? Price is really not an issue; however, I and need to have a compiler that will be expandable, IE: Windows Interface, Allowing for LAN system technology and audio interface. Eventually, I want to write my own text/voice interface so that my programs are stand-alone and not dependant on other programs. Graphics is not a major issue at this point, obviously since it will be used by blind individuals, but I want to keep that open as an option due to the fact that I need to present it to sighted people and making the product graphically appealing always helps. Again, the biggest thing here is flexibility!!!! I don't want to buy a product that will limit me...Thanks in advance for your help! --- Patrick.Hedglin@granite.mn.org --- þ OLX 2.2 þ Klingon vessel uncloaking....or is it Odo? ================================================================================ Archive-Date: Mon, 13 Jun 1994 02:53:14 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 9 Jun 94 21:50:27 +0200 From: kaufmann@analog.shraero.co.at (Roland Kaufmann SCHRACK AEROSPACE) Reply-To: LitProg@SHSU.edu, kaufmann@ANALOG.SHRAERO.CO.AT Message-ID: <9406091950.AA05475@analog.co.at.> To: LitProg@SHSU.edu Subject: Re: closing a web in web-mode.el? Gregory Tucker-Kellogg (gtk@walsh.med.harvard.edu) wrote: greg> I have been using web-mode.el for a few months (almost as long as greg> I've been using a web). While I am pleased with greg> web-mode, I have one problem that won't go away. To wit: is it greg> possible to close a web file and its associated buffers without greg> killing emacs? Whenever I have tried, I end up with error messages greg> like "Tried to execute web-mode command in non-web buffer". What greg> I'm looking for is some sort of "web-close-web-buffer". I am using Donald Knuth's 'cweb.el' (July 1990) and didn't experience like those mentioned by Greg. It does change some global key bindings (i.e. Emacs will behave differently after loading cweb.el), but just a few with unused (by me) functionality outside cweb mode. ========================================================================== Roland Kaufmann Tel.: +43 1 81100 5563 Systems Engineer Fax: +43 1 81100 5577 Studies Group e-mail: kaufmann@shraero.co.at Signal Processing SCHRACK Aerospace Breitenfurterstr. 106-108 A-1120 Vienna, AUSTRIA ========================================================================== ================================================================================ Archive-Date: Mon, 13 Jun 1994 10:38:28 CDT Sender: owner-litprog@SHSU.edu From: steve@hubcap.clemson.edu ("Steve" Stevenson) Reply-To: LitProg@SHSU.edu, steve@HUBCAP.CLEMSON.EDU Subject: Would like copy of HTML demos of Noweb and Nuweb Date: 13 Jun 94 15:27:03 GMT Message-ID: To: LitProg@SHSU.EDU I had a slight disaster on my home directory....would someone please post the HTML demo information again. Thanks. steve -- Steve (really "D. E.") Stevenson steve@hubcap.clemson.edu Department of Computer Science, (803)656-5880.mabell Clemson University, Clemson, SC 29634-1906 Wanted: Sterbenz, P. Floating Point Computation ================================================================================ Archive-Date: Mon, 13 Jun 1994 13:48:33 CDT Sender: owner-litprog@SHSU.edu From: mauer@mcs.anl.gov (Andrew Mauer) Reply-To: LitProg@SHSU.edu, mauer@MCS.ANL.GOV Subject: Re: Is there some kind of verbatim mode in web ? Message-ID: Date: Mon, 13 Jun 1994 18:35:02 GMT To: LitProg@SHSU.EDU In article <2t18mk$kkf@hpscit.sc.hp.com> domi@grenoble.hp.com (Dominique Dumont) writes: DD> Hello DD> To use the format and write command in perl, we must write this kind of DD> line : DD> format STDOUT = DD> @<<<<<<<<<<<<<<<<<<< @||||||||||| @>>>>>>>>>>>>>>>> @<<<<<<<<< DD> $file, $data, @foo, $bar DD> . DD> this is correct perl syntax. In noweb (the system I use, but the problem DD> might arise in other language independant webs), I must write this line DD> within a scrap like this : DD> format STDOUT = DD> @@<<<<<<<<<<<<<<<<<<< @||||||||||| @@>>@>>@>>@>>@>>@>>@>>@>> @<<<<<<<<< DD> $file, $data, @foo, $bar DD> . DD> unless noweb detects a scrap call. Needless to say, this is quite painfull DD> and confusing. DD> So could the web gurus specify a verbatim mode ( a la LaTeX ? ) There is a simple solution in noweb: design your own filter to fix things like this. The following (CRUDE!) filter would solve your problem if it could be run before the `markup' program: #!/bin/perl -p # If a line has at least 4 `<' characters in a row, we assume it's a # format line and escape everything. if ( /<<<>/@>>/g; } There remains the problem of having filters that run before `markup'. I have noweb 2.5a, which does not come with this capability. Here is an untested diff to allow the -prefilters flag. I use a similar hack for noweave, so I think it has a reasonable chance of working untested. --- ~crud/notangle Fri Jan 28 10:15:05 1994 +++ crud2 Mon Jun 13 13:24:53 1994 @@ -5,7 +5,7 @@ # set -x LIB=/home/some/path/bin/sun4 PATH=$PATH:$LIB -opt= arg= markopt= filters= +opt= arg= markopt= filters= prefilters= while [ $# -gt 0 ]; do case $1 in -ml|-m3|-awk|-icn|-icon|-pascal|-c|-w[0-9][0-9]*) ;; @@ -14,6 +14,7 @@ -t*) markopt="$markopt -t" ; opt="$opt '$1'" ;; # copy tabs at markup, use width given in notangle -filter) filters="$filters $2 | " ; shift ;; + -prefilter) prefilters="$prefilters | $2 " ; shift ;; -) arg="$arg '$1'" ;; -*) opt="$opt '$1'" ;; *) arg="$arg '$1'" ;; @@ -20,5 +21,5 @@ esac shift done -eval "$LIB/markup $markopt $arg | $filters $LIB/nt $opt" +eval "cat $arg $prefilters | $LIB/markup $markopt | $filters $LIB/nt $opt" exit $? /Andrew/ ================================================================================ Archive-Date: Mon, 13 Jun 1994 16:21:28 CDT Sender: owner-litprog@SHSU.edu Date: Mon, 13 Jun 1994 17:12:22 -0400 From: raman@crl.dec.com Reply-To: LitProg@SHSU.edu, raman@CRL.DEC.COM Message-ID: <9406132112.AA05997@aster.crl.dec.com> To: patrick.hedglin@granite.mn.org (Patrick Hedglin) CC: raman@crl.dec.com, LitProg@SHSU.edu, bnb@math.ams.org Subject: C compiler, IBM Screenreader and Accessibility: Patrick writes: > Subject: Which Compiler??? > The programs that I am working on, for now, will be for DOS and will > work in conjunction with IBM's SCREEN READER(TM) program for the blind. What I need to know is which compiler to purchase. IE: Borland C+, C++, Turbo C, Turbo Pascal, or what??? Hi Patrick, I use IBM Screenreader for all my work, though I do not program on the PC. (I'm a UNIX hack, and use the PC merely as a talking terminal) However, I'm a bit confused by your question. I don't really see how your choice of C compiler should affect the accessibility of your applications using Screenreader, (or any other screen access packages) What you do need to keep in mind however is that the screen update method you use can drastically affect the behaviour of screen review programs. Screenreader is not as vulnerable to this as some other packages. Also, you need to pay attention to how/what you do with your program cursor. For instance, if you decide to leave the hardware cursor parked on the bottom of the screen, and give the user feedback about changes by just highlighting a particular line, or moving a lightbar around, most screen access programs will get confused, (at least, they will need some customization before they do something easonable) So as far as I can tell, your concerns should start only after you've acquired a C compiler. ================================================================================ Archive-Date: Tue, 14 Jun 1994 10:36:47 CDT Sender: owner-litprog@SHSU.edu Date: Tue, 14 Jun 94 11:37:15 EDT From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, mauer@mcs.anl.gov Subject: Re: Is there some kind of verbatim mode in web ? Message-ID: Andrew Mauer writes (wrt noweb filters): > There remains the problem of having filters that run before `markup'. > I have noweb 2.5a, which does not come with this capability. Here is > an untested diff to allow the -prefilters flag. I use a similar hack > for noweave, so I think it has a reasonable chance of working untested. Having wrestled with the same problem for some time before I came up with the simple solution, I know that it is not ``obvious,'' even though it should have been. The ``obvious'' reason that noweb does not provide for pre- (or post-) filters is that the operating system already provides the capability. If ``pre'' and ``post'' are the names of said filters, the following command line (suitable for a make file) should do the job nicely: pre cob.nw | noweave | post > cob.tex (and similarly for notangle). If noweave doesn't take input from the standard input stream when no file is specified, that is certainly a bug in noweb that I am sure Norman Ramsey would want to fix, as the whole noweb philosophy is to produce LP tools that work well with existing tools. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | When a country is in trouble, Computer Science Department | choices are few, Kean College of New Jersey | And, apart from charging double, Union, NJ 07083 | what can you do? USA | | -- Stephen Sondheim leew@pilot.njin.net | Pacific Overtures (1976) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Tue, 14 Jun 1994 23:31:16 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Unofficial BOF at PLDI Message-ID: Date: Wed, 15 Jun 1994 00:18:04 GMT To: LitProg@SHSU.EDU I'm going to SIGPLAN PLDI next week, and probably some other literate programmers are too. If you'd like to have a get-together, let me know what time you'd prefer. If there are enough of us I'll try to schedule a time and a room. Failing that, I'll see you in the halls :-) Norman -- Norman Ramsey norman@bellcore.com ================================================================================ Archive-Date: Wed, 15 Jun 1994 02:41:02 CDT Sender: owner-litprog@SHSU.edu From: domi@grenoble.hp.com (Dominique Dumont) Reply-To: LitProg@SHSU.edu, domi@GRENOBLE.HP.COM Subject: Re: Is there some kind of verbatim mode in web ? Date: 15 Jun 1994 07:29:34 GMT Message-ID: <2tmaku$3tf@hpscit.sc.hp.com> To: LitProg@SHSU.EDU Norman Ramsey (norman@flaubert.bellcore.com) wrote: : Agony! Damn perl anyway --- you should be using Icon :-) : OK, I see two answers: change the scrap delimiter <<...>> to something : like <#...#> or some other sufficiently unlikely string, or switch to I wonder if there is such thing as a "sufficiently unlikely string" in perl ... ----------------------------------------------------------------------------- Name: Dominique Dumont ^^^^^^ Email: Dominique_Dumont@grenoble.hp.com / O O \ HP Desk: Dominique DUMONT / HP6300/UM ( \____/ ) Address : HEWLETT PACKARD, 38053 Grenoble Cedex 09 FRANCE \______/ Tel,Telnet: (33) 76 62 57 24 - 7 779 5724 Telex,Fax: 980 124 - (33) 76 62 14 88 ----------------------------------------------------------------------------- ================================================================================ Archive-Date: Wed, 15 Jun 1994 16:39:21 CDT Sender: owner-litprog@SHSU.edu Date: Wed, 15 Jun 1994 22:34:00 -0700 (PDT) From: "Stephen Boyan (510) 926-3291/fax 926-3604" Reply-To: LitProg@SHSU.edu, BOYANST@NCAL.KAIPERM.ORG Subject: Where is help for Tex? To: LITPROG@SHSU.EDU Message-ID: <01HDKP6SBFBK91W139@mr.kaiperm.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Where do I post questions for help on Tex, specifically EMTex? Thanks. ================================================================================ Archive-Date: Wed, 15 Jun 1994 20:31:11 CDT Sender: owner-litprog@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Subject: Reverse-engineering code. Date: 16 Jun 94 10:33:15 Message-ID: Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au Keywords: reverse-engineering source-code-control To: LitProg@SHSU.EDU I was just reading an article in Unixworld's Open Computing about tools for reverse-engineering software. The crux of it was that these tools create a database which describes the structure of the code and the dependence of global data structures, etc. Many then provide a base from which to continue the development of the software, with the tool essentially tracking the program structure as the development process continues, sometimes even enforcing coding conventions before allowing a new revision of a piece of code to be registered. It occurred to me that this style of tool could well be the way in which literate programming might end up being introduced to the `great unwashed'. In some ways, of course, it goes against the literate programming paradigm that code should be well documented from the start, but then not everyone has the advantage of starting from scratch. Then there are examples of LitProg tools being used for reverse engineering, such as when Ross Williams used FunnelWeb to add documentation to a Postscript program until he understood the structure of the program enough to allow him to fix the code. While this could be done with any appropriate LitProg tool, it's also a good bet that people would strongly prefer automatic code analysation to the manual process that Ross went through. Tools like FunnelWeb, noweb, and nuweb, being language-independent, i.e. language insensitive, would not be the best place to look for such features to be added, but what about with CWEB or FWEB? Are there any such tools currently around? (I only use FunnelWeb, so I wouldn't know) Clearly designing such a tool is a major job, because you have to parse the code, but since CWEB, FWEB, and a few others already parse the code, would adding structure analysis of some sort be unreasonable? Not that I'm volunteering ;-) by the way, I'm just interested into how the current crop of LitProg tools will fit into some of the developing trends in code management. Any thoughts? Cheers, Tony. -- _____________________________________________________________________________ A.B.Coates, Dept. of Physics, The University of Queensland QLD 4072 Australia. Email: coates@physics.uq.oz.au Phone: (07/+617) 365-3424 Fax: (07/+617) 365-1242 Disclaimer: The University is ignorant of my opinions, let alone guilty ... _____________________________________________________________________________ ================================================================================ Archive-Date: Thu, 16 Jun 1994 10:08:58 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 16 Jun 1994 17:09:55 +0000 (GMT) From: "Eric W. van Ammers, LUW, tel: (+31)8370-83356" Reply-To: LitProg@SHSU.edu, AMMERS@RCL.WAU.NL Subject: Re: multiple module refs To: LitProg@SHSU.edu Message-ID: <01HDM7UY9DPECSQCUN@RCL.WAU.NL> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT I'm not sure if I understand your problem correctly, but if so then CLiP solves your problem. In the CLiP system there is predefined connection between the structure of your the documentation (Chapter, sections, subsections, etc) and the scraps of your literate program. Any compination of scraps inside sections is allowed. In a Pascal environment this allows you to simulate local declarations. That is if you have a refinement step with local variables you can document both together in one section while the declarations will still be inserted at their syntactically correct posistion at main level. Hope this helps Eric ============================================================================ Eric W. van Ammers Department of Computer Science Wageningen Agricultural University Dreijenplein 2 E-mail: ammers@rcl.wau.nl 6703 HB Wageningen voice: +31 (0)8370 83356/84154 The Netherlands fax: +31 (0)8370 84731 ============================================================================ ================================================================================ Archive-Date: Thu, 16 Jun 1994 10:22:50 CDT Sender: owner-litprog@SHSU.edu From: ara@zurich.ai.mit.edu (Allan Adler) Reply-To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU Subject: vertical line in FWEB Date: 16 Jun 94 10:46:30 Message-ID: To: LitProg@SHSU.EDU I'm rewriting in FWEB a fortran program I received. In some places the code has write statements that print a vertical line | and this is confusing fweave. What can I do about that? Allan Adler ara@altdorf.ai.mit.edu ================================================================================ Archive-Date: Thu, 16 Jun 1994 13:13:45 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 16 Jun 1994 20:08:32 +0200 (MET DST) From: Lode Leroy Reply-To: LitProg@SHSU.edu, Lode.Leroy@RUG.AC.BE Subject: problem using CWEB, $ in C section To: LitProg Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII hi, I've just written my first web. It is just a silly program, based on a yacc script. The problem is in the yacc stuff: @= line : line expr '\n' { printf("%d\n",$2); } ; [non-yacc-ers: this should print the value of the expression "expr" ] This works fine when ctangled and compiled. The problem is that TeX treats the '$' as a start of math-mode. I think it isn't escaped. (the TeX sourcefile is pretty unreadable). I suppose there is no workaround for this, other than modifying cweave, as '$' wasn't supposed to be in a section of C code, (unless it's in a string). Please mail me directly, cause I'm not on LitProg due to examinations :-( I'm not really interested on the working of other litprog tools for this purpose. I know there are some language independent tools that wouldn't have problems with this, but I'd like to use CWEB for the nice prettyprinting... Also yacc doesn't accept the #line directives. How do i stop them from being generated? For the moment I throw 'em out with sed... Lode.Leroy@rug.ac.be ================================================================================ Archive-Date: Thu, 16 Jun 1994 17:20:54 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 16 Jun 1994 23:13:00 -0700 (PDT) From: "Stephen Boyan (510) 926-3291/fax 926-3604" Reply-To: LitProg@SHSU.edu, BOYANST@NCAL.KAIPERM.ORG Subject: RE: problem using CWEB, $ in C section To: LITPROG@SHSU.EDU Message-ID: <01HDM4XNPHUS91WFRB@mr.kaiperm.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT Regarding the earlier post referenced here, about using C-Web with YACC, I would also find this useful. ================================================================================ Archive-Date: Thu, 16 Jun 1994 17:48:58 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 16 Jun 1994 23:22:00 -0700 (PDT) From: "Stephen Boyan (510) 926-3291/fax 926-3604" Reply-To: LitProg@SHSU.edu, BOYANST@A1.KAIPERM.ORG Subject: RE: Reverse-engineering code. To: LITPROG@SHSU.EDU Message-ID: <01HDM5WDLL1I91W5V4@mr.kaiperm.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT In yesterday's mail came this post from A.B.Coates, Dept. of Physics, The University of Queensland QLD 4072 Australia. Email: coates@physics.uq.oz.au >>>>>>>>>>>>> I was just reading an article in Unixworld's Open Computing about tools for reverse-engineering software. The crux of it was that these tools create a database which describes the structure of the code and the dependence of global data structures, etc. ... It occurred to me that this style of tool could well be the way in which literate programming might end up being introduced to the `great unwashed'. In some ways, of course, it goes against the literate programming paradigm that code should be well documented from the start, but then not everyone has the advantage of starting from scratch. Then there are examples of LitProg tools being used for reverse engineering, such as when Ross Williams used FunnelWeb to add documentation to a Postscript program until he understood the structure of the program enough to allow him to fix the code. While this could be done with any appropriate LitProg tool, it's also a good bet that people would strongly prefer automatic code analysation to the manual process that Ross went through. ... <<<<<<<<<<<<<<<<<<<<<<<<<<< I do have some thoughts on this. In fact the use of C-Web with my favorite third party tools like PC-Lint and C-Vision is a question I've been holding in the back of my mind until I start trying to code in a literate style. (Right now I'm learning TeX, and still coding in normal C.) I have some experience with reengineering tools for COBOL on the IBM mainframe. I think they are assists to the maintenance programmer, but do not fully automate the job. The art comes in knowing what can be "assisted", and what must be done manually. I think reengineering code lies with tasks like indexing books; there is no fully automated way to do it. If you try to automate indexing, you get a concordance, not an index. Automated ree tools are also great at generating concordance-size output, instead of a more focused and distilled index-size. BTW, I do not include tools like Lint with the COBOL tools of the previous paragraph, although Lint can also give copious output. I have found PC-Lint far more useful than any COBOL ree tool I've used to date. I also like breakpoint debuggers. So my thoughts regarding C-Web and third party automated tools can be summed up how can lints and debuggers be used with literate programs? how can code databases be analyzed and tied back to the original literate source? It would seem all these thrid-party tools would work on the C output from the original literate text, rather than the text itself, and that is the difficulty. The approach of manually adding "webbing" to the code until it becomes understandable might be assisted by third-party analyzers. I had a gut reaction to the mention of this above as a promising avenue of research and practice, and hope to follow it. Thank you. ================================================================================ Archive-Date: Thu, 16 Jun 1994 20:58:29 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 16 Jun 1994 18:58:35 -0700 (MST) From: bauer@spock.AME.Arizona.EDU (Holger Bauer 8/93) Reply-To: LitProg@SHSU.edu, bauer@SPOCK.AME.ARIZONA.EDU Subject: Re: vertical line in FWEB To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU CC: LitProg@SHSU.EDU Message-ID: <9406170158.AA04459@AME.Arizona.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT If it is in (La)TeX-section @| will help. (e.g. \begin{tabular}{@|c@|c} ........) Try it for your FORTRAN code, maybe it helps there also. Holger |==========================================================================| | _ _ _ | | Holger Bauer ... __o ( ) ( ) (_ ) _ | | 1426 E. 8th St. .. _`\<,_ | |_| | _ | | __ (_) | | Tucson, AZ 85719 ...(*)/ (*). | _ | /'_`\ | | /'_ `\ | | | | (602) 623-9003 | | | | ( (_) ) | | ( (_) | | | | | (_) (_) `\___/ (___)`\__ | (_) | |============================= bauer@spock.ame.arizona.edu === ( )_) | ====| "Experience comes from bad judgment" Mark Twain \___/' ================================================================================ Archive-Date: Fri, 17 Jun 1994 09:17:35 CDT Sender: owner-litprog@SHSU.edu Date: Fri, 17 Jun 94 10:18:04 EDT From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, Lode.Leroy@rug.ac.be Subject: Re: problem using CWEB, $ in C section Message-ID: Lode.Leroy@rug.ac.be writes: > I've just written my first web. It is just a silly program, based on a > yacc script. > > The problem is in the yacc stuff: > > @= > line : line expr '\n' { printf("%d\n",$2); } > ; > > [non-yacc-ers: this should print the value of the expression "expr" ] > > This works fine when ctangled and compiled. The problem is that TeX > treats the '$' as a start of math-mode. I think it isn't escaped. > (the TeX sourcefile is pretty unreadable). > > I suppose there is no workaround for this, other than modifying cweave, > as '$' wasn't supposed to be in a section of C code, (unless it's in a > string). The easiest workaround is to use the @= (verbatim) control code for the $ parameters. For example, your example above would become @= line : line expr '\n' { printf("%d\n",@=$2@>); } The `$2' will have a nice box around it (and be in typewriter type). You can change this by redefining the \vb macro (see cwebmac.tex) as you like. > Also yacc doesn't accept the #line directives. How do i stop them from > being generated? For the moment I throw 'em out with sed... It's a bit odd that yacc chokes on #line's, as it inserts its own. The easiest way to remove them is to pipe the tangled output through a filter to remove the #line's. grep -v '^#line' should do nicely. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Junk journalism is the evidence of a Computer Science Department | society that has got at least one thing Kean College of New Jersey | right, that there should be nobody with Union, NJ 07083 | the power to dictate where responsible USA | journalism begins. | leew@pilot.njin.net | -- Tom Stoppard | "Night and Day" (1979) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Fri, 17 Jun 1994 11:07:34 CDT Sender: owner-litprog@SHSU.edu From: preston@noel.cs.rice.edu (Preston Briggs) Reply-To: LitProg@SHSU.edu, preston@NOEL.CS.RICE.EDU Subject: Re: Unofficial BOF at PLDI Date: 17 Jun 1994 03:35:19 GMT Message-ID: <2tr5ln$g7l@larry.rice.edu> To: LitProg@SHSU.EDU norman@flaubert.bellcore.com (Norman Ramsey) writes: >I'm going to SIGPLAN PLDI next week, and probably some other literate >programmers are too. If you'd like to have a get-together, let me >know what time you'd prefer. If there are enough of us I'll try to >schedule a time and a room. Failing that, I'll see you in the halls :-) I'll be there too, as will some of the local grad students (who're among the world's most experience users of nuweb). Preston Briggs ================================================================================ Archive-Date: Fri, 17 Jun 1994 17:59:02 CDT Sender: owner-litprog@SHSU.edu From: lwall@netlabs.com (Larry Wall) Reply-To: LitProg@SHSU.edu, lwall@NETLABS.COM Subject: Re: Is there some kind of verbatim mode in web ? Message-ID: <1994Jun17.224607.6118@netlabs.com> Date: Fri, 17 Jun 1994 22:46:07 GMT To: LitProg@SHSU.EDU In article <2tmaku$3tf@hpscit.sc.hp.com> domi@grenoble.hp.com (Dominique Dumont) writes: : Norman Ramsey (norman@flaubert.bellcore.com) wrote: : : Agony! Damn perl anyway --- you should be using Icon :-) : : : OK, I see two answers: change the scrap delimiter <<...>> to something : : like <#...#> or some other sufficiently unlikely string, or switch to : : I wonder if there is such thing as a "sufficiently unlikely string" : in perl ... Well, <# may not be unlikely enough, since @files = <#*>; will get you all the files in the current directory that start with #. You might be able to get away with (-: ... :-) though. Larry Wall lwall@netlabs.com ================================================================================ Archive-Date: Fri, 17 Jun 1994 21:49:23 CDT Sender: owner-litprog@SHSU.edu Date: Fri, 17 Jun 1994 19:49:44 -0700 (MST) From: bauer@spock.AME.Arizona.EDU (Holger Bauer 8/93) Reply-To: LitProg@SHSU.edu, bauer@SPOCK.AME.ARIZONA.EDU Subject: 2.1.1.1 2.1.1.1 ..........13 To: LitProg@SHSU.edu Message-ID: <9406180249.AA06681@AME.Arizona.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT the subject tells the main part of my problem. How can I prevent FWEB(Vers.1.40) (or LaTeX) from giving me a table of contents like: 2. section....................................................... 2.1 subsection........................................... 2.1.1 subsubsection ............................. 2.1.1.1 2.1.1.1 ......................... where the WEB-Code looks like: @* section. @*1 subsection. @*2 subsubsection. @ @^Index-Entry@> @= some code What really bothers me is the fact that the unnamed module (started by '@ ') is in the table of contents. Any ideas why? Thanks for any help. Holger |==========================================================================| | _ _ _ | | Holger Bauer ... __o ( ) ( ) (_ ) _ | | 1426 E. 8th St. .. _`\<,_ | |_| | _ | | __ (_) | | Tucson, AZ 85719 ...(*)/ (*). | _ | /'_`\ | | /'_ `\ | | | | (602) 623-9003 | | | | ( (_) ) | | ( (_) | | | | | (_) (_) `\___/ (___)`\__ | (_) | |============================= bauer@spock.ame.arizona.edu === ( )_) | ====| "Experience comes from bad judgment" Mark Twain \___/' ================================================================================ Archive-Date: Mon, 20 Jun 1994 07:49:28 CDT Sender: owner-litprog@SHSU.edu From: ara@zurich.ai.mit.edu (Allan Adler) Reply-To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU Subject: can one have it all? Date: 18 Jun 94 11:31:02 Message-ID: To: LitProg@SHSU.EDU I have been looking over the various web programs available. It seems to me that there is no program that incorporates all of the best features of the availble web programs. Correct me if I'm wrong, but this is how it looks to me: FWEB can handle several languages well but it is not convenient for the user to add support for another language (although there is support for using any language verbatim). Also, it can't write to multiple output files. Spidery web can handle new languages but not multiple output files. Noweb can handle multiple output files but not languages such as fortran where the position of tokens on a line is important. I received a large fortran program that I would like to consider rewriting with a suitable web. THe program is spread out over several dozen files. It also involves some files written in C. What web does one use for something like that? I realize one can make a web file for each fortran file but then one loses information about the relation among the files. Allan Adler ara@altdorf.ai.mit.edu ================================================================================ Archive-Date: Mon, 20 Jun 1994 07:51:41 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: noweb version 2.6, supports HTML Message-ID: Date: Sun, 19 Jun 1994 02:46:26 GMT To: LitProg@SHSU.EDU noweb version 2.6 is now available on CTAN in web/noweb. This version has an HTML back end so you can create hypertext literate programs to be browsed with Mosaic. There's also a -latex+html option which makes it easy to use latex2html to create hypertext versions of programs already marked up in latex style. For an example see ftp://bellcore.com/pub/norman/wc.html There is a bug fix in this version, plus I have changed the support code to work around a bug in latex2e. I have now fixed all the problems I know of involving using noweb with latex2e's compatibility mode. -- Norman Ramsey norman@bellcore.com ================================================================================ Archive-Date: Mon, 20 Jun 1994 07:52:35 CDT Sender: owner-litprog@SHSU.edu From: porttiki@cc.Helsinki.FI (Anssi Porttikivi) Reply-To: LitProg@SHSU.edu, porttiki@CC.HELSINKI.FI Subject: CWEB formats C++ badly Date: 19 Jun 1994 10:25:35 GMT Message-ID: <2u16ev$7su@kantti.Helsinki.FI> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit To: LitProg@SHSU.EDU Tell me, is CWEB 3.1 which we run here really supposed to parse non C but C++ constructs properly? I have a project which is in two dozen .w files and produces various .H and .C files. But e.g. class header files are never formatted rigth, we will have to include A LOT of CWEB formating commands to make line breaks sane. Indentations are impossible to fix properly. Templates confuse CWEB badly. Sometimes CWEB produces faulty C++ code (Try a >, you will have to write it a@= @>>). I am so tired with it... -- t. Anssi.Porttikivi@Helsinki.Fi (http://www.helsinki.fi/~porttiki) - Internet Is The Computer, World Wide Web Is The Operating System, HTML Is The Programming Language. (Anssi) ================================================================================ Archive-Date: Mon, 20 Jun 1994 07:58:57 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: can one have it all? Message-ID: Date: Sun, 19 Jun 1994 02:36:21 GMT To: LitProg@SHSU.EDU In article , Allan Adler wrote: >Spidery web can handle new languages but not multiple output files. I've been writing lousy documentation again. Spidery web handles multiple output files. In fact, I invented the idea of multiple output files when I designed spidery web. >Noweb can handle multiple output files but not languages such as fortran >where the position of tokens on a line is important. Ditto. Noweb does indeed handle languages in which the position of tokens on a line is important (including not just fortran but miranda, haskell, python, and bourne shell here documents). And again it was the first literate-programming tool to do so. You'd be doing me a service if you could point me to whatever you read that gave you these misconceptions, so I could correct it. >I received a large fortran program that I would like to consider rewriting >with a suitable web. THe program is spread out over several dozen files. >It also involves some files written in C. What web does one use for >something like that? Either noweb or nuweb would be most suitable. If you want prettyprinting and are willing to tolerate a more complex tool, FWEB might also be good. (I would be surprised if it couldn't handle multiple output files and multiple languages simultaneously, but where FWEB is concerned I don't know what I'm talking about.) ================================================================================ Archive-Date: Mon, 20 Jun 1994 07:59:36 CDT Sender: owner-litprog@SHSU.edu From: bauer@spock.ame.arizona.edu (Holger Bauer 8/93) Reply-To: LitProg@SHSU.edu, bauer@SPOCK.AME.ARIZONA.EDU Subject: 2.1.1.1 2.1.1.1 ...........13 Date: 18 Jun 1994 20:16:28 GMT Message-ID: To: LitProg@SHSU.EDU Hi: the subject tells the main part of my problem. How can I prevent FWEB(Vers.1.40) (or LaTeX) from giving me a table of contents like: 2. section....................................................... 2.1 subsection........................................... 2.1.1 subsubsection ............................. 2.1.1.1 2.1.1.1 ......................... where the WEB-Code looks like: @* section. @*1 subsection. @*2 subsubsection. @ @^Index-Entry@> @= some code What really bothers me is the fact that the unnamed module (started by '@ ') is in the table of contents. Any ideas why? Thanks for any help. |==========================================================================| | _ _ _ | | Holger Bauer ... __o ( ) ( ) (_ ) _ | | 1426 E. 8th St. .. _`\<,_ | |_| | _ | | __ (_) | | Tucson, AZ 85719 ...(*)/ (*). | _ | /'_`\ | | /'_ `\ | | | | (602) 623-9003 | | | | ( (_) ) | | ( (_) | | | | | (_) (_) `\___/ (___)`\__ | (_) | |============================= bauer@spock.ame.arizona.edu === ( )_) | ====| "Experience comes from bad judgment" Mark Twain \___/' -- |==========================================================================| | _ _ _ | | Holger Bauer ... __o ( ) ( ) (_ ) _ | | 1426 E. 8th St. .. _`\<,_ | |_| | _ | | __ (_) | | Tucson, AZ 85719 ...(*)/ (*). | _ | /'_`\ | | /'_ `\ | | | | (602) 623-9003 | | | | ( (_) ) | | ( (_) | | | | | (_) (_) `\___/ (___)`\__ | (_) | |============================= bauer@spock.ame.arizona.edu === ( )_) | ====| "Experience comes from bad judgment" Mark Twain \___/' ================================================================================ Archive-Date: Mon, 20 Jun 1994 08:00:20 CDT Sender: owner-litprog@SHSU.edu From: dak@messua.informatik.rwth-aachen.de (David Kastrup) Reply-To: LitProg@SHSU.edu, dak@MESSUA.INFORMATIK.RWTH-AACHEN.DE Subject: Re: CWEB formats C++ badly Date: 20 Jun 1994 08:19:22 GMT Message-ID: <2u3jea$cj1@urmel.informatik.rwth-aachen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: LitProg@SHSU.EDU porttiki@cc.Helsinki.FI (Anssi Porttikivi) writes: >Tell me, is CWEB 3.1 which we run here really supposed to parse non C but C++ >constructs properly? I have a project which is in two dozen .w files and >produces various .H and .C files. But e.g. class header files are never >formatted rigth, we will have to include A LOT of CWEB formating commands to >make line breaks sane. Indentations are impossible to fix properly. Templates >confuse CWEB badly. Sometimes CWEB produces faulty C++ code (Try a >, you >will have to write it a@= @>>). > I am so tired with it... I recommend switching to a non-pretty-printing Web, such as noweb or nuweb. In my opinion (I have used both cweb and noweb) the only excuse for using prettyprinting web's is for publication of a program (which has a very special focus on appearance, like typesetting a typesetter source :) ), or for fast typesetting of machine-generated code using WEB constructs (if your generated code does not, you are better off with a special purpose prettyprinter like indent), or for writing code where the programmer has as bad a style as to be less readable than machine-formatted code. In all other cases, the extra hassle is not worth it. This is especially the case with in-house documented source code. When the choice to the WEB programmer is 1) have lots of additional pains 2) do it illiterate the products will look nice, for a while, then he'll drop the webs as the novelty wears off. For puzzling together docs and programs, noweb for me does the trick very nicely, and I do not consider it more work doing it literate. Especially for syntactically complicated languages (like C++) with a host of slightly different compilers around, a pretty-printing Web is almost bound to fail eventually, as it does not have the compiler's complex parser, and not even the contexts for parsing. Instead of trying to coax a tool into mangling the code not too badly, better use one that does not even try, and hands the resposibility over to you, the human. Good pragrammers indent anyway, without thinking much. -- David Kastrup dak@pool.informatik.rwth-aachen.de Tel: +49-241-72419 Fax: +49-241-79502 Goethestr. 20, D-52064 Aachen ================================================================================ Archive-Date: Mon, 20 Jun 1994 11:50:20 CDT Sender: owner-litprog@SHSU.edu Date: Mon, 20 Jun 94 11:21:34 -0400 From: gtk@walsh.med.harvard.edu (Gregory Tucker-Kellogg) Reply-To: LitProg@SHSU.edu, gtk@WALSH.MED.HARVARD.EDU Message-ID: <9406201521.AA02400@walsh.med.harvard.edu> To: LitProg@SHSU.edu Subject: Re: can one have it all? References: Norman Ramsey writes: > In article , Allan Adler > wrote: [snip..] > Either noweb or nuweb would be most suitable. If you want > prettyprinting and are willing to tolerate a more complex tool, > FWEB might also be good. (I would be surprised if it couldn't > handle multiple output files and multiple languages simultaneously, > but where FWEB is concerned I don't know what I'm talking about.) FWEB does handle multiple output files. Look at the @o and @O commands for output files with local and global scope, respectively. FWEB can also compare temporary files (following the example of noweb) to avoid triggering an unnecessary make, but you should turn off the commenting options because the '#line nnn "foo.web"' insertions are likely to change even if you modify just the documentation part. -- Gregory W. Tucker-Kellogg Department of Biological Chemistry and Molecular Pharmacology Harvard Medical School, Boston MA 02115 (617) 432-0930 or (617) 432-3212 ================================================================================ Archive-Date: Mon, 20 Jun 1994 12:19:49 CDT Sender: owner-litprog@SHSU.edu Date: Mon, 20 Jun 94 11:46:36 EDT From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, porttiki@cc.helsinki.fi Subject: Re: CWEB formats C++ badly Message-ID: t. Anssi.Porttikivi@Helsinki.Fi (http://www.helsinki.fi/~porttiki) asks: > Tell me, is CWEB 3.1 which we run here really supposed to parse non C but C++ > constructs properly? I have a project which is in two dozen .w files and > produces various .H and .C files. But e.g. class header files are never > formatted rigth, we will have to include A LOT of CWEB formating commands to > make line breaks sane. Indentations are impossible to fix properly. Templates > confuse CWEB badly. Sometimes CWEB produces faulty C++ code (Try a >, you > will have to write it a@= @>>). > I am so tired with it... C++ is an extremely difficult language to parse, and certain constructs need to be dealt with differently than in C. The CWEB parser tries to be as simple as possible, so it misses a lot of ``strange'' constructs. I suspect that you are not making good use of the @[ and @] formatting commands. These ``brackets'' turn whatever is inside them into an expression for the purposes of formatting. Almost every C++ formatting problem I've had in CWEB was solved with a simple application of @[ and @]. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Junk journalism is the evidence of a Computer Science Department | society that has got at least one thing Kean College of New Jersey | right, that there should be nobody with Union, NJ 07083 | the power to dictate where responsible USA | journalism begins. | leew@pilot.njin.net | -- Tom Stoppard | "Night and Day" (1979) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Mon, 20 Jun 1994 12:19:54 CDT Sender: owner-litprog@SHSU.edu Date: Mon, 20 Jun 94 11:41:08 EDT From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, ara@zurich.ai.mit.edu Subject: Re: can one have it all? Message-ID: Allan Adler writes: > I have been looking over the various web programs available. It seems to > me that there is no program that incorporates all of the best features > of the availble web programs. > > Correct me if I'm wrong, but this is how it looks to me: > > FWEB can handle several languages well but it is not convenient for the > user to add support for another language (although there is support > for using any language verbatim). Also, it can't write to multiple output > files. > > Spidery web can handle new languages but not multiple output files. Spidery WEB *can* handle multiple output files, just not multiple languages in a single web. > Noweb can handle multiple output files but not languages such as fortran > where the position of tokens on a line is important. While this is basically true, the output from notangle can be piped through a postprocessing filter that can deal with line positions (an extremely simple sed script can deal with Fortran; other less simple filters can deal with Cobol and even assembly language!). > I received a large fortran program that I would like to consider rewriting > with a suitable web. THe program is spread out over several dozen files. > It also involves some files written in C. What web does one use for > something like that? I realize one can make a web file for each fortran > file but then one loses information about the relation among the files. I'd recommend noweb, but any of the language-independents should do the job. Also, I'm a bit surprised to hear you say that FWEB can't support multiple output files; I was sure it could (but, then again, I don't use FWEB, and nonusers are always the last to know :-). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Junk journalism is the evidence of a Computer Science Department | society that has got at least one thing Kean College of New Jersey | right, that there should be nobody with Union, NJ 07083 | the power to dictate where responsible USA | journalism begins. | leew@pilot.njin.net | -- Tom Stoppard | "Night and Day" (1979) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Tue, 21 Jun 1994 07:33:01 CDT Sender: owner-litprog@SHSU.edu From: ohl@crunch.ikp.physik.th-darmstadt.de (Thorsten Ohl) Reply-To: LitProg@SHSU.edu, ohl@CRUNCH.IKP.PHYSIK.TH-DARMSTADT.DE Subject: Re: can one have it all? Date: 21 Jun 1994 12:28:02 GMT Message-ID: To: LitProg@SHSU.EDU >>>>> "Allan" == Allan Adler writes: Allan> Noweb can handle multiple output files but not Allan> languages such as fortran where the position of tokens on a Allan> line is important. That can be easily worked around. I just strip all leading whitespace from chunk references and use standard indentation in the chunk definition. Here's a snippet from one of my Makefiles: NOTANGLE = sed 's/^[ ]*< Reply-To: LitProg@SHSU.edu, naumann@phx.mcd.mot.com Date: Tue, 21 Jun 1994 15:33:38 GMT To: LitProg@SHSU.EDU >>>>> "aa" == Allan Adler writes: In article ara@zurich.ai.mit.edu (Allan Adler) writes: aa> Correct me if I'm wrong, but this is how it looks to me: aa> FWEB can handle several languages well but it is not convenient for the aa> user to add support for another language (although there is support aa> for using any language verbatim). Also, it can't write to multiple output aa> files. I believe that FWEB's @O changes the global default (output) filename and @o changes the (output) filename for the current section/module. I'm relying on this in my code, so that I can put definitions in my header (.h) and code in the .c file. -- Thanks, Mark [[[(602)](438)](3580)] naumann@phx.mcd.mot.com ---------------------------------------------------------- The speed of the leader determines the rate of the pack. ================================================================================ Archive-Date: Tue, 21 Jun 1994 12:37:17 CDT Sender: owner-litprog@SHSU.edu From: naumann@phx.mcd.mot.com (Mark W. Naumann) Subject: Re: CWEB formats C++ badly Message-ID: Reply-To: LitProg@SHSU.edu, naumann@phx.mcd.mot.com Date: Tue, 21 Jun 1994 15:46:58 GMT To: LitProg@SHSU.EDU >>>>> "dk" == David Kastrup writes: In article <2u3jea$cj1@urmel.informatik.rwth-aachen.de> dak@messua.informatik.rwth-aachen.de (David Kastrup) writes: dk> I recommend switching to a non-pretty-printing Web, such as dk> noweb or nuweb. In my opinion (I have used both cweb and noweb) dk> the only excuse for using prettyprinting web's is for dk> publication of a program (which has a very special focus on dk> appearance, like typesetting a typesetter source :) ), or for dk> fast typesetting of machine-generated code using WEB constructs dk> (if your generated code does not, you are better off with a dk> special purpose prettyprinter like indent), or for writing code dk> where the programmer has as bad a style as to be less readable dk> than machine-formatted code. For me, pretty-printing is not the reason for using CWEB or FWEB. These tools also automagically create an index showing where each token is used. And, they will insert __FILE__ and __LINE__ directives into the C output when tangling. The later is valuable when debugging. For instance, the CWEB tool will insert file, so that when you are debugging, it puts you into the correct line of your WEB source file. These values are missing from tools that do not know the source language. When using funnelweb, we get nice output... but don't immediately/ automagically know which WEB file the C line came from. (The project is large, so there are multiple WEB input files to the documentation.) Mark -- Thanks, Mark [[[(602)](438)](3580)] naumann@phx.mcd.mot.com ---------------------------------------------------------- The speed of the leader determines the rate of the pack. ================================================================================ Archive-Date: Tue, 21 Jun 1994 14:07:00 CDT Sender: owner-litprog@SHSU.edu From: TWEBER@urz-mail.urz.uni-heidelberg.de (thorsten weber) Reply-To: LitProg@SHSU.edu, TWEBER@URZ-MAIL.URZ.UNI-HEIDELBERG.DE Subject: ? Literate Programming for SmallTalk ? Date: 21 Jun 1994 14:01:34 -0500 Message-ID: <487B10113@urz-mail.urz.uni-heidelberg.de> To: LitProg@SHSU.EDU Hello, is there a literate-propramming tool for SmallTalk available ? Thanx for advice thorsten Thorsten P. Weber email: tweber@urz-mail.urz.uni-heidelberg.de ================================================================================ Archive-Date: Tue, 21 Jun 1994 14:39:48 CDT Sender: owner-litprog@SHSU.edu From: ara@zurich.ai.mit.edu (Allan Adler) Reply-To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU Subject: FWEB vs. statement numbers Date: 21 Jun 94 14:21:42 Message-ID: To: LitProg@SHSU.EDU I am making progress with FWEB (I'm trying the different webs one at a time). As I mentioned in antoher posting, I am practicing by taking a Fortran program I received and converting it to FWEB. At first, most of my effort was spent trying to get fweave to accept it and and f77 to produce a reasonable TeX file. As soon as I turned to getting ftangle to accept the web file, all hell broke loose. I managed to fix several mistakes and now it is a lot better. However, I am still having trouble with error messages about multiply defined line numbers. It's like this. One subroutine has something like (in english where possible) 13 print a prompt get user's input if user asks for help, give it and then go to 13 if user screws up, print .. and go to 97 If I set the above as the value of @ and if there is another subroutine that has a statement number 13 beginning another @<@>- module, then I get error messages from f77 about the line numbers being multiply defined (no complaints from ftangle). If you know how to deal with this, please let me know. Allan Adler ara@altdorf.ai.mit.edu ================================================================================ Archive-Date: Tue, 21 Jun 1994 15:51:05 CDT Sender: owner-litprog@SHSU.edu From: A7621GAC@AWIUNI11.EDVZ.UniVie.AC.AT Reply-To: LitProg@SHSU.edu, A7621GAC@AWIUNI11.EDVZ.UNIVIE.AC.AT Subject: Re: CWEB formats C++ badly Date: Tue, 21 Jun 94 22:33:11 MEZ Message-ID: <16FDC13D2D.A7621GAC@AWIUNI11.EDVZ.UniVie.AC.AT> To: LitProg@SHSU.EDU In article naumann@phx.mcd.mot.com (Mark W. Naumann) writes: >For me, pretty-printing is not the reason for using CWEB or FWEB. >These tools also automagically create an index showing where each >token is used. And, they will insert __FILE__ and __LINE__ directives >into the C output when tangling. The later is valuable when debugging. >For instance, the CWEB tool will insert file, so that when you are >debugging, it puts you into the correct line of your WEB source file. You can also try the c2cweb package. It contains a modified CWEAVE which will have a better C support; additionally there will be a distinction between functions and variables in the index (if you have different names). Werner ================================================================================ Archive-Date: Wed, 22 Jun 1994 03:23:16 CDT Sender: owner-litprog@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: CWEB formats C++ badly Message-ID: Date: Wed, 22 Jun 1994 04:38:13 GMT To: LitProg@SHSU.EDU In article , Mark W. Naumann wrote: >For me, pretty-printing is not the reason for using CWEB or FWEB. >These tools also automagically create an index showing where each >token is used. If you are willing to mark definitions, noweb and nuweb automatically identify uses and create an index. Noweb also creates a mini-index for each chunk, which many programmers have found useful. > And, they will insert __FILE__ and __LINE__ directives >into the C output when tangling. The later is valuable when debugging. This feature is more than valuable; it's indispensable. Noweb and nuweb support C's #line directive, which provides this feature. Noweb also supports the analogous feature for other languages, like Icon and Modula-3. I'm still waiting for a Standard ML compiler supporting this feature... ================================================================================ Archive-Date: Wed, 22 Jun 1994 10:12:14 CDT Sender: owner-litprog@SHSU.edu Date: Wed, 22 Jun 94 11:12:49 EDT From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, naumann@phx.mcd.mot.com Subject: Re: CWEB formats C++ badly Message-ID: Mark Naumann writes: > For me, pretty-printing is not the reason for using CWEB or FWEB. > These tools also automagically create an index showing where each > token is used. And, they will insert __FILE__ and __LINE__ directives > into the C output when tangling. The later is valuable when debugging. > For instance, the CWEB tool will insert file, so that when you are > debugging, it puts you into the correct line of your WEB source file. > > These values are missing from tools that do not know the source > language. This is not exactly true for noweb. It can (and does for C, Icon, and other languages that accept such things) insert #line-like directives (which include the __FILE__ and __LINE__ info). It also can create indices for both identifier and chunk names, the latter automatically, the former with a little help from the programmer (but there exist filters for several languages that let noweb automatically index identifiers, and it is possible to write such a filter for any language you wish). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Junk journalism is the evidence of a Computer Science Department | society that has got at least one thing Kean College of New Jersey | right, that there should be nobody with Union, NJ 07083 | the power to dictate where responsible USA | journalism begins. | leew@pilot.njin.net | -- Tom Stoppard | "Night and Day" (1979) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Wed, 22 Jun 1994 14:53:23 CDT Sender: owner-litprog@SHSU.edu From: ara@zurich.ai.mit.edu (Allan Adler) Reply-To: LitProg@SHSU.edu, ara@ZURICH.AI.MIT.EDU Subject: info-matrix (Was: can one have it all?) Date: 22 Jun 94 14:45:42 Message-ID: To: LitProg@SHSU.EDU Thanks to all who replied to my posting. After reading the replies, I started wanting more features (e.g. I am under the impression that there are problems with webbing ANSI C's function prototypes). Rather than nickel-and-dime everyone to death, here is a more comprehensive question: is there (perhaps in a FAQ sheet) a table (i.e. a matrix) showing the different webs on the one hand and the different properties a web might be expected to have and showing which ones have those properties. To greatly oversimplify: WEB CWEB FWEB noweb nuweb funnelweb spideryweb RWEB schemeweb ... mult. output files? C C++ Fortran Pascal Retar- getable? ANSI C? Multiple languages simul- taneously? etc. Is there such a beast? Allan Adler ara@altdorf.ai.mit.edu ================================================================================ Archive-Date: Thu, 23 Jun 1994 00:42:02 CDT Sender: owner-litprog@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Subject: Re: CWEB formats C++ badly Date: 23 Jun 94 15:37:28 Message-ID: Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au To: LitProg@SHSU.EDU In article naumann@phx.mcd.mot.com (Mark W. Naumann) writes: For me, pretty-printing is not the reason for using CWEB or FWEB. These tools also automagically create an index showing where each token is used. And, they will insert __FILE__ and __LINE__ directives into the C output when tangling. The later is valuable when debugging. For instance, the CWEB tool will insert file, so that when you are debugging, it puts you into the correct line of your WEB source file. These values are missing from tools that do not know the source language. When using funnelweb, we get nice output... but don't immediately/ automagically know which WEB file the C line came from. (The project is large, so there are multiple WEB input files to the documentation.) If you are interested, you can try my (experimental) version of FunnelWeb, which supports the (non-automatic) insertion of #line directives. I use it all the time myself, and it works perfectly well. However, as far as debugging is concerned, I have found that debuggers choke on #line directives unless the code is laid out sequentially in the original WEB source. For debugging, I replace my FunnelWeb @ macro with a dummy one and thus remove all the #line directives. Yes, I have to recompile, which is a pain, but if I don't the debuggers aren't sure where I am or what I'm doing. That is to say, don't expect debuggers to really support ANSI C. By the way, my version can create any type of line directive for any language, so long as all that is required is a format containing the line number and file name. So it isn't limited to C/C++. Indeed, I used to use it to imbed comments in Maple files that just made it easier for me to trace errors back to the original FunnelWeb sources. Cheers, Tony. P.S. Adding #line directives isn't the only way to do things. The version of FunnelWeb supplied with the Eli compiler generation system produces a `map' file which can be used to map compilation errors back to the original FunnelWeb sources. The advantage of *not* using #line directives is that there is nothing to confuse debuggers. I hope to merge the Eli version of FunnelWeb with my own in the near future, with the intention of having it as part of the next official FunnelWeb release. -- _____________________________________________________________________________ A.B.Coates, Dept. of Physics, The University of Queensland QLD 4072 Australia. Email: coates@physics.uq.oz.au Phone: (07/+617) 365-3424 Fax: (07/+617) 365-1242 Disclaimer: The University is ignorant of my opinions, let alone guilty ... _____________________________________________________________________________ ================================================================================ Archive-Date: Thu, 23 Jun 1994 06:12:14 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 23 Jun 94 12:47:20 +0200 From: sigula@EB.se (Ulf Lagerqvist) Reply-To: LitProg@SHSU.edu, sigula@EB.SE Message-ID: <9406231047.AA03566@EB.se> To: litprog@shsu.edu query litprog ================================================================================ Archive-Date: Thu, 23 Jun 1994 06:12:18 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 23 Jun 94 12:46:52 +0200 From: sigula@EB.se (Ulf Lagerqvist) Reply-To: LitProg@SHSU.edu, sigula@EB.SE Message-ID: <9406231046.AA03561@EB.se> To: litprog@shsu.edu review litprog ================================================================================ Archive-Date: Thu, 23 Jun 1994 06:12:31 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 23 Jun 94 12:47:38 +0200 From: sigula@EB.se (Ulf Lagerqvist) Reply-To: LitProg@SHSU.edu, sigula@EB.SE Message-ID: <9406231047.AA03576@EB.se> To: litprog@shsu.edu help ================================================================================ Archive-Date: Thu, 23 Jun 1994 06:12:35 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 23 Jun 94 12:47:30 +0200 From: sigula@EB.se (Ulf Lagerqvist) Reply-To: LitProg@SHSU.edu, sigula@EB.SE Message-ID: <9406231047.AA03571@EB.se> To: litprog@shsu.edu list ================================================================================ Archive-Date: Tue, 28 Jun 1994 09:42:41 CDT Sender: owner-litprog@SHSU.edu From: utcke@worf.ti1.tu-harburg.de () Reply-To: LitProg@SHSU.edu, utcke@WORF.TI1.TU-HARBURG.DE Subject: Re: can one have it all? Date: 21 Jun 1994 10:19:04 GMT Message-ID: <2u6eqo$pu1@rztsun.tu-harburg.de> To: LitProg@SHSU.EDU In article , ara@zurich.ai.mit.edu (Allan Adler) writes: |> |> Correct me if I'm wrong, but this is how it looks to me: |> |> FWEB can handle several languages well but it is not convenient for the |> user to add support for another language (although there is support |> for using any language verbatim). Also, it can't write to multiple output |> files. Well, it used to be able to in version 1.30a (which I'm using). You can even have several different languages (e.g. c and a makefile) in one .web-file and have them write to several different files like .c, .h and the makefile (I do it all the time). Sven -- utcke@tu-harburg.d400.de ================================================================================ Archive-Date: Tue, 28 Jun 1994 16:42:31 CDT Sender: owner-litprog@SHSU.edu From: DCHIRIAC@ELECTRICAL.watstar.uwaterloo.ca (Dan Chiriac) Reply-To: LitProg@SHSU.edu, DCHIRIAC@ELECTRICAL.WATSTAR.UWATERLOO.CA Subject: EXTENDED MEMORY ACCESS' Message-ID: Date: Tue, 28 Jun 1994 21:39:39 GMT To: LitProg@SHSU.EDU i'M TRYING TO WRITE TO MY EXTENDED MEMORY... AND i CAN'T ! I tryed to configure my extended memory using HIMEM.SYS but I did not succeed! All I'm trying to do is copy a buffer to ateh extended memory... but I'm missinf a driver, or something.... because it hangs... Dis anyone manage to do anything like this before ? Please... reply by mail... Liviu ... thanks in advance !! :) ================================================================================ Archive-Date: Tue, 28 Jun 1994 23:22:14 CDT Sender: owner-litprog@SHSU.edu From: dak@rama.informatik.rwth-aachen.de (David Kastrup) Reply-To: LitProg@SHSU.edu, dak@RAMA.INFORMATIK.RWTH-AACHEN.DE Subject: Re: CWEB formats C++ badly Date: 25 Jun 1994 07:52:27 GMT Message-ID: <2ugnnr$sd7@urmel.informatik.rwth-aachen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: LitProg@SHSU.EDU coates@kelvin.physics.uq.oz.au (Tony Coates) writes: >In article naumann@phx.mcd.mot.com >(Mark W. Naumann) writes: > For me, pretty-printing is not the reason for using CWEB or FWEB. > These tools also automagically create an index showing where each > token is used. And, they will insert __FILE__ and __LINE__ directives > into the C output when tangling. The later is valuable when debugging. > For instance, the CWEB tool will insert file, so that when you are > debugging, it puts you into the correct line of your WEB source file. > These values are missing from tools that do not know the source > language. You are overgeneralizing. There is no particular reason why a source language independent Web should not make #line directives. Strictly speaking, of course, the form of them does depend on the language in question. But with appropriate options this can be dealt with. Noweb does this. And for debugging purposes, if your compiler/debugger version really chokes up on #line, you can still use the nountangle program, which hides all commentary sections in comments, so you can still see most of what is happening when debugging. Of course, when correcting mistakes, you have to search for the original lines. > When using funnelweb, we get nice output... but don't immediately/ > automagically know which WEB file the C line came from. (The project > is large, so there are multiple WEB input files to the documentation.) So that is one thing in funnelweb that might need amendment. >If you are interested, you can try my (experimental) version of >FunnelWeb, which supports the (non-automatic) insertion of #line >directives. You seem to be of the same opinion. > I use it all the time myself, and it works perfectly >well. However, as far as debugging is concerned, I have found that >debuggers choke on #line directives unless the code is laid out >sequentially in the original WEB source. For debugging, I replace my >FunnelWeb @ macro with a dummy one and thus remove all the >#line directives. Yes, I have to recompile, which is a pain, but if I >don't the debuggers aren't sure where I am or what I'm doing. That is >to say, don't expect debuggers to really support ANSI C. Just for interest's sake: What compiler/debugger are you using? Or what combinations have you had these experiences with? > By the way, my version can create any type of line directive >for any language, so long as all that is required is a format >containing the line number and file name. So it isn't limited to >C/C++. Indeed, I used to use it to imbed comments in Maple files that >just made it easier for me to trace errors back to the original >FunnelWeb sources. An obvious idea, which noweb supports as well. -- David Kastrup dak@pool.informatik.rwth-aachen.de Tel: +49-241-72419 Fax: +49-241-79502 Goethestr. 20, D-52064 Aachen ================================================================================ Archive-Date: Wed, 29 Jun 1994 19:52:10 CDT Sender: owner-litprog@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Subject: Re: CWEB formats C++ badly Date: 30 Jun 94 10:39:36 Message-ID: Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au To: LitProg@SHSU.EDU In article <2ugnnr$sd7@urmel.informatik.rwth-aachen.de> dak@rama.informatik.rwth-aachen.de (David Kastrup) writes: coates@kelvin.physics.uq.oz.au (me) writes: >In article naumann@phx.mcd.mot.com >(Mark W. Naumann) writes: > For me, pretty-printing is not the reason for using CWEB or FWEB. > These tools also automagically create an index showing where each > token is used. And, they will insert __FILE__ and __LINE__ directives > into the C output when tangling. The later is valuable when debugging. > For instance, the CWEB tool will insert file, so that when you are > debugging, it puts you into the correct line of your WEB source file. > These values are missing from tools that do not know the source > language. You are overgeneralizing. There is no particular reason why a source language independent Web should not make #line directives. Strictly speaking, of course, the form of them does depend on the language in question. But with appropriate options this can be dealt with. Noweb does this. And for debugging purposes, if your compiler/debugger version really chokes up on #line, you can still use the nountangle program, which hides all commentary sections in comments, so you can still see most of what is happening when debugging. Of course, when correcting mistakes, you have to search for the original lines. I have never used noweb. How does it decide where to insert #line directives? With FunnelWeb, all code sections are macros, and all macros contain code. As such, multiple macros can appear on the one line, and this possibility is what stops me from adding automatic insertion of #line directives with FunnelWeb. I cannot think of an automatic way of knowing which macros will be invoked at the beginning of a line, and not in the middle. Does this differ from the way noweb works? I would be interested to know. >well. However, as far as debugging is concerned, I have found that >debuggers choke on #line directives unless the code is laid out >sequentially in the original WEB source. For debugging, I replace my >FunnelWeb @ macro with a dummy one and thus remove all the >#line directives. Yes, I have to recompile, which is a pain, but if I >don't the debuggers aren't sure where I am or what I'm doing. That is >to say, don't expect debuggers to really support ANSI C. Just for interest's sake: What compiler/debugger are you using? Or what combinations have you had these experiences with? I have used gdb and DEC's decladebug(ladbx). I tried dbx too. All have failed when the code did not appear sequentially in the FunnelWeb sources. By failed, I mean that they did not report the correct source line. By the way, I was not wishing to suggest that FunnelWeb did anything that some others literate programming tools cannot. The original post mentioned FunnelWeb, and so I answered in that context. Cheers, Tony. -- _____________________________________________________________________________ A.B.Coates, Dept. of Physics, The University of Queensland QLD 4072 Australia. Email: coates@physics.uq.oz.au Phone: (07/+617) 365-3424 Fax: (07/+617) 365-1242 Disclaimer: The University is ignorant of my opinions, let alone guilty ... _____________________________________________________________________________ ================================================================================ Archive-Date: Wed, 29 Jun 1994 20:11:35 CDT Sender: owner-litprog@SHSU.edu Date: Wed, 29 Jun 94 21:12:12 EDT From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, coates@physics.uq.oz.au Subject: Re: CWEB formats C++ badly Message-ID: Tony Coates asks: > I have never used noweb. How does it decide where to insert #line > directives? Pretty much the same way that CWEB (and the others, I suppose). It simply inserts a #line directive at the beginning of each chunk, and after each expanded chunk. For example, if the following chunk appeared at line 50 of the file xxx.nw: <<*>>= n++; <> n *= 4; and this chunk appeared at line 273: <>= printf("Hello world\n"); then the tangled code would look like: #line 50 "xxx.nw" n++; #line 273 "xxx.nw" printf("Hello world\n"); #line 52 "xxx.nw" n *= 4; Simple, no? -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Junk journalism is the evidence of a Computer Science Department | society that has got at least one thing Kean College of New Jersey | right, that there should be nobody with Union, NJ 07083 | the power to dictate where responsible USA | journalism begins. | leew@pilot.njin.net | -- Tom Stoppard | "Night and Day" (1979) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 30 Jun 1994 04:48:24 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 30 Jun 1994 11:47:38 +0200 From: "Jean-Paul.ROY" Reply-To: LitProg@SHSU.edu, roy@AURORA.UNICE.FR Message-ID: <199406300947.AA03991@aurora.unice.fr> To: litprog@shsu.edu Subject: unsubscribe unsubscribe LitProg ================================================================================ Archive-Date: Thu, 30 Jun 1994 07:26:05 CDT Sender: owner-litprog@SHSU.edu Date: Thu, 30 Jun 94 08:26:42 EDT From: dalton@lds.loral.com ([u]Joe Dalton) Reply-To: LitProg@SHSU.edu, dalton@LDS.LORAL.COM Message-ID: <9406301226.AA04416@eda070.lds.loral.com> To: LitProg@shsu.edu Subject: unsubscribe unsubscribe LitProg ================================================================================ Archive-Date: Thu, 30 Jun 1994 10:08:45 CDT Sender: owner-litprog@SHSU.edu From: preston@noel.cs.rice.edu (Preston Briggs) Reply-To: LitProg@SHSU.edu, preston@NOEL.CS.RICE.EDU Subject: Re: CWEB formats C++ badly Date: 30 Jun 1994 14:06:23 GMT Message-ID: <2uujgv$d3a@larry.rice.edu> To: LitProg@SHSU.EDU coates@physics.uq.oz.au writes: >I have never used noweb. How does it decide where to insert #line >directives? With FunnelWeb, all code sections are macros, and all >macros contain code. As such, multiple macros can appear on the one >line, and this possibility is what stops me from adding automatic >insertion of #line directives with FunnelWeb. In the case of nuweb, the insertion of #line directives causes forces a newline for every macro. Looks ugly, but your code _is_ going to look ugly with all those directives. And it works just fine in dbx, where you'll see only the web source. For example, some expression containing a macro invocation foo + bar + @ + ... might normally expand into foo + bar + quux With #line directives, we'd see foo + bar + #line 123 "example.w" quux #line 1 "example.w" + ... ================================================================================ Archive-Date: Thu, 30 Jun 1994 17:29:23 CDT Sender: owner-litprog@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Contents of the LitProg Archive (monthly posting) Date: 1 Jul 1994 00:20:05 +0200 Message-ID: <2uvgelINNicl@spice.iti.informatik.th-darmstadt.de> To: LitProg@SHSU.EDU # literate-programming/Contents 04 May 94 -*- Indented-Text -*- #------------------------------------------------------------ The material available from the Literate Programming Archive is categorized, each category is put in a directory tree. While this structure (which is described in the README files) supports browsing, the need for quick access to a specific Literate Programming tool remains. This file shall assist you in this need. It presents the *WEB systems and tools available, in an alphabetic order, and names the directory where you can find it. In addition to the systems mentioned below, the LitProg Archive features texts in the directory Documentation: FAQs, papers, and an extensive bibliography in BibTeX format. Since this file is updated manually, I cannot guarantee that it's up to date. Send reports about inconsistencies of description and reality to Joachim Schrod . SYSTEM DIRECTORY REMARK ------ --------- ------ APLWEB apl w/o source, but under the GPL! [this was an error by the author] AWEB ada/aweb not supported any more cfa Tools Change File Analyzer CLiP any language, any formatter, any -- source independent wordprocessor. Hypertext -- for DOS machines/ms-dos integration possible -- for VMS machines/vms CWEB (Levy/Knuth) C++, ANSI C, K&R C -- source c.c++ -- Amiga port machines/amiga -- Atari TOS port machines/atari-tos an old version [2.4 p5b] -- DOS port machines/ms-dos -- Mac port machines/mac -- Mac CTANGLE machines/mac Impact: CTANGLE & Apple-Events cweb style c.c++ CWEB programs as LaTeX documents CWEB (van Leeuwen) c.c++ CWEB for ANSI C, in ANSI C CWEB (Schrod) not supported any more send me mail if you have historic interests :-) Funnelweb independent FWEB multi-lingual WEB -- source fweb -- DOS port machines/ms-dos -- MS-Windows port machines/ms-windows Impact machines/mac CTANGLE & Apple-Events Knit pascal not supported any more lit2x independent [????] from Glasgow LPW machines/mac Literate Programming Workshop CAVEAT: Shareware! MapleWEB spiderweb MWEB (Schrod/Detig) modula-2 not supported any more MWEB (Sewell) modula-2 not supported any more noweb uses the UNIX toolbox paradigm -- source independent -- DOS port machines/ms-dos nuweb lean system, written in C -- source independent -- Amiga port machines/amiga -- DOS port machines/ms-dos ProTex independent WEB system based on TeX RWEB spiderweb for Reduce smlweb spiderweb for Standard ML SpiderWEB WEB generator, in awk -- source spiderweb -- DOS port machines/ms-dos -- OS/2 port machines/os2 -- Mac port machines/mac TIE Tools Change File Merger WEB The basis, it started with it... -- source pascal -- DOS port machines/ms-dos WEB mode Tools for GNU Emacs WinWordWEB machines/ms-dos WEB with Word for Windows Literate Documentation Systems ------------------------------ (or LitDoc systems for short): Tools that do not support refinements but enable the use of usual document preparation systems (e.g., LaTeX) in program comments. cnoweb c.c++ doc package /pub/tex/latex CAVEAT: No LitProg A directory! oriented towards TeX code; part of the LaTeX2e distrib. MAKEPROG independent is here for my own convenience :-) SchemeWEB lisp wbuild /pub/X11/other/fwf CAVEAT: No LitProg A directory! creating new X widget classes -- The Literate Programming Archive, or LitProg Archive for short, resides at ftp.th-darmstadt.de [130.83.55.75], directory pub/programming/literate-programming/. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Literate Programming Archive, maintainer Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Thu, 30 Jun 1994 17:29:28 CDT Sender: owner-litprog@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Diff to Contents of the LitProg Archive (monthly posting) Date: 1 Jul 1994 00:20:07 +0200 Message-ID: <2uvgenINNicn@spice.iti.informatik.th-darmstadt.de> To: LitProg@SHSU.EDU *** Contents Sun May 1 00:20:08 1994 --- /common/ftp/pub/programming/literate-programming/Contents Wed May 4 13:39:21 1994 *************** *** 1,3 **** ! # literate-programming/Contents 21 Apr 94 -*- Indented-Text -*- #------------------------------------------------------------ --- 1,3 ---- ! # literate-programming/Contents 04 May 94 -*- Indented-Text -*- #------------------------------------------------------------ *************** *** 33,36 **** --- 33,37 ---- -- source c.c++ -- Amiga port machines/amiga + -- Atari TOS port machines/atari-tos an old version [2.4 p5b] -- DOS port machines/ms-dos -- Mac port machines/mac -- The Literate Programming Archive, or LitProg Archive for short, resides at ftp.th-darmstadt.de [130.83.55.75], directory pub/programming/literate-programming/. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Literate Programming Archive, maintainer Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Thu, 30 Jun 1994 18:32:09 CDT Sender: owner-litprog@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Subject: Inserting #line directives (Was: CWEB formats C++ badly) Date: 1 Jul 94 09:18:40 Message-ID: Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au To: LitProg@SHSU.EDU In article <2uujgv$d3a@larry.rice.edu> preston@noel.cs.rice.edu (Preston Briggs) writes: coates@physics.uq.oz.au writes: >I have never used noweb. How does it decide where to insert #line >directives? With FunnelWeb, all code sections are macros, and all >macros contain code. As such, multiple macros can appear on the one >line, and this possibility is what stops me from adding automatic >insertion of #line directives with FunnelWeb. In the case of nuweb, the insertion of #line directives causes forces a newline for every macro. Looks ugly, but your code _is_ going to look ugly with all those directives. And it works just fine in dbx, where you'll see only the web source. For example, some expression containing a macro invocation foo + bar + @ + ... might normally expand into foo + bar + quux With #line directives, we'd see foo + bar + #line 123 "example.w" quux #line 1 "example.w" + ... OK, I can see that this would be reasonable in most circumstances, though I wouldn't make FunnelWeb work this way myself. Why? Because in FunnelWeb, I can do things like @$@==@{The rain in Spain@} @$@==@{falls mainly in the plain.@} and then stick these definitions in the one string as @$@==@{"@ @@"} The compiler would probably choke on a line directive in a string. Not that I expect this to happen often, but equally there's no reason why someone shouldn't do it (I know that in ANSI C I might be able to get around it by splitting the string over two lines, but I don't know what the behaviour is if the two strings are separated by a #line directive. It should *probably* work, but I wouldn't trust all compilers to agree on that). By the way, I certainly have had problems debugging with dbx (on a DEC Alpha). I'm not sure whether the problem was caused primarily by the code being out of order in the FunnelWeb source files, or by some routines having components from different files, or by the fact that some macros are used multiple times. So if anyone *hasn't* had problems, I wonder if that isn't more through good luck than through having a debugger that genuinely can handle arbitrary #line directives in the original sources. My personal feelings is that a separate map file is the most flexible alternative, though it does complicate the issue by requiring translators for the compiler error reports and for the debugger source line/file position indication. I'm not yet convinced that the #line directive way of doing things is yet flexible enough, much as it works well in a very great number of cases. Cheers, Tony. -- _____________________________________________________________________________ A.B.Coates, Dept. of Physics, The University of Queensland QLD 4072 Australia. Email: coates@physics.uq.oz.au Phone: (07/+617) 365-3424 Fax: (07/+617) 365-1242 Disclaimer: The University is ignorant of my opinions, let alone guilty ... _____________________________________________________________________________