Archive-Date: Tue, 01 Feb 1994 07:27:56 CST Sender: LP-Mgr@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Re: what's `monolithic' mean, and why is it interesting? Date: 1 Feb 1994 12:25:33 GMT Message-ID: <2ilhnt$i6f@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article , norman@flaubert.bellcore.com (Norman Ramsey) writes: > > Decomposable tools are more flexible and extensible; for example, it > is easy to convert source from noweb -> CWEB because the noweb parser > is separable. A nuweb -> CWEB converter would be harder (although the > nuweb syntax is carefully designed, so nuweb is a lot easier to > convert than other tools). An interesting litmus test for > decomposability is whether the tool can be extended without > recompiling. I agree with you, but one question remains: Do you think that the need to relink (in contrast to recompile) things is also a sign of non-decomposability? Just for the record: IMO not. I still think an OOP model where one uses abstract base classes to define services and can plug in different derived classes depending on the service one needs in this project is a worthwile path to explore. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Tue, 01 Feb 1994 13:40:41 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: LitProg on the World-Wide Web [monthly posting] Message-ID: Date: Tue, 1 Feb 1994 17:44:31 GMT To: LitProg@SHSU.EDU [[This is a regular posting to comp.programming.literate]] New items since last posting [January '94] ordered by time of update: .................................................................... * List of new books by D.E. Knuth [Getting Start(l)ed Page] ----------------------------------------------------------------------------- * 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 much 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 introductory Internet course on Literate Programming. Editing[4] GNU Emacs mode for WEB programming Tools[5] Common, freely available Literate Programming environments Examples[6] Literate Programming archives and selected examples Discussion[7] Discussion on LitProg on a mailing list and a newsgroup LitProg Library[8] George D. Greenwade's Literate Programming Library at Niord.shsu.edu. Experimental service: Archive Search[9] FAQs[10] 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[11] (files litprog.*) HyperLitProg[12] Literate Programming using HyperText[13] Techniques OO-LitProg[14] Thoughts on Object-Oriented[15] Literate Programming [[Now you can continue climbing down the documentation tree by entering numbers 1-15 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. The general FTP repository for browser software is info.cern.ch (including a hypertext browser/editor for NeXTStep 3.0) If you cannot go through TELNET, you can still retrieve WWW documents by e-mail: send a mail to listserv@info.cern.ch with a line in it saying just HELP to get back detailed instructions. Your mail system must have a mail gateway to the 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. January, 1994 ***************************************************************************** Copyright 1993 Globewide Network Academy, Inc. All rights reserved world-wide. Permission is granted to copy this document for free distribution so long as it remains intact and unmodified. Seek more information on WWW at http://uu-gna.mit.edu:8001/uu-gna/index.html ------------------------------------------------------------------------- END -- ----------------------------------------------------------------------------- Marcus Speh, II.Inst.Theor.Physik,Luruper Chaussee 149, 22761 Hamburg,Germany Phone: +49-40 8998 2178, Fax: +49-40 8998 2267, Private: +49-40 801392 Email / DECnet: 13313::SPEH ================================================================================ Archive-Date: Tue, 01 Feb 1994 13:54:44 CST Sender: LP-Mgr@SHSU.edu From: cjmb@signal.dra.hmg.gb (Christopher Booth) Subject: How do I use noweb effectively for C++? Date: 1 Feb 1994 17:32:01 GMT Message-ID: <2im3mh$4pm@signal.dra.hmg.gb> Reply-To: LitProg@SHSU.edu, cjmb@signal.dra.hmg.gb To: LitProg@SHSU.EDU Dear noweb-users, I have now given up using noweb, because I couldn't persuade my colleagues to join me. Part of the reason for that was that it is relatively difficult to see what is in each chunk unless you have good separation of chunks. I would have loved to use a folding editor; it might have increased my chances of persuading the group. (I *have* got Jamie Lokier's folding-mode for emacs :-) The other reason that I found noweb difficult was because I am writing C++, generating lots of classes for one program. It is normal practice to put each class into two (or perhaps three) files, one header file, one implementation file (and one file of inline functions). With any reasonably sized project the number of files very soon mounts up, but there is no easy way to split up the noweb files; after all, the classes are all meant to work together, they are all inter-related, so I really want to keep them close together. The problem comes when using make. Each header file gets [no]tangled many times, but is never changed because I use cpif, but make seems to get confused and attempts to remake the same header file multiple times. This wouldn't be too bad if the noweb files weren't too long, but they *are*. Does anyone have any suggestions? I will summarize if I get lots of replies, so please email me. Thanks in advance, Chris. -- ----------------------------------------------------------- Parallel Processing Section | Christopher Booth email: cjmb@signal.dra.hmg.gb | DRA Malvern Fax: +44 (684) 894389 | St Andrews Road Tel: +44 (684) 896400 | Malvern. WR14 3PS UK ----------------------------------------------------------- ================================================================================ Archive-Date: Tue, 01 Feb 1994 14:29:33 CST Sender: LP-Mgr@SHSU.edu Date: Tue, 1 Feb 94 15:23:09 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, cjmb@signal.dra.hmg.gb Subject: Re: How do I use noweb effectively for C++? Message-ID: Christopher Booth writes: > I have now given up using noweb, because I couldn't > persuade my colleagues to join me. Part of the reason for that > was that it is relatively difficult to see what is in each chunk > unless you have good separation of chunks. I would have loved to > use a folding editor; it might have increased my chances of > persuading the group. (I *have* got Jamie Lokier's folding-mode > for emacs :-) I'm sorry to hear that. I had a similar problem at Tipton Cole+Co. last year, but now they are happily LP-ing (with noweb). All it takes is getting one other person to start using literate programming. No one believes the original pioneer, but when a second person starts gushing about the same stuff you've been saying, people start to take notice. Is there someone you can ``lean on'' to start literate programming, as well? > The other reason that I found noweb difficult was because > I am writing C++, generating lots of classes for one program. It > is normal practice to put each class into two (or perhaps three) > files, one header file, one implementation file (and one file of > inline functions). With any reasonably sized project the number > of files very soon mounts up, but there is no easy way to split > up the noweb files; after all, the classes are all meant to work > together, they are all inter-related, so I really want to keep > them close together. The problem comes when using make. Each > header file gets [no]tangled many times, but is never changed > because I use cpif, but make seems to get confused and attempts > to remake the same header file multiple times. This wouldn't be > too bad if the noweb files weren't too long, but they *are*. > Does anyone have any suggestions? I will summarize if I get lots > of replies, so please email me. This is not really a problem at all. I speak from experience here, since the new DOS port of noweb (soon to be officially released) is written in C++ (for a variety of reasons, none relevant to this discussion). I put each class into a separate .nw file that generates both the .h and .cpp files. They are tangled separately, but designed to be woven together (I weave with the -n option, and use a separate doc.tex ``driver,'' but you can just put them all together on the noweave command line). Make doesn't get confused -- the rules .nw.h: notangle -R$*.h $*.nw > $*.h .nw.cpp: notangle -R$*.cpp $*.nw > $*.cpp do the job quite nicely (I use filenames for my root chunks in C++ classes, and \let\nwnotused=\nwoutput. Sneaky, no?). Hope this helps somewhat. -- Lee leew@pilot.njin.net ================================================================================ Archive-Date: Tue, 01 Feb 1994 15:26:39 CST Sender: LP-Mgr@SHSU.edu Message-ID: <9402012118.AA13495@crdems.ge.com> Date: Tue, 1 Feb 94 16:22:38 -0500 From: U-E59264-Osman Buyukisik Reply-To: LitProg@SHSU.edu, buyukisik_osman@AE.GE.COM To: LitProg@SHSU.edu, cjmb@signal.dra.hmg.gb CC: LitProg@SHSU.EDU Subject: Re: How do I use noweb effectively for C++? >>>>> "Christopher" == Christopher Booth writes: Christopher> I have now given up using noweb, because I Christopher> couldn't persuade my colleagues to join me. Part of Christopher> the reason for that was that it is relatively Christopher> difficult to see what is in each chunk unless you Christopher> have good separation of chunks. I would have loved Don't give up on litprog, try nuweb with auctex. Christopher> The other reason that I found noweb difficult ..... Christopher> close together. The problem comes when using make. Christopher> Each header file gets [no]tangled many times, but is Christopher> never changed because I use cpif, but make seems to Christopher> get confused and attempts to remake the same header Christopher> file multiple times. This wouldn't be too bad if the nuweb takes care of this, files are not updated (touched) unless they are changed. Osman ================================================================================ Archive-Date: Tue, 01 Feb 1994 21:32:31 CST Sender: LP-Mgr@SHSU.edu From: coates@dingo.cc.uq.oz.au (Tony Coates) Subject: Re: How do I use noweb effectively for C++? Date: 2 Feb 1994 01:56:12 GMT Message-ID: <2in17s$624@dingo.cc.uq.oz.au> Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au To: LitProg@SHSU.EDU On Tue, 1 Feb 94 16:22:38 -0500 in comp.programming.literate, U-E59264-Osman Buyukisik (buyukisik_osman@ae.ge.com) wrote: : >>>>> "Christopher" == Christopher Booth writes: : Christopher> The other reason that I found noweb difficult : ..... : Christopher> close together. The problem comes when using make. : Christopher> Each header file gets [no]tangled many times, but is : Christopher> never changed because I use cpif, but make seems to : Christopher> get confused and attempts to remake the same header : Christopher> file multiple times. This wouldn't be too bad if the : nuweb takes care of this, files are not updated (touched) unless they : are changed. As with FunnelWeb too, however I don't think that his files were being updated each time, since he was using `cpif'. 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, 02 Feb 1994 02:34:03 CST Sender: LP-Mgr@SHSU.edu From: lynbech@daimi.aau.dk (Christian Lynbech) Reply-To: LitProg@SHSU.edu, lynbech@DAIMI.AAU.DK Subject: Program formatting (was Re: Seeking K&R-style formatting for C) Date: 1 Feb 1994 10:33:48 GMT Message-ID: <2ilb6c$d8s@belfort.daimi.aau.dk> To: LitProg@SHSU.EDU For something in between true prettyprinting ala SpiderWeb and tt-only, one could consider the lgrind package. I do not remember exactly where I found it, but I can dig that up if anybody is interested. The idea is to write a short termcap like definition file that defines things like what is keywords and what delimits comments. The you can generate latex and tex versions of your programs. As indicated, the program is rather limited in the control it offers, but you do get some basic formatting (strings, keywords, comments, identifiers) with a very little effort, and the result respects indentation and such, without resorting to an all-is-in-tt-font scheme. ------------------------------------------------------------------------------ Christian Lynbech | Hit the philistines three times over the office: R0.33 (phone: 3217) | head with the Elisp reference manual. email: lynbech@daimi.aau.dk | - petonic@hal.com (Michael A. Petonic) ------------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 03 Feb 1994 10:28:53 CST Sender: LP-Mgr@SHSU.edu From: domi@grenoble.hp.com (Dominique Dumont) Reply-To: LitProg@SHSU.edu, domi@GRENOBLE.HP.COM Subject: did you try literate prg with engineering tools ? Date: 3 Feb 1994 14:30:35 GMT Message-ID: <2ir1qb$7c5@hpscit.sc.hp.com> To: LitProg@SHSU.EDU Hello Dear literate programmers. Has anyone of you ever tried to program in a literate way while using software engineering tools such as Softbench (or workbench) ? Did you manage to make them work together ? ----------------------------------------------------------------------------- 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: Thu, 03 Feb 1994 19:35:05 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: what's `monolithic' mean, and why is it interesting? Message-ID: CC: Joachim Schrod Date: Thu, 3 Feb 1994 22:07:23 GMT To: LitProg@SHSU.EDU >> An interesting litmus test for >> decomposability is whether the tool can be extended without recompiling. > >Do you think that the need to relink (in contrast to recompile) >things is also a sign of non-decomposability? No, but I don't think relinking is always a good strategy for writing decomposable, extensible tools. The problem is that the mechanisms and practices found in typical development environments don't support relinking well. For example, it is difficult if not impossible to link in an extension written in a language that differs from the original program. Now, if you have a good low-level API for extensions and you have good incremental or dynamic linking mechanisms, extension by relinking becomes more attractive. ================================================================================ Archive-Date: Thu, 03 Feb 1994 19:35:28 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: How do I use noweb effectively for C++? Message-ID: CC: Christopher Booth Date: Thu, 3 Feb 1994 21:58:00 GMT To: LitProg@SHSU.EDU In article <2im3mh$4pm@signal.dra.hmg.gb>, Christopher Booth wrote: >I have now given up using noweb... Part of the reason for that >was that it is relatively difficult to see what is in each chunk >unless you have good separation of chunks. I don't understand this remark. I suspect you are referring to some property of editing the source code. If you actually run noweave and print documents, I suspect you will find it much easier to see what is in each chunk. The ``source code is unreadable'' problem is well known; it plagues most literate-programming tools. I would be most interested to hear if you run across tools that do a better job in this respect. > The other reason that I found noweb difficult was because >I am writing C++, generating lots of classes for one program. It >is normal practice to put each class into two (or perhaps three) >files, one header file, one implementation file (and one file of >inline functions). With any reasonably sized project the number >of files very soon mounts up, but there is no easy way to split >up the noweb files; after all, the classes are all meant to work >together, they are all inter-related, so I really want to keep >them close together. The problem comes when using make. Each >header file gets [no]tangled many times, but is never changed >because I use cpif, but make seems to get confused and attempts >to remake the same header file multiple times. This wouldn't be >too bad if the noweb files weren't too long, but they *are*. If I understand correctly, you are pleased about the way you are structuring your code, but you are encountering performance problems with make. I've encountered this problem before when building large systems. To state it succinctly, you are caught on the horns of the following dilemna: 1) if you don't use cpif, files containing class declarations (i.e. header files) get updated even when their contents don't change, resulting in unnecessary recompilations. 2) if you do use cpif, files containing class declarations are almost always out of date (from checking timestamps), resulting in lots of attempts by make to bring them up to date. (These attempts do nothing but chew up time---they have no side effects---but they occur every time you run make.) You've chosen option (2). The only real way out of this box is to use a better build engine, like odin, but there is a hack that works well with option (2). Every so often, once you've built your target, run `make -t', which touches all the files in an appropriate order so that the time stamps show that become consistent. This is not an aesthetic solution, but it's viable because the unnecessary attempts only occur when you've touched a source file, so you can get away with running make -t only every so often, when things get ugly. Another poster claimed that nuweb solves this problem. It doesn't. nuweb implements exactly the same semantics as cpif. It does make the problem less annoying because nuweb makes the rebuild attempt more quickly then noweb since it doesn't use shell scripts. ================================================================================ Archive-Date: Fri, 04 Feb 1994 08:23:43 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: Re: How do I use noweb effectively for C++? Message-ID: Date: Fri, 4 Feb 1994 12:58:35 GMT To: LitProg@SHSU.EDU I was wondering whether other practitioners using litprog for the C++ language, are still making use of the "good style" like hiding class defs in *.hh, member defs in *.cc and inline members in *.icc files -- I have noticed that if I do not post-WEB code but write in NOWEB, say, from scratch, I do tend to inline *everything*. Whether or not the parts are split up later is a matter put in an "assembly" chunk which I am only interested in at the very end. Ok, if someone insists looking at the tangled code, he/she will find extremely long, ugly inlined functions - effectively it is left to the compiler to reject one or the other definition. Thus, one is deprived of the PRAGMA directive (but not every compiler has got one). What do others think/do? -- ----------------------------------------------------------------------------- Marcus Speh, II.Inst.Theor.Physik,Luruper Chaussee 149, 22761 Hamburg,Germany Phone: +49-40 8998 2178, Fax: +49-40 8998 2267, Private: +49-40 801392 Email / DECnet: 13313::SPEH ================================================================================ Archive-Date: Fri, 04 Feb 1994 09:17:42 CST Sender: LP-Mgr@SHSU.edu From: AStirnem@maths.exeter.ac.uk Reply-To: LitProg@SHSU.edu, AStirnem@MATHS.EXETER.AC.UK Date: Fri, 4 Feb 94 14:48:46 GMT Message-ID: <27487.9402041448@maths.exeter.ac.uk> To: LitProg@SHSU.edu Subject: fweb, C++ Hi, I have been trying to write literate C++ code for almost a year, using fweb. On the whole I am very pleased with the results. Being in the business of computer-aided mathematical proofs, I particularly like the possibility of adding mathematical formulae to the comments. An example for the sort of code I develop is availabe via anonymous ftp from euclid.ex.ac.uk. It is the file necklace.w (the name refers to the mathematical construction it is supposed to deal with), in the directory pub/andreas. (The program won't compile stand-alone; I did not want to include the library files it depends on.) Now, I'd like to raise two points. Firstly: I often write code of the following form: --------------------------- begin example ---------------------------------- @ Output function. @ = ostream& operator<<(ostream&, foo); @ @ = ostream& operator<<(ostream& ost, foo f) { /* ... */ } ---------------------------- end example ----------------------------------- What I find a bit cumbersome with this is that I am forced to introduce two numbered sections, although this code really deals with one single issue. Instead, I'd like to write: --------------------------- begin example ---------------------------------- @ Output function. @ = ostream& operator<<(ostream&, foo); @ = ostream& operator<<(ostream& ost, foo f) { /* ... */ } ---------------------------- end example ----------------------------------- fweb does not like this at all. (It reports something like ! (TANGLE): Nested named modules. Missing '@*' or '@'?.) This may seem to be a trivial problem in connection with the above example. Let me therefore give a somewhat more elaborate one, which is taken from one of the programs I am actually using: --------------------------- begin example ---------------------------------- @ @ = static function* pphi; @ @ = function* pair::pphi; @ @ = pphi = new function(); @ @ = function& phi = *pphi; @ @ = const function& phi = *pphi; @ @ = delete pphi; ---------------------------- end example ----------------------------------- It seems excessive to me to have to introduce six numbered sections in order to deal with one single object. I don't see any syntactical reason why it should not be possible to write instead: --------------------------- begin example ---------------------------------- @ @ = static function* pphi; @ = function* pair::pphi; @ = pphi = new function(); @ = function& phi = *pphi; @ = const function& phi = *pphi; @ = delete pphi; ---------------------------- end example ----------------------------------- I'd really like to be able to emit code into several slots out of one numbered section. Thus, the operations of creating slots and emitting code into slots would become dual. But maybe I am overlooking an issue here. Or maybe the above code is simply bad style. Here is my second point, which is really a question. I am using the following strategy to declare classes: --------------------------- begin example ---------------------------------- @ @a @o foo.h class foo { private: @@; public: @@; @@; }; ---------------------------- end example ----------------------------------- Given this code, tangle produces a reusable header file, which is fine. But suppose I'd like to have a woven version of the header file, exhibiting, for instance, all the public member function. Does anyone have a suggestion how to achieve this? Regards, Andreas Stirnemann. ================================================================================ Archive-Date: Fri, 04 Feb 1994 10:22:11 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 4 Feb 94 11:20:39 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, marcus@x4u2.desy.de Subject: Re: How do I use noweb effectively for C++? Message-ID: Marcus Speh writes: > I was wondering whether other practitioners using litprog for > the C++ language, are still making use of the "good style" like > hiding class defs in *.hh, member defs in *.cc and inline members > in *.icc files -- I have noticed that if I do not post-WEB code > but write in NOWEB, say, from scratch, I do tend to inline > *everything*. > Whether or not the parts are split up later is a matter > put in an "assembly" chunk which I am only interested in at the very > end. Ok, if someone insists looking at the tangled code, he/she will > find extremely long, ugly inlined functions - effectively it is left > to the compiler to reject one or the other definition. Thus, one is > deprived of the PRAGMA directive (but not every compiler has got one). > > What do others think/do? An interesting series of points. The idea of *.icc files for inline members is new to me, and I think I prefer keeping the entire interface in the *.h file (I use `.h' instead of `.hh' or `.hpp', but the idea is the same -- the C++ standard seems to be moving toward eliminating extensions altogether from header file names, by the way), and I consider inline functions to be part of the interface. I also put the member defs in *.cpp files (my compiler prefers this extension -- maybe the new standard will have something to say on this issue, as well). WRT making everything inline, I also find that I have the tendency to want to declare all member functions inline, but I try to fight it in the interests of ``cleaner design.'' I believe that the interface and implementation of a class should be kept conceptually, if not physically, separate (LP, of course, allows me to keep them physically together in the web, but apart in the tangled code). I prefer to save inline functions for members that are either trivial or are aliases for other functions. For example, in the NWstring class I implemented for the DOS version of noweb, I have the following chunk (extracted to nwstring.h) declaring the += operator: <>= NWstring& operator+=(const char *); NWstring& operator+=(const NWstring& s) { return *this += s.p->s; } (p->s is, of course, a char *). The const char * operator is defined in a chunk that is extracted to nwstring.cpp, as it is a ``real'' function rather than an alias. Well, that's one man's opinion. Anyone else? -- Lee leew@pilot.njin.net ================================================================================ Archive-Date: Fri, 04 Feb 1994 10:32:28 CST Sender: LP-Mgr@SHSU.edu From: 26@educ.queensu.ca (Allen Brown) Reply-To: LitProg@SHSU.edu, 26@EDUC.QUEENSU.CA Subject: Representation in Computer Systems Message-ID: <26.7.0@educ.queensu.ca> Keywords: representation, programming system, paradigm Date: Fri, 4 Feb 1994 16:15:15 GMT To: LitProg@SHSU.EDU I'm looking for pointers to recent review / survey / (anything!) articles or books that discuss the issues of representation of concepts / problems in computer systems. I am interested in how problems are recast into a "software space" form, and the effects of different paradigms (procedural, functional, declarative, and object-oriented) and data structures and procedures of the system. I am trying to think about this at a level that is above that of "language features"; something a little more fundamental - the expressability of a programming system. Many thanks, Allen Brown Queen's University, Kingston, CANADA brownan@educ.queensu.ca ================================================================================ Archive-Date: Fri, 04 Feb 1994 10:32:58 CST Sender: LP-Mgr@SHSU.edu From: karel@cv.ruu.nl (Karel Zuiderveld) Reply-To: LitProg@SHSU.edu, karel@CV.RUU.NL Subject: Re: How do I use noweb effectively for C++? Message-ID: Date: Fri, 4 Feb 1994 15:21:56 GMT To: LitProg@SHSU.EDU In marcus@x4u2.desy.de (Marcus Speh) writes: | "I was wondering whether other practitioners using litprog for | "the C++ language, are still making use of the "good style" like | "hiding class defs in *.hh, member defs in *.cc and inline members | "in *.icc files -- I have noticed that if I do not post-WEB code | "but write in NOWEB, say, from scratch, I do tend to inline | "*everything*. | " Whether or not the parts are split up later is a matter | "put in an "assembly" chunk which I am only interested in at the very | "end. Ok, if someone insists looking at the tangled code, he/she will | "find extremely long, ugly inlined functions - effectively it is left | "to the compiler to reject one or the other definition. Thus, one is | "deprived of the PRAGMA directive (but not every compiler has got one). | " | "What do others think/do? I am using a collection of perl scripts called perl4c++ which I wrote during the last two years. Before I started to use noweb, I used two files, namely a description file containing my class interface (but without the inline functions) and an implementation file that contains the actual C++ code. From these two files, usually with .des and .imp extensions, my perl4c++ scripts are generating all required files automagically: - a .h file - a .icc file with all inline functions - a .tcc file with all template functions - a .C file with the C++ code as well as - a .d file with all dependencies required for correct compilation of the .h file - a script that generates a man page from a description file. The basic advantage of using perl4c++ is that it is up to the Perl scripts to decide to put which information in which file, instead of deciding that while writing the code. This greatly increases code portability. I am considering writing a paper on my approach, since I feel that more people are running into the described problem while my approach seems to work for me and likely for others. drop me a line if you want to have more info. karel -- Karel Zuiderveld E-mail: karel@cv.ruu.nl 3D Computer Vision - Room E.02.222 Tel: (+31) 3403-75548/30-506682 Academisch Ziekenhuis Utrecht Fax: (+31) 30-513399 Heidelberglaan 100, 3584 CX Utrecht, The Netherlands ================================================================================ Archive-Date: Sat, 05 Feb 1994 07:15:46 CST Sender: LP-Mgr@SHSU.edu Date: Sat, 5 Feb 1994 06:45:45 -0500 From: ejb@world.std.com (ed j baker) Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Message-ID: <199402051145.AA01280@world.std.com> To: LitProg@SHSU.edu Subject: LaTeX I've recently downloaded FWEB1_30 for the IBM-PC. I also got the fweave and ftangle EXE files. I can't seem to get latex to work on any web files I create. plain TeX works just fine. My system is reading FWEBMAC.STY all right. I am using the -PL option in my FWEB.INI file IMHO, the `ifLaTeXisloaded' true/false test is not working properly. Does anybody have any suggestions? Thanks Ed Baker ejb@world.std.com ================================================================================ Archive-Date: Sat, 05 Feb 1994 12:35:52 CST Sender: LP-Mgr@SHSU.edu Date: Sat, 5 Feb 1994 13:35:30 -0500 From: ejb@world.std.com (ed j baker) Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Message-ID: <199402051835.AA17620@world.std.com> To: krommes@lyman.pppl.gov Subject: Bug Report CC: LitProg@SHSU.edu Hi LitProggers, I posted a message earlier about difficulty in getting LaTeX to work on my PC. I found the problem. The following segment was lifted from FWEBMAC.STY. The line numbers are for reference only. Line==============================================Begin Segment 128 %%EJB> evenit %% found uncommented lines that were screwing up LaTeX 129 %%EJB> dices %% because the appeared before \documentstyle ==================================================End Segment The two words "evenit" and "dices" were confusing LaTeX because they appeared before the \documentstyle or \begin{document} declarations. I suspect these errors were part of Charles Karney's effort to introduce NFSS. NOTE: In no way is this a criticism of Charles Karney. His contribution to FWEB is to be commended. New Question: What does it mean when a phrase like "see [M-19.22] for details" appears in an FAQ? That's all for now. Ed Baker ================================================================================ Archive-Date: Sat, 05 Feb 1994 13:58:50 CST Sender: LP-Mgr@SHSU.edu From: elliottm@csulb.edu (Mike Elliott) Reply-To: LitProg@SHSU.edu, elliottm@CSULB.EDU Subject: LP for Modula-3 / Ada 9X: Recommendations? Date: 5 Feb 1994 19:27:22 GMT Message-ID: To: LitProg@SHSU.EDU I am embarking upon a project implemented Modula-3 and Ada 9X, and I'd like to try Literate Programming on it as well. My TeX knowledge is strong, and I'm unconcerned with having to do a substantial amount of learning or initial configuration. Any recommendations would be welcome. ================================================================================ Archive-Date: Sat, 05 Feb 1994 17:40:18 CST Sender: LP-Mgr@SHSU.edu Date: Sat, 5 Feb 94 18:39:57 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, elliottm@csulb.edu Subject: Re: LP for Modula-3 / Ada 9X: Recommendations? Message-ID: Mike Elliott asks: > I am embarking upon a project implemented Modula-3 and Ada 9X, and I'd like > to try Literate Programming on it as well. My TeX knowledge is strong, and > I'm unconcerned with having to do a substantial amount of learning or > initial configuration. Any recommendations would be welcome. Any of the language-independent systems (noweb, Nuweb, FunnelWeb, CLiP, ProTeX, etc.) will do the trick. I'm a noweb user myself, but you may prefer one of the others (it's been known to happen :-). If you'd like pretty-printed output, you may want to consider creating Modula-3 and Ada 9X grammars for Spidery WEB. -- Lee leew@pilot.njin.net ================================================================================ Archive-Date: Mon, 07 Feb 1994 05:59:01 CST Sender: LP-Mgr@SHSU.edu From: preston@cs.rice.edu (Preston Briggs) Reply-To: LitProg@SHSU.edu, preston@CS.RICE.EDU Subject: Re: what's `monolithic' mean, and why is it interesting? Message-ID: Date: Fri, 4 Feb 1994 17:07:17 GMT To: LitProg@SHSU.EDU norman@flaubert.bellcore.com (Norman Ramsey) writes: >Size is an interesting property, but it is always a question of >degree. `made of only one' vs `decomposable into parts' is a >difference in kind. Classic WEB is a wonderful example of a >monolithic tool; it has many different features bundled into a single >program, including features that have survived in no other >literate-programming tool. It's interesting to recall that there have been some subtle evolutionary steps since WEB. The first WEB tools came in pairs: tangle and weave. The explanatory diagrams of the day looked like this: cob.web / \ / \ tangle weave | | V V cob.pas cob.tex | | V V pascal tex | | V V cob.o cob.dvi Ross Williams, via FunnelWeb, changed the picture slightly. With FunnelWeb, there was only one LP tool cob.web | V FunnelWeb / \ / \ cob.pas cob.tex | | V V pascal tex | | V V cob.o cob.dvi (Of course, FunnelWeb is language independent; I only show a Pascal file for the sake of a concrete example.) Preston Briggs ================================================================================ Archive-Date: Mon, 07 Feb 1994 17:09:11 CST Sender: LP-Mgr@SHSU.edu From: maavl@cwi.nl (Marc van Leeuwen) Reply-To: LitProg@SHSU.edu, maavl@CWI.NL Subject: Re: fweb, C++ Message-ID: Date: Mon, 7 Feb 1994 14:14:20 GMT To: LitProg@SHSU.EDU In article <27487.9402041448@maths.exeter.ac.uk>, Andreas Stirnemann writes |> --------------------------- begin example ---------------------------------- |> @ |> @ = |> static function* pphi; |> |> @ |> @ = |> function* pair::pphi; |> |> @ |> @ = |> pphi = new function(); |> |> @ |> @ = |> function& phi = *pphi; |> |> @ |> @ = |> const function& phi = *pphi; |> |> @ |> @ = |> delete pphi; |> ---------------------------- end example ----------------------------------- |> |> It seems excessive to me to have to introduce six numbered sections in |> order to deal with one single object. I don't see any syntactical |> reason why it should not be possible to write instead: |> |> --------------------------- begin example ---------------------------------- |> @ |> @ = |> static function* pphi; |> |> @ = |> function* pair::pphi; |> |> @ = |> pphi = new function(); |> |> @ = |> function& phi = *pphi; |> |> @ = |> const function& phi = *pphi; |> |> @ = |> delete pphi; |> ---------------------------- end example ----------------------------------- |> |> I'd really like to be able to emit code into several slots out of one |> numbered section. Thus, the operations of creating slots and emitting |> code into slots would become dual. But maybe I am overlooking an issue |> here. Or maybe the above code is simply bad style. Although I am not familiar with FWEB, I can see a reason why this is not possible in CWEB, and which probably applies to FWEB as well. All cross references are made to section numbers, and allowing a (numbered) section to contribute to arbitrarily many modules could rapidly make these references useless. Also, the module body is the basic unit for the tangling program, and so internally your example would be considered as six independent bodies, even if they were combined in the printed listing. There is no doubt that one could change the WEB programs so that your syntax would be allowed (add a code that means "start a new section but skip the commentary and don't increase the section number") but it would be an added feature, not the removal of an arbitrary restriction. I admit thay typing `@ @<' is more work than just `@<', but it's not really a big deal, and I don't believe increasing the section number rapidly really hurts either (the upper limit for section numbers is rather generous). In fact you could interpret the `@ ' as an invitation to add a bit of commentary that applies the the (small) module body, although in such simple cases as above there is often not really much to say. There is one real practical problem though (at least in CWEB) namely that there is a more than average chance that a page break will occur somewhere in this list of small sections (since the first such section would easily fit on an already largely filled page). To that end one could add a new code to the system that is like `@ ' except that no page break will occur before the section, which is a much easier change than the one suggested above; I have done so in my CWEB (ftp.cwi.nl:pub/cweb) where it is called `@~'. Whether your example is bad style I cannot say, although I personally seldom find any need to bind more than two sections together (but I'm using C, not C++). I tend to keep my variables as local as possible, almost to the extreme (if I have to swap two variables, the temporary variable will be defined locally to the three-statement block that does it), since I believe this greatly improves the clarity of the code; this reduces the number of occasions where your problem arises. One consequence of producing code by tangling is that it facilitates use of global things, since references to them can be localised in the source although they are scattered throughout the code; I think one should resist the temptation to consequently use globals for convenience, where (with a bit more planning) one could achieve the same effect with locals. Someone who is reading the code with the purpose of checking its correctness must have some mental picture (even if abstract) of the structure of the tangled code, and to that end globals are still omnipresent. |> Here is my second point, which is really a question. I am using the |> following strategy to declare classes: |> |> --------------------------- begin example ---------------------------------- |> @ |> @a |> @o foo.h |> class foo |> { |> private: |> @@; |> |> public: |> @@; |> @@; |> }; |> ---------------------------- end example ----------------------------------- |> |> Given this code, tangle produces a reusable header file, which is |> fine. But suppose I'd like to have a woven version of the header |> file, exhibiting, for instance, all the public member function. Does |> anyone have a suggestion how to achieve this? Joachim Schrod recently meentioned an alternative approach to this. In brief: write a separate source for the header file, and include it by means of `@i' in the implementation. Marc van Leeuwen ================================================================================ Archive-Date: Mon, 07 Feb 1994 18:07:23 CST Sender: LP-Mgr@SHSU.edu Date: Mon, 7 Feb 94 09:13:22 -0500 From: "James T. Kirby" Reply-To: LitProg@SHSU.edu, kirby@KIRBY.COASTAL.UDEL.EDU Message-ID: <9402071413.AA00578@kirby.coastal.udel.edu> To: litprog@shsu.edu Subject: subscribe subscribe kirby@coastal.udel.edu ================================================================================ Archive-Date: Tue, 08 Feb 1994 14:13:36 CST Sender: LP-Mgr@SHSU.edu Date: Tue, 8 Feb 1994 15:12:57 -0500 From: ejb@world.std.com (ed j baker) Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Message-ID: <199402082012.AA26000@world.std.com> To: LitProg@SHSU.edu Subject: Extended Characters I'd like to put some extended ASCII characters (174 and 175) into an FWEB program but I can't seem to get TANGLE to accept them. Does anyone know how to do this? Also, I'd like to print the WEAVE output of COMMON.WEB. However, I don't have access to a unix machine. My PC doesn't have enough memory to run weave on the file. Would someone be willing to weave COMMON.WEB and email the TeX file to me? Thanks Ed Baker ejb@world.std.com ================================================================================ Archive-Date: Tue, 08 Feb 1994 15:49:39 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: Re: Bug Report Message-ID: Date: Tue, 8 Feb 1994 20:32:06 GMT To: LitProg@SHSU.EDU >>>>> "ed" == ed j baker writes: ed> New Question: ed> What does it mean when a phrase like "see [M-19.22] for ed> details" appears in an FAQ? From the FWEB FAQ: ------- Sections of the FWEB User's Manual are referred to by their section numbers, as in "[M-10.2]" ------- In other words, [M-19.22] refers to section 19.22 of the FWEB User's Manual (for v1.29). Several times last year, since January 93, I had had in mind to update the FAQ (and these numbers) but I have never come around to actually do it. Now, alas, the literate programming course which I shall try to coordinate for GNA interests me more so there is a chance that again I will not be able to update it...Anybody actually using FWEB (I am not in these days) is invited to take maintenance of the FWEB FAQ over from me - either the Texinfo, the text, or the HTML version ... Anyone interested may contact me. -- ----------------------------------------------------------------------------- Marcus Speh, II.Inst.Theor.Physik,Luruper Chaussee 149, 22761 Hamburg,Germany Phone: +49-40 8998 2178, Fax: +49-40 8998 2267, Private: +49-40 801392 Email / DECnet: 13313::SPEH ================================================================================ Archive-Date: Thu, 10 Feb 1994 05:31:16 CST Sender: LP-Mgr@SHSU.edu From: fiehler@eads.umsl.edu (Greg Fiehler) Reply-To: LitProg@SHSU.edu, fiehler@EADS.UMSL.EDU Message-ID: <9402101121.AA01158@eads> Subject: Numbering in CWEB To: LitProg@shsu.edu Date: Thu, 10 Feb 1994 05:21:12 -0600 (CST) Content-Type: text Hi, Being new to CWEB I have a question on how I would like to wee my weaved output to be numbered. When I reach the section: @= main() { @ @ @ ... @ } ---This would normally look like: = main() { ... } --But I would like to see it as: = main() { ... } -and numbered such as they appear later in the document. This appraoch seems to make more sense to me in outlining the hierarchy of a program. I would like to also see sub units of these refered to as ex. 5.2.1. If anyone has done this or knows how it may be accomplished I would appreciate the knowledge or if anyone has objections stylistically or otherwise to this approach I would also appreciate the criticism or alternative approaches. I am just beginning to develop a consistent style for my attempts at LitProgramming and would like any suggestions on good approaches and things to avoid. Thank You, Gregg Fiehler fiehler@eads.umsl.edu ================================================================================ Archive-Date: Thu, 10 Feb 1994 07:39:23 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 10 Feb 94 14:29:54 MET From: Zdenek Wagner Reply-To: LitProg@SHSU.edu, WAGNER%CSEARN.BITNET@SHSU.EDU Subject: C++, web and structuring (I forgot the original subject) To: Literate Progaramming list You wrote: > I was wondering whether other practitioners using litprog for > the C++ language, are still making use of the "good style" like > hiding class defs in *.hh, member defs in *.cc and inline members > in *.icc files -- I have noticed that if I do not post-WEB code > but write in NOWEB, say, from scratch, I do tend to inline > *everything*. > Whether or not the parts are split up later is a matter > put in an "assembly" chunk which I am only interested in at the very > end. Ok, if someone insists looking at the tangled code, he/she will > find extremely long, ugly inlined functions - effectively it is left > to the compiler to reject one or the other definition. Thus, one is > deprived of the PRAGMA directive (but not every compiler has got one). > > What do others think/do? > -- > ----------------------------------------------------------------------------- > Marcus Speh, II.Inst.Theor.Physik,Luruper Chaussee 149, 22761 Hamburg,Germany > Phone: +49-40 8998 2178, Fax: +49-40 8998 2267, Private: +49-40 801392 > Email / DECnet: 13313::SPEH I write my C++ programs in CWEB but the philosophy should be similar. The structuring of the sources depends on what I am writing. I will split my explanation to the following parts: 1. Class library. The intention is to build a library of hierarchical classes which has to be stored as a .LIB file (on MS DOS). the appropriates parts will then be linked to the user program (or my own program) in the future. All classes will have something in common but a particular program may need only some of them. This logically leads to a requirement of having all sources in one web file and send each class (or a small gpour of classes) into a separate CPP file (implementation) abd a separate header file (class definition and inline functions). 2. Program with reusable classes. Sometimes I write a program for whic I develop some new private classes. It seems to me that the classes could be useful in the future in other programs. In order to make the classes easily reusable, I again send the class definition and the inline functions into a header file and the implementation to the CPP file. Moreover, I write it to a separate web file and either treat it absolutely independently (with independant weaving and tangling) or I include it into the main web file via @i. 3. Small program with special classes. Sometimes I need classes which will hardly be useful for anything else. If the program is sufficiently small, I do not care about spliting the tangled code to different header and CPP files. Instead I just build a single CPP file which only includes standard CPP headers. 4. Large program with special classes. If the size of the program exceeds some (ill defined) limiting value, my Borland C++ compiler may crash due to insufficient memory. Then I have to split the program into CPP and header files similarly as in 2 above. If some rules are fillowed, Borland C++ can use precompiled headers, i.e. the header files are compiled only for the first CPP files of the project and at the beginning of the compilation of other files the memory image of the precompiled headers is loaded at high speed. This speeds up the compilation drastically. When splitting the code into CPP and header files, the compilation time is the very thing which I have in mind. ,~~~/ /` / /| /~~~ / / |_/ /__/ ' | / / /~~/ /~~/ /~~/ /~~/ /\ | /| / /~~/ /~~/ /~~/ /~~/ /~~~ / , / / /~~~ / / /~~~ / \ |/ |/ / /_/ / / / /~~~ / ~~~~ ~~~ ~~~ ' ' ~~~ ' ` ' ' ~~~ ~~/ ' ' ~~~ ' Zdenek Wagner______/ Some gateway between me and you may garble backslash. It will appear on your screen as ã due to problems with EBCDIC <--> ASCII conversion. It has already been corrected on SOME gateways. The domain `.cs' does no longer exist and was replaced by `.cz'. Valid addresses are: ^^ ================================================================================ Archive-Date: Thu, 10 Feb 1994 14:24:42 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 10 Feb 94 15:21:20 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, fiehler@eads.umsl.edu Subject: Re: Numbering in CWEB Message-ID: Gregg Fiehler writes: > Being new to CWEB I have a question on how I would like to wee my > weaved output to be numbered. When I reach the section: > > @= > main() > { > @ > @ > @ > ... > @ > } > ---This would normally look like: > = > main() > { > > > ... > > } > --But I would like to see it as: > = > main() > { > > > ... > > } > -and numbered such as they appear later in the document. As far as I recall the CWEB source, the numbering scheme you propose would require some pretty serious hacking (and a pretty big change file). What would you do about numbering a chunk that's used in more than one chunk? If is used in chunk 12, say, should its reference number be 5.3 or 12.x or 5.3/12.x? As to whether it's reasonable, who can say? Different people like different things. As far as I'm concerned, the purpose of the chunk numbers is to enable the reader to find the chunk definitions, and the CWEB scheme allows that pretty readily. Aside: I should also mention that I am becoming quite fond of the new noweb chunk numbering scheme, where chunk numbers are page numbers with an alphabetic suffix: chunk 3a is the first chunk on page 3, 12c the third chunk on page 12, and so on. -- Lee leew@pilot.njin.net ================================================================================ Archive-Date: Fri, 11 Feb 1994 06:33:11 CST Sender: LP-Mgr@SHSU.edu From: maavl@cwi.nl (Marc van Leeuwen) Reply-To: LitProg@SHSU.edu, maavl@CWI.NL Subject: Re: Numbering in CWEB Message-ID: Date: Fri, 11 Feb 1994 10:34:44 GMT To: LitProg@SHSU.EDU In article <9402101121.AA01158@eads>, fiehler@eads.umsl.edu (Greg Fiehler) writes: |> Being new to CWEB I have a question on how I would like to see my |> weaved output to be numbered. When I reach the section: |> |> @= |> main() |> { |> @ |> @ |> @ |> ... |> @ |> } |> ---This would normally look like: |> = |> main() |> { |> |> |> ... |> |> } |> --But I would like to see it as: |> = |> main() |> { |> |> |> ... |> |> } |> -and numbered such as they appear later in the document. |> |> This approach seems to make more sense to me in outlining the hierarchy of |> a program. I would like to also see sub units of these referred to as |> ex. 5.2.1. If anyone has done this or knows how it may be accomplished |> I would appreciate the knowledge or if anyone has objections stylistically |> or otherwise to this approach I would also appreciate the criticism or |> alternative approaches. I am just beginning to develop a consistent |> style for my attempts at LitProgramming and would like any suggestions |> on good approaches and things to avoid. As a short answer to your question: this cannot be done in CWEB, nor can it be achieved without major re-engineering. In fact the information necessary to produce numbers as suggested is present when running CTANGLE, but the printed output is produced by CWEAVE, so you would have to make a kind of a merger between these programs (which cannot be advised to novices to CWEB:-). In fact CWEAVE does keep cross reference information as to which module is the parent of each module, which is part of the information necessary to deduce the numbers, but it does not record the sequence number among the siblings of that parent. Apart from the difficulty to realise it, there are more fundamental objections to a scheme as you propose. First of all it is inherently ambiguous, since modules can be used more than once. The fact that modules may be defined in a sequence of different sections also presents problems: although the section numbers of all but the first defining section are not normally mentioned, they do appear in the index of module names at the end and in the "See also" line after the first occurrence; in your scheme there is no reasonable indication different from that of the first occurrence to refer to the other occurrences by. Secondly, and most decisively, if you consider it closely your scheme is not desirable at all. Although the numbering proposed may make you look like a Very Organised Person, it destroys any possibility of useful cross referencing. Consider for instance the section defining a module numbered 5.3.1.1.3.2.4; what cross reference would appear at the end of it? Well of course "This module is used in section 5.3.1.1.3.2" and maybe something like "See also sections 5.3.1.1.3.2.4a, 5.3.1.1.3.2.4b and 5.3.1.1.3.2.4c" (assuming our previous dilemma is solved by attaching letters to the number to discriminate continuation modules). That is hardly surprising information, and will not help anyone in locating the parent and continuations. Indeed, due to the fact that the programmer may arrange the module definitions in an almost arbitrary order (only continuations of one same module, including those of the unnamed root module, must appear in the relative order of their use in the tangled program) it will be virtually impossible to locate a module given its number, since numbers are not ordered. You will soon find the need for a simple sequential numbering of sections a la CWEB (or as noweb, see Lee Wittenberg's reply) for use in cross referencing, but then you will note that you need that same number to locate the defining occurrence of the module given a used one, but this was the very place you wanted to introduce the new numbering in the first place! Concluding, in order to locate things, you want a simple sequential numbering, like page numbers (as in noweb) or lacking that by successive sections as in CWEB (page numbers would be difficult to get in CWEB, because they are assigned by TeX after CWEAVE has already done its job; I'm not sure how noweb can perform its trick, but it certainly seems to have advantages when previewing your woven code). I have been using manuals that had no page numbers but just (sub)section numbers like 4.2.3.1.3 (presumably because this facilitates updates by insertion or removal of pages) and it sure is a lot more difficult to locate any reference, even though these numbers are still guaranteed to be lexicographically increasing. By the way, do you really use module names like @, @, or is that just an abstraction for the sake of the example? If you do use them, I suggest that you consider using more meaningful names, after all, a reader is supposed to understand the workings of the outer module at least roughly without having to look up the definitions of the modules used. Marc van Leeuwen CWI, Amsterdam ================================================================================ Archive-Date: Fri, 11 Feb 1994 08:30:27 CST Sender: LP-Mgr@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Structures in WEBs (was Re: Numbering in CWEB) Date: 11 Feb 1994 13:15:41 GMT Message-ID: <2jg0dt$llv@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU While I agree largely with Lee Wittenberg and Marc van Leeuwen on their analysis, I want to add another point I got from analyzing lots of WEB tools. (I'll write a tech report sometimes on it...) ---------------- Definition: TradWEB A TradWEB is a `traditional WEB system' that follows the model of Knuth's original WEB and does not change the structual elements available to the WEB programmer. E.g., the various CWEB flavors, SpiderWEB, MWEB, etc. My Hypothesis: Each WEB has two concurrent structures: The document structure and the refinement structure. THE DOCUMENT STRUCTURE It is used to present the software and the concepts behind its creation to the reader. If we don't give up with printed forms, the document creation is usually oriented along structures we know from the field of technical writing, i.e., it has (our should have ;-) sections, subsections, figures, references, index, etc. The basic documentation structure element of a TradWEBs is the `WEBsection'. This is *not* the same as the `section's mentioned above. (DONG! WAKE UP! This was an _important_ statement... ;-) A WEBsection is the basic unit that supports the usage of the technical writing paradigm ``say it twice,'' once in an informal, once more in a formal way. (According to Knuth, that's _the_ essence of Literate Programming, btw.) The importance of a WEBsection is often underestimated. A collegue of mine recently noted that he finds the output of the doc option for LaTeX styles not much readable. We analyzed it, and it happened that he simply did not find the start of such a (explanation, code) unit. It was not supported by the typography of the document. This is a basic principle I demand from all good LitProg tools: It must support the clear detection of these units. They are the units of argumentation and communication with the reader. Without them, the LitProg paradigm cannot be taken advantage of, at least not to its full extent. The support is like using bold face at the start of an item list but not within running text. (IMO, one can learn alot about abstractions of presentations by reading typography textbooks.) How this is made actually, does not matter. In traditional WEB systems the typographic support for the detection is done by vertical space and a bold number. Most probably vertical space alone would not suffice for a distinction, since it can appear within a WEBsection as well (and does in real programs). Other structural elements are *not* supported by TradWEBs. The so-called ``starred sections'' are not structural units, but specially tagged sections that will be noted in the table of contents. I.e., this is not a new element for the document structure. But see below on a note about CWEB. One can cheet... :-) THE REFINEMENT STRUCTURE It is an acyclic graph where a subset of the nodes without predecessors are the start-nodes for minimal spanning trees that represent code for one file. As with every acyclic graph one has the problem how to identify nodes in it. The traditional solution is attaching a unique number to each node (that can be used, for example, in an adjacence matrix [sp?]). Traditional WEB systems use this canonical solution. Since at most one refinement can appear in a WEBsection, they attach a number with each WEBsection and use this number for the identification. Some numbers are unused, but this does not matter. ---------------- That one has numbered WEBsections and thereby numbered refinements in TradWEBs is not a hindrance per se to use higher-level sections (in the document sense) as well. In my opinion, a WEB language designer should *not* throw away this concept, the higher-level elements should be added! So, do we need to rewrite a TradWEB system -- e.g., CWEB -- to get this possibility, to get sections, subsections, figures, etc? No. -- Really, no. You mix document markup and refinement markup if you think this. From the very beginning, the LaTeX style for CWEB has provided the possibility to provide subsections, subsubsections, etc., to the user. (The hierarchy may have up to seven levels.) It has even documentation to this effect. But I didn't need it, and nobody contributed a style option that does realize this possibility. From the very beginning, because I wrote this style when I had to include CWEB code in an other document (my thesis) where I had to adapt the CWEB document structure to the structural conventions used there. (Btw, this was _not_ Levy's (aka Knuth's) CWEB, this was The Real CWEB (mine, all mine). [Special sentence for Timothy Murphy, finished now.] :) :) Perhaps I'll add a respective package after I transformed the cweb style to a LaTeX2e class. Just to show that it's easy... ;-) 'Though I think the possibility to include CWEAVEd pieces in arbitrary LaTeX documents is more important. ---------------- Finally, a personal note: Please, do not read the above as a contribution to the ever on-going ``which WEB is better'' flamewar. (Please, do not start the flamewar again. :) This posting is a general reflection on the structure of WEB documents, and how to support them in tools. CWEB was just used as an example because I happened to be have done something there. And I wanted to pep up the dry hypothesis at the start with some concrete empiric statements. Actually, for those who think I'm the big CWEB fan: I *don't* even use Levy's CWEB -- I'm not doing much C programming any more, and CWEAVE munches C++ code in an inacceptable way. Thanks and have fun, -- Joachim =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany When it comes to Literate Programming, I get irrational. --- DEK, 16 Jul 93 ================================================================================ Archive-Date: Fri, 11 Feb 1994 11:57:24 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 11 Feb 1994 12:55:42 -0500 From: ejb@world.std.com (ed j baker) Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Message-ID: <199402111755.AA08246@world.std.com> To: LitProg@SHSU.edu Subject: examples I'm a newbie to Literate Programming. I'm looking for some samples of FunnelWEB and NOWEB in actual use. If anyone can spare some samples, please send them to: ejb@world.std.com Thanks Ed Baker ================================================================================ Archive-Date: Fri, 11 Feb 1994 16:39:23 CST Sender: LP-Mgr@SHSU.edu From: karel@cv.ruu.nl (Karel Zuiderveld) Reply-To: LitProg@SHSU.edu, karel@CV.RUU.NL Subject: emacs mode for noweb wanted Message-ID: Date: Fri, 11 Feb 1994 20:49:11 GMT To: LitProg@SHSU.EDU Hi, I'm doing most of my programming in noweb. When writing the actual code chunks, I want to use the c++-mode, while I'm using the latex mode of auctex for writing the docs. So I actually want to use two modes in Emacs kind of simulteanously. So if I write << text >>= the editor switches to c++ mode and when typing @ at the start of the line emacs switches to latex mode. you get the idea. Has someone out there written (or can somebody write) a hook that allows for automatic setting of modes? karel -- Karel Zuiderveld E-mail: karel@cv.ruu.nl 3D Computer Vision - Room E.02.222 Tel: (+31) 3403-75548/30-506682 Academisch Ziekenhuis Utrecht Fax: (+31) 30-513399 Heidelberglaan 100, 3584 CX Utrecht, The Netherlands ================================================================================ Archive-Date: Fri, 11 Feb 1994 16:39:56 CST Sender: LP-Mgr@SHSU.edu From: yjc@po.cwru.edu (Jerome Chan) Reply-To: LitProg@SHSU.edu, yjc@PO.CWRU.EDU Subject: Cweb;C++ Class examples;how do you write it? Date: Fri, 11 Feb 1994 15:56:59 -0500 Message-ID: To: LitProg@SHSU.EDU Hi! I'm in need of an example on how to use CWeb to write C++ classess. The main problem I have is with seperating the file into the *.h and the *.c files. I can't seem to find an _elegent_ way of doing it. Can any CWeb guru give a hand? Currently, this is the way I'm doing it. @q Introduction/Overview @> @* Introduction. Item is a C++ container class. The class is defined in the following files: @c @(Item.h@>; /* Header File */ @(Item.cpp@>; /* Class Definations */ @(ItemTest.cpp@>; /* Test Code */ @q Headers @> @* Headers. The headers are defined in |Item.h|. @(Item.h@>= @; @; @; @ Something relevent. @= #pragma once #define foot smelly @ Something interesting. @= #include @ Something fresh. @= class Item { public:@/ @; private:@/ @ }; . . . @* Class Definations. @= @; @; . . . The main problem is the @ declarations in the .h file and the class defination in the .c file. Is there a way I can use one @ in the .h and the .c file? Any helpful pointers or hints? I really like using *Web. :P Thanks! -- The Evil Tofu (Only Human) ================================================================================ Archive-Date: Fri, 11 Feb 1994 22:37:12 CST Sender: LP-Mgr@SHSU.edu From: norman@flash.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLASH.BELLCORE.COM Subject: Re: emacs mode for noweb wanted Message-ID: Date: Sat, 12 Feb 1994 03:12:27 GMT To: LitProg@SHSU.EDU In article , Karel Zuiderveld wrote: >I'm doing most of my programming in noweb. > >So if I write << text >>= > the editor switches to c++ mode and >when typing @ at the start of the line emacs switches to latex mode. >Has someone out there written (or can somebody write) a hook that >allows for automatic setting of modes? Kostas OIkonomou has done something like this for lucid emacs. f I ever get a chance to install lucid and test it, I'll include it in the noweb distribution. MEanwhile you might want to check with Kostas; I think his email address is ko@surya.ho.att.com Norman ================================================================================ Archive-Date: Sat, 12 Feb 1994 02:26:51 CST Sender: LP-Mgr@SHSU.edu From: shf@netcom.com (Stuart Ferguson) Reply-To: LitProg@SHSU.edu, shf@NETCOM.COM Subject: Re: C++, web and structuring (I forgot the original subject) Message-ID: Date: Fri, 11 Feb 1994 18:28:44 GMT To: LitProg@SHSU.EDU Although I do not use C++, I do write object-oriented code in C, as well as normal C code intended to be used as shared modules by other programs. In these cases, I write the interfaces, typedefs and macros to the ".h" and the implmentation to the ".c" files. The header is then included by clients of the class or module. This all seems pretty normal to me and I would expect that C++ would work more or less the same way. I find that one of the great strengths of literate programming tools is just this ability to generate multiple output files from a single source. I only have to define an interface once in the interface spec part of the document and I can include it as a prototype in the header file and as the function declaration in the C file. Of course I only have to use a tool for this because C is such a horrible language, but that is not the only reason to want this capability. I also find it very useful to be able to include a test program for a module in the same document, and some complex or multipurpose modules may have multiple headers, like the public header and the `friend' header. -- Stuart Ferguson (shf@netcom.com) "How do you compute that? Where on the graph do `must' and `cannot' meet?" ================================================================================ Archive-Date: Sat, 12 Feb 1994 15:59:20 CST Sender: LP-Mgr@SHSU.edu From: plummer@cs.swarthmore.edu (David Barker-Plummer) Reply-To: LitProg@SHSU.edu, plummer@CS.SWARTHMORE.EDU Subject: Re: emacs mode for noweb wanted Date: 12 Feb 94 16:15:08 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: LitProg@SHSU.EDU [[This question was originally on comp.programming.literate. I'm crossposting this to gnu.emacs.help, since I suspect that code to do what is suggested might already exist. If anyone there knows of Emacs code to combine two modes, I (and I assume many on comp.programming.literate) would be interested to hear about it. Since this is basically a gnu.emacs question I have directed followups to gnu.emacs.help. I will summarize subsequent discussion there on comp.programming.literate if there is any. Apologies to readers of gnu.emacs.help if this is not the appropriate forum for this posting.]] In article on comp.programming.literate, karel@cv.ruu.nl (Karel Zuiderveld) writes: KZ> I'm doing most of my programming in noweb. When writing the actual KZ> code chunks, I want to use the c++-mode, while I'm using the latex KZ> mode of auctex for writing the docs. KZ> So I actually want to use two modes in Emacs kind of KZ> simulteanously. KZ> So if I write << text >>= the editor switches to c++ mode and KZ> when typing @ at the start of the line emacs switches to latex KZ> mode. you get the idea. The question posed is a special case of the question; how can I choose the major mode on the basis of the contents of the file, and my position relative to that contents? Here is how I would proceed to build a mode which combines two different modes. I will implement this eventually, unless I find that it has already been done, so if anyone wants to shoot down, or suggest improvements on this strategy, I'd appreciate receiving comments. Basically, you need to build a new keymap for the combined mode which has two types of entries: unconditional and conditional. - Unconditional entries occur whenever the two keymaps agree on the function to be called, and the entry is just a call to that function. - Conditional entries point to a function which looks around the point to determine which context we are in, and then calls the function from the appropriate keymap. That is, suppose that in C++ mode, key Ctrl-A calls function foo and in LaTeX mode it calls function bar. Then the combined mode would call foo-or-bar, defined to be: (if (c++-context-p) (foo) (bar)) The trick would then be in the definition of c++-context-p. I think that this would work pretty well when the keymaps mostly agree or at least when the places where the keymaps disagree are used relatively infrequently. I suspect that this is the case for many literate programming contexts. -- Dave PS: I don't think that it would be appropriate to design the combined mode in the way that the original poster described. Since, this scheme assumes that the file is edited from beginning to end, and that one never moves back to revise text which has already been entered. If the way in which Emacs decided which mode to be in was the immediately preceding keystrokes, then movement commands would make it possible for the mode and context to disagree. ================================================================================ Archive-Date: Sat, 12 Feb 1994 17:03:43 CST Sender: LP-Mgr@SHSU.edu Date: Sat, 12 Feb 94 18:03:23 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, schrod@iti.informatik.th-darmstadt.de Subject: Re: Structures in WEBs (was Re: Numbering in CWEB) Message-ID: Joachim Schrod makes the following observation: > Each WEB has two concurrent structures: > The document structure and the refinement structure. This is something I had never thought about before, but now that I think about it, I have been (to some extent) organizing my webs around this principle. I think Joachim's insight is an extremely important one. I also think that the best webs are the ones in which the document structure makes the refinement structure clear to the reader. Note that this does not mean that the DS follows the RS in any way, but that the RS holds the key to the logic of the program and the DS should be laid out to explain it. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | All of the characters, corporations, Computer Science Department | religions, nations, philosophies, Kean College of New Jersey | political viewpoints, events and makeup Union, NJ 07083 | in this novel are fictional and are not USA | intended to portray anything in the world | as we know it. None of the characters leew@pilot.njin.net | represents the author's personal opinions, | which are, in any event, not quite yet | organized into publishable form. | -- Donald Westlake, "Good Behavior" (1985) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Sat, 12 Feb 1994 17:42:42 CST Sender: LP-Mgr@SHSU.edu Date: Sat, 12 Feb 94 18:41:43 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, yjc@po.cwru.edu Subject: Re: Cweb;C++ Class examples;how do you write it? Message-ID: yjc@po.cwru.edu asks: > Hi! I'm in need of an example on how to use CWeb to write C++ classess. The > main problem I have is with seperating the file into the *.h and the *.c > files. I can't seem to find an _elegent_ way of doing it. Can any CWeb guru > give a hand? I've mentioned this before, but the structure I like to use in my CWEB programs is (explanations are contrived, and should not be considered in any way a good example): @*A Sample Class. Here we define the |xxx| class. The interface will go in the \.{xxx.h} file. @s xxx int @q I don't always trust the parser @> @(xxx.h@>= #ifndef XXX_H #define XXX_H // prevent multiple inclusions @# @@; @# class xxx { @@; protected: @/ @@; public: @/ @@; }; @# #endif @ The members themselves are defined in the ``unnamed chunk.'' I let \.{CTANGLE} generate \.{xxx.c} (or \.{xxx.cc} or \.{xxx.cpp}, depending on the compiler's preference). @c @
@; @(xxx.h@>@; // included by \.{CTANGLE} rather than \&{#include} @<|xxx| members and friends@>@; @ To show you how I define a member, I'll make a simple constructor, that takes a string parameter. First, I declare it (for the interface): @= xxx(const char *s = NULL); @ Then I define it for real: @<|xxx| members...@>= xxx::xxx(const char *s) { @; } @ Let's have a data field that we can do something with. @= char *dummy; @ And we'll initialize it in the constructor: @= dummy = s; @*Epilogue. This technique works quite well for me, and I find it reasonably ``elegant,'' as well as flexible enough to accomodate a wide variety of classes. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | All of the characters, corporations, Computer Science Department | religions, nations, philosophies, Kean College of New Jersey | political viewpoints, events and makeup Union, NJ 07083 | in this novel are fictional and are not USA | intended to portray anything in the world | as we know it. None of the characters leew@pilot.njin.net | represents the author's personal opinions, | which are, in any event, not quite yet | organized into publishable form. | -- Donald Westlake, "Good Behavior" (1985) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Mon, 14 Feb 1994 08:29:54 CST Sender: LP-Mgr@SHSU.edu From: jmb29@cus.cam.ac.uk (Julian Birch) Reply-To: LitProg@SHSU.edu, jmb29@CUS.CAM.AC.UK Subject: Re: emacs mode for noweb wanted Message-ID: <1994Feb14.134957.24627@infodev.cam.ac.uk> Date: Mon, 14 Feb 1994 13:49:57 GMT To: LitProg@SHSU.EDU In article karel@cv.ruu.nl (Karel Zuiderveld) writes: >So I actually want to use two modes in Emacs kind of simulteanously. > >So if I write << text >>= > the editor switches to c++ mode and >when typing @ at the start of the line emacs switches to latex mode. >you get the idea. > >Has someone out there written (or can somebody write) a hook that >allows for automatic setting of modes? > >karel Please don't flame me if I'm incorrect, but... I don't think it's that simple, sadly. I find that switching between modes for noweb doesn't work as well as expected - c-mode reads <>= and thinks the current line is a continuation of an assignment (>>= being an assignment operator) and hence gets the indentation horribly confused. Hope this helps at least explain why no-one's done it yet. Julian. ================================================================================ Archive-Date: Mon, 14 Feb 1994 11:40:52 CST Sender: LP-Mgr@SHSU.edu From: karel@cv.ruu.nl (Karel Zuiderveld) Reply-To: LitProg@SHSU.edu, karel@CV.RUU.NL Subject: Re: emacs mode for noweb wanted Message-ID: Date: Mon, 14 Feb 1994 16:10:11 GMT To: LitProg@SHSU.EDU In <1994Feb14.134957.24627@infodev.cam.ac.uk> jmb29@cus.cam.ac.uk (Julian Birch) writes: | "In article karel@cv.ruu.nl (Karel Zuiderveld) writes: | ">So I actually want to use two modes in Emacs kind of simulteanously. | "> | ">So if I write << text >>= | "> the editor switches to c++ mode and | ">when typing @ at the start of the line emacs switches to latex mode. | ">you get the idea. | "> | ">Has someone out there written (or can somebody write) a hook that | ">allows for automatic setting of modes? | "> | ">karel | "Please don't flame me if I'm incorrect, but... | " | "I don't think it's that simple, sadly. I find that switching between modes for | "noweb doesn't work as well as expected - c-mode reads <>= and | "thinks the current line is a continuation of an assignment (>>= being an | "assignment operator) and hence gets the indentation horribly confused. | "Hope this helps at least explain why no-one's done it yet. Does that also hold for the new cc-mode? If that mode is smarter or contains hooks for adding "user" code, it should not pose a big problem (says he, being an elisp illiterate programmer ;-)) Karel -- Karel Zuiderveld E-mail: karel@cv.ruu.nl 3D Computer Vision - Room E.02.222 Tel: (+31) 3403-75548/30-506682 Academisch Ziekenhuis Utrecht Fax: (+31) 30-513399 Heidelberglaan 100, 3584 CX Utrecht, The Netherlands ================================================================================ Archive-Date: Mon, 14 Feb 1994 14:45:18 CST Sender: LP-Mgr@SHSU.edu Date: Mon, 14 Feb 94 14:43:16 CST From: thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) Reply-To: LitProg@SHSU.edu, thompson@SUN1.COE.TTU.EDU Message-ID: <9402142043.AA21648@sun1.coe.ttu.edu> To: LitProg@SHSU.edu, plummer@CS.SWARTHMORE.EDU Subject: Re: emacs mode for noweb wanted CC: thompson@sun1.coe.ttu.edu > The question posed is a special case of the question; how can I choose > the major mode on the basis of the contents of the file, and my > position relative to that contents? Please, if you get a response that allows writing the two-mode macros for emacs (excuse my ignorance--I'm not an emacs devotee ;-) let me know, especially if it results in an emacs mode for litereate programming. I'll include it in the FAQ. -=d ======================================================================= David B. Thompson internet: thompson@sun1.coe.ttu.edu Civil Engineering Dept. internet: dthompson@coe2.coe.ttu.edu Texas Tech University internet: wqdbt@ttacs1.ttu.edu P.O. Box 41023 Lubbock, Texas 79409-1023 "Get a haircut and get a *real* job." ======================================================================= ================================================================================ Archive-Date: Mon, 14 Feb 1994 23:03:27 CST Sender: LP-Mgr@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Reply-To: LitProg@SHSU.edu, coates@KELVIN.PHYSICS.UQ.OZ.AU Subject: Re: emacs mode for noweb wanted Date: 15 Feb 94 13:04:53 Message-ID: To: LitProg@SHSU.EDU I have been thinking about the same thing for FunnelWeb. My current solution, which I haven't written yet, is to implement a minor mode for creating a `mode-stack', something like the directory stack often used in UNIX shells. It would be up to the user to push and pop the correct modes onto and off the stack, but an empty push would swap the two most recent on the stack. What do you think of this idea? Not that I've tried it out yet, but it seemed to me to be an achievable suggestion. 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: Tue, 15 Feb 1994 00:47:56 CST Sender: LP-Mgr@SHSU.edu From: mauer@mcs.anl.gov (Andrew Mauer) Reply-To: LitProg@SHSU.edu, mauer@MCS.ANL.GOV Subject: Re: emacs mode for noweb wanted Message-ID: Date: Mon, 14 Feb 1994 15:35:27 GMT To: LitProg@SHSU.EDU >>>>> On Fri, 11 Feb 1994 20:49:11 GMT, karel@cv.ruu.nl (Karel Zuiderveld) said: [Looking for a way to have c++-mode and latex-mode co-exist in a document.] The simple kludge I use is to have a function key which flips me back and forth between c++ and latex mode. Since I usually write for a reasonable period of time in one or the other (usually latex-mode), it is not an appreciable hassle to hit a key to switch back and forth. The actual code I use is appended below. I am hardly an emacs-lisp programmer, so realize that this is probably far from a "good" solution. However, it does work. The solution is VERY sub-optimal if you also use folding-mode. /Andrew/ (defun ajm-flip-latex-c++-mode () (interactive) (cond ; Switch latex or c -> c++ ((or (string= major-mode "LaTeX-mode") (string= major-mode "c-mode")) ;; NOTE THIS AND CHANGE IF YOU WANT!! ; go to c++-mode (c++-mode)) ; Otherwise change to latex-mode (t (latex-mode) (set-variable 'TeX-master t)))) (if (string< "19" emacs-version) (progn (global-set-key [f12] 'ajm-flip-latex-c++-mode) (global-set-key [f11] 'folding-mode)) ; emacs-18 (global-set-key "\e[192z" 'folding-mode) ;f11 (global-set-key "\e[193z" 'ajm-flip-latex-c++-mode) ;f12 ) ================================================================================ Archive-Date: Tue, 15 Feb 1994 08:13:07 CST Sender: LP-Mgr@SHSU.edu Date: Tue, 15 Feb 1994 09:11:31 -0500 From: ejb@world.std.com (ed j baker) Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Message-ID: <199402151411.AA11274@world.std.com> To: LitProg@SHSU.edu Subject: LitProg <<>> GNUinfo My boss would like to use Literate Programming methods and the GNUinfo hypertext help system on a series of C++ files. Has anyone undertaken something like this. I'd be very interested in hearing about any Tips, Tricks or Traps to pursuing this. Thanks Ed Baker ejb@world.std.com ================================================================================ Archive-Date: Tue, 15 Feb 1994 12:07:06 CST Sender: LP-Mgr@SHSU.edu Message-ID: Date: Tue, 15 Feb 94 10:00 PST To: LitProg@SHSU.edu Subject: Re: emacs mode for noweb wanted References: From: Kayvan Sylvan Reply-To: LitProg@SHSU.edu, kayvan@SATYR.SYLVAN.COM Dominique de Waleffe's nuweb-mode does a good job with this for nuweb. It starts out in LaTeX mode. Within a scrap, you can hit C-c C-z to edit it. This brings up another buffer, where the scrap is copied and put into the appropriate source mode (the source mode is user-definable, since nuweb is language independant). Once you're done with the scrap, you hit C-c C-z again to install it. It has other conveniences as well. Perhaps someone could use the same approach for noweb or funnelweb. ---Kayvan | Kayvan Sylvan, Sylvan Associates, kayvan@satyr.Sylvan.COM, (408) 978-1407 | | Consulting, Training, Development, SysAdmin, {BSD,SVr3,SVr4} Unix Systems | | "Think Globally, Act Locally." "Only you can make your dreams come true." | | Proud Dad of Katherine Yelena (born 8/8/89) & Robin Gregory (born 2/28/92) | ================================================================================ Archive-Date: Tue, 15 Feb 1994 12:41:21 CST Sender: LP-Mgr@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Re: emacs mode for noweb wanted Date: 15 Feb 1994 17:48:51 GMT Message-ID: <2jr1u3$7ru@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article , coates@kelvin.physics.uq.oz.au (Tony Coates) writes: > I have been thinking about the same thing for FunnelWeb. My current > solution, which I haven't written yet, is to implement a minor mode > for creating a `mode-stack', something like the directory stack often > used in UNIX shells. It would be up to the user to push and pop the > correct modes onto and off the stack, but an empty push would swap the > two most recent on the stack. Why shall it be done by hand? To repeat myself, from a posting I sent only to g.e.h: In Lucid Emacs one can use the concept of extents to attach attributes to a text area. (GNU Emacs 19 has a similar concept, 'though I don't know its name.) If the position is changed one checks if the extent has changed and then one changes the mode. The actual problem is that AUC-TeX does initialization and finalization actions. They have to be done properly as well, this must be organized. Otherwise it's rather easy, and fast in addition. Oh yes, and all the other tools: etags, font-lock, func-menu, etc., must be adapted as well... They all depend on the one-mode-per-buffer-or-file paradigm... This approach is fast. A file content gets its extents attached on read in, and on-the-fly while one types. In noweb that's a bit more difficult than in other webs since the refinement delimiters are matched by heuristics and have meaning in other modes as well. (Read: I've never understood why <<...>> is so much better than @<...@>, especially as it's well known that the former construct appears quite often in many languages [not only in C].) As outlined above, the real difficulties are somewhere else. After all, we want to use the rest of Emacs as we're used to, don't we? Cheers, Joachim PS: If anybody makes yet another web mode: PLEASE, don't bind \C-C LETTER like the web-mode does. Or like cweb.el, that does even bind keys globally. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Tue, 15 Feb 1994 17:17:49 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: Re: LitProg <<>> GNUinfo Message-ID: Date: Tue, 15 Feb 1994 19:58:22 GMT To: LitProg@SHSU.EDU [Excerpted from full documentation on World-Wide Web at URL http://info.desy.de/user/projects/LitProg.html - more on WWW in ftp.desy.de:/pub/userWWW/projects/Announce/LitProg.txt] ------------ Glasgow LitProg Tools A GNU Texinfo-based suite of literate programming tools from Glasgow, at ftp.dcs.glasgow.ac.uk:/pub/haskell/glasgow/. Here is the documentation in PostScript, and a experience report ------------ I havent used these tools myself though. marcus -- ----------------------------------------------------------------------------- Marcus Speh, II.Inst.Theor.Physik,Luruper Chaussee 149, 22761 Hamburg,Germany Phone: +49-40 8998 2178, Fax: +49-40 8998 2267, Private: +49-40 801392 Email / DECnet: 13313::SPEH ================================================================================ Archive-Date: Tue, 15 Feb 1994 17:20:00 CST Sender: LP-Mgr@SHSU.edu From: dak@tabaqui.informatik.rwth-aachen.de (David Kastrup) Reply-To: LitProg@SHSU.edu, dak@TABAQUI.INFORMATIK.RWTH-AACHEN.DE Subject: Re: emacs mode for noweb wanted Date: 15 Feb 1994 19:32:59 GMT Message-ID: <2jr81b$8oe@urmel.informatik.rwth-aachen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: LitProg@SHSU.EDU schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes: >This approach is fast. A file content gets its extents attached on >read in, and on-the-fly while one types. In noweb that's a bit more >difficult than in other webs since the refinement delimiters are >matched by heuristics and have meaning in other modes as well. (Read: >I've never understood why <<...>> is so much better than @<...@>, >especially as it's well known that the former construct appears quite >often in many languages [not only in C].) The <<>> solution is just a bit more appealing to the eye, if you are reading the source by human. I do agree this looks a bit nicer, but might cause more puzzling than necessary when reading texts which use, for example, << and >> operators. Personally, I do not find the choice that bad. Perhaps this is because I am desensibilized by C++. I do remember, however, that reading the first time template { ... I had the urge to flame somebody, who obviously never had taken the pains to write a parser without using an automated tool. This still reverbs in compiler writers thinking about how they can handle xxx <23> z; and there are lots worse examples. The noweb solution, obviously, has something to do with being matched by awk, where you can somewhat reasonably do this on a line by line base the way noweb does. Whether it was a good design decision, well... Up to know it has not disturbed me, but it might lead to problems with computer generated code/computer handled syntax operations as with Emacs. -- David Kastrup dak@pool.informatik.rwth-aachen.de Tel: +49-241-72419 Fax: +49-241-79502 Goethestr. 20, D-52064 Aachen ================================================================================ Archive-Date: Tue, 15 Feb 1994 20:29:35 CST Sender: LP-Mgr@SHSU.edu From: troyer@socrates.ucsf.edu (John M. Troyer) Reply-To: LitProg@SHSU.edu, troyer@SOCRATES.UCSF.EDU Subject: dbx, #lines, and breakpoints Message-ID: Date: Wed, 16 Feb 1994 00:17:07 GMT To: LitProg@SHSU.EDU My dbx (Irix 4.0. ) refuses to set breakpoints that have #line directives that are before the #line directives of the first executable line of a module. This is obviously correct behavior on non-tangled source, but is a pain for a literate program. Is anybody else's dbx so clever, and is there any way to stop it from being that smart? (And is this a bug or a feature?) as an example, a breakpoint can only be set at lines 13 and 14 in the following. 'stop at 10' fails with 'no executable code found at line "test.nw":10' #line 2 "test.nw" main() { int i; #line 13 "test.nw" i = 1; i = 2; #line 10 "test.nw" i = 3; #line 7 "test.nw" } for debugging, I'm now inserting a dummy statement at the top of my file, but that's nasty. john troyer@cgl.ucsf.edu ================================================================================ Archive-Date: Wed, 16 Feb 1994 02:32:41 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 16 Feb 1994 09:02 +0000 (GMT) From: "Eric W. van Ammers, LUW, tel: (+31)8370-83356" Reply-To: LitProg@SHSU.edu, AMMERS@RCL.WAU.NL Subject: Re: LitProg <<>> GNUinfo To: LitProg@SHSU.edu Message-ID: <01H8Y4R4FBMOE96CUW@RCL.WAU.NL> Content-Transfer-Encoding: 7BIT Right now we are experimenting with literate programming in hypertext (Mosiac, HTML). We use CLiP as LP-tool, since CLiP was developed with this idea in mind 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: Wed, 16 Feb 1994 06:31:22 CST Sender: LP-Mgr@SHSU.edu From: maavl@cwi.nl (Marc van Leeuwen) Reply-To: LitProg@SHSU.edu, maavl@CWI.NL Subject: Re: Structures in WEBs (was Re: Numbering in CWEB) Message-ID: Date: Wed, 16 Feb 1994 10:52:02 GMT To: LitProg@SHSU.EDU In article <2jg0dt$llv@rs18.hrz.th-darmstadt.de>, schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) puts forward a few interesting points. |> Definition: TradWEB |> A TradWEB is a `traditional WEB system' that follows the model of |> Knuth's original WEB and does not change the structural elements |> available to the WEB programmer. E.g., the various CWEB flavors, |> SpiderWEB, MWEB, etc. |> |> |> My Hypothesis: |> Each WEB has two concurrent structures: |> The document structure and the refinement structure. |> |> |> THE DOCUMENT STRUCTURE |> |> It is used to present the software and the concepts behind its |> creation to the reader. If we don't give up with printed forms, the |> document creation is usually oriented along structures we know from |> the field of technical writing, i.e., it has (our should have ;-) |> sections, subsections, figures, references, index, etc. |> |> The basic documentation structure element of a TradWEBs is the |> `WEBsection'. This is *not* the same as the `section's mentioned |> above. (DONG! WAKE UP! This was an _important_ statement... ;-) A |> WEBsection is the basic unit that supports the usage of the technical |> writing paradigm ``say it twice,'' once in an informal, once more in |> a formal way. (According to Knuth, that's _the_ essence of Literate |> Programming, by the way.) I agree only partially with this. A WEB document is of course a very specific kind of document used for a special purpose, so it is not too surprising that it is not structured exactly like any run-of-the-mill technical paper. But given this special structure, the WEB sections are used in about the same way as sections are traditionally, or maybe more like subsections or even finer units (what is the usual name for document units that are typically about half a page or less?). The numbering structure is a bit unusual, but we are just coming to that: |> The importance of a WEBsection is often underestimated. A collegue of |> mine recently noted that he finds the output of the doc option for |> LaTeX styles not much readable. We analyzed it, and it happened that |> he simply did not find the start of such a (explanation, code) unit. |> It was not supported by the typography of the document. |> |> This is a basic principle I demand from all good LitProg tools: It |> must support the clear detection of these units. They are the units |> of argumentation and communication with the reader. Without them, the |> LitProg paradigm cannot be taken advantage of, at least not to its |> full extent. |> The support is like using bold face at the start of an item list |> but not within running text. (In my opinion, one can learn a lot about |> abstractions of presentations by reading typography textbooks.) How |> this is made actually, does not matter. |> |> In traditional WEB systems the typographic support for the detection |> is done by vertical space and a bold number. Most probably vertical |> space alone would not suffice for a distinction, since it can appear |> within a WEBsection as well (and does in real programs). Good points, I agree fully here. |> Other structural elements are *not* supported by TradWEBs. The |> so-called ``starred sections'' are not structural units, but |> specially tagged sections that will be noted in the table of |> contents. I.e., this is not a new element for the document structure. Why do you deny ``starred sections'' the qualification of structural units? In fact of course it is not so much the starred section by itself, but rather the whole range of sections until the next starred section that forms a unit. In my opinion these are much like chapters of the literate program: they start on a new page, get a bold title, which also goes to the running heads during the whole range of sections, and to the table of contents, all very traditional it seems to me (note that the _number_ of the starred section gets none of the special treatments its title gets, which agrees with the view that the first section itself is in no way special). Indeed, if you look in ``TeX, The Program'' or ``METAFONT, The Program'', you will find that these ranges of sections are called `parts', and get some even more special treatment, such as a separate level of numbering. |> |> But see below on a note about CWEB. One can cheat... :-) |> |> |> THE REFINEMENT STRUCTURE |> |> It is an acyclic graph where a subset of the nodes without |> predecessors are the start-nodes for minimal spanning trees that |> represent code for one file. Sounds too learned for me, but I can see what is intended. In any case you mean _directed_ acyclic graph. |> As with every acyclic graph one has the |> problem how to identify nodes in it. The traditional solution is |> attaching a unique number to each node (that can be used, for |> example, in an adjacency matrix). |> |> Traditional WEB systems use this canonical solution. Since at most |> one refinement can appear in a WEBsection, they attach a number with |> each WEBsection and use this number for the identification. Some |> numbers are unused, but this does not matter. |> |> ---------------- |> |> That one has numbered WEBsections and thereby numbered refinements in |> TradWEBs is not a hindrance per se to use higher-level sections (in |> the document sense) as well. In my opinion, a WEB language designer |> should *not* throw away this concept, the higher-level elements |> should be added! |> |> |> So, do we need to rewrite a TradWEB system -- e.g., CWEB -- to get |> this possibility, to get sections, subsections, figures, etc? No. -- |> Really, no. You mix document markup and refinement markup if you think |> this. Still I believe the higher-level elements you mention cannot be considered to all be of the same kind. For things like figures and references, that would comfortably fit into individual WEB sections, there is no real problem: you can just include them in the commentary part (in fact most of my literate programs end with a section headed by @* References and Index. followed by a list of references just like my math papers, albeit a bit shorter; it works just fine). To add structural units that _contain_ several WEB sections is quite a bit more difficult. |> From the very beginning, the LaTeX style for CWEB has provided the |> possibility to provide subsections, subsubsections, etc., to the |> user. (The hierarchy may have up to seven levels.) It has even |> documentation to this effect. But I didn't need it, and nobody |> contributed a style option that does realize this possibility. I don't suppose you mean subsections and subsubsections as subdivisions of WEB sections, although that would explain why nobody needed them. Otherwise, I would like some explanation of the basic mechanism, which would interest me even though I don't use the LaTeX style. As far as I can see, WEB is rather unfriendly when it comes to adding textual stuff that goes outside the WEB sections, e.g., chapter titles (at a level coarser than given by the starred sections), except at the very beginning where one can use the limbo section: the problem is that there is no place for TeX code between the code part of a previous section and the section number of the next one. Even at the beginning of the document I have found myself going through strange bends in order to get a large centered title above the first section (and on the same page); eventually I started with an unstarred section to prevent a page break, and fiddled a bit to get proper running heads before the first real starred section came along. To get similar document structure once the first section is given, I can see only one possibility: to redefine the macros `\M' and (particularly) `\N' used by CWEB to start a new (starred) section, to the extent that, possibly depending on an argument, they will output some things before they give the section number. As far as I can see the newest version of CWEB already goes a bit in this direction with its support for sections starting like `@**', although one still has to do some advanced macro writing to get the kinds of effects I indicated. I would be interested if anybody has other suggestions to handle these matters conveniently. Marc van Leeuwen CWI, Amsterdam ================================================================================ Archive-Date: Wed, 16 Feb 1994 13:18:39 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 16 Feb 94 14:10:56 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, troyer@socrates.ucsf.edu Subject: Re: dbx, #lines, and breakpoints Message-ID: John Troyer writes: > My dbx (Irix 4.0. ) refuses to set breakpoints that have #line > directives that are before the #line directives of the first executable line > of a module. > > This is obviously correct behavior on non-tangled source, but is a pain > for a literate program. Is anybody else's dbx so clever, and is there any > way to stop it from being that smart? (And is this a bug or a feature?) IMHO, this is a dbx bug. Although the #line directive is traditionally only used by the C preprocessor wrt #include's, it is certainly legal to sprinkle them around your own code, even without help from CTANGLE. The example you gave would be perfectly legal C code (although a bit strange), and your dbx should not choke on perfectly legal constructions. Question: What will your dbx do with the following function: int f(int i) { #include "inci.h" #include "inci.h" #include "inci.h" return i; } Where the include file inci.h contains the solitary line i++; This will produce the same kind of #line problems that CTANGLE does (note: some non-ANSI compliant compilers require the # in the first column). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | Look, I made a hat... Kean College of New Jersey | Where there never was a hat... Union, NJ 07083 | USA | -- Stephen Sondheim | "Sunday in the Park with George" (1984) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 17 Feb 1994 02:33:34 CST Sender: LP-Mgr@SHSU.edu From: rdssw@cse.rmit.EDU.AU (Simon Wail) Reply-To: LitProg@SHSU.edu, rdssw@CSE.RMIT.EDU.AU Subject: Looking for info on PCTE Date: 17 Feb 1994 06:49:16 GMT Message-ID: <2jv41c$7cl@aggedor.rmit.EDU.AU> Keywords: PCTE development environment To: LitProg@SHSU.EDU I've just been reading an article on a development environment called HyperWeb in which they mention the Portable Common Tools Environment (PCTE), which is an ECMA (European Computer Manufacturers Association) standard #149. I was wondering if there's any ftp-able or net-available copy of the standard. Any info greatly appreciated. -- rdssw@chudich.cse.rmit.edu.au -- AARNET: sw@goanna.cs.rmit.oz.au Nature is blind. We are merely UUCP: ...uunet!munnari!goanna!sw short-sighted. That's an improvement. - Henry Spencer ================================================================================ Archive-Date: Thu, 17 Feb 1994 14:25:58 CST Sender: LP-Mgr@SHSU.edu From: jacojn@inet.uni-c.dk (Jacob Nielsen) Reply-To: LitProg@SHSU.edu, jacojn@INET.UNI-C.DK Subject: Re: emacs mode for noweb needed Date: Wed, 16 Feb 1994 13:49:06 GMT Message-ID: <76140654613860@inet.uni-c.dk> To: LitProg@SHSU.EDU Hi. I`ve followed the discussion on an emacs mode for doing literate programming in noweb. I use nuweb, but the main point is that there is a emacs mode for nuweb, that allows you to edit the code parts in a seperate buffer using c/c++/lisp or whatever mode you have. The code is not that hard to follow (being fairly iliterate on elisp myself, that`s a compliment to the author :) This approch works very well (IMHO) The only requirement is that you are using emacs version 19.xx It`s included with nuweb (since I can`t remember the ftp-location at the moment -- anyone ? -- anyone interested can email me for a copy) BTW, the nuweb-mode works together with the AUC-TeX-mode but I allso have a changed version that doesn`t rely on AUC-TeX, so no need to dispair if AUC-TeX is not installed at your site. Hope this helps, Jacob -- Jacob Nielsen Email: jacojn@inet.uni-c.dk (my private account) or bc898574@bbar.dth.dk (my account at the university) ================================================================================ Archive-Date: Thu, 17 Feb 1994 17:37:49 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: emacs mode for noweb needed Message-ID: Date: Thu, 17 Feb 1994 20:35:50 GMT To: LitProg@SHSU.EDU In article <76140654613860@inet.uni-c.dk>, Jacob Nielsen wrote: >there is a emacs mode for nuweb, that allows you to edit the code >parts in a seperate buffer using c/c++/lisp or whatever mode you have. ^^^^^^^^^^^^^^^^^^^^ This scheme strikes me as a loss. I want the documentation parts right there in my face (in the same buffer as the code) so I'm likely to keep them consistent. Documentation together with code, even when editing, is one of the strengths of the literate-programming paradigm. ================================================================================ Archive-Date: Thu, 17 Feb 1994 17:38:04 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: whence the noweb syntax (was: emacs mode for noweb wanted) Message-ID: Date: Thu, 17 Feb 1994 20:33:20 GMT To: LitProg@SHSU.EDU In article <2jr1u3$7ru@rs18.hrz.th-darmstadt.de>, Joachim Schrod wrote: >[noweb is harder to recognize because it uses heuristics] I don't understand what this statement means. There's a perfectly precise algorithm for identifying noweb markup... >[and because the delimiters can be used meaningfully in other contexts] An interesting point. I never considered the advantages of restricting delimiters to be permitted only in one context. Obviously it would much simplify the construction of an emacs mode. It's worth mentioning that noweb comes with a separable parser that reads all the markup, so if you want to write a batch tool that does something amusing, it's easy. Sadly, this helps nobody edit. >I've never understood why <<...>> is so much better than @<...@>, >especially as it's well known that the former construct appears quite >often in many languages [not only in C].) For what it's worth, this was my rationale for abandoning the @<...@> standard: symmetry: <<...>> is a palindrome, appropriate since << and >> are brackets. I considered but rejected @<...>@ because of ergonomics: I have difficulty typing @<...@>; I find <<...>> much easier typography: <<...>> seems to catch the eye better, perhaps because it leaves lots of white space. This is important when editing the source. I chose [[...]] over |...| for similar reasons; it's important to be able to spot these things when editing. (Plus it's easier to detect a missing delimiter when opening and closing delimiters don't match.) In article <2jr81b$8oe@urmel.informatik.rwth-aachen.de>, David Kastrup wrote: >The noweb solution, obviously, has something to do with being matched >by awk, where you can somewhat reasonably do this on a line by line >base the way noweb does. Interesting exegesis, but actually it had nothing to do with awk. Human beings are very good at perceiving line breaks and indentation as significant, and I wanted to take advantage of that. I ended up by not using indentation to terminate code chunks, however, because I decided the rules for determining the refinement would be too complex. (You will notice, however, that noweave uses indentation to mark the scope of code chunks.) ================================================================================ Archive-Date: Thu, 17 Feb 1994 20:40:27 CST Sender: LP-Mgr@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Reply-To: LitProg@SHSU.edu, coates@KELVIN.PHYSICS.UQ.OZ.AU Subject: Re: emacs mode for noweb needed Date: 18 Feb 94 11:20:08 Message-ID: To: LitProg@SHSU.EDU In article norman@flaubert.bellcore.com (Norman Ramsey) writes: In article <76140654613860@inet.uni-c.dk>, Jacob Nielsen wrote: >there is a emacs mode for nuweb, that allows you to edit the code >parts in a seperate buffer using c/c++/lisp or whatever mode you have. ^^^^^^^^^^^^^^^^^^^^ This scheme strikes me as a loss. I want the documentation parts right there in my face (in the same buffer as the code) so I'm likely to keep them consistent. Documentation together with code, even when editing, is one of the strengths of the literate-programming paradigm. Myself, I have just started working on an emacs mode for FunnelWeb. At this (rather early) stage, if you are just linearly typing, as you type @{ to start a code fragment, it prompts you for a major mode, allowing normal name completion from all the possible modes, and using the last chosen mode as a default. When you type @} to finish a code fragment, it returns the mode to the chosen (AUC/La)TeX mode. I still have a lot of work to do detecting movement in and out of code sections, but I'll try to get to that soon. Anyone have any ideas/suggestion? 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: Fri, 18 Feb 1994 03:29:27 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 18 Feb 94 10:26:39 +0100 From: ddw2@sunbim.be (Dominique de Waleffe) Reply-To: LitProg@SHSU.edu, ddw2@SUNBIM.BE Message-ID: <9402180926.AA09027@amadeus.sunbim.be> To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM CC: LitProg@SHSU.EDU Subject: Re: emacs mode for noweb needed References: >>> "Norman" == Norman Ramsey writes: Norman> In article <76140654613860@inet.uni-c.dk>, Norman> Jacob Nielsen wrote: >> there is a emacs mode for nuweb, that allows you to edit the code >> parts in a seperate buffer using c/c++/lisp or whatever mode you have. Norman> ^^^^^^^^^^^^^^^^^^^^ Norman> This scheme strikes me as a loss. I want the documentation parts Norman> right there in my face (in the same buffer as the code) so I'm likely Norman> to keep them consistent. Documentation together with code, even when Norman> editing, is one of the strengths of the literate-programming paradigm. To be more precise than Jacob, what the mode for nuweb does it that it takes a scrap contents into a separate buffer just for editing that scrap then puts it back in place in the document. Which you still see. Thus, Norman, I don't think that is such a loss. That allows to use all the specific facilities of C/Lisp/Makefile etc modes for editing the portions of code. But globally, one is editing the nuweb file in a LateX-mode buffer with the whole thing available. One of these days when my project leaves me a few hours free, I'll put some more work into this mode. [ I know I've been saying this for months...] Dominique ============================================== Dominique de Waleffe ddw@sunbim.be BIM sa Chaussee de Louvain, 510 Tel: +32 2 719 26 14 B-1930 Zaventem Fax: +32 2 725 47 83 Belgium ================================================================================ Archive-Date: Fri, 18 Feb 1994 10:26:42 CST Sender: LP-Mgr@SHSU.edu From: thompson@sun1.coe.ttu.edu Subject: comp.programming.literate FAQ Date: 18 Feb 1994 15:20:42 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/01/06 Version: 1.1.2 Welcome to the Literate Programming Frequently Asked Questions List ------------------------------------------------------------------- This version was created Wednesday - January 5, 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. Special Note ============ This release of the Literate Programming FAQ represents a significant change from the previous version. As a result, errors may have crept in. Programmers/authors who have entries in this document should check for consistency with their current release. If changes to this document are required to conform entries to current status, please send me email and include such changes. Thank you! -=d = ====================================================================== * 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.literate.programming 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 - lit2x - Literate Programmer's Workshop (LPW) - MapleWEB - MWEB (Schrod/Detig) - MWEB (Sewell) - noweb - nuweb - RWEB - SchemeWEB - Spidery WEB - WEB - WinWordWEB * Are there other tools I should know about? - C2LaTeX - c2man - cnoweb - ProTeX - TIE - nuweb.el - 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 * 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 (FILESERV@SHSU.BITNET) 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 (FILESERV@SHSU.BITNET), and include the following text in a one line message: SENDME FAQ.FWEB The file server will send the current version of the file via email. The FWEB FAQ exists in various formats, including HyperText (see other resources below). In Europe, the complete distribution can also be obtained from ftp.desy.de [131.169.10.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). = ====================================================================== * 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 (or LISTSERV@SHSU.BITNET), 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: pub/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.Uni-Stuttgart.DE 129.69.8.13 soft/tex Univ. Stuttgart/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. = ====================================================================== * 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 to be posted soon (look at CTAN). 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 Hardware: Unix, VMS, and DOS platforms Languages: C, C++, Fortran-77, Fortran-90, Ratfor, TeX, and LaTeX. Formatter: Plain TeX and LaTeX. Availability: Anonymous ftp from: lyman.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). It runs on most platforms: VMS, PC, UNIX, and pretty much anything that the GNU C compiler (GCC) is supported for. Support: Bug reports to krommes@princeton.edu - ---------------------------------------------------------------------- - 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: Unknown Formatter: Unknown Availability: Anonymous ftp from: LPA:/machines/mac CTAN:/web/lpw ftp.apple.com:/pub/literate.prog Readme: Unknown 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 MPW: it prepares raw source text for the MPW compilers, accepts MPW error messages, and shows them in the context of the original documents. Automatic indexing and hypertext features allow for easy access to both source text and documentation. Support: Shareware, so I assume that the authors will support their product. - ---------------------------------------------------------------------- - 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.5 Hardware: Unix and DOS platforms. Languages: All programming languages. Formatter: Plain TeX and LaTeX formatters. Availability: Anonymous ftp from: csservices.princeton.edu:/pub/noweb.shar.Z bellcore.com:/pub/norman/noweb.shar.Z CTAN:/web/independent/noweb LPA:/independent DOS version in LPA:/machines/ms-dos 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, and (!) MSDOS. 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 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 - ---------------------------------------------------------------------- - 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: Unknown 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: nexus.yorku.ca:/pub/scheme/utl LPA:/lisp 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 or DOS filter that translates SchemeWEB source into LaTeX source or Lisp source. Lisp code is formatted in typewriter type font and the comments are passed to LaTeX unchanged. Support: Bug reports to ramsdell@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. - ---------------------------------------------------------------------- - 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. - ---------------------------------------------------------------------- - ProTeX -------- Developer: Unknown Version: Unknown Hardware: Unknown Languages: Unknown Formatter: TeX Availability: Anonymous ftp from: LPA:/independent Readme: Unknown Description: Unknown Support: Unknown - ---------------------------------------------------------------------- - TIE ----- Developer: Unknown Version: Unknown Hardware: Unknown Availability: Anonymous ftp from: LPA:/Tools Readme: Unknown Description: This software merges change files. Support: Unknown - ---------------------------------------------------------------------- There are other tools useful to literate programmers. These generally revolve around the editing process. - nuweb.el ---------- Developer: D. deWaffelette Version: Unknown Availability: Unknown Description: This is a major mode (whatever that is) for Emacs that supports use of nuweb. [DBT--I can't help it, I'm not an Emacs user. Don't flame me!] Support: Unknown. - ---------------------------------------------------------------------- - Web mode ---------- Developer: Bart Childs Version: Unknown Availability: Unknown Description: This is an Emacs extension for working with FWEB, CWEB, and WEB files. 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 LISTSERV@INFO.CERN.CH by sending a message containing the command HELP. Instructions will be returned by email. For literate programming documents, you can try anonymous ftp to ftp.desy.de [131.169.10.115] and attach to directory: /pub/userWWW/projects/Announce - ---------------------------------------------------------------------- - 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 (LISTSERV@SHSU.BITNET), 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 anonymous FTP. 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. Tuition: Students should agree to work for Global Network Academy in some capacity. This may include agreeing to serve as a consultant next term, donating computing resources which belong to them, helping with programming, etc. 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 January 94. [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 January 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 two examples written in CWEB. They are available via anonymous ftp from: bart.kean.edu:~/pub/leew/samples.LP = ====================================================================== * 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. 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 be evolving over the next few months. 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. History: First release: Fri 10/15/1993 -- Yep, I finally did it! Thu 10/21/93 -- Minor change to ftp instructions. Fri 10/22/93 -- Minor change to stuttgart ip and fweb.faq version. Made reader-recommended changes, lots of re- organization, and added a few tools. Mon 11/01/93 -- Corrected typo in address. Thu 11/11/93 -- Minor change to www. Fri 11/12/93 -- Fixed CLiP entry, spiderweb entry. Wed 01/05/94 -- Lots of minor updates. Reformatting of tool entries deserves a minor revision update. Thu 01/06/94 -- Added Schrod's pointers for noweb, spideryweb, WinWordWeb. = End of File ========================================================== ================================================================================ Archive-Date: Fri, 18 Feb 1994 13:17:52 CST Sender: LP-Mgr@SHSU.edu From: u8023001@cc.nctu.edu.tw (William Yeh) Reply-To: LitProg@SHSU.edu, u8023001@CC.NCTU.EDU.TW Subject: indentation of FTANGLE output Date: 18 Feb 1994 16:27:30 GMT Message-ID: <2k2q9i$8ov@ccnews.nctu.edu.tw> To: LitProg@SHSU.EDU I'm new to FWEB. I find woven files look nice, while TANGLEd not. FTANGLE always destroys my indentation of source codes. Is there a way to preserve my indentation of the program parts inside a FWEB file, so that the output of FTANGLE will just be like what I've written in FWEB? I don't want to use a source beautifier on FTANGLE output. -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- William Yeh | E-mail address: | u8023001@cc.nctu.edu.tw Dept. of Computer & Info. Science | is80001@cis.nctu.edu.tw National Chiao-Tung University, | william.yeh@dds.com.tw Hsinchu, Taiwan, R.O.C. | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ================================================================================ Archive-Date: Fri, 18 Feb 1994 17:00:05 CST Sender: LP-Mgr@SHSU.edu From: przemek@rrdbartok.nist.gov (Przemek Klosowski) Reply-To: LitProg@SHSU.edu, przemek@RRDBARTOK.NIST.GOV Subject: Re: emacs mode for noweb needed Message-ID: Date: Fri, 18 Feb 1994 20:26:34 GMT To: LitProg@SHSU.EDU In article norman@flaubert.bellcore.com (Norman Ramsey) writes: >there is a emacs mode for nuweb, that allows you to edit the code >parts in a seperate buffer using c/c++/lisp or whatever mode you have. ^^^^^^^^^^^^^^^^^^^^ This scheme strikes me as a loss. I want the documentation parts right there in my face (in the same buffer as the code) so I'm likely to keep them consistent. Documentation together with code, even when editing, is one of the strengths of the literate-programming paradigm. In practice it is not such problem because the elisp code splits the window and displays the code in the bottom part. If your code is over the regulatory 12 lines, and the documentation part is similarly long, it actually is a win, because you get to scroll around the code without scrolling the text out of sight. -- przemek klosowski (przemek@rrdstrad.nist.gov) Reactor Division (bldg. 235), E111 National Institute of Standards and Technology Gaithersburg, MD 20899, USA (301) 975 6249 tel (301) 921 9847 fax ================================================================================ Archive-Date: Fri, 18 Feb 1994 19:42:44 CST Sender: LP-Mgr@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Subject: Where are AUC-TeX sources? Date: 19 Feb 94 10:36:31 Message-ID: Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au To: LitProg@SHSU.EDU I have been trying to FTP a copy of AUC-TeX, but each time I keep getting pre-compiled .elc files, when I would prefer the .el sources. Can anyone tell me where I should be looking? My poor archie server just doesn't seem to know. Thanks in advance, 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: Fri, 18 Feb 1994 19:42:57 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 18 Feb 94 20:33:16 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, norman@flaubert.bellcore.com Subject: Re: whence the noweb syntax (was: emacs mode for noweb wanted) Message-ID: Norman Ramsey writes (in response to Joachim Schrod's comments): > >I've never understood why <<...>> is so much better than @<...@>, > >especially as it's well known that the former construct appears quite > >often in many languages [not only in C].) > > For what it's worth, this was my rationale for abandoning the @<...@> > standard: > symmetry: <<...>> is a palindrome, appropriate since << and >> are > brackets. I considered but rejected @<...>@ because of > ergonomics: I have difficulty typing @<...@>; I find <<...>> much easier > typography: <<...>> seems to catch the eye better, perhaps because > it leaves lots of white space. This is important when > editing the source. I chose [[...]] over |...| for > similar reasons; it's important to be able to spot > these things when editing. (Plus it's easier to detect > a missing delimiter when opening and closing delimiters > don't match.) As a sidelight here, I've been using literate programming notation in my introductory programming classes to help demonstrate step-wise refinement. I tell the students that the English text inside the <<>> brackets are ``placeholders'' for bits of code that we'll write later. When I actually write the code chunks, I use the <<>>= notation. I chose to use <<>> instead of @<@> because it seemed easier to explain to a bunch of novices. I could just hear the crazy questions about the at signs and what they were used for. On the other hand, I've discovered that when I write <<...>> on the board, no one bats an eye -- they're obviously brackets (whereas @< and @> are only brackets to the initiated). This is the second semester I've been trying this experiment, and it seems to be succeeding. Students have no trouble ``tangling'' the code themselves, and their notes now contain information about the *process* of stepwise refinement, rather than just a completed program or a bunch of code fragments with arrows pointing every which way (to show where in the program the code belongs). On the other hand, they say that ``all educational experiments are doomed to succeed.'' -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | Look, I made a hat... Kean College of New Jersey | Where there never was a hat... Union, NJ 07083 | USA | -- Stephen Sondheim | "Sunday in the Park with George" (1984) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Fri, 18 Feb 1994 20:45:03 CST Sender: LP-Mgr@SHSU.edu From: dalton@mantle.Geop.UBC.Ca (David Dalton) Reply-To: LitProg@SHSU.edu, dalton@MANTLE.GEOP.UBC.CA Subject: Re: Where are AUC-TeX sources? Date: 19 Feb 1994 01:14:08 GMT Message-ID: To: LitProg@SHSU.EDU iesd.auc.dk , although there may be closer sites. -- David Dalton ------------------------------ ------ Dept. of Geophysics & Astronomy, (604) 822-2267 2219 Main Mall, University of British Columbia fax 822-6047 Vancouver, Canada V6T 1Z4 home 733-1303 ================================================================================ Archive-Date: Sat, 19 Feb 1994 10:27:29 CST Sender: LP-Mgr@SHSU.edu From: lynbech@daimi.aau.dk (Christian Lynbech) Reply-To: LitProg@SHSU.edu, lynbech@DAIMI.AAU.DK Subject: Re: emacs mode for noweb wanted Date: 16 Feb 1994 12:04:48 GMT Message-ID: <2jt250$qpf@belfort.daimi.aau.dk> To: LitProg@SHSU.EDU Thus spake norman@flash.bellcore.com (Norman Ramsey): >In article , Karel Zuiderveld wrote: >>I'm doing most of my programming in noweb. >> >>So if I write << text >>= >> the editor switches to c++ mode and >>when typing @ at the start of the line emacs switches to latex mode. >>Has someone out there written (or can somebody write) a hook that >>allows for automatic setting of modes? >Kostas OIkonomou has done something like this for lucid emacs. f I >ever get a chance to install lucid and test it, I'll include it in the >noweb distribution. MEanwhile you might want to check with Kostas; I >think his email address is ko@surya.ho.att.com Someone else did a web mode (can't remember, but I think it was for nuweb). I never got round to testing it, but the idea was that you would edit each chunk in a separate buffer (just like mail and RCS logs), using some scheme like the usual `-*- c -*-' mode setting feature, for setting the major mode of the buffer, maintaining the original major mode for the web buffer. It was posted to the net, so somebody probably knows where it can be found. My own approach has been to overload the indentation function. I have made a small script that allows me to use environment syntax: \begin{scrap}{This defines foobar} int foobar() { } \end{scrap} Then I can make a small function that checks whether it is inside such an environment or not, using either one of the appropriate indentation functions. This scheme can be more or less sophisticated, and uses that you must have an indentation function that can work locally. This seem to be the case of the ordinary ones such as lisp and c, but you may have to rip the indentation function from some major modes and make a minor mode out of it. But it can be done, and I havbe found ot works reasonably. I can post some of the interesting functions, if anybody cares to see. ------------------------------------------------------------------------------ Christian Lynbech | Hit the philistines three times over the office: R0.33 (phone: 3217) | head with the Elisp reference manual. email: lynbech@daimi.aau.dk | - petonic@hal.com (Michael A. Petonic) ------------------------------------------------------------------------------ ================================================================================ Archive-Date: Sun, 20 Feb 1994 09:59:57 CST Sender: LP-Mgr@SHSU.edu From: ceblair@ux1.cso.uiuc.edu (Charles Blair) Reply-To: LitProg@SHSU.edu, ceblair@UX1.CSO.UIUC.EDU Subject: Stanford GraphBase help wanted Date: 20 Feb 1994 15:38:28 GMT Message-ID: <2k805k$759@vixen.cso.uiuc.edu> To: LitProg@SHSU.EDU I am using the mcc version of linux, which includes a not-too- recent version of the gcc compiler. I took the tar.z file and expanded it into the large collection of files, gb_basic.w, etc. (minor thing: there was a file +TheStanford+Graph+Base of size zero, which puzzled me) I edited the Makefile and typed make tests. A warning was generated early in the sequence of compilations about a comparison always being zero due to the range of values. After several compilations, things came to a halt with a message like ``ERROR: test_io undefined.'' I wasn't sure whether the line about string.h or strings.h needed to be un-commented, so I tried it both ways with the same result. I also tried both shortcut and non-sc choices for the Makefile. I hope somebody with similar experiences can enlighten me. Thank you, Charles Blair ================================================================================ Archive-Date: Sun, 20 Feb 1994 10:34:41 CST Sender: LP-Mgr@SHSU.edu Date: Sun, 20 Feb 1994 11:34:16 -0500 From: ejb@world.std.com (ed j baker) Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Message-ID: <199402201634.AA22863@world.std.com> To: LitProg@SHSU.edu, ceblair@UX1.CSO.UIUC.EDU Subject: Re: Stanford GraphBase help wanted ================================================================================ Archive-Date: Mon, 21 Feb 1994 18:57:00 CST Sender: LP-Mgr@SHSU.edu From: simmdan@kenya.isu.edu (Daniel Simmons) Reply-To: LitProg@SHSU.edu, simmdan@KENYA.ISU.EDU Subject: funnelweb-mode.el was Re: emacs mode for noweb needed Date: 21 Feb 1994 12:32:48 -0700 Message-ID: <2kb290$341@kenya.isu.edu> To: LitProg@SHSU.EDU In article <76140654613860@inet.uni-c.dk>, Jacob Nielsen wrote: >I`ve followed the discussion on an emacs mode for doing literate >programming in noweb. I use nuweb, but the main point is >that there is a emacs mode for nuweb, that allows you to edit the code >parts in a seperate buffer using c/c++/lisp or whatever mode you have. >The code is not that hard to follow (being fairly iliterate on elisp myself, >that`s a compliment to the author :) > >This approch works very well (IMHO) The only requirement is that you are >using emacs version 19.xx Howdy folks! 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. At any rate, here's the quick hack. Let me know what you think, if you have improvements or whatever. BTW, I have removed dependencies on AUCTeX (mostly because AUCTeX was causing my emacs to lock up--or at least to go into some kind of processing loop that took longer than I wanted to wait around to see what happened-- whenever I tried to load a copy of the tex output produced by Funnelweb). Danny ;;;------------------------------------------------------------------- ;;; funnelweb-mode.el --- major mode to edit funnelweb files ;;; -- modifications by Daniel Simmons (simmdan@isu.edu) 2/19/94 ;;; (based on nuweb.el --- major mode to edit nuweb files with AucTex) ;;; ;;; $Id: nuweb.el,v 1.15 1993/08/13 06:59:35 ddw2 Exp ddw2 $ ;;; ;;; Author: Dominique de Waleffe (ddw@sunbim.be) ;;; Maintainer: Dominique de Waleffe (ddw@sunbim.be) ;;; ;;; Copyright (C) BIM sa, Everberg, Belgium 1993 ;;; ;;; This funnelweb support package is free software, just as GNU Emacs; you ;;; can redistribute it and/or modify it under the terms of the GNU ;;; General Public License as published by ;the Free Software Foundation; ;;; either version 2, or (at your option) any later version. ;; GNU Emacs is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;; ;;; Bug reports , suggestions are welcome. I'll see if I can do anything in ;;; my copious spare time :-) ;;; DOCUMENTATION (short) there is no long version yet:-) ;;; To install: ;;; ; if you want to activate the mode for .fw files ;;; (push auto-mode-alist '( "\\.fw" . funnelweb-mode)) ;;; ; To load it ;;; (require 'funnelweb) ;;; ;;; When called, funnelweb-mode calls tex-mode and adds the following ;;; bindings: ;;; ;;; NOTE: When changing to funnelweb from nuweb, I modified the bindings ;;; inside the source buffer to ones that seemed more familiar to me ;;; (they work like mh-mode for editting a letter): ;;; C-c M-k --> C-c C-q ;;; ;;; C-c C-z funnelweb-edit-this-macro ;;; Edit the macro point is on in its own buffer *Source* ;;; put into the mode specified by the buffer local variable ;;; funnelweb-source-mode (defaults "emacs-lisp") or into the ;;; mode specified after @{ (on same line) the macro body as ;;; -*-mode-name-*- ;;; The *Source* buffer is then put into Funnelweb minor mode ;;; which adds two bindings: ;;; C-c C-z funnelweb-install-this-macro ;;; Which takes the *Source* buffer contents and puts ;;; it back into the web buffer in place of the old ;;; version of the macro. ;;; C-c C-q funnelweb-kill-this-macro ;;; Which restores the old macro, ignoring changes ;;; made. ;;; The original buffer is put in read-only mode until you ;;; call one of the two above functions or kill the ;;; *Source* buffer. ;;; C-c @ funnelweb-insert-macro ;;; With no argument: inserts an empty macro template at ;;; point. ;;; With an argument: prompt for macro type (oDdD), macro ;;; name and language mode. A new macro is inserted and ;;; edited as if funnelweb-edit-this-macro had been called. ;;; ;;; CUSTOMISATION: ;;; ;;; Change language mode for macros ;;; (setq-default funnelweb-source-mode "mode-name-function(without -mode)") ;;; (setq-default funnelweb-source-mode "prolog") ;default for all buffers ;;; or (setq funnelweb-source-mode "emacs-lisp") ; current one only ;;; ;;; Support for funnelweb comments @% (I have patches to funnelweb for that) ;;; (setq funnelweb-comment-leader "@%") ;;; PROBLEMS: SOLUTION: ;;; no-longer -) Requires AucTex Get it from /iesd.auc.dk: ;;; -) Relies on FSF Emacs 19 Upgrade or make the package ;;; back-compatible ;;; -) Functions are not well I should have used funnelweb for this ;;; documented ;;; -) Bindings may not suit Change as you like ;;; every one ;;; ;;; WISH LIST: ;;; -) movement through funnelweb items (outline? tags?) ;;; -) menu? ;;; ;;; CONTRIBUTIONS: ;;; Thorbj{\o}rn Andersen suggested the use of C-c C-z ;;; I used it to get into the *source* and as normal exit key. ;;; Also suggested the simple (no prompts) insertion of a macro ;;; template, and other things. ;;; ;;; AVAILABILITY: ;;; Should be available SHSU archives ;;; or from ftp.imada.ou.dk (thanks to ;;; or from by email from me ;;; (defvar funnelweb-mode-map nil) (defun funnelweb-mode () "Major mode to edit funnelweb source files" (interactive) (tex-mode) (setq mode-name "funnelweb") ;; Make sure the funnelweb map exist (cond ((or (not (boundp 'funnelweb-mode-map)) (null funnelweb-mode-map)) ;; this keymap inherit the current local bindings (setq funnelweb-mode-map (cons 'keymap tex-mode-map)) (define-key funnelweb-mode-map "\C-c\C-z" 'funnelweb-edit-this-macro) (define-key funnelweb-mode-map "\C-c@" 'funnelweb-insert-macro))) ;; make sure we have our own keymap ;; we use a copy for in buffer so that outline mode is ;; properly initialized (use-local-map (copy-keymap funnelweb-mode-map)) (make-local-variable 'funnelweb-source-mode)) (defvar funnelweb-comment-leader "@!") (defvar funnelweb-last-macro-title "") ; !!! look in above function (defun funnelweb-insert-macro(arg) "Insert a macro at current cursor location. With an argument, prompts for the type, name and editing mode then directly enter the *Source* buffer. If no argument given, simply inserts a template for a macro" (interactive "P") (if arg (apply 'funnelweb-insert-macro-intern (list (concat (read-from-minibuffer "Type of macro: " "$") "@<") (concat (setq funnelweb-last-macro-title (read-from-minibuffer "Macro title:" funnelweb-last-macro-title)) "@>==") (read-from-minibuffer "Mode name:" funnelweb-source-mode) ;; edit if interactive t)) ;; first, shadow the variable use for default value (let (funnelweb-last-macro-title) (save-excursion (fun)) (forward-char 1)))) (defun funnelweb-insert-macro-intern(type title modename editp) (save-excursion (insert (format "@%s%s@{@- %s%s\n\n@}\n" type title funnelweb-comment-leader (if (equal modename funnelweb-source-mode) "" (concat " -*-" modename "-*-"))))) (cond ( editp (forward-line 1) (funnelweb-edit-this-macro)))) ; only one of those in effect.... (defvar *funnelweb-last-macro-pos* nil) (defvar *funnelweb-last-macro-begin* nil) (defvar *funnelweb-last-macro-end* nil) (defun funnelweb-edit-this-macro () (interactive) (cond((or (null *funnelweb-last-macro-pos*) (y-or-n-p "You did not finish editing the previous macro. Continue ")) (setq *funnelweb-last-macro-pos* (point-marker)) (let* ((begin (and (re-search-backward "@[$O{]" nil t) (point))) (offset (- (marker-position *funnelweb-last-macro-pos*) begin)) (end (and (search-forward "@}" nil t) (>= (point) (marker-position *funnelweb-last-macro-pos*)) (point))) (text "") (source-mode funnelweb-source-mode)) (cond ( (and begin end) (setq *funnelweb-last-macro-begin* begin) (setq *funnelweb-last-macro-end* end) (setq text (buffer-substring begin end)) (setq buffer-read-only t) (switch-to-buffer-other-window "*Source*") (erase-buffer) (insert text) (goto-char (point-min)) ;; look for -*-modename-*- behind @{ (search-forward "@{") (if (looking-at ".*-\\*-[ \t]*\\(.*\\)[ \t]*-\\*-.*$") (setq source-mode (buffer-substring (match-beginning 1) (match-end 1)))) (funcall (intern (concat (downcase source-mode) "-mode"))) ; go to same relative position (goto-char (+ (point-min) offset)) ;; clean up when killing the *source* buffer (make-local-variable 'kill-buffer-hook) (add-hook 'kill-buffer-hook (function (lambda() (save-excursion (funnelweb-kill-this-macro))))) (funnelweb-minor-mode 1) (message "C-c C-z to use source, C-c C-q to abort")) (t (goto-char (marker-position *funnelweb-last-macro-pos*)) (setq *funnelweb-last-macro-pos* nil) (error "Could not identify macro"))))) (t (message "Use C-x b and select buffer *Source* to finish")))) (defvar funnelweb-minor-mode-map nil) (cond ((or (not (boundp 'funnelweb-minor-mode-map)) (null funnelweb-minor-mode-map)) (setq funnelweb-minor-mode-map (make-sparse-keymap)) (define-key funnelweb-minor-mode-map "\C-c\C-z" 'funnelweb-install-this-macro) (define-key funnelweb-minor-mode-map "\C-c\C-q" 'funnelweb-kill-this-macro) )) (defvar funnelweb-minor-mode nil) (make-variable-buffer-local 'funnelweb-minor-mode) (or (assq 'funnelweb-minor-mode minor-mode-alist) (setq minor-mode-alist (cons '(funnelweb-minor-mode " Funnelweb") minor-mode-alist))) (or (assq 'funnelweb-minor-mode minor-mode-map-alist) (setq minor-mode-map-alist (cons (cons 'funnelweb-minor-mode funnelweb-minor-mode-map) minor-mode-map-alist))) ;;; The function is there but has nothing to do (thanks to Emacs 19 ;;; function for minor mode bindings ;;; It is here if anyone cares to make it Emacs 18 compatible. (defun funnelweb-minor-mode (arg) (interactive "P") (setq funnelweb-minor-mode (if (null arg) (not funnelweb-minor-mode) (> (prefix-numeric-value arg) 0))) (cond (funnelweb-minor-mode ;; turn it on ;; Nothin to do yet... t ) (t ;; turn it off ;; Nothin to do yet... nil ))) (defun funnelweb-install-this-macro() (interactive) (let ((offset (point))) (funnelweb-back-to-pos) (delete-region *funnelweb-last-macro-begin* *funnelweb-last-macro-end*) (insert-buffer "*Source*") (forward-char (- offset 1)) (setq *funnelweb-last-macro-pos* nil))) (defun funnelweb-kill-this-macro() (interactive) (funnelweb-back-to-pos) (setq *funnelweb-last-macro-pos* nil)) (defun funnelweb-back-to-pos() (setq kill-buffer-hook nil) (switch-to-buffer (marker-buffer *funnelweb-last-macro-pos*)) (setq buffer-read-only nil) (delete-other-windows) (goto-char (marker-position *funnelweb-last-macro-pos*)) (recenter)) (setq funnelweb-source-mode "c") (provide 'funnelweb) -- Daniel Simmons electronic mail : simmdan@isu.edu Idaho State University voice mail : (208) 236-3199 Computer Center snail mail : Box 8037, Pocatello ================================================================================ Archive-Date: Tue, 22 Feb 1994 04:47:57 CST Sender: LP-Mgr@SHSU.edu Date: Tue, 22 Feb 1994 01:03:51 -0500 (EST) From: j_mcarthur@BIX.com Reply-To: LitProg@SHSU.edu, j_mcarthur@BIX.COM Subject: BETA Testers Wanted To: LitProg@SHSU.edu CC: info-tex@shsu.edu Message-ID: <9402220103.memo.14272@BIX.com> Content-Transfer-Encoding: 7BIT I need some beta testers for a pretty-printer for TeX. LitTeX is a program and a set of macros to typeset TeX source code. I was unhappy with the way that tgrind, fweb, and noweb process TeX files. So I wrote my own. Current features are: Major and minor sections. Automatic generation of table of contents Automatic generation of index. Index is of all control sequences in the file. Option of specifying control sequences to be left out of the index. Placement of rules: hairline, single, double. rules are supressed prior to major and minor sections as well as at the top of a page. Limited understanding of \catcode changes. This means that if @ (or any other character) if made a letter, control sequences with the specified character will be included in the index. Lines may be omited from the typeset document. This is useful for things like version control statements. LitTeX, the program, runs under MS-Dos. After beta test both the macros and the source to the formatting program will be available. I want to keep the source until I am sure it is a bit more stable. If you would like to see an example of what LitTeX can do to your TeX source file, send it to me and I will send back the converted file as well as the macros to typeset it. I have typeset plain.tex with LitTeX. I currently do not have out-going ftp access so I cannot post LitTeX to an ftp site. Beta-test copies will be a uuencoded .zip file using pkzip 2.04g. It will include the program, the macros, and some documentation on how to use LitTeX. ---- Jeffrey M\kern-.05em\raise.5ex\hbox{\b c}\kern-.05emArthur a.k.a. Jeffrey McArthur ATLIS Publishing phone: (301) 210-6655 12001 Indian Creek Court fax: (301) 210-4999 Beltsville, MD 20705 email: j_mcarthur@bix.com ================================================================================ Archive-Date: Tue, 22 Feb 1994 13:15:15 CST Sender: LP-Mgr@SHSU.edu Date: Tue, 22 Feb 94 13:15:20 CST From: thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) Reply-To: LitProg@SHSU.edu, thompson@SUN1.COE.TTU.EDU Message-ID: <9402221915.AA02256@sun1.coe.ttu.edu> To: litprog@shsu.edu Subject: litprog.faq CC: dthompson@coe2.coe.ttu.edu, thompson@sun1.coe.ttu.edu I'm going to issue a collective apology/explanation for the most recent release of the litprog faq. I've become extraordinarily busy and haven't been able to include the most recent batch of changes/additions to the file. I made a conscious (sp?) decision to post the faq anyway. Judging from some recent mail, this may not have been the best decision. I have a log of changes that are required to the faq to bring it up to date. I *will* be making those changes one-of-these-days. If it is the consensus of the user community that I *not* post the faq in it's current condition, warts and all, then I can easily request the faq-server to put a hold on it until I have time to edit a new version. I hesitate to publish this here, because I don't want to start a flurry of discussion on the relative merits (or demerits) of the faq in it's current form. But I cannot more easily reach the user community. If I've offended someone, somehow, I offer a public apology. -=d ================================================================================ Archive-Date: Tue, 22 Feb 1994 13:33:23 CST Sender: LP-Mgr@SHSU.edu From: hywong@cs.cuhk.hk (Jason Wong) Reply-To: LitProg@SHSU.edu, hywong@CS.CUHK.HK Subject: testing Message-ID: Date: Tue, 22 Feb 1994 17:12:11 GMT To: LitProg@SHSU.EDU testing. ================================================================================ Archive-Date: Tue, 22 Feb 1994 22:14:17 CST Sender: LP-Mgr@SHSU.edu Return-Path: Date: Tue, 22 Feb 1994 17:33:51 -0800 From: mackay@cs.washington.edu (Pierre MacKay) Reply-To: LitProg@SHSU.edu, mackay@CS.WASHINGTON.EDU Message-ID: <199402230133.RAA28911@june.cs.washington.edu> To: j_mcarthur@BIX.com CC: LitProg@SHSU.edu Subject: Re: BETA Testers Wanted When you say it runs under DOS, I hope that simply means that it was compiled from something like C under DOS. If so, I would be interested in looking at it, but only with a view to making it compile under Unix. I have thought of this sort of facility with longing for many years, but have refrained from trying because the imposition of structure on a macro language is so much harder than on a compiler language. ================================================================================ Archive-Date: Wed, 23 Feb 1994 06:22:59 CST Sender: LP-Mgr@SHSU.edu From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Reply-To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Re: litprog.faq Date: 23 Feb 1994 11:08:36 GMT Message-ID: <2kfdfk$iak@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article <9402221915.AA02256@sun1.coe.ttu.edu>, thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) writes: > > I'm going to issue a collective apology/explanation for the most recent > release of the litprog faq. I've become extraordinarily busy and haven't > been able to include the most recent batch of changes/additions to the > file. I made a conscious (sp?) decision to post the faq anyway. Judging > from some recent mail, this may not have been the best decision. The FAQ is a good work, and it's hard to keep it current. Those who nag should think about this. You don't need to apologize that you work in your free time for the LitProg community... IMO the FAQ should be posted in regular intervals, e.g., every 1st of a month, automatically. If you don't succeed putting in all changes you plan -- that's life. It might be in the next issue, or the one after the next. The information is not so tangible to be really out-of-date. Thanks for your work, and keep up with it. -- Joachim ================================================================================ Archive-Date: Wed, 23 Feb 1994 11:25:27 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 23 Feb 1994 12:24:46 -0500 (EST) From: ed j baker Reply-To: LitProg@SHSU.edu, ejb@WORLD.STD.COM Subject: Re: litprog.faq To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE CC: LitProg@SHSU.EDU Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Here Here. I thought Dave's apology for re-releasing the FAQ was un-necessary. He's doing all of us a favor for monitoring the status of LitProg tools. It reminds me of a guy at work who complained about our coffee club. Membership was $2.00/week for unlimited coffee. 3 people maintained all the supplies and brewed the coffee for 30 people. Well...this one guy wanted an accounting of what the three people were doing with the excess money. He was then, promptly and summmarily, ejected from the coffee club. Keep the faith, Dave. We appreciate your efforts. ================================================================================ Archive-Date: Wed, 23 Feb 1994 15:55:58 CST Sender: LP-Mgr@SHSU.edu From: AJAY@sparc5.cs.uiuc.edu (4YurEyesOnly) Reply-To: LitProg@SHSU.edu, AJAY@SPARC5.CS.UIUC.EDU Subject: Wanted: Tic-Tac-Toe game source code -ASAP Message-ID: Keywords: wanted: tic-tac-toe game source code -ASAP Date: Wed, 23 Feb 1994 20:23:20 GMT To: LitProg@SHSU.EDU as it says, i am looking for source code to the game known all over the world... :) tic-tac-toe game source code, and i need it ASAP, i.e. TODAY--THIS HOUR any help will be greatly appreciated.. thank you. --AJ.******************* AJAY@sparc5.cs.uiuc.edu***************************** An ideal wife is the woman who has an ideal husband. ================================================================================ Archive-Date: Wed, 23 Feb 1994 16:34:55 CST Sender: LP-Mgr@SHSU.edu From: cbs@bigbird.sbc.com (Charles Bradley Slaten) Reply-To: LitProg@SHSU.edu, cbs@BIGBIRD.SBC.COM Subject: Re: dbx, #lines, and breakpoints Date: 23 Feb 1994 21:15:28 GMT Message-ID: <2kgh1g$prc@sbctri.sbc.com> To: LitProg@SHSU.EDU Lee Wittenberg (leew@pilot.njin.net) wrote: : John Troyer writes: : > My dbx (Irix 4.0. ) refuses to set breakpoints that have #line : > directives that are before the #line directives of the first executable line : > of a module. I have experienced the same problems with the Sun C++ dbx: version-id of "./dbx": SW1.0 dbx 1.0 1Mar1991 I found no good answer to this problem. Lee Wittenberg (leew@pilot.njin.net) wrote: : Question: What will your dbx do with the following function: : int : f(int i) : { : #include "inci.h" : #include "inci.h" : #include "inci.h" : return i; : } : Where the include file inci.h contains the solitary line : i++; After the conversion from ansi to K&R, and the addition of a main() which invokes f(4), I was able to step into f(). However executing step skipped the next 2 #include lines and stopped at return i; The value of i is consistent with where the debugger tells me it is executing: 4 upon entering f() 7 after step -- Charles Bradley Slaten Southwestern Bell Technology Resources 550 Maryville Centre Drive St. Louis, MO 63141 (314) 529-7636 cbs@sbctri.sbc.com ================================================================================ Archive-Date: Thu, 24 Feb 1994 00:04:39 CST Sender: LP-Mgr@SHSU.edu From: opus@telerama.lm.com (Opus Pheedback) Reply-To: LitProg@SHSU.edu, opus@TELERAMA.LM.COM Subject: Artists, Programmers, Musicians Look Here! Date: 23 Feb 1994 23:55:13 -0500 Message-ID: <2khbvh$1fe@telerama.lm.com> To: LitProg@SHSU.EDU ********************** ATTENTION ********************** Digital Sketches, a young, upstart company, is looking for PROGRAMMERS, GRAPHIC ARTISTS and MUSICIANS. If you believe you have the talent to work on games for Atari's 64 bit system, the "Jaguar" please respond promptly. We are currently in search of: Two (2) programmers, must have the knowledge and ability to program arcade style games. One (1) musician, must have knowledge of computer related composing. Game experience a plus. Two (2) graphics artists, must have experience in bitmapped graphics, animation, and sprite manipulation. You must be willing to invest TIME, MONEY, and HARD WORK. This is not a scam, but as a new company, funds are limited (no money will be asked for up front). Please respond as soon as possible, and include a short resumeU. Most of all, keep in mind we are looking for people with a young philosophy, not necessarily young, but with a youthful outlook. I'll be looking forward to your response. Opus Pheedback Or Josh Topolsky C.E.O. Digital Sketches ================================================================================ Archive-Date: Thu, 24 Feb 1994 08:58:53 CST Sender: LP-Mgr@SHSU.edu Subject: New CTangle for Macintosh Message-ID: From: tsl1@cornell.edu (Timothy Larkin) Reply-To: LitProg@SHSU.edu, tsl1@CORNELL.EDU Date: 24 Feb 1994 13:05:14 GMT To: LitProg@SHSU.EDU Announcing IMPACT 1.0 Q: What is IMPACT? A: Impact for Macintosh Pairs Appleevents and C Tangle. It is based on the Levy- Knuth CTangle 3.1. Q: What? You should have called it YACMAC, Yet Another CTangle for MACintosh. Do we need this? A: IMPACT offers two features lacking in previous ports of CTangle. Q: OK, convince me. A: First, all other CTangles, and here I refer to CTangles for Mac, will tangle only one file per run. When you need to tangle your file again, you must launch the application again. In fact, the program probably spends more time launching than it does tangling. Q: So, I launch it and leave it. I suppose, then, it has a File menu with an Open item, which I select to start a tangle. A: That's right. You can tangle as many times as you like without having to restart. Q: Nice. But then I still have to switch to the program, and select the file. A: Not at all. Here we get to the second main feature of IMPACT: Apple Events. Other applications can initiate a tangle, since IMPACT responds to 'odoc'. Q: Can you offer a scenario? A: I use IMPACT with the editor, Alpha, which can send Apple Events. I have a TCL script that tangles the file attached to the foremost Alpha window. And I have bound option-t to call that script. So, when I want to tangle my WEB, I first save the file (control-x, control-s), invoke IMPACT on it, (option-t), switch to Think C (command--), and assuming that the appropriate C file is selected in the project window, compile it (command-k), and run the project (command-r). Thus, with 6 keystrokes, I can progress from WEB to execution. Q: Well, I guess that's about it. Anything else I should know? A: IMPACT runs in a 612K partition. Clearly it requires AppleEvents. I believe it may actually require System 7, but I'm not sure, as I've never used it on any other system. It has been worked extensively on a Mac si. Q: Where do I get it? A: It's posted on your local CTAN archive, in tex-archive/web/systems/mac/impact. If you have any further questions, you will find my email address below. -- tsl1@cornell.edu Timothy Larkin otior ergo sum ================================================================================ Archive-Date: Sat, 26 Feb 1994 21:35:17 CST Sender: LP-Mgr@SHSU.edu From: bart@thrain.anu.edu.au (Bart Childs) Reply-To: LitProg@SHSU.edu, bart@THRAIN.ANU.EDU.AU Subject: Maybe web-mode.el does not work with FunnelWEB Date: 27 Feb 1994 03:14:32 GMT Message-ID: <2kp36o$ml0@manuel.anu.edu.au> Keywords: web-mode emacs funnelweb To: LitProg@SHSU.EDU I just noticed Tony Coates note about FunnelWEB. I probably need to withdraw my claim that web-mode.el works with FunnelWEB. It is tied to the @* and @ starts of chapters/sections and code starting with @a, @p, or @c and section names being delimited by @<...@> Sorry about that Bart Childs ================================================================================ Archive-Date: Sat, 26 Feb 1994 21:35:29 CST Sender: LP-Mgr@SHSU.edu From: bart@thrain.anu.edu.au (Bart Childs) Reply-To: LitProg@SHSU.edu, bart@THRAIN.ANU.EDU.AU Subject: Emacs web-mode.el for web, fweb, cweb, funnelweb Date: 27 Feb 1994 02:56:23 GMT Message-ID: <2kp24n$mae@manuel.anu.edu.au> Keywords: emacs, web-mode To: LitProg@SHSU.EDU A version has been put on ftp.cs.tamu.edu and thrain.anu.edu.au for annonymous ftp. On the first, cd pub/tex-web/web/EMACS.web-mode and on the second leave out the `/tex-web'. Thanks to Dave Love, Andrew Mauer, and Sandeev Dharap for their comments as well as many earlier ones from Marcus Speh. 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. Please let me know if you can break it (and if you do how!) Enjoy Bart Childs also bart@cs.tamu.edu ================================================================================ Archive-Date: Mon, 28 Feb 1994 14:35:38 CST Sender: LP-Mgr@SHSU.edu Date: Mon, 28 Feb 94 15:32:04 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu Subject: DOS noweb 2.5a Message-ID: The (long awaited?) DOS port of noweb 2.5a is now officially available. The package dosnoweb.zip is available for anonymous ftp in the pub/leew directory of bart.kean.edu. With luck, the various noweb sites (bellcore.com, etc.) will pick up copies to reduce the strain on poor li'l bart, but for now, this is the only place it's available. Unlike earlier DOS noweb's, this version is ``load and go'' -- it contains everything you need (except TeX) to get started using noweb under DOS, and has been (fairly) thoroughly tested. Executable versions of notangle and noweave, compiled versions of the Icon source, and an Icon interpreter are included (as well as executable versions of noindex and nodefs, provided by Brian Danilko). [Other tools will be provided when I get around to it, or when a significant number of users complain enough about the missing stuff, whichever comes first]. Printable copies of the documentation (IEEE.DVI and the .TXT manual pages) are included to help beginners. I will be actively supporting this version (unlike my previous hack of an earlier noweb), so please feel free to report any bugs to me (not that anyone on this list has any problems complaining :-). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | I was ready ... Kean College of New Jersey | Like a battleship at Pearl Harbor. Union, NJ 07083 | USA | -- Dave Frishberg | "Let's Eat Home" (1990) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Mon, 28 Feb 1994 14:57:44 CST Sender: LP-Mgr@SHSU.edu Date: Mon, 28 Feb 94 15:57:10 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu Subject: More LP sample programs Message-ID: I've put a couple more sample programs in the pub/leew/samples.LP directory of bart.kean.edu (for anonymous ftp), if anyone is interested. The directories contain the original source as well as DVI and PostScript versions of the woven documents. PALEVENT: An implementation of EventLib (CWEB version in another directory) in PAL (Paradox Application Language) using noweb. This may be of interest even to non-PAL programmers, as it makes full use of the features of noweb 2.5a. This is a ``production'' web, and contains user documentation (in the form of manual pages) as well as version control information (formatted using slightly modified RCS.STY macros). SERIALNO: A ``quick and dirty'' web written in an afternoon (using CWEB) to meet an immediate need, but with hooks for adding additional features in the future (that time has not yet come). This is pretty much a first draft of a literate program (more precisely, the first *working* draft), so the descriptions are pretty much ``stream of consciousness,'' as I was writing the code. It also contains version control information, inserted into the tangled code with @=. I hope many of you will want to take a look at these webs, and while I welcome comments and criticisms, please be kind. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | I was ready ... Kean College of New Jersey | Like a battleship at Pearl Harbor. Union, NJ 07083 | USA | -- Dave Frishberg | "Let's Eat Home" (1990) leew@pilot.njin.net | ------------------------------------------------------------------------