Archive-Date: Tue, 01 Mar 1994 14:30:43 CST Sender: LP-Mgr@SHSU.edu From: seiferth@boa.cs.unm.edu (Justin Seiferth) Reply-To: LitProg@SHSU.edu, seiferth@BOA.CS.UNM.EDU Subject: Using DOC as a literate programming tool Message-ID: Keywords: interviews doc literate query Date: Tue, 1 Mar 1994 15:35:24 GMT To: LitProg@SHSU.EDU I have been using frame as a literate programming tool but have lately been thinking of switching to a less expensive application I can afford to use at home as well as at work. Unfortunately, I've become very accustomed to programming in a WYSIWYG style and to incorporating diagrams in my source. It occured to me that perhaps the TEX compatible word-processor DOC included in the interviews toolkit might be modified to incorporate CWEB functionality. Is this a foolish notion or a good idea? Justin seiferth@bandelier.cs.unm.edu ================================================================================ Archive-Date: Tue, 01 Mar 1994 17:58:47 CST Sender: LP-Mgr@SHSU.edu From: wlu@syl.dl.nec.com (Wei Lu) Reply-To: LitProg@SHSU.edu, wlu@SYL.DL.NEC.COM Subject: windows programming Message-ID: Keywords: TSR, interrupts, windows programming Date: Tue, 1 Mar 1994 22:58:58 GMT To: LitProg@SHSU.EDU I am having hard time in figuring out the way to call TSR from a windows program via interrupts. I will appreciate any comments and references to my problem. --- Wei Lu ================================================================================ Archive-Date: Wed, 02 Mar 1994 09:22:01 CST Sender: LP-Mgr@SHSU.edu From: bruce@liverpool.ac.uk (Bruce Stephens) Reply-To: LitProg@SHSU.edu, bruce@LIVERPOOL.AC.UK Subject: noweb mode for GNU Emacs 19 Message-ID: Date: Wed, 2 Mar 1994 13:59:56 GMT To: LitProg@SHSU.EDU This is a very simple mode I just hacked up. There's a lot wrong with it, but I thought others may be interested, even as it stands. It *requires* text properties, and assumes those used in GNU Emacs 19.22; it'll quite likely work with Lucid Emacs, but I haven't tried it. I use it with auctex8.1 and cc-mode 3.229, both of which are loaded separately (I think my emacs is dumped with them, in fact). The idea is to have one mode (which calls itself c-mode, but actually has LaTeX-mode keybindings) generally (this means that the code is hilighted nicely), and have the code chunks use a different keymap. ;;; ;;; web mode, for editing noweb ;;; By Bruce Stephens , March 1994 ;;; Comes with no warranty, etc., consult the standard FSF statement ;;; for details. (defvar web-tex-mode-map nil) (defvar web-c-mode-map nil) (defvar web-c-mode-character nil) (defvar web-tex-mode-indent nil) (defvar web-c-mode-indent nil) (defun web-mode () "WEB mode, for editing noweb files" (interactive) (LaTeX-mode) (setq web-tex-mode-map (current-local-map) web-tex-mode-indent indent-line-function) (c-mode) (setq web-c-mode-map (current-local-map) web-c-mode-indent indent-line-function) (define-key web-tex-mode-map "\t" 'web-tex-indent) (define-key web-c-mode-map "\t" 'web-c-indent) (put 'web-c-mode-character 'local-map web-c-mode-map) (web-overlay-keymap) (use-local-map web-tex-mode-map)) (defun web-tex-indent () (interactive) (funcall web-tex-mode-indent)) (defun web-c-indent () (interactive) (funcall web-c-mode-indent)) (defun web-find-next-region (start end) "Finds the region beginning with regexp START, and ending with regexp END, returning the position at the beginning of START end just before END" (let (first last) (setq first (search-forward-regexp start nil t)) (cond (first (setq first (match-beginning 0)) (setq last (search-forward-regexp end nil t)) (cond (last (cons first last)) (t (cons first (point-max))))) (t nil)))) (defun web-overlay-keymap () "Overlay the c-mode keymap on the relevant bits of the buffer" (interactive) (save-excursion (remove-text-properties (point-min) (point-max) (list 'local-map nil)) (goto-char (point-min)) (let (region) (while (setq region (web-find-next-region "^<<.*>>=" "^\\@")) (add-text-properties (car region) (cdr region) '(category web-c-mode-character)) (goto-char (cdr region)))))) -- Bruce Institute of Advanced Scientific Computation bruce@liverpool.ac.uk University of Liverpool ================================================================================ Archive-Date: Wed, 02 Mar 1994 15:32:58 CST Sender: LP-Mgr@SHSU.edu From: scd@atria.com (Steve Daukas) Reply-To: LitProg@SHSU.edu, scd@ATRIA.COM Subject: Web for Turbo C++? Message-ID: Date: Wed, 2 Mar 1994 21:07:57 GMT To: LitProg@SHSU.EDU Anyone know of a web for turbo c++? Regards, Steve -- ================================================================================ Archive-Date: Wed, 02 Mar 1994 16:26:00 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 2 Mar 94 16:25:10 CST From: thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) Reply-To: LitProg@SHSU.edu, thompson@SUN1.COE.TTU.EDU Message-ID: <9403022225.AA11432@sun1.coe.ttu.edu> To: litprog@shsu.edu Subject: more latex styles for the noweb \documentstyle... CC: m@sun1.coe.ttu.edu, thompson@sun1.coe.ttu.edu I'm working with noweb these days. I want to include some additional styles in the [] for the \documentstyle header. Can I do this withouth hacking at noweb? (I'd prefer to leave the package alone, if possible.) I'm kludging right now by editing the .tex file produced by noweave and adding the desired styles. However, I'm rapidly tiring of this and want to automate it. For instance, I want to make my documentstyle: \documenstyle[noweb,jeep,daves]{... Is there an easy way to do this? Thanks! -=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: Wed, 02 Mar 1994 23:08:08 CST Sender: LP-Mgr@SHSU.edu Message-ID: Date: Wed, 2 Mar 94 20:15 PST To: LitProg@SHSU.edu CC: thompson@SUN1.COE.TTU.EDU Subject: more latex styles for the noweb \documentstyle... References: <9403022225.AA11432@sun1.coe.ttu.edu> From: Kayvan Sylvan Reply-To: LitProg@SHSU.edu, kayvan@SATYR.SYLVAN.COM >>>>> "Dave" == Dave Thompson (3/1/93) writes: Dave> I'm working with noweb these days. I want to include some Dave> additional styles in the [] for the \documentstyle header. Can Dave> I do this withouth hacking at noweb? (I'd prefer to leave the Dave> package alone, if possible.) Dave> I'm kludging right now by editing the .tex file produced by Dave> noweave and adding the desired styles. However, I'm rapidly Dave> tiring of this and want to automate it. For instance, I want to Dave> make my documentstyle: \documenstyle[noweb,jeep,daves]{... Dave> Is there an easy way to do this? Why don't you just go ahead and automate it in your makefile (or whatever build process you use)? Just run sed (or equivalent) over the ``.tex'' file. ---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: Thu, 03 Mar 1994 04:13:55 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 03 Mar 94 09:11:42 MET From: Zdenek Wagner Reply-To: LitProg@SHSU.edu, WAGNER%CSEARN.BITNET@SHSU.EDU Subject: Re: Web for Turbo C++? To: Literate Progaramming list , scd@ATRIA.COM On Wed, 2 Mar 1994 21:07:57 GMT said: >Anyone know of a web for turbo c++? > >Regards, >Steve >-- I routinely use CWEB with Turbo C++. The ctangle can be specified as the translator and thus the web source can be added to the project and even autodependency works. There are three problems: ctangle produces #line directives and thence most syntax errors are shown directly in the web source (if you have version 3.0 or later). Unfortunately, the undefined symbols and some other bugs are shown AFTER the end of the corresponding c or cpp file. If the file contains #line directives, the compiler does not recognize precompiled headers. The debugger is totally confused by the #line directives and traces strange lines of strange files. To solve it I wrote a simple batch which is made a translator and after calling ctangle it comments out #line directives. If you wish, I will take it from home and send it to you. So, for the beginning I use the original ctangle and try to compile the projects. I correct the misprints which are shown in the web source. Then I simply switch to a different translator and compile it again (if necessary). ,~~~/ /` / /| /~~~ / / |_/ /__/ ' | / / /~~/ /~~/ /~~/ /~~/ /\ | /| / /~~/ /~~/ /~~/ /~~/ /~~~ / , / / /~~~ / / /~~~ / \ |/ |/ / /_/ / / / /~~~ / ~~~~ ~~~ ~~~ ' ' ~~~ ' ` ' ' ~~~ ~~/ ' ' ~~~ ' 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, 03 Mar 1994 04:59:31 CST Sender: LP-Mgr@SHSU.edu From: bruce@liverpool.ac.uk (Bruce Stephens) Reply-To: LitProg@SHSU.edu, bruce@LIVERPOOL.AC.UK Subject: Re: more latex styles for the noweb \documentstyle... Message-ID: Date: Thu, 3 Mar 1994 10:30:20 GMT To: LitProg@SHSU.EDU >>>>> On Wed, 2 Mar 94 16:25:10 CST, thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) said: > I'm working with noweb these days. I want to include some additional styles > in the [] for the \documentstyle header. Can I do this withouth hacking at > noweb? (I'd prefer to leave the package alone, if possible.) From the manpage: -delay By default, noweave puts file-name and other information into the output before the first chunk of the program. -delay delays that information until after the first documentation chunk, making act a little bit like the WEB ``limbo.'' The option is typically used to enable a user to put a specialized LaTeX \documentstyle command and other preamble material in the first documentation chunk. This option also forces trailing cross-referencing information to be emitted just before the final chunk, instead of at the end of the document; the final chunk is expected to contain \end{document}. The -delay option implies the -n option. -- Bruce Institute of Advanced Scientific Computation bruce@liverpool.ac.uk University of Liverpool ================================================================================ Archive-Date: Thu, 03 Mar 1994 05:53:06 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: more latex styles for the noweb \documentstyle... Date: 3 Mar 1994 11:20:01 GMT Message-ID: <2l4h51$4rl@lyra.csx.cam.ac.uk> To: LitProg@SHSU.EDU In article <9403022225.AA11432@sun1.coe.ttu.edu> thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) writes: >I'm working with noweb these days. I want to include some additional styles >in the [] for the \documentstyle header. Can I do this withouth hacking at >noweb? (I'd prefer to leave the package alone, if possible.) > >I'm kludging right now by editing the .tex file produced by noweave and >adding the desired styles. However, I'm rapidly tiring of this and want >to automate it. For instance, I want to make my documentstyle: >\documenstyle[noweb,jeep,daves]{... > >Is there an easy way to do this? Well, it's not pretty, but... sed 's/\\documentstyle\[[^]]*noweb[^]]*/&,multicol/' Will add the multicol style to your document. You can then give your makefile rules like %.tex : %.tex2 sed 's/\\documentstyle\[[^]]*noweb[^]]*/&,multicol/' <$< >$@ %.tex2 : %.nw noweave $< >$@ (Of course, you'd hopefully parameterize this more, and it's not going to work on DOS, but I think most noweb users are unix hackers, anyway.) Julian. ================================================================================ Archive-Date: Thu, 03 Mar 1994 06:21:46 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: Re: more latex styles for the noweb \documentstyle... Message-ID: Date: Thu, 3 Mar 1994 10:56:28 GMT To: LitProg@SHSU.EDU >>>>> "Dave" == Dave Thompson (3/1/93) writes: Dave> I'm working with noweb these days. I want to include some Dave> additional styles in the [] for the \documentstyle header. Can Dave> I do this withouth hacking at noweb? (I'd prefer to leave the Dave> package alone, if possible.) Dave> I'm kludging right now by editing the .tex file produced by Dave> noweave and adding the desired styles. However, I'm rapidly Dave> tiring of this and want to automate it. For instance, I want to Dave> make my documentstyle: \documenstyle[noweb,jeep,daves]{... Dave> Is there an easy way to do this? I use sed(1) to tune the *.tex output: Eg, this is the relevant part of an implicit rule I am using to include the styles mynoweb.sty, newref.sty, RCS.sty, palatino.sty and multicol.sty (needed for nice printout of the identifier index). In the second sed(1) action, some noweboptions are set. If you hand over a printout to someone who's not developing the code, adding 'hideunuseddefs' is useful, too. #--------------------- # sample variables docdir = . weave = noweave wflags = -index websrc = test.nw styles = mynoweb,newref,RCS,palatino,multicol nwopt = longchunks,shift .SUFFIXES: .tex .nw ## noweb source -> LaTeX document .nw.tex: $(weave) $(wflags) $(websrc) > ${docdir}/$@ cd ${docdir}; \ sed -e \ 's/\\documentstyle\[noweb\]/\\documentstyle\[noweb,${styles}\]/' \ -e \ 's/\\noweboptions{}/\\noweboptions{${nwopt}}/' \ < $@ > TMP; \ ${mv} TMP $@ $(rm) ${docdir}/TMP* -- ----------------------------------------------------------------------------- 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, 03 Mar 1994 12:01:09 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 3 Mar 94 13:00:22 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, seiferth@boa.cs.unm.edu Subject: Re: Using DOC as a literate programming tool Message-ID: Justin Seiferth writes: > I have been using frame as a literate programming tool but have lately > been thinking of switching to a less expensive application I can afford > to use at home as well as at work. Unfortunately, I've become very > accustomed to programming in a WYSIWYG style and to incorporating > diagrams in my source. > > It occured to me that perhaps the TEX compatible word-processor DOC > included in the interviews toolkit might be modified to incorporate > CWEB functionality. Is this a foolish notion or a good idea? I don't know about DOC, but it doesn't seem like a foolish idea to me. On the other hand, when I first started playing with CWEB, I was a confirmed WYSIWYG-er, but once I ``got into'' (La)TeX, I wouldn't go back if you paid me (well, if you paid me enough, I might -- make me an offer). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | If venerated ancient thinkers hung around Computer Science Department | in ivory towers, it certainly follows that Kean College of New Jersey | today's pundits do a lot of serious work Union, NJ 07083 | in tiled sanctuaries far from the madding USA | throng. And no wonder, with the price of | ivory. leew@pilot.njin.net | -- Jean Sheperd | "A Fistful of Fig Newtons" (1981) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 03 Mar 1994 12:06:11 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 3 Mar 94 13:05:45 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, scd@atria.com Subject: Re: Web for Turbo C++? Message-ID: Steve Daukas asks: > Anyone know of a web for turbo c++? Both CWEB and noweb work fine with Borland products. The pc-based change files for CWEB at labrea are Borland-based, and the new DOS port of noweb (plug!) was compiled with Borland C++ 3.1 (in strict ANSI mode). I assume that FWEB, Nuweb, FunnelWeb, CLiP, ProTeX, and WinWordWEB will do the job, as well (there are probably others I forgot to list; I apologize). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | If venerated ancient thinkers hung around Computer Science Department | in ivory towers, it certainly follows that Kean College of New Jersey | today's pundits do a lot of serious work Union, NJ 07083 | in tiled sanctuaries far from the madding USA | throng. And no wonder, with the price of | ivory. leew@pilot.njin.net | -- Jean Sheperd | "A Fistful of Fig Newtons" (1981) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 03 Mar 1994 12:11:14 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 3 Mar 94 13:11:03 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, thompson@sun1.coe.ttu.edu Subject: Re: more latex styles for the noweb \documentstyle... Message-ID: David Thompson asks: > I'm working with noweb these days. I want to include some additional styles > in the [] for the \documentstyle header. Can I do this withouth hacking at > noweb? (I'd prefer to leave the package alone, if possible.) > > I'm kludging right now by editing the .tex file produced by noweave and > adding the desired styles. However, I'm rapidly tiring of this and want > to automate it. For instance, I want to make my documentstyle: > \documenstyle[noweb,jeep,daves]{... > > Is there an easy way to do this? Sho' 'nuff is! Just put the \documentstyle, \begin{document}, and \end{document} commands into the web, and use noweave's -delay option. The PALEVENT example I recently posted to bart.kean.edu does precisely that (it uses \documentstyle[noweb,pvcs,tccman,twoside]{article}). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | If venerated ancient thinkers hung around Computer Science Department | in ivory towers, it certainly follows that Kean College of New Jersey | today's pundits do a lot of serious work Union, NJ 07083 | in tiled sanctuaries far from the madding USA | throng. And no wonder, with the price of | ivory. leew@pilot.njin.net | -- Jean Sheperd | "A Fistful of Fig Newtons" (1981) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 03 Mar 1994 12:37:09 CST Sender: LP-Mgr@SHSU.edu From: mcguire@cs.utexas.edu (Tommy Marcus McGuire) Reply-To: LitProg@SHSU.edu, mcguire@CS.UTEXAS.EDU Subject: Re: windows programming Date: 3 Mar 1994 12:28:36 -0600 Message-ID: <2l5a8k$d2n@needmore.cs.utexas.edu> Keywords: TSR, interrupts, windows programming To: LitProg@SHSU.EDU In article , Wei Lu wrote: >I am having hard time in figuring out the way to call >TSR from a windows program via interrupts. > >I will appreciate any comments and references to my >problem. > >--- Wei Lu Why do these questions keep popping up here? Is there some meaning to "literate programming" that I'm not aware of? There have been too many of them for this to be coincidence. ----- Tommy McGuire mcguire@cs.utexas.edu mcguire@austin.ibm.com "...I will append an appropriate disclaimer to outgoing public information, identifying it as personal and as independent of IBM...." ================================================================================ Archive-Date: Thu, 03 Mar 1994 13:25:54 CST Sender: LP-Mgr@SHSU.edu Message-ID: <9403031925.AA09175@netmail2.microsoft.com> From: Eric Landes Reply-To: LitProg@SHSU.edu, ericla@MICROSOFT.COM To: LitProg@SHSU.EDU, LP-Mgr@SHSU.edu Date: Thu, 3 Mar 94 11:19:32 TZ Subject: Re: windows programming I don't know of any other meaning to "literate programming," and definitely none connected to Microsoft Windows programming. We only get two comp.programming.* groups here, so I don't know if there are more, but my guess is that people haven't taken the time to figure out where they _should_ post, and post in a group that looks like it _could_ be right. They haven't noticed that there usually is a comp.os.*.programmer newsgroup. When I see these, I just kinda snicker and say to myself "somebody just doesn't get it yet..." Eric ---------- | From: Tommy Marcus McGuire | To: | Subject: Re: windows programming | Date: Thursday, March 03, 1994 12:28PM | | In article , Wei Lu wrote: | >I am having hard time in figuring out the way to call | >TSR from a windows program via interrupts. | > | >I will appreciate any comments and references to my | >problem. | > | >--- Wei Lu | | | Why do these questions keep popping up here? Is there some meaning to | "literate programming" that I'm not aware of? | | There have been too many of them for this to be coincidence. | | | ----- | Tommy McGuire | mcguire@cs.utexas.edu | mcguire@austin.ibm.com | | "...I will append an appropriate disclaimer to outgoing public information, | identifying it as personal and as independent of IBM...." | | ================================================================================ Archive-Date: Thu, 03 Mar 1994 13:45:19 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 3 Mar 94 11:42:36 PST From: bos@mdd.comm.mot.com (Mary Bos) Reply-To: LitProg@SHSU.edu, bos@MDD.COMM.MOT.COM Message-ID: <9403031942.AA01273@bb37c.mdd.comm.mot.com> To: LitProg@SHSU.edu, mcguire@CS.UTEXAS.EDU Subject: Re: windows programming > From: mcguire@cs.utexas.edu (Tommy Marcus McGuire) > Date: 3 Mar 1994 12:28:36 -0600 > In article , Wei Lu wrote: > >I am having hard time in figuring out the way to call > >TSR from a windows program via interrupts. > > > >I will appreciate any comments and references to my > >problem. > > > >--- Wei Lu > > > Why do these questions keep popping up here? Is there some meaning to > "literate programming" that I'm not aware of? > > There have been too many of them for this to be coincidence. > In Mr. McGuire's questioning the extraneous questions, I agree there are entirely too many of these types of postings. Perhaps we can use this an educational opportunity, e.g. have a standard message the literate programming group sends to the requestor and possibly to the computer science and computer services of the institution (many of these requests come from schools) about what literate programming is (and what we aren't - a source of program fragments, techniques, or hacks (in the sense of tricks)). The return message could be simple, send the path to the faq. I'm a subscriber and not a news reader, but is there some description included in what this newgroup is about? Also there should be some copyright, copyleft, or whatever protection notice of programming examples posted in this news group. nec.com implies a commercial concern to me and so should be careful about using code fragments or programs from outside sources. I hope any programming answers we give to these types of programming requests are in a WEB for easy understanding and reading. My dictionary gives several definitions of literate: a: able to read and write b: versed in literature or creative writing c: well-read d: having knowledge or competence So, maybe these people are reading the dictionary and figure we have flights of creativity about their problem? Mary Bos bos@mdd.comm.mot.com Motorola Wireless Data Group Bothell, WA "We put our best feet forward and crushed each other's toes." The Deluxe Transitive Vampire - Karen Elizabeth Gordon -- All statements in this posting are my own and do not reflect Motorola's statements, opinions, or views ------- ================================================================================ Archive-Date: Thu, 03 Mar 1994 17:39:46 CST Sender: LP-Mgr@SHSU.edu Message-ID: <199403032338.SAA00704@cumc.cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Thu, 03 Mar 1994 18:40:22 -0500 To: LitProg@SHSU.edu From: perin@med.cornell.edu (Lew Perin) Reply-To: LitProg@SHSU.edu, perin@MED.CORNELL.EDU Subject: Web-style change-only processor? I've often thought it would be nice to have a filter that applies a WEB-style change file, with its simple syntax and without a sed script's eagerness to apply changes to each line of the input, *without* weave or tangle (not that I don't love them!) It probably wouldn't be hard to hack this out of CWEB's common.w, but maybe someone's already done this. Or maybe someone can show that this is a truly misguided idea? Cheers, Lew ================================================================================ Archive-Date: Fri, 04 Mar 1994 08:04:23 CST Sender: LP-Mgr@SHSU.edu From: bruce@liverpool.ac.uk (Bruce Stephens) Reply-To: LitProg@SHSU.edu, bruce@LIVERPOOL.AC.UK Subject: FWEB, improving LaTeX usage? Message-ID: Date: Fri, 4 Mar 1994 13:42:56 GMT To: LitProg@SHSU.EDU I've been playing with FWEB a bit, and I think I prefer it to noweb (although I like the fact that noweb produces readable output files, so I could stop using it in the future if I wanted). Given that I'm using LaTeX, why does the table of contents have to appear at the end? I'd prefer it if FWEB used the standard LaTeX mechanisms for doing this kind of thing; is there any way of doing this? -- Bruce Institute of Advanced Scientific Computation bruce@liverpool.ac.uk University of Liverpool ================================================================================ Archive-Date: Fri, 04 Mar 1994 08:34:04 CST Sender: LP-Mgr@SHSU.edu From: scd@atria.com (Steve Daukas) Reply-To: LitProg@SHSU.edu, scd@ATRIA.COM Subject: Re: Web for Turbo C++? Message-ID: Date: Fri, 4 Mar 1994 14:21:26 GMT To: LitProg@SHSU.EDU Thanks to all who posted and sent me E-mail!! Regards, Steve ================================================================================ Archive-Date: Sat, 05 Mar 1994 08:17:37 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: Literate Programming on the World Wide Web [Revised 1 March 1994] Message-ID: Date: Fri, 4 Mar 1994 10:10:35 GMT To: LitProg@SHSU.EDU ----------------------------------------------------------------------------- * Recent Changes [-> from the home page] ----------------------------------------------------------------------------- o New large literate example with C++ [-> "Examples"] o NOWEB 2.5 ported to DOS [-> "Tools"] o More samples by Lee Wittenberg [-> "Examples"] ----------------------------------------------------------------------------- * Literate Programming on the World Wide Web ----------------------------------------------------------------------------- FYI, there is a wealth of information on Literate Programming, the art of structured programming and documentation [like WEB-like systems with (La)TeX formatting] available on the World Wide Web [WWW], a distributed HyperText system, a network of documents connected by links which can be activated electronically. Examples for LitProg environments are WEB for Pascal (DEK), CWEB for C/C++ (Levy/Knuth), FWEB for C/C++/Fortran/ratfor/TeX (Krommes), various language independent tools...and many more. ----------------------------------------------------------------------------- * How to get to the Web ----------------------------------------------------------------------------- If you have a WWW browser up and running, try going to http://info.desy.de/general/users.html and look for "Literate Programming" in the panel which appears. The precise URL is http://info.desy.de/user/projects/LitProg.html If you have no clue what WWW is, you can go over the Internet with telnet info.cern.ch which brings you to the WWW Home Page at CERN. You are now using the simple line mode browser. To move around the Web, enter the numbers given after an item. To go to the Literate Programming documents, enter go http://info.desy.de/user/projects/LitProg.html This is what you should see now: ----------------------------------------------------------------------------- * What you will see here ----------------------------------------------------------------------------- Getting Start(l)ed[2] A first look into Literate Programming with WEB Course[3] Planned GNA[4] Internet course on Literate Programming Editing[5] GNU Emacs mode for WEB programming Tools[6] Common, freely available Literate Programming environments Examples[7] Literate Programming archives and selected examples Discussion[8] Discussion on LitProg takes place on a mailing list and a newsgroup Program Library[9] George D. Greenwade's Literate Programming Library at Niord.shsu.edu. Experimental service: Archive Search[10] FAQs[11] Lists of Frequently Asked Questions: General and FWEB Further Reading Nelson Beebe's Literate Programming bibliography at ftp.math.utah.edu in directory /pub/tex/bib[12](files litprog.*) HyperLitProg[13] Literate Programming using HyperText[14] Techniques OO-LitProg[15] Opinions and examples on Object-Oriented[16] Literate Programming [[Now you can continue climbing down the documentation tree by entering numbers 1-16 and follow your own interests]] ----------------------------------------------------------------------------- * More on Browsing the Web ----------------------------------------------------------------------------- A very nice way of "browsing" through WWW uses X-based tools like "tkWWW" or "NCSA Mosaic". For the latter, binaries for many platforms (ready for use) and sources are available via anonymous FTP from ftp.ncsa.uiuc.edu in directory Web/Mosaic-binaries. 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 Email to test-list@info.cern.ch with one or more lines of the form send e.g. send http://info.desy.de/user/projects/LitProg.html at the bottom of the page you'll find all links of that document listed. Your mail system must have a mail gateway to internet mail. ----------------------------------------------------------------------------- * Contact for Further Information ----------------------------------------------------------------------------- Please feel free to contact me for questions, suggestions and further contributions, or just to tell me whether you found this information useful in any way. For questions related to WWW, consult the WWW-FAQ: available via anonymous FTP from rtfm.mit.edu in directory pub/usenet/news.answers/www/faq, or on WWW at URL http://www.vuw.ac.nz:80/who/Nathan.Torkington/ideas/www-faq.html Enjoy. March, 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. See more at rtfm.mit.edu in /pub/usenet/news.answers/www/resources/gna, or 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: Sat, 05 Mar 1994 08:18:52 CST Sender: LP-Mgr@SHSU.edu From: anygard@freenet.hut.fi (Anders Nygård) Reply-To: LitProg@SHSU.edu, anygard@FREENET.HUT.FI Subject: Windows Programming ??? Date: 4 Mar 1994 11:46:25 GMT Message-ID: <2l772h$as8@freenet.hut.fi> To: LitProg@SHSU.EDU I would like to know how to make a window ICONIZED from the start (in other words Start out as an ICON ================================================================================ Archive-Date: Sat, 05 Mar 1994 08:20:48 CST Sender: LP-Mgr@SHSU.edu From: lynbech@avignon.daimi.aau.dk (Christian Lynbech) Reply-To: LitProg@SHSU.edu, lynbech@AVIGNON.DAIMI.AAU.DK Subject: Re: Structures in WEBs (was Re: Numbering in CWEB) Date: 28 Feb 1994 12:15:57 GMT Message-ID: To: LitProg@SHSU.EDU Marc> A WEB document is of course a very specific kind of document Marc> used for a special purpose, so it is not too surprising that it Marc> is not structured exactly like any run-of-the-mill technical Marc> paper. I actually experienced some difficulties with this. First let me explain that I'm still in the midst of my first major project using the LP paradigm, and that I used first nuweb and now noweb, so all I'm about to say may just be a beginners inexperienced fumbling about with the wrong tools. Anyway, my initial approach, using nuweb, was to write my program just as I would write a report. In fact, what I am writing is supposed to *be* the report. And for quite some time I was surprised that LP wasn't more convincing. I was slowly reaching the conclusion that Joachim put into words, My own formulation would then be, extrapolating Joachims observations: Writing a report is *different* from writing a program. Note that with report I do not necessarily mean something of publication standard, but just something that one could consider giving ones advisor as conclusion of a project. I would not hesitate to embed code in such a thing, though my advisor certainly would not be especially interested in the code parts. So readability is of a higher concern than for something like the Stanford GraphBase webs. If one reads Knuth's original article on WEB, he writes that it allows him to write almost in a "stream of consciousness". And I longed for the freedom that WEB's lowlevel @ sectional unit command was giving. But while stream-of-consciousness certainly helps the programmer, it is not a good strategy for report writing, in my oppinion. You need to carefully plan the order in which you present the material to your reader, and things that may be developed together, may best be put in entirely different parts of the report. On top of this, neither nuweb nor noweb enhance the WEBsection structure with typographical support, which I have come to regard as a major shortcoming. They do typeset code sections well, but the code tends to float around as small islands in a sea of surrounding text, making it difficult to isolate the corresponding documentation part for a WEBsection. To some it may be obvious, but the fact that *programs* cannot be easily incorporated in *reports*, was new to me. What do others think? ------------------------------------------------------------------------------ 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: Sat, 05 Mar 1994 17:02:34 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: more latex styles for the noweb \documentstyle... Message-ID: CC: Dave Thompson (3/1/93) Date: Sat, 5 Mar 1994 20:50:22 GMT To: LitProg@SHSU.EDU In article <9403022225.AA11432@sun1.coe.ttu.edu>, Dave Thompson (3/1/93) wrote: >I'm working with noweb these days. I want to include some additional styles >in the [] for the \documentstyle header. > For instance, I want to make my documentstyle: >\documenstyle[noweb,jeep,daves]{... >Is there an easy way to do this? Yes. Just put the line \documentstyle[noweb,jeep,daves]{... in your .nw file, and use noweave -n. noweave will not put any header or trailer in the .tex file. (If you are using noweave -x or noweave -index, you probably want to use -delay instead of -n, so that no cross-reference information will precede the \documentstyle command.) Norman P.S. I resisted putting these options in, but users nagged me for them. All these people using sed scripts make me suspect I was wrong to give in :-) :-) -- Norman Ramsey norman@bellcore.com ================================================================================ Archive-Date: Sat, 05 Mar 1994 23:35:22 CST Sender: LP-Mgr@SHSU.edu Message-ID: Date: Sat, 5 Mar 94 21:31 PST To: norman@FLAUBERT.BELLCORE.COM CC: LitProg@SHSU.EDU, Dave Thompson (3/1/93) Subject: Re: more latex styles for the noweb \documentstyle... References: From: Kayvan Sylvan Reply-To: LitProg@SHSU.edu, kayvan@SATYR.SYLVAN.COM >>>>> "Norman" == Norman Ramsey writes: Norman> P.S. I resisted putting these options in, but users nagged me for Norman> them. All these people using sed scripts make me suspect I was Norman> wrong to give in :-) :-) :-) Since noweb conforms to the Unix philosophy of small tools cobbled together to do a job, it only seems natural to use "sed" or other tools to further mangle its output. ---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: Sun, 06 Mar 1994 07:32:47 CST Sender: LP-Mgr@SHSU.edu From: thompson@sun1.coe.ttu.edu Subject: comp.programming.literate FAQ Date: 6 Mar 1994 13:13:23 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: Sun, 06 Mar 1994 11:37:59 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: more latex styles for the noweb \documentstyle... Date: 6 Mar 1994 17:05:02 GMT Message-ID: <2ld2fu$4n@lyra.csx.cam.ac.uk> To: LitProg@SHSU.EDU In article , Kayvan Sylvan wrote: >Since noweb conforms to the Unix philosophy of small tools cobbled >together to do a job, it only seems natural to use "sed" or other >tools to further mangle its output. > Perhaps it would be more accurate to say, since noweb conforms to the unix philosophy, one should expect know-nothings to hack something together rather than actually read the man page. 8-) Julian. ================================================================================ Archive-Date: Sun, 06 Mar 1994 23:09:58 CST Sender: LP-Mgr@SHSU.edu From: gjb@maxim.gba.oz.au (Greg Black) Message-ID: <199403070330.AA01164@maxim.gba.oz.au> Subject: PICTEX Manual To: LITPROG@SHSU.edu Date: Mon, 7 Mar 1994 13:30:03 +1000 (AEST) Reply-To: LitProg@SHSU.edu, gjb@gba.oz.au (Greg Black) Content-Type: text I am in need of the PICTEX manual but don't know where to get it. If any readers of this list can point me in the right direction, I'd be most grateful. Please reply directly to me, rather than to the list, as I am not currently receiving the list. Thanks in advance. -- Greg Black -- gjb@gba.oz.au 681 Park Street, Brunswick, Vic. 3056, Australia ================================================================================ Archive-Date: Sun, 06 Mar 1994 23:30:47 CST Sender: LP-Mgr@SHSU.edu Message-ID: Date: Sun, 6 Mar 94 20:56 PST To: LitProg@SHSU.edu, jmb29@CUS.CAM.AC.UK Subject: Re: more latex styles for the noweb \documentstyle... References: <2ld2fu$4n@lyra.csx.cam.ac.uk> From: Kayvan Sylvan Reply-To: LitProg@SHSU.edu, kayvan@SATYR.SYLVAN.COM >>>>> "Julian" == Julian Birch writes: Kayvan> Since noweb conforms to the Unix philosophy of small tools cobbled Kayvan> together to do a job, it only seems natural to use "sed" or other Kayvan> tools to further mangle its output. Julian> Perhaps it would be more accurate to say, since noweb conforms Julian> to the unix philosophy, one should expect know-nothings to Julian> hack something together rather than actually read the man Julian> page. 8-) :-) Hey! I resemble that remark! ---Kayvan ================================================================================ Archive-Date: Tue, 08 Mar 1994 11:42:17 CST Sender: LP-Mgr@SHSU.edu From: wrc1001@cus.cam.ac.uk (W.R. Corner) Reply-To: LitProg@SHSU.edu, wrc1001@CUS.CAM.AC.UK Subject: Teach yourself C book - Any suggestions? Message-ID: <1994Mar8.155950.29032@infodev.cam.ac.uk> Date: Tue, 8 Mar 1994 15:59:50 GMT To: LitProg@SHSU.EDU Hi I'm about to attempt to teah myself C. Because I have to! And I was wondering if anyone out there could recommend a good book that I could follow. Preferably one that is simple and easy to follow. I know a little Fortran and Basic so I'm not cpmpletely clueless! Any suggestions gratefully received. One last thing - I have a copy of Turbo C on my pc - does this make any difference to what I shoud get? How different is it from the generic C? Thanks in advance... -Bill- PS Please reply to my e-mail address: wrc1001@cus.cam.ac.uk, as I don't get to read the newsnet as often as I did. ================================================================================ Archive-Date: Tue, 08 Mar 1994 12:16:55 CST Sender: LP-Mgr@SHSU.edu From: David Stanley Irvin Reply-To: LitProg@SHSU.edu, di07+@ANDREW.CMU.EDU Subject: Need help in C windows!!!! Date: Mon, 7 Mar 1994 16:21:54 -0500 Message-ID: To: LitProg@SHSU.EDU My brother just recently expressed his need for help in his programming in c for windows. Some exerpts: >I need your help! Would you please post a message to a couple >of groups for me? I need this information posted maybe in: >....windows.programming or ....c.programming or anything that >relate to C and Windows programming. In particular, I need to >find out: > >a) is it possible to send a message to a DOS BOX to tell it to > do a paste from the clipboard? (there is an option in the > system menu, and I know it works manually [ie. click]) > >b) how does one get information about how much the CPU is getting > utilized? (i can't find any programming call) > >You might also want to let them know that I am using Borland >3.0 c/c++ and I am programming in c. Also to to say that you are >just posting for a friend/brother (whatever) becuase I do not >have the ability to post anything, but that I do have EMAIL >capabilities...therefore to respond to USERSRV3@nt.com. Any help would be greatly appreciated. You can either send me mail at di07@andrew.cmu.edu or send him mail directly at USERSRV3@nt.com. THANK YOU! Dave Irvin ================================================================================ Archive-Date: Tue, 08 Mar 1994 12:24:18 CST Sender: LP-Mgr@SHSU.edu From: mauer@mcs.anl.gov (Andrew Mauer) Reply-To: LitProg@SHSU.edu, mauer@MCS.ANL.GOV Subject: Re: Structures in WEBs Message-ID: Date: Mon, 7 Mar 1994 15:04:19 GMT To: LitProg@SHSU.EDU >>>>> "lynbech" == Christian Lynbech writes: lynbech> On top of this, neither nuweb nor noweb enhance the lynbech> WEBsection structure with typographical support, which I have lynbech> come to regard as a major shortcoming. They do typeset code lynbech> sections well, but the code tends to float around as small lynbech> islands in a sea of surrounding text, making it difficult to lynbech> isolate the corresponding documentation part for a lynbech> WEBsection. I'm not exactly sure what you are saying. Both nuweb and noweb provide the standard LaTeX formatting commands, which I have found to be mostly adequete for document formatting. At times I find myself wishing for a another level of depth, but it is not usually missed. My standard progression is \section, \subsection, \subsubsection, \subsubsection*. Things which are so unimportant that they do not fit in their own subsubsection really do not seem to be large enough details to bother the reader with in the table of contents. In practice, I like the way this turns out. If, on the other hand, you are complaining that the chunks are not typographically integrated with the text, I'm not sure whether I agree, nor am I sure that separation is not a good thing. /Andrew/ ================================================================================ Archive-Date: Tue, 08 Mar 1994 12:24:35 CST Sender: LP-Mgr@SHSU.edu From: mauer@mcs.anl.gov (Andrew Mauer) Reply-To: LitProg@SHSU.edu, mauer@MCS.ANL.GOV Subject: Web-Mode 2.5 Message-ID: Date: Mon, 7 Mar 1994 14:55:38 GMT To: LitProg@SHSU.EDU The latest version of the web-mode by Bart Childs has been released. I am posting this message for him do to a temporary lack of news access. ------------------------------------------------------------------------ web-mode.el version 2.5 is available for anonymous ftp from: thrain.anu.edu.au directory pub/web/EMACS.web-mode and ftp.cs.tamu.edu directory pub/tex-web/web/EMACS.web-mode It now compiles quite cleanly and runs with no known errors on both v 18 and 19 of emacs. It does give warnings when compiling under v 19 but frame-height does not exist in v 18 and the other warning is about some Epoch features. The web-mode.el is there as well as web-mode.elc-18 and web-mode.elc-19. The latter will not work on version 18 emacs. There are also LaTeX and PostScript versions of the manual and some assorted files that I use on an Xstation. The BC.emacs file and template.tex files go with the programming of the function keys to the most popular functions. It is a real winner and I think I will probably always be faster with that than the next version which will require leaving the keyboard and wandering around the screen with a mouse. However, that kind of stuff is in these days. [Yuk. Leave the keyboard hooks in, at least. Please? -ajm] Cheers Bart Childs ================================================================================ Archive-Date: Tue, 08 Mar 1994 14:03:23 CST Sender: LP-Mgr@SHSU.edu From: salmi@convex.csc.FI (Timo Salmi) Reply-To: LitProg@SHSU.edu, salmi@CONVEX.CSC.FI Subject: Re: Teach yourself C book - Any suggestions? Date: 8 Mar 1994 18:59:16 GMT Message-ID: <2lihu4$ese@pobox.csc.fi> To: LitProg@SHSU.EDU In article <1994Mar8.155950.29032@infodev.cam.ac.uk> wrc1001@cus.cam.ac.uk (W.R. Corner) writes: >I'm about to attempt to teah myself C. Because I have to! And I was wondering >if anyone out there could recommend a good book that I could follow. Not a book, but the following might be of interest 45863 Nov 8 01:47 garbo.uwasa.fi:/pc/c-lang/c-lesson.zip c-lesson.zip A complete course for you to learn the C language All the best, Timo .................................................................. Prof. Timo Salmi, CAM.a co-mod, temporarily as salmi@convex.csc.fi Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1 Faculty of Accounting & Industrial Management; University of Vaasa Internet: ts@uwasa.fi BBS +(358)-61-3170972; FIN-65101, Finland ================================================================================ Archive-Date: Wed, 09 Mar 1994 02:43:06 CST Sender: LP-Mgr@SHSU.edu From: umwill44@cc.umanitoba.ca (Kerry Gordon Peter Williams) Reply-To: LitProg@SHSU.edu, umwill44@CC.UMANITOBA.CA Subject: Suggestion on Intro. C+/C++ manuals? Date: 9 Mar 1994 08:00:07 GMT Message-ID: <2ljvm7$h44@canopus.cc.umanitoba.ca> Keywords: help, C++, sugeestions, To: LitProg@SHSU.EDU Hi everyone, I was wondering if you C/C+/C++ gurus have any suggestions on intro level, C+/C++ programming manuals. I've seen "Visual C++ for Windows" (or some title like that) which looks good, but I don't like the $50 price tag. Is there perchance an internet "free" introduction? Thank you! Kerry email: umwill44@cc.umanitoba.ca ps. If you prefer post to this newsgroup as others will have the same question I'm sure. Thanks again. -- ***************************************************************** * Kerry Williams * CLASSIFIEDS: * * Computer Engineering III * Highly skilled engineer looking * * University of Manitoba * for work. Renumeration in Beer * ================================================================================ Archive-Date: Wed, 09 Mar 1994 04:07:03 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 9 Mar 1994 11:05:53 +0100 From: cgl@risc1.rug.nl (Kees van der Laan) Reply-To: LitProg@SHSU.edu, cgl@RISC1.RUG.NL Message-ID: <9403091005.AA28559@risc1.rug.nl> To: LitProg@SHSU.edu, gjb@gba.oz.au Subject: Re: PICTEX Manual TeX Users Group Office, tug@tug.org, Santa Barabara Kees van der Laan ================================================================================ Archive-Date: Wed, 09 Mar 1994 09:27:42 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 9 Mar 94 10:25:15 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu Subject: LP news from Phoenix (ACM conference) Message-ID: Greeting from Phoenix! Literate programming seems to be picking up steam, slowly but surely. Addiston-Wesley has The Stanford Graphbase prominently displayed and a hugh stack of The CWEB System of Structured Documentation copies that they are giving away right and left (I'd estimate that only about a third of the original pile remains). Other publishers seem very interested in LP, even though they don't have any books, as yet (this is a major improvement over last year, when all I got were blank looks). I ran into an editor from Gordon and Breach Science Publishers, a firm that specializes in technical journals. He was quite excited about the idea of a refereed journal for literate programs (an idea we discussed on the net sometime within the last year). More on this if anything actually comes of it. On Thursday, Stephen Shum and Curtis Cook are presenting a paper entitled ``Using Literate Programming to Teach Good Programming Practices.'' More on this after their talk -- there's a long line waiting for these terminals. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Day breaks, it's said, Computer Science Department | When night is ended. Kean College of New Jersey | I stay in bed Union, NJ 07083 | Until it's mended. USA | | -- Richard Armour leew@pilot.njin.net | "Light Armour" (1954) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Wed, 09 Mar 1994 12:35:32 CST Sender: LP-Mgr@SHSU.edu From: gnat@u.washington.edu (L Boyd) Reply-To: LitProg@SHSU.edu, gnat@U.WASHINGTON.EDU Subject: Re: Suggestion on Intro. C+/C++ manuals? Date: 9 Mar 1994 17:40:42 GMT Message-ID: <2ll1mq$h8n@news.u.washington.edu> Keywords: help, C++, sugeestions, To: LitProg@SHSU.EDU umwill44@cc.umanitoba.ca (Kerry Gordon Peter Williams) writes: >Hi everyone, >I was wondering if you C/C+/C++ gurus have any suggestions on intro level, >C+/C++ programming manuals. I've seen "Visual C++ for Windows" (or some >title like that) which looks good, but I don't like the $50 price tag. Is >there perchance an internet "free" introduction? >Thank you! >Kerry I *highly* recommend Bruce Eckel's _c++ inside out. He does a nice job of contrasting c & c++ which serves as a good review if you're rusty on c. It can also be a good intro to c & c++ & ood. Of course, you *must* have a copy of K&R. Lauren ================================================================================ Archive-Date: Wed, 09 Mar 1994 19:44:25 CST Sender: LP-Mgr@SHSU.edu From: craig@adikia.sccsi.com (Craig Groeschel) Reply-To: LitProg@SHSU.edu, craig@ADIKIA.SCCSI.COM Subject: Re: Structures in WEBs (was Re: Numbering in CWEB) Message-ID: Date: Wed, 9 Mar 1994 03:07:09 GMT To: LitProg@SHSU.EDU In lynbech@avignon.daimi.aau.dk (Christian Lynbech) writes: >But while stream-of-consciousness certainly helps the >programmer, it is not a good strategy for report writing, in my >oppinion. You need to carefully plan the order in which you present >the material to your reader, and things that may be developed >together, may best be put in entirely different parts of the report. Yes. Once, before I let my colleagues inspect a short module I had written, I found myself going back through it, rearranging chunks, saying, "It would make more sense to explain this here." I wondered if that indicated a flaw in my thinking, that if I thought _logically_ (tm), and really kept my audience in mind, I would not have to rearrange. -- Craig Groeschel | I'm available! BSCS, BSEE, Unix, C, The essence of every art is its intensity. Keats | X, TeX, MC68K, will reloc. ================================================================================ Archive-Date: Wed, 09 Mar 1994 21:50:43 CST Sender: LP-Mgr@SHSU.edu From: gjb@maxim.gba.oz.au (Greg Black) Message-ID: <199403100154.AA10725@maxim.gba.oz.au> Subject: PICTEX Manual (followup) To: LITPROG@SHSU.edu Date: Thu, 10 Mar 1994 11:54:56 +1000 (AEST) Reply-To: LitProg@SHSU.edu, gjb@gba.oz.au (Greg Black) Content-Type: text Three days ago, I posted a message here asking about the PiCTeX Manual. I've had so many replies that it no longer seems sensible to thank you all individually. Thanks to all those who offered help --- this is a very friendly list! In case anybody wanted to know, the answer is to get it direct from the TeX Users Group (tug@tug.org). -- Greg Black -- gjb@gba.oz.au 681 Park Street, Brunswick, Vic. 3056, Australia ================================================================================ Archive-Date: Thu, 10 Mar 1994 08:06:20 CST Sender: LP-Mgr@SHSU.edu Date: 10 Mar 1994 08:26:11 -0500 (EST) From: bbeeton Reply-To: LitProg@SHSU.edu, BNB@MATH.AMS.ORG Subject: Re: Structures in WEBs (was Re: Numbering in CWEB) To: LitProg@SHSU.edu, craig@ADIKIA.SCCSI.COM Message-ID: <763305971.927542.BNB@MATH.AMS.ORG> Content-Transfer-Encoding: 7BIT craig groschel wonders if rearranging chunks of a program module "indicated a flaw in my thinking, that if I thought _logically_ (tm), and really kept my audience in mind, I would not have to rearrange." if it's any comfort, i heard don knuth admit that when he was writing the texbook, he realized he couldn't find a way to explain something logically, so instead he went back and rewrote the program code so that a clear explanation was possible. cheers. -- bb ================================================================================ Archive-Date: Thu, 10 Mar 1994 12:40:03 CST Sender: LP-Mgr@SHSU.edu Date: 10 Mar 94 13:36:51 EST From: Reply-To: LitProg@SHSU.edu, PJENSEN@CSI.COMPUSERVE.COM To: Subject: Long array initializers in CWEB Message-ID: Here's a CWEB formatting hack I just figured out - maybe there's an easier way, but this works for me. The goal is to have an initialized array formatted roughtly as shown: char stuff[size] = { 0,1,2,3,4,5,6,7,8,9, 9,8,7,6,5,4,3,2,1,0 } The problem is that there is nothing to trigger the line-break before the left brace, and the indentation within the braces. (I should have said, too, that I want to specify the line breaks within the list of values.) Here's how I did it: char @[ stuff[size] = @] { @[ 0,1,2,3,4,5,6,7,8,9, @]@; @[ 9,8,7,6,5,4,3,2,1,0 @]@; }; The @[...@] brackets coerce their contents to an "exp" (which the @; can then turn into a "stmt") and the right things happen. ================================================================================ Archive-Date: Thu, 10 Mar 1994 14:44:55 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 10 Mar 1994 21:04:17 +0100 From: " (Bernhard Lang)" Reply-To: LitProg@SHSU.edu, Lang@TU-HARBURG.D400.DE Message-ID: <9403102004.AA24557@kirk.ti1.tu-harburg.de> To: LitProg@SHSU.edu Subject: Announcing FOLD2WEB for PCs Announcing FOLD2WEB for PCs --------------------------- Let me introduce a new tool for semi-automatic generation of web-files. It is based on the idea of "folded" source code. In folded source code you can fold away some portions of your code and will only see a top level fold containing a description. Only if required you will open a fold and will see its details. The fold structure is embedded in a source text using comments. Defining a StartFold-, EndFold- and TerminateFold-marker a folding structure may be embedded in most programming languages. I use e.g. the following markers: Pascal: StartFold: "(*{{{" EndFold: "(*}}}" TerminateFold: "*)" C++: StartFold: "//{{{" EndFold: "//}}}" TerminateFold: "" TeX: StartFold: "%%{{{" EndFold: "%%}}}" TerminateFold: "" Then a small pascal program will look like: PROGRAM test(input,output); (*{{{ variables *) VAR i:integer; (*}}} variables *) (*{{{ The main program *) begin for i:=0 to 10 do writeln('hello world'); end. (*}}} The main program *) In a folding editor the top level view will look like: PROGRAM test(input,output); ... variables ... The main program In our institute we picked the "folding micro emacs" FUE from the net, modified this editor to some extent and adapted it to the PC. This editor allows the definition of different foldmarks based on the file extension. Thus we produce a lot of source code that is really beautiful structured using folds. The remaining problem was to get a printout of these structured documents which will reflect the embedded folding structure of the source. To solve this problem I wrote a program FOLD2WEB which automatically translates a folded document to a NUWEB source file (I am really a FAN of NUWEB due to its simplicity). This sourcefile can be tangled and weaved either reproducing the program source or producing the TeX source. FOLD2WEB is written in PASCAL and runs on PCs. The WEB file of FOLD2WEB can be generated with a complete embedded LaTeX environement and thus can be translated to a printfile without knowing anything about NUWEB or LaTeX. Only how to call the different translators must be known. On the other hand if you have to modify old program sources it is very helpful if you give them a structure based on (hopefully) embedded comments using a folding editor. This costs not much time. Then the FOLD2WEB program will translate this structured program automatically to a NUWEB source which can be used as a basis for documented program modifications. For all who are interested in the described programs I packed the executables of FUE.EXE (the folding editor) and FOLD2WEB.EXE and some description onto our FTP server "kirk.ti1.tu-harburg.de:pub/fold2web". Read the files FOLD2WEB.DOC and FUE.DOC for more information. Bernhard. {{{ Dr. Bernhard Lang ----------------------------------------------- email: lang@tu-harburg.d400.de TU Hamburg Harburg Technische Informatik I }}} ... Enter this fold to view behind the scenes ----------------------- ================================================================================ Archive-Date: Fri, 11 Mar 1994 07:56:54 CST Sender: LP-Mgr@SHSU.edu From: tbodine@utig.ig.utexas.edu (Tom Bodine) Subject: Name needed Date: 11 Mar 1994 13:15:14 GMT Message-ID: <2lpqt2$ad5@geraldo.cc.utexas.edu> Reply-To: LitProg@SHSU.edu, tbodine@utig.ig.utexas.edu To: LitProg@SHSU.EDU Hi folks I need a unique name fo a utility that renumbers the Common Depth Points for seismogram files in the SEG-Y format. "renum" and "segyrenum" are already taken. The need for such a utility comes from our use of seismic processing software that requires the CDP's to be monotonically increasing or decreasing. Unfortunately the old data we often deal with does not contain CDP's with this quality. Please respond by e-mail. --- Thanks & Regards Tom Bodine #----------------------------------------------------------------------- # Hatred and bitterness can never cure the disease of fear, only love # can do that. (Martin Luther King Jr.) #----------------------------------------------------------------------- ================================================================================ Archive-Date: Fri, 11 Mar 1994 13:01:17 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 11 Mar 94 10:06:37 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, Lang@tu-harburg.d400.de Subject: Re: Announcing FOLD2WEB for PCs Message-ID: > > Announcing FOLD2WEB for PCs > --------------------------- > Sounds like an interesting tool. It might be interesting to have an LP system generate code with ``fold'' comments at the start of each chunk, so FOLD2WEB could be used to reconstruct (somewhat) the original web (sans text chunks). [Yet another potential noweb filter to stick on my ``to do'' list. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Day breaks, it's said, Computer Science Department | When night is ended. Kean College of New Jersey | I stay in bed Union, NJ 07083 | Until it's mended. USA | | -- Richard Armour leew@pilot.njin.net | "Light Armour" (1954) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Fri, 11 Mar 1994 16:57:56 CST Sender: LP-Mgr@SHSU.edu From: wgao@nyx10.cs.du.edu (Weiqi Gao) Reply-To: LitProg@SHSU.edu, wgao@NYX10.CS.DU.EDU Subject: FWeb 1.40 sty files Message-ID: <1994Mar11.221830.10826@mnemosyne.cs.du.edu> Date: Fri, 11 Mar 94 22:18:30 GMT To: LitProg@SHSU.EDU I have downloaded fweb-1.40 to my DOS machine and compiled it with DJGPP. Now I have a running fweb 1.40 on my PC. However, the fwebmac.sty that comes with the package is of version 1.30, and the fwebmacl.sty is of version 1.32. I'm wondering whether I can get the 1.40 version of the files by ftp. Thanks for your help in advance. Weiqi Gao gaow@daisy.siue.edu ================================================================================ Archive-Date: Fri, 11 Mar 1994 17:36:37 CST Sender: LP-Mgr@SHSU.edu From: c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) Reply-To: LitProg@SHSU.edu, c21vc@KOCRSV01.DELCOELECT.COM Subject: AbstractionLet me list a subroutine, provide a description, and then ask a Message-ID: <1994Mar11.194419.27657@kocrsv01.delcoelect.com> Date: Fri, 11 Mar 1994 19:44:19 GMT To: LitProg@SHSU.EDU question sub delete_file { local($filename) = @_; $cmdline = "rm -rf $filename"; $output = `$cmdline 2>&1 `; if ($?) { $warning = "\n Problems deleting file $filename" . "\n Command Used: $cmdline" . "\n Output Received: $output"; printf "\n $warning"; $status = 'ERROR'; } else { $status = 'GOOD'; } return ($status); } The above is in Perl. Unix provides 'rm' to remove files, which can be used in Perl under backticks. The subroutine above adds a small amount of functionality to 'rm' by: . Providing error handling . Being more English like and less programmerese (delete_file versus rm) I prefer to make subroutines like the above and use them instead of using 'rm' for instance and performing error handling in place. Usually the subroutines add a little more functionality than the above and in that sense the above is an extreme case. In our system, we use 'core commands' from another package and I prefer to convert the cryptic core commands into more English like subroutines. Further, if it seems that a likely to be useful higher level function may be built by combining say two or three lower level functions, I do so even if I don't have an immediate use for it. The idea is to make building blocks from the ground up thus enriching the set of building blocks that came as a part of the language. (One author calls the latter factory objects.) Some people dislike this practice. The objection usually voiced is that extra time is spent in branching to the subroutine and back. Our set of programs is interpreted (as opposed to compiled). The application is also 'processing user entries'; the extra time branching is not a factor at all. I contend that in all but exceptional cases the advantages of the practice (reuse, english likeness, lack of clutter in the calling programs) make it preferable. Some people seem to be bothered by the adding of more and more units and claim that there is more to maintain. If the lines of code were in place instead of in a subroutine they still need to be maintained. Any comments ? Keywords: ================================================================================ Archive-Date: Fri, 11 Mar 1994 18:44:06 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 11 Mar 94 19:42:13 -0500 From: koopman@ctc.com (Michael G. Koopman) Message-ID: <9403120042.AA18031@sgi81.ctc.com> To: LitProg@SHSU.edu, c21vc@kocrsv01.delcoelect.com Subject: AbstractionLet me list a subroutine, provide a description, and then Reply-To: LitProg@SHSU.edu, koopman@ctc.com From: c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) Organization: Delco Electronics Corp. Date: Fri, 11 Mar 1994 19:44:19 GMT Regarding your Perl(tm) methodology - > The idea is to make building blocks from the ground up thus enriching > the set of building blocks that came as a part of the language. (One > author calls the latter factory objects.) ... > Some people seem to be bothered by the adding of more and more units > and claim that there is more to maintain. If the lines of code were in > place instead of in a subroutine they still need to be maintained. > > Any comments ? Two - First, check out the Perl(tm) functions. Combining 'C' language operations into simplier expressions with extended capability is built into the core of the language. Conclusion: good choice, continuity. Second, natural language-like operations and literate programming? Did you forget this is a computer? ABEND erro..... eQUA.... > Keywords: chain,code,board,stone,wannis :-) Michael Koopman (mike) Associate Computer Systems Specialist Concurrent Technologies Corporation internet: koopman@ctc.com 1450 Scalp Avenue phone: +1-814-269-2637 Johnstown, PA 15904-3321 USA telefax: +1-814-269-2402 ================================================================================ Archive-Date: Sun, 13 Mar 1994 19:26:43 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Reply-To: LitProg@SHSU.edu, marcus@X4U2.DESY.DE Subject: Looking for FWEB FAQ Maintainer Message-ID: Date: Sun, 13 Mar 1994 18:57:45 GMT To: LitProg@SHSU.EDU Howdy, The last update of the FWEB FAQ is for version 1.29. Now, after v1.40 is being discussed and I didnt find the time to update for v1.30, I think it is high time to look for a volunteer who wants to continue the work done, for v1.30 or v.1.40. The principal FAQ source is written in TeXinfo and expands nicely into DVI, PostScript, Emacs Info and plain text. All that should be done for an update to v1.30 is to fix the pointers to places in the manual, and check for very few additional questions which have been posted to c.p.l. Then, John Krommes should be sent the final draft of a FAQ for check. The two main reasons why I would not try to update it anymore is that I am out of touch with FWEB since I have only used other LitProg tools for the last year or so, and also because I want to get the ball rolling for the GNA LitProg course, finally. The ideal maintainer o knows TeXinfo (or isnt afraid to learn something new), o uses FWEB regularly, and o is ready to retrieve the bulk of my FAQ material for an update from ftp.desy.de in pub/web/fweb/faq.tar.gz. If you're pondering whether you want the job, just look at it. o will handle the USENET approval of the fweb-faq for c.p.l. (header for this is ready-for-use). I will be glad to provide the HyperText version of the FAQ (if it remains a TeXinfo source file) and keep its latest version on the World-Wide Web [see http://info.desy.de/user/projects/LitProg.html, or ftp.desy.de:/pub/userWWW/projects/Announce/LitProg.txt for WWW info.] 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: Sun, 13 Mar 1994 20:09:28 CST Sender: LP-Mgr@SHSU.edu From: lwall@netlabs.com (Larry Wall) Reply-To: LitProg@SHSU.edu, lwall@NETLABS.COM Subject: Re: Abstraction Message-ID: <1994Mar14.014718.7800@netlabs.com> Date: Mon, 14 Mar 1994 01:47:18 GMT To: LitProg@SHSU.EDU In article <1994Mar11.194459.27726@kocrsv01.delcoelect.com> c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) writes: : Any comments ? Sure. You're going to be surprised the first time someone passes in a filename containing shell metacharacters, and then you're going to be even more surprised if that filename contains the printf metacharacter. I have no problem with people who want to roll their own user interface--I am not a monoculturalist. However, if you're going to be designing user interfaces, you need to hold yourself to a higher standard of robustness. To put it as bluntly as possible, I don't want to hear people maligning Perl because your code deleted the root filesystem. I did have one quibble with your user interface. I think it's a disimprovement to return a "true" string for both success and failure. You're going to have people writing: if (&delete_file($file)) or worse, if (&delete_file($file) == "GOOD") which is always bad. Note the use of == where eq is needed. A good human interface makes allowances for human nature. Larry P.S. Speaking of user interfaces, you really oughta learn how to cross-post too. Grumble... ================================================================================ Archive-Date: Sun, 13 Mar 1994 20:32:22 CST Sender: LP-Mgr@SHSU.edu From: cdevan@leo.vsla.edu (Chris Devan) Reply-To: LitProg@SHSU.edu, cdevan@LEO.VSLA.EDU Subject: Re: Name needed Message-ID: <1994Mar11.212512.25797@leo.vsla.edu> Date: Fri, 11 Mar 1994 21:25:12 GMT To: LitProg@SHSU.EDU Try CoDePo or ReCoDePo ================================================================================ Archive-Date: Mon, 14 Mar 1994 19:29:51 CST Sender: LP-Mgr@SHSU.edu From: eaeu387@rigel.oac.uci.edu (Aoyama-san) Reply-To: LitProg@SHSU.edu, eaeu387@RIGEL.OAC.UCI.EDU Subject: Re: Teach yourself C book - Any suggestions? Date: 15 Mar 94 00:53:29 GMT Message-ID: To: LitProg@SHSU.EDU wrc1001@cus.cam.ac.uk (W.R. Corner) writes: >Hi >I'm about to attempt to teah myself C. Because I have to! And I was wondering >if anyone out there could recommend a good book that I could follow. >Preferably one that is simple and easy to follow. I know a little Fortran >and Basic so I'm not cpmpletely clueless! >Any suggestions gratefully received. >One last thing - I have a copy of Turbo C on my pc - does this make any >difference to what I shoud get? How different is it from the generic C? >Thanks in advance... I am a student in almost the exact same boat. I have the same questions he does except that I don't have any C program... but my dad would like me to work for him and he has visual c++. I don't know how to get proficient enough to get up to the point where I could program in c++. I think I could learn c and then figure out c++. I hope anyway. Any suggestions? Also anyone know of news groups for newbie programmers(is this one?)? For C? Thanks in advance!!!!!!!!!!!!!!!!!!!!!!! Aoyama ================================================================================ Archive-Date: Mon, 14 Mar 1994 22:52:55 CST Sender: LP-Mgr@SHSU.edu From: Mark.Probert@nms.otc.com.au (Mark Probert) Reply-To: LitProg@SHSU.edu, Mark.Probert@NMS.OTC.COM.AU Message-ID: <9403130414.AA04163@ra.pad.otc.com.au> Subject: Re: Teach yourself C book - Any suggestions? To: LitProg@SHSU.edu, salmi@convex.csc.FILq Date: Sun, 13 Mar 1994 15:14:30 +1100 (AEST) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Timo Salmi... > > In article <1994Mar8.155950.29032@infodev.cam.ac.uk> wrc1001@cus.cam.ac.uk (W.R. Corner) writes: > >I'm about to attempt to teah myself C. Because I have to! And I was wondering > >if anyone out there could recommend a good book that I could follow. > > Not a book, but the following might be of interest > The best self-help and class book I've used/tought is "Practical C Programming" by Steve Oualline (O'Reilly Press 1992). Very clear and good thoughts behind what he says and how he presents the material. Recommended. -- mark. (probertm@nms.otc.com.au) ph: (02) 339 3953 fax: (02) 339 3688 ================================================================================ Archive-Date: Tue, 15 Mar 1994 12:20:05 CST Sender: LP-Mgr@SHSU.edu From: porttiki@cc.Helsinki.FI (Anssi Porttikivi) Reply-To: LitProg@SHSU.edu, porttiki@CC.HELSINKI.FI Subject: literary programming and C++ Date: 15 Mar 1994 17:41:56 GMT Message-ID: <2m4s14$6gi@klaava.Helsinki.FI> To: LitProg@SHSU.EDU Dear people! THE BACKGROUND I have read the TeXbook and the LaTeX book through with medium concentration. I have used TeX a little. I tried to read "TeX - The Program" but it was too much for me. I have a copy of the original Knuth WEB report and have glanced through it. But I never had any real use for these methods before. Now we are considering CWEB for a middle sized four people programming project at The Helsinki University, Department of Computer Science. Our department uses LaTeX a lot but has very little experience with WEB. I have spent two days reading the LitProg stuff in WWW - an excellent proof of the tremendous effectiveness of Internet technologies of today as learning tools. THE PROBLEM However, I maybe stupid but I don't quite understand how to write a makefile and WEB source files to produce - a single document with single contents and index page - lots of C++ header and implementation files Maybe this is trivial and is done with CWEB @(object.H@> and @(object.C@> commands? How about multiple WEB source files? We are using all kinds of weird C++ features extensively, I don't think that could be a problem? And I am not sure if I am in the right track at all. And what do you think, should I complicate this even further by introducing SCCS to the project? Good grief, tell me what is the fastest way for humble humans to write best possible code! With "best" I mean a) understandable b) re-usable c) with fool proof easy to use user interface d) reliable I don't give a damn about memory requirements or speed! I believe in systems simple enough to be obviously right, not in systems complex enough not to be obviously wrong. Why am I posting this anyway? I should be reading the docs and examples instead... And the whole project (program visualization, concentrating on string algorithms) should maybe be done in Visual Basic if we wanted to get it done fast... Anssi.Porttikivi@Helsinki.Fi ================================================================================ Archive-Date: Wed, 16 Mar 1994 03:14:22 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 16 Mar 1994 10:09:17 +0100 From: Thomas Herter Reply-To: LitProg@SHSU.edu, Thomas.Herter@MCH.SNI.DE Message-ID: <199403160909.AA02537@d255s228.mch.sni.de> To: LitProg@SHSU.edu Subject: Re: literary programming and C++ Content-Type: text [This a reply to: porttiki@cc.helsinki.fi (Anssi Porttikivi)] Hallo Anssi, I wrote a lot of software using Knuth's original WEB and Pascal. I have done also a small project using CWEB and C. I have also done some experiments with MWEB, FWEB and Spider for ADA. I believe, that all the WEB's work similar and that any _good programmer_ can adapt the Web-Approach within of two-three weeks of training. C++ ist another question. My primary job is compiler developement and my current tast is to develop a C++ Compiler. Based on this know-how I absolutely discourage anybody to use such a language for any software projects. The language has a large number of design errors which will be ``fixed'' by the commitee by introducing new exceptions in visibility rules or by introducing plenty of new keywords. Many language elements are more or less strongly overlapping in their funtionality. Example: two different forms of initialization which differ slightly for class objects with constructors. Or think about the data typ conversion: via cast and via constructor (invisible !!!) call and via conversion functions... Every meeting of the ISO committe brings really a HUGE number of corrections and modifications and further extentions. 1992 C++ V2-parser was alredy twice as big as the ADA parser and additional disambiguation modul (or prepars) was still necessary to recognize C++. The nondeterministic parts of C++ require backtrack parsing, which can be for some forms of declarations even recursively nested!! (See J. Roskind's article and C++ grammar as an impressive collection of C++ design qualities and the number of problems beeing ``overseen'' during language definition). And ADA is believed to be a ``large langauge''... The new parser for ISO C++ is going to be significant larger again. My todays observation is ~2.5 times larger. The semantics of C++ constructs is also extremly large. It is shure not smaller than ADA's complex semantics---look into the working draft for C++ Standard. Since the begin of my participation on C++ project end of 1991 the volume of the C++ standard has been doubled! The huge number of excetions in the semantical rules makes them heavy to learn and understand for average programmer. The next edition of B. Strostroup's book about C++ will take (I think) at least 1500 Pages to describe the todays C++. The book Ellis/Stroustrup ``Annotated C++ RM'' is _absolutely_ outdated. I believe that nodoby seeking for beauty and correctness of algorithms should use language like C++. And since the langauge is still ``under construction'' better wait for the final product. Thomas ------------------------------------ Thomas Herter, SNI Muenchen (thomas.herter@mch.sni.de) tel +89 636 49973 ================================================================================ Archive-Date: Wed, 16 Mar 1994 04:54:25 CST Sender: LP-Mgr@SHSU.edu From: AStirnem@maths.exeter.ac.uk Reply-To: LitProg@SHSU.edu, AStirnem@MATHS.EXETER.AC.UK Date: Wed, 16 Mar 94 10:50:44 GMT Message-ID: <1771.9403161050@noether.maths.exeter.ac.uk> To: LitProg@SHSU.edu, Thomas.Herter@MCH.SNI.DE Subject: literary programming and C++ > C++ ist another question. ... > I absolutely discourage anybody to use such a language > for any software projects. ... > The semantics of C++ constructs is also extremly large. This remark is a bit out of scope of this discussion group. Let me, nevertheless, comment on it. My experiences with C++ on a project of medium size have been very encouraging. I am using only a small subset of the language, and I am using it conservatively, orientating myself with Stroustrup's "The C++ Programming Language". The two features that are most important to me are * the possibility of bundling functions and data together and * operator overloading. In fact, the latter point alone would justify my using C++. Being in the business of computer assisted mathematical proof, I want my code to be as close to mathematical notation as possible. But I agree that the language is huge; it must be a nightmare to write a C++ compiler. Back to Anssi's question: I have been using C++ together with FWEB for about one year, and I am pleased with the results. Recently I switched to NOWEB, which I prefer to FWEB, mainly because of the ease with which it fits into the UNIX toolbox. I also find its syntax more flexible. My advice would be: Keep using C++, and use it together with NOWEB. Andreas Stirnemann. AStirnem@maths.ex.ac.uk ================================================================================ Archive-Date: Wed, 16 Mar 1994 11:00:51 CST Sender: LP-Mgr@SHSU.edu From: carroll@stimpy.eecis.udel.edu (Mark C. Carroll) Reply-To: LitProg@SHSU.edu, carroll@STIMPY.EECIS.UDEL.EDU Subject: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Date: 16 Mar 1994 16:44:56 GMT Message-ID: To: LitProg@SHSU.EDU >>>>> "AStirnem" == AStirnem writes: In article <1771.9403161050@noether.maths.exeter.ac.uk> AStirnem@maths.exeter.ac.uk writes: >> C++ ist another question. ... I absolutely discourage anybody to >> use such a language for any software projects. ... The semantics >> of C++ constructs is also extremly large. AStirnem> This remark is a bit out of scope of this discussion AStirnem> group. Let me, nevertheless, comment on it. And I'll comment on your comments... AStirnem> My experiences with C++ on a project of medium size have AStirnem> been very encouraging. I am using only a small subset of the AStirnem> language, and I am using it conservatively, orientating AStirnem> myself with Stroustrup's "The C++ Programming Language". AStirnem> The two features that are most important to me are * the AStirnem> possibility of bundling functions and data together and * AStirnem> operator overloading. AStirnem> In fact, the latter point alone would justify my using AStirnem> C++. Being in the business of computer assisted mathematical AStirnem> proof, I want my code to be as close to mathematical AStirnem> notation as possible. I'm not going to comment much... but there are a couple of things that must be said. A thing that I've noticed is *very* common among programmers is a resistance to take a thorough look at alternatives. Above, you've presented your reasons for using C++: those reasons are *not* reasons for using C++ specifically. They're not even reasons for using an object-oriented language! They're reasons for using a language with user defined data types and operator overloading. The *same* *exact* features are supported by quite a large number of languages. Just off the top of my head, without even thinking about it before I type: Ada9X (free compiler from GNU), Eiffel (commercial), Sather (free compiler from ICSI), and CLU (free compiler from MIT). And that's only if I restrict myself to strongly typed imperative languages which I've actually used within the last year.... This isn't to say that C++ isn't the best choice for your project - it very well may be. But you've not presented an argument to support that. (It probably is the best choice, because of the libraries that are available for it.) AStirnem> But I agree that the language is huge; it must be a AStirnem> nightmare to write a C++ compiler. Worse. It's a nightmare to *use* one. Not necessarily because of any flaws in the language (what exactly constitutes a "flaw" in a language design is largely a matter of personal taste and religion), but because it's a moving target. The point made by the earlier poster holds - it's *not* a good idea to start working on a large software system in a language where the language definition is constantly changing. There are a couple of reasons: first, your code may break. Second, with a moving target, the compiler writers are always going to be trying to catch up. There's a choice: fix a bug and get behind on tracking the language spec, or implement changes as they happen. -- ================================================================================ Archive-Date: Wed, 16 Mar 1994 11:28:53 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 16 Mar 94 12:28:32 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, porttiki@cc.helsinki.fi Subject: Re: literary programming and C++ Message-ID: Anssi.Porttikivi@Helsinki.Fi writes: > I have read the TeXbook and the LaTeX book through with > medium concentration. I have used TeX a little. I > tried to read "TeX - The Program" but it was too much > for me. Me too. I browse through it occasionally, though. > THE PROBLEM > > However, I maybe stupid but I don't quite understand > how to write a makefile and WEB source files to produce > > - a single document with single contents and index page > - lots of C++ header and implementation files > > Maybe this is trivial and is done with CWEB > @(object.H@> and @(object.C@> commands? How about > multiple WEB source files? Yes, that's what @( is for. If a number of different programmmers are working on different parts, then you will probably want to use @i a lot, too. > We are using all kinds of weird C++ features > extensively, I don't think that could be a problem? It may confuse the prettyprinter, but @[ and @] can usually be used to unconfuse it. CTANGLE couldn't care less. > And I am not sure if I am in the right track at all. > And what do you think, should I complicate this even > further by introducing SCCS to the project? Use SCCS, by all means. My serialno sample (in the pub/leew/LP.samples directory of bart.kean.edu) uses PVCS, but can show you a simple way of dealing with version control in a CWEB program. The palevent program (in the same directory) ``goes whole hog'' WRT version control, but it's in noweb rather than CWEB. Feel free to use any ideas from these programs. > > Good grief, tell me what is the fastest way for humble > humans to write best possible code! With "best" I mean > > a) understandable > b) re-usable > c) with fool proof easy to use user interface > d) reliable That's the philosopher's stone, isn't it? There's no way to guarantee any of that, but IMHO literate programming addresses every issue except c. I think most people on this list would agree. > I don't give a damn about memory requirements or speed! ``Premature optimization is the root of all evil.'' -- Knuth ``Make it right before you make it faster.'' -- Kernighan & Plauger > I believe in systems simple enough to be obviously > right, not in systems complex enough not to be > obviously wrong. Bravo! I wish Microsoft (and Borland and IBM and the rest of them) felt that way. > Why am I posting this anyway? I should be reading the > docs and examples instead... And the whole project > (program visualization, concentrating on string > algorithms) should maybe be done in Visual Basic if we > wanted to get it done fast... Visual Programming systems lead to major maintenance problems in my experience, although using LP in conjunction with a VP system is possible (but difficult -- the VP systems usually don't like other tools muscling in on their territory). Hope this helps. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | More good code has been written in Computer Science Department | languages denounced as ``bad'' than in Kean College of New Jersey | languages proclaimed ``wonderful'' -- Union, NJ 07083 | much more. USA | | -- Bjarne Stroustrup leew@pilot.njin.net | "The Design and Evolution of C++" (1994) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Wed, 16 Mar 1994 12:59:00 CST Sender: LP-Mgr@SHSU.edu Date: Wed, 16 Mar 94 13:58:56 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, Thomas.Herter@mch.sni.de Subject: Re: literary programming and C++ Message-ID: Thomas Herter writes: > I believe that nodoby seeking for beauty and correctness of > algorithms should use language like C++. And since the langauge > is still ``under construction'' better wait for the final product. I don't want to get involved in a ``language war,'' but Stroustrup has a new book out entitled _The_Design_and_Evolution_of_C++_ (Addison-Wesley, 1994) that discusses the various design decisions and the reasons for each of them. It's worthwhile reading for both friends and foes of C++, and (IMHO) should be required reading for all language designers (as it's the only book I've seen that describes all the pitfalls of programming language design). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | More good code has been written in Computer Science Department | languages denounced as ``bad'' than in Kean College of New Jersey | languages proclaimed ``wonderful'' -- Union, NJ 07083 | much more. USA | | -- Bjarne Stroustrup leew@pilot.njin.net | "The Design and Evolution of C++" (1994) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Wed, 16 Mar 1994 13:31:10 CST Sender: LP-Mgr@SHSU.edu From: c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) Reply-To: LitProg@SHSU.edu, c21vc@KOCRSV01.DELCOELECT.COM Subject: Re: Abstraction Message-ID: <1994Mar16.153043.22549@kocrsv01.delcoelect.com> Date: Wed, 16 Mar 1994 15:30:43 GMT To: LitProg@SHSU.EDU Frankly, I am surprised by the tone of mild hostility in the followup. My whole point of posting on this topic is to get the opinions of those outside our group, whether they are supportive or not. There is the danger that the opinions are given based on the very limited information that I have given (i.e., without having had a chance to look at the rest of our system). I guess that I got into this habit of building slightly more functional building blocks (when compared to the building blocks provided by the language) and reusing them from my limited but enjoyable experience with Smalltalk. I have no problem agreeing to good standards of robustness etc. I don't stop with the first level building blocks but go on to higher levels. I see these as customization to our local site based on our functions. The example I posted was not typical in this sense. (A couple of people pointed out that I could use Perl's unlink.) Some of these functions may be used by other Perl users also, laying aside for a minute the question of whether these are better or not. For instance, I often have a need to: 1. create a temporary directory 2. perform certain functions here 3. delete the temporary directory 4. return to the original directory I have subroutines to do 1, 3, and 4. I use them instead of repeating the lines in the subroutines, each place it is called. I see it as an improvment. a given function is done only in one place (in the subroutine); the subroutines are more English-like and less computerese. Now on to specifics: > >Sure. You're going to be surprised the first time someone passes in a >filename containing shell metacharacters, and then you're going to be >even more surprised if that filename contains the printf metacharacter. > In case you care to educate me, what will happen ? You can point to pages in the Camel book. >I have no problem with people who want to roll their own user >interface--I am not a monoculturalist. However, if you're going to be >designing user interfaces, you need to hold yourself to a higher standard >of robustness. To put it as bluntly as possible, I don't want to hear >people maligning Perl because your code deleted the root filesystem. > The building blocks that I construct are strictly for my own use. I have a set of standards that continue to evolve on their usage. If others want to use them, they should follow these standards. I have no problem building in allowances for human nature, as you say. How can my 'code delete the root filesystem' and consequently 'people maligning Perl' ? Aren't the files of the root filesystem protected by permissions ? >I did have one quibble with your user interface. I think it's a >disimprovement to return a "true" string for both success and failure. >You're going to have people writing: > > if (&delete_file($file)) > >or worse, > > if (&delete_file($file) == "GOOD") > >which is always bad. Note the use of == where eq is needed. A good human >interface makes allowances for human nature. > 1. The convention and examples here (in our organization) also clearly ask for the use of 'eq' and not '=='. 2. My convention and examples here also require testing specifically for 'GOOD' and 'ERROR'. I personally never write if (&delete_file($file)) (because deleting being true does not mean quite the same thing as delete being successful, to me). More importantly, almost all my subroutines return several variables back, the first of which is always the status; the rest are meaningful only if status eq 'GOOD'. An example of something in progress: local($debug_mode) = 'TRUE'; local($calds_version) = "6.1"; local( $status, $original_directory_name, $temporary_directory_name, $library_name, $library_name_in_full, ) = &setup($debug_mode, $calds_version); if ($status ne 'GOOD') { exit }; print DEBUG "\n Original Directory: $original_directory_name"; print DEBUG "\n Temporary Directory: $temporary_directory_name"; print DEBUG "\n Library Name: $library_name"; print DEBUG "\n Library Name In Full: $library_name_in_full"; # process input - get sw member name - check that members are readable # they both point to same sw member etc. local ( $status, $software_member_name, $bundle1, $DLS1, $bundle2, $DLS2, @list_of_calsets_to_be_compared ) = &process_user_input(); print DEBUG "$status\n"; if ($status ne 'GOOD') { $status = &cleanup( $original_directory_name, $temporary_directory_name, $library_name_in_full, ); exit; } print DEBUG " Bundle 1: $bundle1 DLS 1: $DLS1 Bundle 2: $bundle2 DLS 2: $DLS2 Name of software member in the bundles being compared: $software_member_name Calsets to be compared: @list_of_calsets_to_be_compared"; Followup-To: References: <1994Mar11.194459.27726@kocrsv01.delcoelect.com> <1994Mar14.014718.7800@netlabs.com> From: c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) Organization: Delco Electronics Corp. Subject: Re: Abstraction Keywords: ================================================================================ Archive-Date: Wed, 16 Mar 1994 14:54:22 CST Sender: LP-Mgr@SHSU.edu From: carroll@stimpy.eecis.udel.edu (Mark C. Carroll) Reply-To: LitProg@SHSU.edu, carroll@STIMPY.EECIS.UDEL.EDU Subject: Re: literary programming and C++ Date: 16 Mar 1994 20:36:07 GMT Message-ID: To: LitProg@SHSU.EDU >>>>> "Lee" == Lee Wittenberg writes: In article Lee Wittenberg writes: Lee> Thomas Herter writes: >> I believe that nodoby seeking for beauty and correctness of >> algorithms should use language like C++. And since the langauge is >> still ``under construction'' better wait for the final product. Lee> I don't want to get involved in a ``language war,'' but Lee> Stroustrup has a new book out entitled Lee> _The_Design_and_Evolution_of_C++_ (Addison-Wesley, 1994) that Lee> discusses the various design decisions and the reasons for each Lee> of them. It's worthwhile reading for both friends and foes of Lee> C++, and (IMHO) should be required reading for all language Lee> designers (as it's the only book I've seen that describes all the Lee> pitfalls of programming language design). I haven't seen this book yet, but I'm inclined to second what Lee's got to say, sight unseen. I had the opportunity to meet Stroustrup last fall, when he visited the U of D, and my opinion of him was radically changed. He's got a lot of terrific, insightful things to say about programming languages, which should be interesting to anyone who's interested in languages in general, or C++ in particular. Even if you *hate* C++ (which I most certainly do), you should really give Stroustrup a listen. You might be surprised how much you agree with him. -- ================================================================================ Archive-Date: Wed, 16 Mar 1994 15:56:35 CST Sender: LP-Mgr@SHSU.edu From: ogata@tethys.nswc.navy.mil (Eric Ogata) Reply-To: LitProg@SHSU.edu, ogata@TETHYS.NSWC.NAVY.MIL Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Message-ID: Date: Wed, 16 Mar 1994 20:14:56 GMT To: LitProg@SHSU.EDU In article carroll@stimpy.eecis.udel.edu (Mark C. Carroll) writes: > Ada9X (free compiler from GNU) Ok, where can I find this? I just checked prep.ai.mit.edu. If it is there it is not named in a manner such that I can figure out what it is (gnada, gnu-ada, ada9X...) I have seen no anouncement of its availability. Does it in fact exist? Has 9X with OOP extensions actually been formally accepted yet? Commercial Ada compilers are *way* too expensive for this Navy employee. -- eric ogata@tethys.nswc.navy.mil ================================================================================ Archive-Date: Wed, 16 Mar 1994 16:28:32 CST Sender: LP-Mgr@SHSU.edu From: sherrod@sporty.col.oh.us (David H. Sherrod) Reply-To: LitProg@SHSU.edu, sherrod@SPORTY.COL.OH.US Subject: Re: Teach yourself C book - Any suggestions? Date: Wed, 16 Mar 1994 03:12:32 GMT Message-ID: <1994Mar16.031232.24653@sporty.col.oh.us> To: LitProg@SHSU.EDU I'm also in the same boat - but have a suggestion as well. I've been working with The Waite Group's New C Primer Plus. It covers several versions of C (although C++ is not covered in the edition I use). It seems well organized, and has helped me grasp a good understanding of ANSI C. My only problem is that I'd like a book which addresses the Turbo C++ (Borland) which I own. In that vain, I also have a question - Borland has come out with C++ Version 4. It looks to have all the bells and whistles that my Visual Edition Turbo C++ has - and more. Has anyone used it? Should I upgrade? Considerations? Thanks! David Piglet sidled up to Pooh from behind. "Pooh!" he whispered. "Yes, Piglet?" "Nothing," said Piglet, taking Pooh's paw. "I just wanted to be sure of you." sherrod@sporty.col.oh.us ================================================================================ Archive-Date: Wed, 16 Mar 1994 16:28:43 CST Sender: LP-Mgr@SHSU.edu From: adam@csi.jpl.nasa.gov (Adam Bernstein) Reply-To: LitProg@SHSU.edu, adam@CSI.JPL.NASA.GOV Subject: Re: Teach yourself C book - Any suggestions? Date: 16 Mar 1994 22:14:24 GMT Message-ID: <2m80c0$snc@grover.jpl.nasa.gov> To: LitProg@SHSU.EDU In article , eaeu387@rigel.oac.uci.edu (Aoyama-san) writes: |> wrc1001@cus.cam.ac.uk (W.R. Corner) writes: |> |> >I'm about to attempt to teah myself C. Because I have to! And I was wondering |> >if anyone out there could recommend a good book that I could follow. I'm guessing you got lots of replies by email, but just in case... I taught myself C after taking one class in Pascal, using the bible of C programming: "The C Programming Language" (Second Edition!) by Kernighan and Ritchie. It will teach you the basics, and then you'll use it as a reference ad infinitum. It's wonderful (he says wistfully, little red hearts drifting up around his head). |> >One last thing - I have a copy of Turbo C on my pc - does this make any |> >difference to what I shoud get? How different is it from the generic C? There isn't much of a generic C for PC's, or rather it's much the same situation as that for standards in the rest of the industry: The wonderful thing about standards is that there are so many to choose from! Turbo C is a good package (I use it), especially if you have money constraints, although there are some more sophisticated packages available for several times the price. I don't know too much about 'em, but there's Borland C++ (makers of the lower-end Turbo C++), Microsoft C++ (comparable to Borland?), Watcom, Semantec, and in the public domain there's djgpp (where does that name come from, anyway?). You'll notice that they're all called C++ these days, but they all do regular C code. |> I am a student in almost the exact same boat. I have the same questions he does except that I don't have any C program... but my dad would like me to work for |> him and he has visual c++. I don't know how to get proficient enough to get |> up to the point where I could program in c++. I think I could learn c and |> then figure out c++. I hope anyway. Any suggestions? Hell, Visual C++ writes the code for you, right? Point and click. Maybe you have to take care of the nitty gritty details; not having used it, I really don't know. Good luck. Adam ------------------------------------------------------------------------ Adam Bernstein Phone: 818 354-9784 Jet Propulsion Lab Guidance & Control / FAX: 818 393-6105 MS 198-235 Optical Tracking Group 4800 Oak Grove Dr. adam@bloodhound.jpl.nasa.gov Pasadena, CA 91109 ------------------------------------------------------------------------ ================================================================================ Archive-Date: Wed, 16 Mar 1994 17:15:59 CST Sender: LP-Mgr@SHSU.edu From: btd@iastate.edu (Benjamin T. Dehner) Reply-To: LitProg@SHSU.edu, btd@IASTATE.EDU Subject: Re: Teach yourself C book - Any suggestions? Date: 16 Mar 94 22:45:14 GMT Message-ID: To: LitProg@SHSU.EDU In <2m80c0$snc@grover.jpl.nasa.gov> adam@csi.jpl.nasa.gov (Adam Bernstein) writes: >In article , eaeu387@rigel.oac.uci.edu >(Aoyama-san) writes: >|> wrc1001@cus.cam.ac.uk (W.R. Corner) writes: >|> >|> >I'm about to attempt to teah myself C. Because I have to! And I was wondering >|> >if anyone out there could recommend a good book that I could follow. > I'm guessing you got lots of replies by email, but just in case... I >taught myself C after taking one class in Pascal, using the bible of C >programming: "The C Programming Language" (Second Edition!) by Kernighan and >Ritchie. It will teach you the basics, and then you'll use it as a reference >ad infinitum. It's wonderful (he says wistfully, little red hearts drifting >up around his head). HWARF (he says nautiously, little chunks spewing from his mouth :) I've got Kernighan and Ritchie, I've tried to learn C from Kernighan and Ritchie without taking a class. I'll say this: it sucks. It's a great C _reference_, it has all of the system calls, header file information, control structures, etc., but it is a lousy book to try and learn from. Ben "I gained nothing at all from Supreme Enlightenment, and for that very reason it is called Supreme Enightenment" -- Gotama Buddha -- ----------------------------------------------------------------------------- Benjamin T. Dehner Dept. of Physics and Astronomy btd@iastate.edu Iowa State University Ames, IA 50011 ================================================================================ Archive-Date: Thu, 17 Mar 1994 02:31:19 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 1994 09:26:05 +0100 From: Thomas Herter Reply-To: LitProg@SHSU.edu, Thomas.Herter@MCH.SNI.DE Message-ID: <199403170826.AA10556@d255s228.mch.sni.de> To: LitProg@SHSU.edu, ogata@TETHYS.NSWC.NAVY.MIL Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Content-Type: text > Ok, where can I find this? I just checked prep.ai.mit.edu. If it is > there it is not named in a manner such that I can figure out what it > is (gnada, gnu-ada, ada9X...) I have seen no anouncement of its > availability. Does it in fact exist? Has 9X with OOP extensions > actually been formally accepted yet? Commercial Ada compilers are > *way* too expensive for this Navy employee. > -- > eric > ogata@tethys.nswc.navy.mil Try `gnats' -- Gnu Ada Translation System Thomas ------------------------------------ Thomas Herter, SNI Muenchen (thomas.herter@mch.sni.de) tel +89 636 49973 ================================================================================ Archive-Date: Thu, 17 Mar 1994 03:33:26 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 94 09:04:38 MET From: Zdenek Wagner Reply-To: LitProg@SHSU.edu, WAGNER%CSEARN.BITNET@SHSU.EDU Subject: Re: literary programming and C++ To: Literate Progaramming list , leew@PILOT.NJIN.NET On Wed, 16 Mar 94 13:58:56 EST Lee Wittenberg said: >Thomas Herter writes: > >> I believe that nodoby seeking for beauty and correctness of >> algorithms should use language like C++. And since the langauge >> is still ``under construction'' better wait for the final product. > >I don't want to get involved in a ``language war,'' but Stroustrup has >a new book out entitled _The_Design_and_Evolution_of_C++_ (Addison-Wesley, >1994) that discusses the various design decisions and the reasons for each >of them. It's worthwhile reading for both friends and foes of C++, >and (IMHO) should be required reading for all language designers (as >it's the only book I've seen that describes all the pitfalls of >programming language design). > > -- Lee > >------------------------------------------------------------------------ >Lee Wittenberg | More good code has been written in >Computer Science Department | languages denounced as ``bad'' than in >Kean College of New Jersey | languages proclaimed ``wonderful'' -- >Union, NJ 07083 | much more. >USA | > | -- Bjarne Stroustrup >leew@pilot.njin.net | "The Design and Evolution of C++" (1994) >------------------------------------------------------------------------ Anyway, if we wait until the perfect programming language is developed and it is a final product, we will find that we are too old (or possibly even dead). Isn't it better to make a reasonable compromise? ,~~~/ /` / /| /~~~ / / |_/ /__/ ' | / / /~~/ /~~/ /~~/ /~~/ /\ | /| / /~~/ /~~/ /~~/ /~~/ /~~~ / , / / /~~~ / / /~~~ / \ |/ |/ / /_/ / / / /~~~ / ~~~~ ~~~ ~~~ ' ' ~~~ ' ` ' ' ~~~ ~~/ ' ' ~~~ ' 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, 17 Mar 1994 03:57:44 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 1994 10:53:19 +0100 (MET) From: Lode Leroy Reply-To: LitProg@SHSU.edu, Lode Leroy Subject: Re: Re: Teach yourself C book - Any suggestions? To: Adam Bernstein CC: LitProg@SHSU.EDU Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII On 16 Mar 1994, Adam Bernstein wrote: > the lower-end Turbo C++), Microsoft C++ (comparable to Borland?), Watcom, > Semantec, and in the public domain there's djgpp (where does that name come > from, anyway?). You'll notice that they're all called C++ these days, but > they all do regular C code. djgpp is Delory's port of GNU C++ to dos (the pp is instead of ++, on UNIX the gnu C++ compiler is called g++, but DOS doesn't like that, neither does it like plusplus.) The new package comes with a C compiler, C++, and objective C, Many graphics cards supported (SVGA that is, even HIcolor 64K colors :-) Libraries to compile BORLAND C++ code, (Graphics Compatible) As to the compiler: I used BC3.0 for a while, but on benchmarking POVRAY (PD Ray Tracer) ie. timing it BC3.0 using the 'fastest code' option it was still slower than djgpp not optimizing at all. It was quite faster on compiling however, but who wants a fast compiler instead of fast programs? (well except for development) Speed was comparable to Watcom 9.5. It comes with a dos extender too I've appended the README for djgpp to know more specifications Right then I did a deltree on the BC directory. [now using Linux (PD UNIX) I did an fdisk on my dos partition as wel, going for the real stuff] disclaimer: I don't want a discussion on what compiler is best, and I'm not even associated to the GNU project (he said sadly). It's just that gcc/g++ is very good, but few people know about it. GNU is a non-profit organisation and cannot afford a media campain announcing it's stuff, so I'll do some for them. They have other terrific programs as well (FORTRAN/ADA/EMACS/GNUplot/GhostScript/...) It was intended to be portable, but it generates very good code as well. It's in the public domain, so it won't cost you a dime, except for ftping it and it's comparable to packages you'd pay $500 for... It is not intended to learn C with, as there is no IDE, and needs a 32bit processor. I've used djgpp from a 6MB ramdisk recently, containing some tools (zip etc) my editor, the c++ compiler, headers an libraries. /* due to a HD crash :-( */ BC needs a whopping 20 to 40 MB to install, and I don't have that much dram in my box... Using BC3.0 with IDE, I spent very much time circumventing limitations (memory, disk space, cpu power) and bugs. Having a protected mode compiler as well as having protected-mode programs makes you don't have to reboot (or have BC reboot for you). /* This comes in handy on the ramdisk ;-) */ I hope I didn't get too much not-so-very-correct info in this message, and sorry if I bored you with advertising. Lode Leroy Student Computer Science University of Ghent ---- readme.1st from djgpp 2.5.7 distribution ---- This is djgpp's README.1ST, which you should have read before any other. Please read this COMPLETELY before going any further. WARNING: This software comes with ABSOLUTELY NO WARRANTEE. I can't even guarantee that this software won't wipe out your entire hard drive (it's happened to a few people before, but we've fixed it). USE AT YOUR OWN RISK! It's always a good idea to make regular backups of your hard drives anyway. If you are installing djgpp off floppies, you should run the install program on disk 1. This program will prompt you for all the information it needs to properly install djgpp on your system. If you are using PKUNZIP to extract your files, don't forget the -d or you'll get them all in the same directory! All djgpp modules are designed to be unzipped from the same directory, so that they install themselves properly. You should also use the -o switch, since some files are included in multiple modules. You will need either PKUNZIP version 2 or higher, or InfoZip's unzip version 5.0 or higher. A complementary copy of InfoZip's unzip is provided as UNZIP-DJ.EXE in case you don't have either. This file uses a merged copy of go32.exe, so you should delete it in favor of the unzip.exe in zipXXbn.zip after you unzip that module. You should be able to find documentation in various subdirectories of the docs directory in the djgpp distribution. The files README and FAQ are in the djdocXXX.zip module. If you install txiXXXbn.zip, you can run "info" to read this documentation. The modules you'll want to start with are (replace XXX with an appropriate version number): djdocXXX.zip The base documentation djeoeXXX.zip Execution-only environment - extender binary, emu387, some utils, README and FAQ djdevXXX.zip Basic development libraries and utilities gccXXXbn.zip GCC binaries, including C front end (no C++ or ObjC) gasXXXbn.zip Assembler - required for all compiles bnuXXXbn.zip Binary utilities - required for all compiles Don't forget to use th "-o" switch on unzip, as some files are replicated throughout all the modules. The command should look like this: unzip-dj -o a:djeoe111.zip The EOE module is for people who only need the extender (go32) to run some other 32-bit program that didn't come with one. The remainder of these modules listed above are required to compile C programs. For more information on installing and setting up djgpp, refer to the file docs/djgpp/readme after you install Additional modules include: djemuXXX.zip 80387 emulator sources djlgrXXX.zip Basic 256-color SVGA library (grx is better) djsrcXXX.zip Sources to extender and utilities djlsrXXX.zip Sources to all the libraries djtstXXX.zip Test programs to test djgpp makXXXbn.zip GNU Make gppXXX.zip C++ front end, headers, and libraries objcXXX.zip Objective-C front end, headers, and libraries bsnXXXbn.zip Bison (yacc-like parser) flxXXXbn.zip Flex (lex-like parser) txiXXXbn.zip On-line info reader INFO.EXE and info compiler gzpXXXbn.zip GZip compressor zipXXXbn.zip Info-Zip's ZIP and UNZIP programs GNU programs are normally distributed as three files: *bn.zip Binaries for various GNU programs *dc.zip Documentation for various GNU programs *sr.zip Sources for various GNU programs (may be split into *s1.zip...*sN.zip) djgpp is a complete 32-bit C and C++ development environment for DOS. This product is intended for users who have experience using Unix, not DOS users who expect djgpp to act like any other DOS compiler. This is NOT the software you want if you want to learn programming. Supported: 80386, 80387, 80486, XMS, himem.sys, VCPI, QEMM, 386MAX, DesqView, Windows, OS/2, interrupts. Unsupported: XTs, 80286, multitasking, signals. Features: 80387 emulator, 32-bit unix-ish environment, flat memory model, debugger, SVGA graphics. ==================== Reporting bugs ==================== ALL changes to the source code should be submitted in "diff -c2" format. If you just send replacement files, I'll reject them, since I don't know which parts you've changed and my sources keep changing anyway. Diffs will also be rejected for use of bcc features in go32 sources (like // comments), or more than one feature or bugfix per diff. Please use the same programming style as the existing style when making changes to my sources. Note that new features are not bugs. If you would like to work on adding features to djgpp, please send me e-mail at dj@ctron.com beforehand, in case it's being worked on already and to coordinate it's integration. If you want to request a new feature but not work on it, send to the mailing list. If the problem is in one of the FSF utilities, please don't expect me to fix it. Problems with FSF code should be reported to the FSF; I only compile the code and distribute it. My best suggestion is to post to the appropriate newsgroup or mailing list, but if you can't find one, ask gnu@prep.ai.mit.edu. If the problem is in anything else, and you have e-mail access, I strongly recommend joining the djgpp mailing list. To do so, send mail to listserv@sun.soe.clarkson.edu: $ mail listserv@sun.soe.clarkson.edu Subject: help add djgpp ^D Any mail sent to djgpp@sun.soe.clarkson.edu will get automatically forwarded to all the subscribers on the list, and someone may have an answer to your query. Note that I (DJ) am of course a subscriber, so I will get it also. If all else fails, you may contact me directly at dj@ctron.com (preferred) or at home: DJ Delorie 24 Kirsten Ave Rochester, NH 03867-2954 USA If you write, please include a stamped, self-addressed envelope. The FSF (see README for address) sells djgpp on floppies, as do I. If you would like a complete set of djgpp floppies from me, send a check or money order (made out to DJ Delorie) in the amount of US$100 to the address above. Please specify 1.4M or 1.2M floppies, and allow a few weeks for processing and shipping. You will automatically be registered for update notices and reduced prices on future versions. To be added to the mailing list for new version notices ONLY, please send US$5 to the address above. All phone calls will be returned collect. Please leave a night/weekend phone number. ==================== Redistribution ==================== The utilities built from FSF code may NOT be made available through any means not prepared to also distribute the source for those utilities. This isn't just a good idea, it's the LAW. Read the file "copying" for more details on FSF copyright terms. Since djgpp includes such binaries, it requires the same terms. Programs that link in FSF code must comply with the GNU Library Public License, or the GNU General Public License. All FSF objects are in libgpl.a and libgpp.a I strongly recommend prepending stub.exe (use coff2exe) for any programs you intend to distribute. This aids upgrading go32, since stub.exe doesn't need to change, and coff2exe produces a faster executable due to disk alignment optimizations. ================================================================================ Archive-Date: Thu, 17 Mar 1994 08:13:11 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 94 09:11:40 -0500 From: Eric Ogata Reply-To: LitProg@SHSU.edu, ogata@TETHYS.NSWC.NAVY.MIL To: Thomas.Herter@mch.sni.de CC: LitProg@SHSU.edu Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Hi Thomas, Thanks for your help. gnats... I should have known(?) How long has this been out? I never saw it announced. Once again thanks, I must have been getting a little crabby yesterday afternoon:) -- eric ogata@tethys.nswc.navy.mil ================================================================================ Archive-Date: Thu, 17 Mar 1994 09:34:45 CST Sender: LP-Mgr@SHSU.edu From: rsr@hpuerca.atl.hp.com (Dick Rhoads) Subject: Re: Teach yourself C book - Any suggestions? Date: 17 Mar 1994 13:39:39 GMT Message-ID: <2m9mir$i8j@hpuerci.atl.hp.com> Reply-To: LitProg@SHSU.edu, dick_rhoads@hpatc.hp.com To: LitProg@SHSU.EDU About two years ago, I ordered the "Power C Master Pack" from Mix Software in Richardson, Texas (214-783-6001 800-333-0330). This included: -- The Power C reference book -- The Power C compiler for DOS -- The Power C trace utility -- The Waite Group's "Master C" Reference book and on-line training program (for DOS) At that time, the total price for this package was $60. I am very satisfied. Since it's been some time, I don't know if the phone numbers are still correct, or what their pricing is now.... ----------------------------------------------------------------------- Dick Rhoads Hewlett-Packard Company dick_rhoads@hpatc.hp.com Atlanta Technology Center ================================================================================ Archive-Date: Thu, 17 Mar 1994 10:01:40 CST Sender: LP-Mgr@SHSU.edu From: carroll@stimpy.eecis.udel.edu (Mark C. Carroll) Reply-To: LitProg@SHSU.edu, carroll@STIMPY.EECIS.UDEL.EDU Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Date: 17 Mar 1994 15:50:46 GMT Message-ID: To: LitProg@SHSU.EDU >>>>> "Eric" == Eric Ogata writes: In article ogata@tethys.nswc.navy.mil (Eric Ogata) writes: Eric> In article Eric> carroll@stimpy.eecis.udel.edu (Mark C. Carroll) writes: >> Ada9X (free compiler from GNU) Eric> Ok, where can I find this? I just checked prep.ai.mit.edu. If Eric> it is there it is not named in a manner such that I can figure Eric> out what it is (gnada, gnu-ada, ada9X...) I have seen no Eric> anouncement of its availability. Does it in fact exist? Has 9X Eric> with OOP extensions actually been formally accepted yet? Eric> Commercial Ada compilers are *way* too expensive for this Navy Eric> employee. -- eric ogata@tethys.nswc.navy.mil The GNU Ada compiler is called GNAT. The current version is available from cs.nyu.edu. I haven't had the opportunity to do much with it recently, but the authors claim to have implemented most of the 9x spec. Tagged types are definitely working. (BTW, sorry about the misleading title change. I was originally taking a detour in my earlier message, which I decided to defer to another message, and I forgot the change the title back.) -- ================================================================================ Archive-Date: Thu, 17 Mar 1994 10:16:47 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 94 08:16:27 PST From: bos@mdd.comm.mot.com (Mary Bos) Reply-To: LitProg@SHSU.edu, bos@MDD.COMM.MOT.COM Message-ID: <9403171616.AA03671@bb37c.mdd.comm.mot.com> To: LitProg@SHSU.edu Subject: Re: Teach yourself C book - Any suggestions? To learn the best about programming style in general (and organization) - read the woven CWEB code available on the various servers. (See the FAQs in the newreader for comp.programming.literate) You learn to appreciate what you can do and see how others write the same code. If you aren't fond of C, try the original WEB written by Knuth - as a maintenance programmer I find this is the ultimate in maintainnable code (and I don't care for pascal). Most of programming is not the actual composition of the syntax but the meaning behind the code, the design, and suitability of the code to the task. Once you grasp this, learning the syntax is slugging it out with the compiler, having a library reference, and practice. Note: This is not only a newsgroup but some of us are listsubscribers. Mary Bos "All opinions and views are strictly my own and may not reflect Motorola's" bos@mdd.comm.mot.com Motorola Wireless Data Group in Bothell WA ================================================================================ Archive-Date: Thu, 17 Mar 1994 10:37:26 CST Sender: LP-Mgr@SHSU.edu From: glv@metronet.com (Glenn Vanderburg) Reply-To: LitProg@SHSU.edu, glv@METRONET.COM Subject: Re: literary programming and C++ Date: Thu, 17 Mar 1994 15:32:31 GMT Message-ID: To: LitProg@SHSU.EDU In article , Lee Wittenberg wrote: >``Premature optimization is the root of all evil.'' > -- Knuth Just FYI ... after giving Knuth credit for this for years, I recently saw a place where Knuth attributes it to C.A.R. Hoare. From ``The Errors of TeX,'' on page 276 of _Literate_Programming_: "But I also knew, and forgot, Hoare's dictum that premature optimization is the root of all evil in programming." Does anybody know where this statement first appeared? ---Glenn (crossposted to alt.quotations) ================================================================================ Archive-Date: Thu, 17 Mar 1994 10:37:39 CST Sender: LP-Mgr@SHSU.edu From: Tom Christiansen Subject: Re: Abstraction Date: 17 Mar 1994 16:16:59 GMT Message-ID: <2m9vpr$fa6@lace.Colorado.EDU> Reply-To: LitProg@SHSU.edu, tchrist@cs.colorado.edu (Tom Christiansen) To: LitProg@SHSU.EDU :-> In comp.lang.perl, c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) writes: :>I did have one quibble with your user interface. I think it's a :>disimprovement to return a "true" string for both success and failure. :>You're going to have people writing: :> :> if (&delete_file($file)) :> :>or worse, :> :> if (&delete_file($file) == "GOOD") :> :>which is always bad. Note the use of == where eq is needed. A good human :>interface makes allowances for human nature. :> : :1. The convention and examples here (in our organization) also clearly ask :for the use of 'eq' and not '=='. : :2. My convention and examples here also require testing specifically :for 'GOOD' and 'ERROR'. I personally never write : : if (&delete_file($file)) : :(because deleting being true does not mean quite the same thing as :delete being successful, to me). More importantly, almost all my :subroutines return several variables back, the first of which is :always the status; the rest are meaningful only if status eq 'GOOD'. Having things that work return true and things that fail return false is simple, intuitive, and powerful. You are free, of course, to adopt any call interface you choose, but don't expect it to be beloved by all those around you. For example, you might do something like this: STATUS: for ( &delete_file($file) ) { /^ERROR: (.*)/ && do { warn "delete error: $1\n"; last STATUS; }; /^GOOD: (.*)/ && do { if ($DEBUG) { warn qq(file "$file" deleted\n); } last STATUS; }; die qq{unknown return code from delete_file("$_"): $_}; } But that's just not what people are used to doing. It seems easier and clearer to do this: &delete_file($file) || warn qq{delete_file("$file"): $!}; Or, if you would prefer, if (! &delete_file($file)) { warn qq{delete_file("$file"): $!}; } One point to ponder is whether you want multiple success states or multiple failure states. Calling a subprocess has one success state (child exits 0) and multiple failure ones (any non-zero return code). Making a system call has multiple success conditions (how many bytes DID you read? what IS my pid?), and just one failure condition. That way you can always say function || die; But in the case of wanting to know WHY it failed, we have to multiplex it through another mechanism. For program status, you get back multiple significant bytes of information, with signal and coredump information nestled in there. For system calls, you need the auxiliary mechanism of errno, which is of course $! in perl. --tom -- Tom Christiansen tchrist@cs.colorado.edu "Will Hack Perl for Fine Food and Fun" Boulder Colorado 303-444-3212 ================================================================================ Archive-Date: Thu, 17 Mar 1994 12:11:39 CST Sender: LP-Mgr@SHSU.edu From: lwall@netlabs.com (Larry Wall) Reply-To: LitProg@SHSU.edu, lwall@NETLABS.COM Subject: Re: Abstraction Message-ID: <1994Mar17.173649.12239@netlabs.com> Date: Thu, 17 Mar 1994 17:36:49 GMT To: LitProg@SHSU.EDU In article <1994Mar16.153043.22549@kocrsv01.delcoelect.com> c21vc@kocrsv01.delcoelect.com (Venkataraman Chandrasekhar) writes: : Frankly, I am surprised by the tone of mild hostility in the followup. I guess I was in a bad mood. I didn't think I let it show THAT much though. It did look as though you were expecting to get a negative reaction to your remarks, so I figured I'd oblige you. I just didn't happen to want to talk about the things you wanted to talk about... :-) : My whole point of posting on this topic is to get the opinions of : those outside our group, whether they are supportive or not. There is : the danger that the opinions are given based on the very limited : information that I have given (i.e., without having had a chance to : look at the rest of our system). : : I guess that I got into this habit of building slightly more functional : building blocks (when compared to the building blocks provided by the : language) and reusing them from my limited but enjoyable experience with : Smalltalk. I have no problem agreeing to good standards of robustness : etc. I don't stop with the first level building blocks but go on to : higher levels. I see these as customization to our local site based on : our functions. The example I posted was not typical in this sense. (A : couple of people pointed out that I could use Perl's unlink.) Some of : these functions may be used by other Perl users also, laying aside for : a minute the question of whether these are better or not. : : For instance, I often have a need to: : : 1. create a temporary directory : 2. perform certain functions here : 3. delete the temporary directory : 4. return to the original directory : : I have subroutines to do 1, 3, and 4. I use them instead of repeating : the lines in the subroutines, each place it is called. I see it as an : improvment. a given function is done only in one place (in the : subroutine); teh subroutines are more English-like and less : computerese. I have no problem whatsoever with your building up your own interface. In fact, I like the bottom-up approach. It's how I program. : Now on to specifics: : : >Sure. You're going to be surprised the first time someone passes in a : >filename containing shell metacharacters, and then you're going to be : >even more surprised if that filename contains the printf metacharacter. : : In case you care to educate me, what will happen ? You can point to pages : in the Camel book. If someone gives your routine a filename of "foo;bar", it will end up trying to execute "rm -rf foo;bar". You'd better hope that "bar" is a benign command. If your filename contains a % character, the warnings you're printing will try to use that as a printf metacharacter. (This is a problem in C as well as Perl.) In general, instead of saying printf $text you should say printf "%s", $text or better, just print $text; : >I have no problem with people who want to roll their own user : >interface--I am not a monoculturalist. However, if you're going to be : >designing user interfaces, you need to hold yourself to a higher standard : >of robustness. To put it as bluntly as possible, I don't want to hear : >people maligning Perl because your code deleted the root filesystem. : > : : The building blocks that I construct are strictly for my own use. I : have a set of standards that continue to evolve on their usage. If : others want to use them, they should follow these standards. I have no : problem building in allowances for human nature, as you say. You just contradicted yourself. Standards by their very nature are requiring people to go against their nature. Otherwise they wouldn't be necessary, no? You see many "Please stay off grass" signs because people like to walk on grass. You don't see many "Please don't jump out this window" signs because people don't naturally want to do that. I guess I'm arguing that lawns are unnatural. I certainly don't mow my lawn as often as the standards specify... :-) I'm not against grass as a user interface, but we have to realize there's a tradeoff. : How can my 'code delete the root filesystem' and consequently : 'people maligning Perl' ? Aren't the files of the root filesystem : protected by permissions ? If someone uses your routines in a setuid program, then it has the permissions granted by the program. If the program belongs to root, anybody could leave a booby-trap filename containing a newline to get it to delete any file on the system. Even when you're just using it for yourself, your routine will fail if you run an application that happens to produce filenames with spaces in them. This happens quite often when you start dealing with data from Macs and Amigas, especially if you're mounting filesystems under NFS. : >I did have one quibble with your user interface. I think it's a : >disimprovement to return a "true" string for both success and failure. : >You're going to have people writing: : > : > if (&delete_file($file)) : > : >or worse, : > : > if (&delete_file($file) == "GOOD") : > : >which is always bad. Note the use of == where eq is needed. A good human : >interface makes allowances for human nature. : > : : 1. The convention and examples here (in our organization) also clearly ask : for the use of 'eq' and not '=='. People, being people, will nonetheless type == when they mean eq a goodly part of the time. I do it occasionally myself. : 2. My convention and examples here also require testing specifically : for 'GOOD' and 'ERROR'. I personally never write : : if (&delete_file($file)) : : (because deleting being true does not mean quite the same thing as : delete being successful, to me). Perl itself doesn't make the distinction, so in some sense you're fighting the mindset of the language here. : More importantly, almost all my : subroutines return several variables back, the first of which is : always the status; the rest are meaningful only if status eq 'GOOD'. The typical way I do that is by returning a null list, which when assigned to a list of variables returns a boolean value of false. So typically I'd say: if ( ($foo, $bar, $baz) = &do_something() ) { &process($foo,$bar,$baz); } else { warn "Couldn't do something\n"; } I'm not saying this is the only way to do it, but the language is designed to make that easy. Larry ================================================================================ Archive-Date: Thu, 17 Mar 1994 12:34:09 CST Sender: LP-Mgr@SHSU.edu From: dak@hathi.informatik.rwth-aachen.de (David Kastrup) Reply-To: LitProg@SHSU.edu, dak@HATHI.INFORMATIK.RWTH-AACHEN.DE Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Date: 17 Mar 1994 15:46:41 GMT Message-ID: <2m9u11$1k4@urmel.informatik.rwth-aachen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: LitProg@SHSU.EDU ogata@tethys.nswc.navy.mil (Eric Ogata) writes: >In article >carroll@stimpy.eecis.udel.edu (Mark C. Carroll) writes: >> Ada9X (free compiler from GNU) > Ok, where can I find this? I just checked prep.ai.mit.edu. If it is >there it is not named in a manner such that I can figure out what it >is (gnada, gnu-ada, ada9X...) gnada is close. The thing is called gnat, but don't ask me why. Don't ask me how good it is currently, or at all, as I never looked into it. -- David Kastrup dak@pool.informatik.rwth-aachen.de Tel: +49-241-72419 Fax: +49-241-79502 Goethestr. 20, D-52064 Aachen ================================================================================ Archive-Date: Thu, 17 Mar 1994 12:34:19 CST Sender: LP-Mgr@SHSU.edu From: ogata@tethys.nswc.navy.mil (Eric Ogata) Reply-To: LitProg@SHSU.edu, ogata@TETHYS.NSWC.NAVY.MIL Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Message-ID: Date: Thu, 17 Mar 1994 17:12:06 GMT To: LitProg@SHSU.EDU In article carroll@stimpy.eecis.udel.edu (Mark C. Carroll) writes: The GNU Ada compiler is called GNAT. The current version is available from cs.nyu.edu. I haven't had the opportunity to do much with it recently, but the authors claim to have implemented most of the 9x spec. Tagged types are definitely working. Thanks to all those who pointed me at this. I am taking a look at it. Hoping to find a *good* OOP environment. Ada is not one of the first places I would have looked but perhaps 9x has fixed that? c++ is definitely getting on my nerves lately. Operator overloading in c++ particularly seems *extremely* inflexible and baroque. If this is supposed to be one of c++' *good* features, I am a little worried. Too bad our management is too narrow minded to consider real options such as CLOS or Smalltalk... Oh yeah, this is the literate programming group... seems to be flooded with inappropriate post lately, such as mine... sorry, won't happen again:) -- eric ogata@tethys.nswc.navy.mil ================================================================================ Archive-Date: Thu, 17 Mar 1994 12:48:17 CST Sender: LP-Mgr@SHSU.edu From: carroll@stimpy.eecis.udel.edu (Mark C. Carroll) Reply-To: LitProg@SHSU.edu, carroll@STIMPY.EECIS.UDEL.EDU Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Date: 17 Mar 1994 18:21:18 GMT Message-ID: To: LitProg@SHSU.EDU >>>>> "David" == David Kastrup writes: In article <2m9u11$1k4@urmel.informatik.rwth-aachen.de> dak@hathi.informatik.rwth-aachen.de (David Kastrup) writes: David> ogata@tethys.nswc.navy.mil (Eric Ogata) writes: >> In article >> carroll@stimpy.eecis.udel.edu (Mark C. Carroll) writes: >>> Ada9X (free compiler from GNU) David> gnada is close. The thing is called gnat, but don't ask me David> why. Don't ask me how good it is currently, or at all, as I David> never looked into it. -- David Kastrup GNAT = GNU/NYU Ada Translator. -- ================================================================================ Archive-Date: Thu, 17 Mar 1994 13:55:11 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 94 14:53:56 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, sherrod@sporty.col.oh.us Subject: Re: Teach yourself C book - Any suggestions? Message-ID: sherrod@sporty.col.oh.us asks: > ... In that vain [sic], I also have a question - > Borland has come out with C++ Version 4. It looks to have all the > bells and whistles that my Visual Edition Turbo C++ has - and more. Has > anyone used it? Should I upgrade? Considerations? Thanks! Personally, I'm tired of being ``nickled and dimed to death'' by these annual upgrades (from all commercial software houses, not just Borland). I've decided to refrain from purchasing any upgrades until the code is stable. For C++ this means waiting until at least September 1994 (when the draft standard is supposed to be released) and probably some time thereafter. I'm also seriously thinking of moving to gcc and g++, but last I heard, the latter didn't support templates, and I refuse to do object oriented programming without parameterized types. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | But the age of chivalry is gone; that of Kean College of New Jersey | sophisters, economists, and calculators Union, NJ 07083 | has succeeded ... USA | | -- Edmund Burke (1793) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 17 Mar 1994 14:09:29 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 17 Mar 94 15:07:44 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, glv@metronet.com Subject: Re: literary programming and C++ Message-ID: Glenn V. writes: > >``Premature optimization is the root of all evil.'' > > -- Knuth > > Just FYI ... after giving Knuth credit for this for years, I recently > saw a place where Knuth attributes it to C.A.R. Hoare. From ``The > Errors of TeX,'' on page 276 of _Literate_Programming_: > > "But I also knew, and forgot, Hoare's dictum that premature > optimization is the root of all evil in programming." > > Does anybody know where this statement first appeared? I first saw this statement in Knuth's article on using goto's (somwhat of a response to Dijkstra's famous ``Goto statement considered harmful''). I forget the exact title, the the article is reprinted in his recent _Literate_Programming_ book, and he states it without attribution. On the other hand, ``The Errors of TeX'' is also in _Literate_Programming_, so who knows? We could ask William Safire (explanation for our non-American cousins: Safire is a ``language maven'' in the US), but I don't think he's really interested in CS. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | But the age of chivalry is gone; that of Kean College of New Jersey | sophisters, economists, and calculators Union, NJ 07083 | has succeeded ... USA | | -- Edmund Burke (1793) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 17 Mar 1994 14:57:59 CST Sender: LP-Mgr@SHSU.edu From: paulp@is.internic.net (Paul Phillips) Reply-To: LitProg@SHSU.edu, paulp@IS.INTERNIC.NET Subject: Re: Abstraction Date: 17 Mar 1994 20:32:43 GMT Message-ID: <2maepb$8su@news.cerf.net> To: LitProg@SHSU.EDU In article <1994Mar17.173649.12239@netlabs.com> lwall@netlabs.com (Larry Wall) writes: >I'm not against grass as a user interface, but we have to realize >there's a tradeoff. I've seen grass used as a user interface, and nobody gets any work done. I think you should reconsider, Larry. :-) |-------------------------------------------------------------------------| | Paul Phillips | EMAIL: paulp@is.internic.net | | InterNIC Information Services | WWW: http://www.internic.net/~paulp/ | | Reference Desk Staff | PHONE: 619-455-4626 FAX: 619-455-4640 | |-------------------------------------------------------------------------| ================================================================================ Archive-Date: Thu, 17 Mar 1994 15:15:52 CST Sender: LP-Mgr@SHSU.edu Message-ID: <9403172115.AA12440@netmail2.microsoft.com> From: Eric Landes Reply-To: LitProg@SHSU.edu, ericla@MICROSOFT.COM To: glv@metronet.com, LitProg@shsu.edu, LP-Mgr@SHSU.edu Date: Thu, 17 Mar 94 13:01:14 TZ Subject: Re: literary programming and C++ ---------- | From: Lee Wittenberg | To: ; | Subject: Re: literary programming and C++ | Date: Thursday, March 17, 1994 3:07PM | | Glenn V. writes: | | > >``Premature optimization is the root of all evil.'' | > > -- Knuth | > | > Just FYI ... after giving Knuth credit for this for years, I recently | > saw a place where Knuth attributes it to C.A.R. Hoare. From ``The | > Errors of TeX,'' on page 276 of _Literate_Programming_: | > | > "But I also knew, and forgot, Hoare's dictum that premature | > optimization is the root of all evil in programming." | > | > Does anybody know where this statement first appeared? | | I first saw this statement in Knuth's article on using goto's (somwhat | of a response to Dijkstra's famous ``Goto statement considered | harmful''). I forget the exact title, the the article is reprinted in | his recent _Literate_Programming_ book, and he states it without | attribution. Given the references listed in the article "Structured Programming with goto Statements" Lee mentions, my guess (and I don't have ready access to the articles) is that this dictum first appeared in "An axiomatic approach to computer programming," Communications of the ACM, October 1969, 576-580, 583. There are six other references to works by Hoare, but this one seems the most likely. Eric Landes ericla@microsoft.com ================================================================================ Archive-Date: Fri, 18 Mar 1994 14:33:56 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Re: OO, C++, EIffel, and LP. Was Re: literary programming and C++ Message-ID: Date: Fri, 18 Mar 1994 18:35:34 GMT To: LitProg@SHSU.EDU In article , Eric Ogata wrote: >Hoping to find a *good* OOP environment. Ada is not one of the first >places I would have looked but perhaps 9x has fixed that? c++ is >definitely getting on my nerves... This discussion wouldn't be complete without mentioning Modula-3. I had worked in Ada for 2 years before seeing Modula-3, and one of the things that struck me is that they did everything that Ada set out to do, only more cleanly. Modula-3 has an easily understandable object model based on single inheritance. To learn more, see Greg Nelson's book, `Systems Programming with Modula-3' I have directed followups to comp.lang.modula3 Norman Ramsey ================================================================================ Archive-Date: Sat, 19 Mar 1994 01:17:06 CST Sender: LP-Mgr@SHSU.edu From: jpoletti@hns.com (Jon Poletti) Reply-To: LitProg@SHSU.edu, jpoletti@HNS.COM Subject: Re: Teach yourself C book - Any suggestions? Message-ID: <1994Mar18.162812.13165@hns.com> Date: Fri, 18 Mar 1994 16:28:12 GMT To: LitProg@SHSU.EDU In article , btd@iastate.edu (Benjamin T. Dehner) writes: |> In <2m80c0$snc@grover.jpl.nasa.gov> adam@csi.jpl.nasa.gov (Adam Bernstein) writes: |> |> >In article , eaeu387@rigel.oac.uci.edu |> >(Aoyama-san) writes: |> >|> wrc1001@cus.cam.ac.uk (W.R. Corner) writes: |> >|> |> >|> >I'm about to attempt to teah myself C. Because I have to! And I was wondering |> >|> >if anyone out there could recommend a good book that I could follow. |> |> > I'm guessing you got lots of replies by email, but just in case... I |> >taught myself C after taking one class in Pascal, using the bible of C |> >programming: "The C Programming Language" (Second Edition!) by Kernighan and |> >Ritchie. It will teach you the basics, and then you'll use it as a reference |> >ad infinitum. It's wonderful (he says wistfully, little red hearts drifting |> >up around his head). |> |> HWARF (he says nautiously, little chunks spewing from his mouth :) |> I've got Kernighan and Ritchie, I've tried to learn C from Kernighan and |> Ritchie without taking a class. I'll say this: it sucks. It's a great |> C _reference_, it has all of the system calls, header file information, |> control structures, etc., but it is a lousy book to try and learn from. |> |> Ben |> Actually, I learned C on my own from the K&R book and with little trouble. BTW, when I taught myself C I all ready knew several programming languages. If you're an experienced programmer in structured languages (like PASCAL, ALGOL, or FORTRAN '77) you shouldn't have any trouble with K&R. Jon Poletti -- ---------------------------------------------------------------------------- The opinions expressed here are my own and do not reflect those of Hns ---------------------------------------------------------------------------- Jon Poletti, Senior Software Engineer Hughes Network Systems INTERNET: jpoletti@hns.com 11717 Exploration Lane (301) 601-7245 Germantown, Maryland 20876 ---------------------------------------------------------------------------- NEW SIGNATURE UNDER CONSTRUCTION ----------------------------------------------------------------------------- ================================================================================ Archive-Date: Sat, 19 Mar 1994 09:05:47 CST Sender: LP-Mgr@SHSU.edu From: rbrager@cbnewsg.cb.att.com (rbrager) Reply-To: LitProg@SHSU.edu, rbrager@CBNEWSG.CB.ATT.COM Subject: Re: Teach yourself C book - Any suggestions? Message-ID: Date: Sat, 19 Mar 1994 14:32:54 GMT To: LitProg@SHSU.EDU From article <1994Mar16.031232.24653@sporty.col.oh.us>, by sherrod@sporty.col.oh.us (David H. Sherrod): > I'm also in the same boat - but have a suggestion as well. I've been > working with The Waite Group's New C Primer Plus. It covers several > versions of C (although C++ is not covered in the edition I use). It > seems well organized, and has helped me grasp a good understanding of > ANSI C. My only problem is that I'd like a book which addresses the > Turbo C++ (Borland) which I own. In that vain, I also have a question - > Borland has come out with C++ Version 4. It looks to have all the > bells and whistles that my Visual Edition Turbo C++ has - and more. Has > anyone used it? Should I upgrade? Considerations? Thanks! > David > Piglet sidled up to Pooh from behind. "Pooh!" he whispered. > "Yes, Piglet?" "Nothing," said Piglet, taking Pooh's paw. > "I just wanted to be sure of you." > sherrod@sporty.col.oh.us I would like to add a couple more to the Turbo C++ list. "TURBO C++ A Self-Teaching Guide" by Flamig, Wiley. Well written and covers the basics of the language but doesn't cover the prctical aspects of PC programming. "Turbo C++ Programming" by Ezzell, Addison-Wesley. More than a little difficult to read but it covers the practical side such as scroll bars, mouse interface and graphics. It has many practical examples and comes with a disk of source code. As a beginners text for C, I've seen a book titled "C by example" that seemed to be an excellent self teaching guide. I learned C the hard way, before the popularity of C on the PC and MAC caused all these neat books to be written. Because I was an expert in PL/1, BASIC and FORTRAN I was assigned to maintain several applications that ran on UNIX and were written in C. One was a personnel tracking system that was a disaster. It took our clerks 2 weeks to update the DB every month. After a chop and channel job that added a real-time terminal interface, I was finnaly scheduled to take the "Beginning C for Programmers Coursse". To the list of good C books I would like to add: "Topics in C Programming" by Kochan and Wood, Wiley. As is the case with all books written by these two, the book is and easy read. It covers many prctical topics in C programming. Like "forking" a child process, "exec"ing another program, using "make" (great now that AT&T is using nmake as a standard :^), "stat"ing files and directorys to mention just a few topics. Bob Rager AT&T Bell Laboratories rbr@cblph.att.com ================================================================================ Archive-Date: Sun, 20 Mar 1994 12:28:59 CST Sender: LP-Mgr@SHSU.edu From: carroll@stimpy.eecis.udel.edu (Mark C. Carroll) Reply-To: LitProg@SHSU.edu, carroll@STIMPY.EECIS.UDEL.EDU Subject: Re: Teach yourself C book - Any suggestions? Date: 20 Mar 1994 18:08:46 GMT Message-ID: To: LitProg@SHSU.EDU >>>>> "Lee" == Lee Wittenberg writes: In article Lee Wittenberg writes: Lee> sherrod@sporty.col.oh.us asks: >> ... In that vain [sic], I also have a question - Borland has come >> out with C++ Version 4. It looks to have all the bells and >> whistles that my Visual Edition Turbo C++ has - and more. Has >> anyone used it? Should I upgrade? Considerations? Thanks! Lee> Personally, I'm tired of being ``nickled and dimed to death'' by Lee> these annual upgrades (from all commercial software houses, not Lee> just Borland). I've decided to refrain from purchasing any Lee> upgrades until the code is stable. For C++ this means waiting Lee> until at least September 1994 (when the draft standard is Lee> supposed to be released) and probably some time thereafter. Lee> I'm also seriously thinking of moving to gcc and g++, but last I Lee> heard, the latter didn't support templates, and I refuse to do Lee> object oriented programming without parameterized types. Contrary to popular rumor, g++ *does* support templates. It's commonly thought that it doesn't, due to the fact that it's a limited implementation, and it requires code to be structured differently from the AT&T compilers. So code written for Cfront with templates isn't structured right, and so people conclude that templates aren't supported. G++ does support templates, and in my experience as a systems administrator, the g++ template support seems to be less buggy than cfront (not that that's saying a whole lot:-). The limitation is: the code that implements all of the operations for a template has to be located in the same file as the declaration of the template. You can't seperate the implementation from the declaration the way you can with other classes. -- ================================================================================ Archive-Date: Sun, 20 Mar 1994 12:53:54 CST Sender: LP-Mgr@SHSU.edu Date: Sun, 20 Mar 94 13:53:54 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu Subject: LP at Phoenix (final report) Message-ID: I've been back from Phoenix for over a week now, and I'd better get this report written now, or I'll never do it :-). \begin{list} \item[The CWEB book] This book went like hotcakes. Out of 125-150 copies available on Tuesday (the A-W people didn't know exactly how many), less than a dozen were left by Thursday afternoon, and they were all gone by 11AM on Friday. I couldn't have been responsible for more than about a dozen of these, so interest in LP seems to be growing (of course, it could have been the ``Free Free Free'' sign on top of the stack that people couldn't resist). While walking past the Borland booth, I overheard a couple of people ask about C/C++ prettyprinters, and I directed them to the Addison-Wesley booth for copies of the CWEB book (what can I say -- I'm a pushy New Yorker :-). I hope they're not disappointed (or overwhelmed). \item[The presentation mentioned in the previous report] Stephen Shum (from the CS Department of Augusta College) presented a paper entitled ``Using Literate Programming to Teach Good Programming Practice.'' His coauthor, Curtis Cook (from the CS Dept. of Oregon State Univ), was not present. What they wanted to determine was whether or not using LP techniques lead to measurably better documentation. Unfortunately, they were unable to come up with an experiment that could handle this, so they settled (as a first pass; the project still continues) for trying to determine if LP at least lead to *more* documentation, leaving the evaluation of better or worse for later. (As those of us who teach programming know, students tend to resist doing any documentation, so ``more'' can be seen as a necessary stepping stone to ``better.'') The experiment was conducted in a single (upper division) course. [I forget what the course was, and the paper doesn't mention it.] An (admittedly small) sample of 16 students (10 seniors, 3 juniors, and 3 ``post college'') was split into 2 groups. Group A did the first assignment using LP; group B the second. While the number of comment lines was pretty constant between literate and non-literate programs (a surprise), the literate programs used significantly more words (and characters) in their comment lines. The reason for this appears to be that LP comments are usually in the form of paragraphs, which fill up a line, while ordinary program comments tend to be short remarks sharing a line with a bit of code. When they analyzed the content of the comments, they found that the comments in the traditional programs were all of the ``what'' variety, while 5% of the LP comments included ``how'' information and 1% of the LP comments included examples. From the paper: Although no inconsistencies were found between the internal comments and the code in both versions, we did find inconsistencies between the source code and external documentation in the traditional programs. Our experiment shows the literate programming paradigm indeed encourages more and consistent documentation. The students seem to like the literate programming style, except they do not like the debugging process required by the literate programming process. The experiment used a ``home-grown'' LP system called AOPS. Like CLiP, AOPS is programming language and typesetter independent. The ``markup language'' for AOPS seems much less intrusive than CLiP's, however (sorry, Eric). On the other hand, it's difficult to see how AOPS output would be typeset (there were no examples of ``woven'' output), and Shum admitted that the students did not really typeset their programs at all. It may be that AOPS is much better for tangling than weaving. I'll be able to tell more when I get the copy of AOPS I was promised. \item[Another presentation related to LP] On Friday afternoon, Philip Miller (from Carnegie Mellon) presented a paper entitled ``Engaging Students and Teaching Modern Concepts: Literate, Situated, Object-Oriented Programming'' (coauthored by Glenn Meter, also from Carnegie Mellon). While the students involved in the project described in the paper used a literate programming system (another home-brew system called Genie, for the Macintosh), the LP experience was only a side issue and was only dealt with in the following statement (from the paper): We think the literate programming environment was very important, but we have not conducted any experiments to establish this as fact. \end{list} That's all from Phoenix (at least all I can remember). -- Lee ------------------------------------------------------------------------ Lee Wittenberg | There's no such thing as a foolproof Computer Science Department | system. And the more complex you make it, Kean College of New Jersey | the more intricate, then the quicker Union, NJ 07083 | things can happen if it ever breaks down. USA | | -- Peter George leew@pilot.njin.net | _Commander-1_ (1965) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Sun, 20 Mar 1994 20:07:44 CST Sender: LP-Mgr@SHSU.edu From: coates@kelvin.physics.uq.oz.au (Tony Coates) Subject: Re: Teach yourself C book - Any suggestions? Date: 21 Mar 94 11:47:33 Message-ID: Reply-To: LitProg@SHSU.edu, coates@physics.uq.oz.au To: LitProg@SHSU.EDU In article carroll@stimpy.eecis.udel.edu (Mark C. Carroll) writes: >>>>> "Lee" == Lee Wittenberg writes: In article Lee Wittenberg writes: Lee> I'm also seriously thinking of moving to gcc and g++, but last I Lee> heard, the latter didn't support templates, and I refuse to do Lee> object oriented programming without parameterized types. G++ does support templates, and in my experience as a systems administrator, the g++ template support seems to be less buggy than cfront (not that that's saying a whole lot:-). The limitation is: the code that implements all of the operations for a template has to be located in the same file as the declaration of the template. You can't seperate the implementation from the declaration the way you can with other classes. This is true for versions of g++ before 2.5.6, where the implementation code has to be included into every file which needs it. From 2.5.6 onwards, using the -fexternal-templates switch, this code only needs to be included into the file containing main(). This differs from the AT&T template scenario, where the use of a template creates a file specifying which templates are needed, and these templates are then compiled up by the linker at link-time (as I understand it). 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: Mon, 21 Mar 1994 03:42:47 CST Sender: LP-Mgr@SHSU.edu From: fairlieb@karman.aod.dsto.gov.au (Bruce Fairlie) Subject: FWeb and Fortran90 Date: 21 Mar 1994 08:11:59 GMT Message-ID: <2mjksf$b7b@foxhound.dsto.gov.au> Reply-To: LitProg@SHSU.edu, fairlieb@karman.aod.dsto.gov.au To: LitProg@SHSU.EDU We are about to embark on the development of a large and complex project which will be coded using Fortran 90. For various reasons, we wish to use FWeb to create the code. We are relative newcomers to Web in general and FWeb in particular and seek your advice on how best to approach our task. Of particular interest is the balance between FWeb modeules and functions, and Fortran90 modules, subroutines, etc. Do any of you have any experience, or even better examples, you can share with us? Any and all suggestions will be most welcome. -- Bruce Fairlie, Head Fluid Dynamics, Air Operations Division, 'phone: +61 3 647 7467 DSTO, Aeronautical Research Laboratory fax: +61 3 646 6060 506 Lorimer St, Fishermens Bend, Vic. 3207, AUSTRALIA. ================================================================================ Archive-Date: Mon, 21 Mar 1994 06:49:58 CST Sender: LP-Mgr@SHSU.edu From: AStirnem@maths.exeter.ac.uk Reply-To: LitProg@SHSU.edu, AStirnem@MATHS.EXETER.AC.UK Date: Mon, 21 Mar 94 12:28:05 GMT Message-ID: <1830.9403211228@noether.maths.exeter.ac.uk> To: LitProg@SHSU.edu, carroll@STIMPY.EECIS.UDEL.EDU Subject: OO, C++, EIffel, and LP. Was Re: literary programming and C++ > This isn't to say that C++ isn't the best choice for your project - it > very well may be. But you've not presented an argument to support > that. It was not my intention to argue that C++ was the BEST choice for my project, only that it is not in all circumstances a bad language. Supposing, however, that I want to use the very best language for my next project, what should I choose, given the following list of requirements: * Efficiency is important. So it should be a compiled language. * The compiler must be free. * It must be easy to install (in, say, one day). * The compiler (and, of course, the compiled programs) must run under UNIX (SunOS and SiliconGraphics IRIX) * I want to be able to package code and data together and use more than one instance of the resulting class. (The latter point probably rules out languages such as Modula 2.) * Operator overloading. I want use the standard arithmetic operators (+,-,*,/) for my objects (e.g. vectors, matrices). Moreover, I like to overload the function call operator "()" for expressing either evaluation of (mathematical) analytic functions or composition of analytic functions. Example: function f, g; complex z; function h = f(g); // h is going to be the composition of f and g complex w = f(z); // w will be the value of f at the point z * I need to interact with the floating point hardware (in order to set the rounding mode). * I need dynamical storage allocation. * I occasionally need standard mathematical functions like log, sin, sqrt. * I need good input/output facilities. * I want to be able to pass command line arguments to my programs. Virtual functions (object oriented programming in the strict sense), are not indispensable for me, but nice to have. I'll be grateful for any advice. Andreas Stirnemann. AStirnem@maths.ex.ac.uk ================================================================================ Archive-Date: Tue, 22 Mar 1994 04:36:11 CST Sender: LP-Mgr@SHSU.edu From: thompson@sun1.coe.ttu.edu Subject: comp.programming.literate FAQ Date: 22 Mar 1994 10:16:31 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: Tue, 22 Mar 1994 06:55:01 CST Sender: LP-Mgr@SHSU.edu From: "Denis B. Roegel" Reply-To: LitProg@SHSU.edu, Denis.Roegel@LORIA.FR Date: Tue, 22 Mar 1994 13:56:19 +0100 Message-ID: <199403221256.NAA18232@pandore.loria.fr> To: LITPROG@SHSU.edu Subject: verbatim in CWEB ? CC: roegel@lorraine.loria.fr Hello, Has somebody devised a neat way of including some parts verbatim in a CWEB documentation ? I want something like LaTeX's \verb. I tried to adapt it and put the following in the limbo: \catcode`\*=11 \def\*makeother#1{\catcode`#1=12\relax} \def\verb{\begingroup \catcode``=13 \*noligs \tt \let\do\*makeother \dospecials\*sverb} \def\*sverb#1{\def\*tempa ##1#1{\leavevmode\null##1\endgroup}% \*tempa} \begingroup \catcode``=13 \gdef\*noligs{\let`\*lquote} \endgroup \def\*lquote{\leavevmode{\kern0pt}`} \catcode`\*=12 (The main difference is that I replaced @ by *) This code works well with plain TeX, but not with CWEB. For instance, \verb/|---...---|/ does not give the right result. It is better in the C comments, but awful in the documentation. Being a little bit in a hurry, I don't have much time to investigate now, but maybe someone else has already worked this out ? Thanks, Denis. (roegel@loria.fr) ================================================================================ Archive-Date: Tue, 22 Mar 1994 12:05:08 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: verbatim in CWEB ? Date: 22 Mar 1994 17:26:34 GMT Message-ID: <2mn9oa$uhh@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article <199403221256.NAA18232@pandore.loria.fr>, "Denis B. Roegel" writes: > > Has somebody devised a neat way > of including some parts verbatim in > a CWEB documentation ? > > This code works well with plain TeX, but not with > CWEB. For instance, \verb/|---...---|/ In particular, this example will not work easily. All stuff between vertical bars will be handled as `restricted C code material' by CWEAVE. Use |@t\verb/|---...---|/@>| . I know, it's ugly -- but don't ask me why @t is not allowed in documentation mode. (It was, in _my_ CWEB :-) LaTeX users should note that cweb.sty does _not_ support the above work-around, this is a known restriction. Otherwise your \verb macro looks functional. (Note: functional, not fine; your code is nearly unreadable. Please consider to use the modern method of `indentation', indispensable for coding any program, regardless of the language...) Cheers, 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: Tue, 22 Mar 1994 12:46:29 CST Sender: LP-Mgr@SHSU.edu Message-ID: <199403221843.NAA20550@climate.gsfc.nasa.gov> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 22 Mar 1994 13:45:59 -0500 To: LitProg@SHSU.edu, thompson@sun1.coe.ttu.edu From: wiscombe@climate.gsfc.nasa.gov (Warren Wiscombe) Reply-To: LitProg@SHSU.edu, wiscombe@CLIMATE.GSFC.NASA.GOV Subject: Re: comp.programming.literate FAQ David, One suggestion: since you are actively updating the FAQ so often, how about a What's New section at the beginning? -------------------------------------------------- Dr. Warren J. Wiscombe, Goddard DAAC Project Scientist NASA Goddard, Code 913, Greenbelt, MD 20771 ================================================================================ Archive-Date: Tue, 22 Mar 1994 13:56:53 CST Sender: LP-Mgr@SHSU.edu From: "Denis B. Roegel" Reply-To: LitProg@SHSU.edu, Denis.Roegel@LORIA.FR Message-ID: <199403221957.UAA19354@pandore.loria.fr> Subject: Re: verbatim in CWEB ? To: LITPROG@SHSU.edu Date: Tue, 22 Mar 1994 20:57:33 +0100 (MET) CC: roegel@lorraine.loria.fr (Denis B. Roegel) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit : : In article <199403221256.NAA18232@pandore.loria.fr>, "Denis B. Roegel" writes: : > : > Has somebody devised a neat way : > of including some parts verbatim in : > a CWEB documentation ? : > : > This code works well with plain TeX, but not with : > CWEB. For instance, \verb/|---...---|/ : : In particular, this example will not work easily. All stuff between : vertical bars will be handled as `restricted C code material' by : CWEAVE. Use |@t\verb/|---...---|/@>| . I know, it's ugly -- but don't : ask me why @t is not allowed in documentation mode. (It was, in _my_ : CWEB :-) It works perfectly. Thanks! : : Otherwise your \verb macro looks functional. (Note: functional, not : fine; your code is nearly unreadable. Please consider to use the : modern method of `indentation', indispensable for coding any program, : regardless of the language...) Sorry to have posted this piece of ugly TeX code. The explanation is that I have taken the relevant excerpt of latex.tex and changed a few things without reformatting it. Denis. ----------------------------------------------------- | Denis Roegel | | CRIN (Centre de Recherche en Informatique de Nancy) | | F-54506 VANDOEUVRE-LES-NANCY | | FRANCE | | e-mail: roegel@loria.fr | ----------------------------------------------------- ================================================================================ Archive-Date: Tue, 22 Mar 1994 18:18:28 CST Sender: LP-Mgr@SHSU.edu From: wjhsr@news.delphi.com (WJHSR@DELPHI.COM) Reply-To: LitProg@SHSU.edu, wjhsr@NEWS.DELPHI.COM Subject: Re: Teach yourself C book - Any suggestions? Date: 22 Mar 1994 18:44:57 -0500 Message-ID: <2mnvtp$ikc@news.delphi.com> To: LitProg@SHSU.EDU I have found Turbo C Programming for the IBM and his book Object Oriented Programming in Turbo C++,published by the Waite Group, helpful as tutorials.Give them a try. Bill. ================================================================================ Archive-Date: Wed, 23 Mar 1994 05:20:24 CST Sender: LP-Mgr@SHSU.edu From: maavl@cwi.nl (Marc van Leeuwen) Reply-To: LitProg@SHSU.edu, maavl@CWI.NL Subject: Re: verbatim in CWEB ? Message-ID: Date: Wed, 23 Mar 1994 10:46:56 GMT To: LitProg@SHSU.EDU In article <2mn9oa$uhh@rs18.hrz.th-darmstadt.de>, schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes: |> All stuff between |> vertical bars will be handled as `restricted C code material' by |> CWEAVE. Use |@t\verb/|---...---|/@>| . I know, it's ugly -- but don't |> ask me why @t is not allowed in documentation mode. (It was, in _my_ |> CWEB :-) Wow, that's a neat trick (or ugly, if you prefer)! It took me some time to figure out that this was just one `|...|' group, rather than two, and why. In fact I previously thought that ``It is impossible to have TeX text that contains the character `|' in any way (except in limbo), no matter what context one sets up (because CWEAVE acts before TeX)'' (quote from my manual), thinking only of TeX contexts (like `\verb/.../'), not of CWEB contexts (`@t...@>'). I found that in CWEB 3.1 you can even place an `@' in the text within `|@t\verb/.../@>|', as long as you don't forget to double it (this used to be forbidden in older versions of CWEB). Nonetheless the trick is quite fragile, and depends for instance on the fact that the dummy macro `\PB' that CWEAVE places around `|...|' groups is deactivated by \let\PB=\relax rather than by \def\PB#1{#1} (which whould freeze the catcodes before \verb has the chance to change them); if \PB is activated for some purpose, then the trick will therefore fail. And for the sake of completeness: the construction can be used within comments, but not within module names. As to the question why `@t' is not allowed within TeX text, I think the answer is that Knuth argued that it could be of no use to insert a piece of TeX text when you are already in TeX mode; the counterexample you gave is contrived enough to be easily overlooked. It may also be noted that one can get produce arbitrary output in typewriter type using the macro `\.' of the cwebmac format, although this is not a verbatim macro and some characters will need to be escaped; also to get a vertical bar one needs an indirect method, for instance defining \chardef\v=`| in limbo (it is unclear to me why this definition is not contained in cwebmac.tex) so that the above example could be written as `\.{\v---...---\v}'. This may be a bit more cumbersome, but the result is more robust. Marc van Leeuwen CWI, Amsterdam ================================================================================ Archive-Date: Wed, 23 Mar 1994 05:39:29 CST Sender: LP-Mgr@SHSU.edu From: ramsdell@triad.mitre.org (John D. Ramsdell) Subject: SchemeWEB 2.0 released---Supports literate programming in Lisp Date: 23 Mar 1994 11:16:46 GMT Message-ID: Reply-To: LitProg@SHSU.edu, ramsdell@mitre.org To: LitProg@SHSU.EDU SchemeWEB 2.0---Simple support for literate programming in Lisp. SchemeWEB is a Unix filter that allows you to generate both Lisp and LaTeX code from one source file. The generated LaTeX code formats Lisp programs in typewriter font obeying the spacing in the source file. Comments can include arbitrary LaTeX commands. SchemeWEB was originally developed for the Scheme dialect of Lisp, but it can easily be used with most other dialects. Version 2.0 is available in the Scheme Repository as cs.indiana.edu:pub/scheme-repository/new/schemeweb.sh or in the Comprehensive TeX Archive Network (CTAN) in the directory ftp.shsu.edu:/tex-archive/web/schemeweb Version 2.0 implements several improvements over the version 1.2 which was released in 1990. * The LaTeX source generated from a SchemeWEB file no longer requires the use of a style option, such as the astyped option required by the previous version. The output is similar to that produced by c2latex. * By default, Lisp source generated from a SchemeWEB file includes all comments. As a result, the filter can translate the Lisp source generated from a SchemeWEB file directly into LaTeX source. * The filter can translate the Lisp source generated from a SchemeWEB file into the original SchemeWEB file. As a result of these changes, a SchemeWEB file can be stored and distributed as a standard Lisp file by tangling the SchemeWEB file. For the purposes of editing comments, the SchemeWEB file can be recovered by untangling the Lisp file. LaTeX documentation can be generated from both the Lisp file or the SchemeWEB file. ================================================================================ Archive-Date: Wed, 23 Mar 1994 14:30:56 CST Sender: LP-Mgr@SHSU.edu From: butrfeld@cs.tcd.ie (Andrew Butterfield) Reply-To: LitProg@SHSU.edu, butrfeld@CS.TCD.IE Subject: Re: comp.programming.literate FAQ Message-ID: Date: Wed, 23 Mar 1994 19:48:01 GMT To: LitProg@SHSU.EDU In article , thompson@sun1.coe.ttu.edu wrote: > ... stuff deleted > Table of Contents: > ... > * What literate programming tools are available and where are they? > - APLWEB > ... > - WinWordWEB > * Are there other tools I should know about? > - C2LaTeX > ... > - Web mode > ... > * What is Literate Programming? > ... > 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: I am new to this group so I read the FAQ, some of which is quoted above. I notice (as an occaisional literate programmer) that everything seems to revolve around WEB and variants. So I thought I'd let this group know that literate programming has spread it wings slightly further. A lot of functional programming languages* have the notion of "literate scripts" where the usual comment convention is inverted. That is, all text is assumed to be comments, unless flagged otherwise. In particular program code can be embedded in code for a documentation system. for example, Miranda literate scripts use '>' in column 1 to flag code lines, so the following fragment (indented for clarity) is BOTH correct Miranda AND correct LaTeX: \documentstyle{article} \begin{document} We code up the factorial function directly based on its common mathematical recursive definition: \begin{displaymath} n! = \left\{ \begin{array}{ll} 0 & \mbox{if $n = 0$} \\ n(n-1)! & \mbox{otherwise} \end{array} \right. \end{displaymath} This gives the following Miranda code: \begin{verbatim} > fac 0 = 1 > fac n = n * fac (n - 1) \end{verbatim} It is easy to see that it is correct. \end{document} The literate script approach is simpler than WEB, in that it won't re-arrange code to meet define-before-use rules, for example. However the languages* that employ this usually don't have a define-before-use rule. Why did I post this - simply for information - WEB isn't the only class of tools supporting this kind of programming. I thought I'd let you know. $64,000 question: are there any other tools (non-WEB, non-literate-scripts) for supporting literate code -- in particular does anyone use hypertext systems ? P.S. another commerical tool* for supporting a formal specification methodology (IFAD Toolbox for VDM-SL) also has a similar idea, giving us: Literate Specifications ! (that'd be the day ! :-) *functional prog. and spec language examples: Haskell [public domain] ftp to /pub/haskell at ftp.dcs.glasgow.ac.uk Miranda(tm) [Commercial] contact mira-request@ukc.ac.uk IFAD Toolbox [Commercial] ftp to /pub/toolbox at hermes.ifad.dk see also comp.lang.functional,comp.specification _____________________________________________________________ Andrew Butterfield, Location: WR.14.0.7 Dept. of Computer Science, Tel: +353-1-702-1765 O'Reilly Institute, Fax: +353-1-677-2204 Trinity College, email(s): butrfeld@cs.tcd.ie Dublin 2, IRELAND Andrew.Butterfield@cs.tcd.ie ================================================================================ Archive-Date: Wed, 23 Mar 1994 18:30:30 CST Sender: LP-Mgr@SHSU.edu From: "Srinivas P. Narayana" Reply-To: LitProg@SHSU.edu, narayan@SILVER.UCS.INDIANA.EDU Subject: CWEB and Cfront templates problem Message-ID: Date: Thu, 24 Mar 1994 00:06:21 GMT To: LitProg@SHSU.EDU Hi! I am new to CWEB. I would like to know how to work around the following problem: When I run cfront compiler over the CTANGLE output containing templates, the cfront template instantiator gets confused by the #line preprocessor directives in the tangled output. The template instantiator looks for the template definitions in the web file instead of looking in the tangled output ( the c file ). How do I get around this? Thanks, -Srinivas ================================================================================ Archive-Date: Thu, 24 Mar 1994 06:41:11 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 24 Mar 94 7:40:54 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, butrfeld@cs.tcd.ie Subject: Re: comp.programming.literate FAQ Message-ID: Andrew Butterfield writes (in addition to a number of comments -- that I support wholeheartedly -- about LP not being restricted to WEB and its variants): > A lot of functional programming languages* have the notion of "literate > scripts" > where the usual comment convention is inverted. That is, all text is > assumed to be comments, unless flagged otherwise. In particular program > code can be embedded in code for a documentation system. > > for example, Miranda literate scripts use '>' in column 1 to flag code > lines, > so the following fragment (indented for clarity) is BOTH correct Miranda > AND correct LaTeX: > > [example omitted for brevity] > > The literate script approach is simpler than WEB, in that it won't > re-arrange code to meet define-before-use rules, for example. However the > languages* that employ this usually don't have a define-before-use rule. If by ``simpler,'' you mean that it has fewer constructs that the programmer has to deal with, I agree. If, on the other hand, you mean that it is easier to use, I have to disagree. IMHO, tangling is the most useful part of LP: it allows me to develop my programs in a step-wise fashion, concentrating on small pieces at a time, without the necessity of rearranging these pieces for the convenience of the compiler (and the attendant errors that occur in this process). While getting around the define-before-use rule is one use of tangling, it is useful in many other contexts. The following example (taken from the Stanford GraphBase) will illustrate: @= Graph *risc(regs) unsigned long regs; /* number of registers supported */ { @@;@# @; @; if (gb_trouble_code) { gb_recycle(new_graph); panic(alloc_fault); /* oops, we ran out of memory somewhere back there */ } return new_graph; } In this case, the chunks (except for @) are used for code refinements rather than declaration order. Granted, function calls could be used to accomplish the same purpose, but CWEB chunks carry no run-time overhead (and I find chunk names more informative than function names -- I despise long, run-on function names, but chunk names are naturally in the form of full sentences). > Why did I post this - simply for information - WEB isn't the only class of > tools supporting this kind of programming. I thought I'd let you know. The information *is* appreciated (that's what the newsgroup/list is for). I am not familiar with Miranda, myself, and was therefore not aware of this (extremely worthwhile) feature. It reminds me of a language in the 60's (I forget its name, but it's described in Sammet's _Programming_Languages:_History_and_Fundamentals_) where comments were typed with a red ribbon and code with a black one (or vice versa), but otherwise freely interspersed. > $64,000 question: are there any other tools (non-WEB, non-literate-scripts) > for supporting literate code -- in particular does anyone use hypertext > systems ? A number of contributors have expressed interest in such systems in the past; I assume that at least one of them is working on something. Anyone? -- Lee ------------------------------------------------------------------------ Lee Wittenberg | There's no such thing as a foolproof Computer Science Department | system. And the more complex you make it, Kean College of New Jersey | the more intricate, then the quicker Union, NJ 07083 | things can happen if it ever breaks down. USA | | -- Peter George leew@pilot.njin.net | _Commander-1_ (1965) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 24 Mar 1994 06:45:57 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 24 Mar 94 7:45:51 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, narayan@silver.ucs.indiana.edu Subject: Re: CWEB and Cfront templates problem Message-ID: Srinivas P. Narayana asks: > I am new to CWEB. I would like to know how to work around the > following problem: When I run cfront compiler over the CTANGLE > output containing templates, the cfront template instantiator gets > confused by the #line preprocessor directives in the tangled > output. The template instantiator looks for the template > definitions in the web file instead of looking in the tangled > output ( the c file ). > How do I get around this? That's a toughie. While I suggest that it might be considered a bug in Cfront, that doesn't help you. All I can think of is passing the CWEB output through a filter that removes the #line's before you feed it to Cfront. You lose the wonderfulness of error messages that refer to the CWEB source, but your programs will compile. This might be a problem worth reporting to the ANSI standardization committee. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | There's no such thing as a foolproof Computer Science Department | system. And the more complex you make it, Kean College of New Jersey | the more intricate, then the quicker Union, NJ 07083 | things can happen if it ever breaks down. USA | | -- Peter George leew@pilot.njin.net | _Commander-1_ (1965) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 24 Mar 1994 06:54:31 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: comp.programming.literate FAQ Date: 24 Mar 1994 12:43:21 GMT Message-ID: <2ms1t9$g48@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article , butrfeld@cs.tcd.ie (Andrew Butterfield) writes: > In article , > thompson@sun1.coe.ttu.edu wrote: > > > > All the original work revolves around a particular literate programming > > tool called WEB. Knuth says: > > I am new to this group so I read the FAQ, some of which is quoted above. I > notice (as an occaisional literate programmer) that everything seems to > revolve around WEB and variants. So I thought I'd let this group know that > literate programming has spread it wings slightly further. > > A lot of functional programming languages* have the notion of "literate > scripts" [...] > The literate script approach is simpler than WEB, in that it won't > re-arrange code to meet define-before-use rules, for example. Thanks for your article. There has been lots of discussions on the LitProg mailing list (that eventually evolved into a newsgroup) about that point. The point most discussant agreed on in the end was that the support of refinements (i.e., to bind code chunks to names and be able to use the names in place of the code itself) is a crucial part of every LitProg system. (You may also want to check the discussions in the CACM column about this topic.) Systems that support typeset documentation are therefore usually not considered to be LitProg systems. I would call them Literate Documentation (LitDoc for short) systems. They are a very valuable contribution as a handy tool (I have written some of them myself ;-), but they are not the real beef. Btw, that's the reason why the regular posting on the Contents of the LitProg Archiv lists such systems in a separate section. I think I'll add the name LitDoc system to the title of this section. :-) > However the > languages* that employ this usually don't have a define-before-use rule. That's not the point of refinements. It's a nice by-product to circumvent this rule in languages that demand them, but it's not necessary. Refinements allow the expression of an abstraction, like functions do. But as an author I can impart this abstraction much better since I can use real text to give it a title, instead of a simple identifier. [I hope `impart' is the right verb here; I don't have a dictionary handy...] Btw, there is also a technical difference between refinements and functions: Refinements are still in the same lexical closure, from a pure hacker's point of view they are just macros. But I find this view too shortsightened, it does not acknowledge the importance of presenting one's abstractions to a reader of one's code. So refinements still have their value in functional languages (and OO languages, for that matter; where one could argue that methods don't need refinements with similar arguments). Anytime I write a larger CLOS program I'm missing a LitProg environment for it... ;-) Cheers, Joachim PS: I tried to recapitulate the previous discussions as good as I could. Feel free to correct me, as many of you know I'm very biased. But perhaps one should mention the discussion in the FAQ? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 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: Thu, 24 Mar 1994 13:25:39 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 24 Mar 94 13:14:57 CST From: thompson@sun1.coe.ttu.edu (Dave Thompson (3/1/93)) Reply-To: LitProg@SHSU.edu, thompson@SUN1.COE.TTU.EDU Message-ID: <9403241914.AA05569@sun1.coe.ttu.edu> To: LitProg@SHSU.edu, schrod@ITI.INFORMATIK.TH-DARMSTADT.DE Subject: Re: comp.programming.literate FAQ > PS: I tried to recapitulate the previous discussions as good as I > could. Feel free to correct me, as many of you know I'm very biased. > But perhaps one should mention the discussion in the FAQ? I would like to address this issue in the FAQ. However, I have not followed the discussion very well (in either the physical or mental sense). :-( Perhaps someone will summarize the issues so that I can follow... -=d ================================================================================ Archive-Date: Thu, 24 Mar 1994 14:29:03 CST Sender: LP-Mgr@SHSU.edu Subject: Re: comp.programming.literate FAQ Message-ID: From: ramsdell@triad.mitre.org (John D. Ramsdell) Date: 24 Mar 1994 19:39:42 GMT Reply-To: LitProg@SHSU.edu, ramsdell@mitre.org To: LitProg@SHSU.EDU In article <2ms1t9$g48@rs18.hrz.th-darmstadt.de> schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes: Thanks for your article. There has been lots of discussions on the LitProg mailing list (that eventually evolved into a newsgroup) about that point. The point most discussant agreed on in the end was that the support of refinements (i.e., to bind code chunks to names and be able to use the names in place of the code itself) is a crucial part of every LitProg system. (You may also want to check the discussions in the CACM column about this topic.) Systems that support typeset documentation are therefore usually not considered to be LitProg systems. I would call them Literate Documentation (LitDoc for short) systems. They are a very valuable contribution as a handy tool (I have written some of them myself ;-), but they are not the real beef. Btw, that's the reason why the regular posting on the Contents of the LitProg Archiv lists such systems in a separate section. I think I'll add the name LitDoc system to the title of this section. :-) I think this note reveals a source of confusion about the notion of a literate programming system. Let me expose the problem by means of an example. The SchemeWEB filter provides simple support for literate programming in Lisp. The filter does not provide support for refinements, so by the logic above, one might say that it only supports literate documentation. However, SchemeWEB was created to be used with Scheme with provides an extremely powerful refinement mechanism called hygienic macros. This mechanism gives macros writers control over the scope of macro parameters so that they can avoid inadvertent name capture. This and other features make it much more useful than ordinary textual macro expansion used in WEB and its relatives. If you define your system to be the combination of SchemeWEB and a Scheme implementation with hygienic macros, then it is easy to see that the combination is a literate programming system. The down side of the use of SchemeWEB is the lack of automated support for the generation of indices, but that is a different subject. A tool's inclusion in the section titled literate documentation systems just means the tool itself does not do refinements; it does not tell you whether the tool supports literate programming. John ================================================================================ Archive-Date: Thu, 24 Mar 1994 16:18:26 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: comp.programming.literate FAQ Date: 24 Mar 1994 21:16:34 GMT Message-ID: <2msvvi$1q0@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article , ramsdell@triad.mitre.org (John D. Ramsdell) writes: > > I think this note reveals a source of confusion about the notion of a > literate programming system. I wouldn't call it confusion -- I would call it a serious difference made consciously. [Scheme macros] > ... more useful than ordinary textual macro expansion used in WEB ... As long as one sees refinements *only* as a macro expansion, than you're right. But -- as I tried to explain in the part of my article you discarded -- refinements are more. I *cannot* use long verbal sentences, with TeX formatted formulas in them (for pre- and postconditions!), as macro names. And identifiers are no substitutions for that. IMO the Scheme (or CL) macro mechanism supports another area of abstractions: With it one can define new syntactic constructs to increase the abstraction level of the formal part. That's something completely different for me. (But I use it a lot, actually!) IMNSHO, a similar line of reasoning could be made to drop loops from programming languages because we have condition and gotos. It's there, yes -- but this is a different *abstraction* level. To express the reason of one's abstractions with prosa is better than with some identifiers -- that's the heart of Literate Programming! Why do we document then, after all; good programs with well-chosen identifiers and very small functions or methods, invariants etc. listed in comments, are self-documenting and everything we need, aren't they? (At least Dijkstra thinks so... ;-) Don't get me wrong, the comments above are in now way meant personally. I simply want to show why refinements are important for me; I wanted to make the points you deleted more clearly. (Obviously I wasn't good enough in formulating them.) Well, 10pm and 12 hours worked -- time for a dinner. CU tomorrow, Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany @d infinity=255 {$\infty$ (approximately)} [DEK, in weave.web] ================================================================================ Archive-Date: Fri, 25 Mar 1994 03:16:42 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 25 Mar 94 09:28:49 MET From: Zdenek Wagner Reply-To: LitProg@SHSU.edu, WAGNER%CSEARN.BITNET@SHSU.EDU Subject: Re: CWEB and Cfront templates problem To: Literate Progaramming list , narayan@SILVER.UCS.INDIANA.EDU On Thu, 24 Mar 1994 00:06:21 GMT Srinivas P. Narayana said: >Hi! > I am new to CWEB. I would like to know how to work around the >following problem: When I run cfront compiler over the CTANGLE >output containing templates, the cfront template instantiator gets >confused by the #line preprocessor directives in the tangled >output. The template instantiator looks for the template >definitions in the web file instead of looking in the tangled >output ( the c file ). > How do I get around this? > >Thanks, >-Srinivas I had another problem (with Borland C++) caused by the same reason. In order to solve it I wrote a simple filter which comments out the #line directives in the tangled file. Thus the compiler does not get confused and I still have information where the chunk is present in the web source. If you like, I can send you the C++ source of my filter. Regards ,~~~/ /` / /| /~~~ / / |_/ /__/ ' | / / /~~/ /~~/ /~~/ /~~/ /\ | /| / /~~/ /~~/ /~~/ /~~/ /~~~ / , / / /~~~ / / /~~~ / \ |/ |/ / /_/ / / / /~~~ / ~~~~ ~~~ ~~~ ' ' ~~~ ' ` ' ' ~~~ ~~/ ' ' ~~~ ' 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: Fri, 25 Mar 1994 08:00:23 CST Sender: LP-Mgr@SHSU.edu From: ramsdell@triad.mitre.org (John D. Ramsdell) Subject: Re: comp.programming.literate FAQ Date: 25 Mar 1994 13:05:34 GMT Message-ID: Reply-To: LitProg@SHSU.edu, ramsdell@mitre.org To: LitProg@SHSU.EDU Joachim, I find it very interesting to learn about the very deeply thought out opinions you have about refinement, and I hope you find hygienic macros interesting due to their ability to give programmers more control over macro expansion. However, I find it hard to believe most people will appreciate these distinctions. I realize that my previous posting might be construed as lending implicit support to the notion that literate programming tools must support refinement. I see no reason the be so restrictive. When asked, here is how I describe literate programming: Literate programming is a style of programming in which programmers view their task as communicating computational processes mostly for the benefit of other humans, rather than solely for the benefit of computing machines. A literate programming tool simply supports this style of programming. In particular, I think that the paper and pencil that Donald Knuth used to write the first draft of TeX are literate programming tools. In my opinion, this news group should be dedicated to promoting the style of literate programming in whatever form it may take. *** In article <2msvvi$1q0@rs18.hrz.th-darmstadt.de> schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes: In article , ramsdell@triad.mitre.org (John D. Ramsdell) writes: > > I think this note reveals a source of confusion about the notion of a > literate programming system. I wouldn't call it confusion -- I would call it a serious difference made consciously. Sorry, I made a bad choice of words. Your characterization is more accurate. John ================================================================================ Archive-Date: Fri, 25 Mar 1994 15:00:38 CST Sender: LP-Mgr@SHSU.edu Date: Fri, 25 Mar 94 15:58:55 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu Subject: Re: CWEB and Cfront templates problem Message-ID: More thoughts on the CWEB/Cfront/templates/#line problem brought up by Srinivas P. Narayana. 1. This is definitely a Cfront bug (not that this is any consolation), as it restricts the use of #line to the compiler itself, while the Standard specifically allows programmers to use #line indiscriminately for their own purposes (presumably for tools like CWEB). 2. On the other hand, it seems like a clever idea to have Cfront remember the files that templates are defined in so it can go back later and generate the necessary functions (and only the necessary ones). Unfortunately, this cleverness trips up us CWEB programmers (``Don't be too clever.'' -- Kernighan & Plauger) 3. It may be possible to outwit Cfront at its own game. You can put your own #line directive into the web. For example, if your template declaration will be tangled to the file ``xxx.hh,'' you can declare the template class xxx as follows: @= #line 1 "xxx.hh" template class xxx { @@/ }; Of course, this assumes that Cfront only uses the file name from the #line, not the line number (a reasonable assumption, as the template will almost certainly rely on declarations made earlier in the file, so the compiler will have to reread the entire file anyway to generate effective code). If the assumption is false, you will have to count lines in xxx.hh to find the actual line number, and this is more trouble than it's worth. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | There's no such thing as a foolproof Computer Science Department | system. And the more complex you make it, Kean College of New Jersey | the more intricate, then the quicker Union, NJ 07083 | things can happen if it ever breaks down. USA | | -- Peter George leew@pilot.njin.net | _Commander-1_ (1965) ------------------------------------------------------------------------ ================================================================================ Archive-Date: Mon, 28 Mar 1994 00:34:41 CST Sender: LP-Mgr@SHSU.edu From: A7621GAC@AWIUNI11.EDVZ.UniVie.AC.AT Reply-To: LitProg@SHSU.edu, A7621GAC@AWIUNI11.EDVZ.UNIVIE.AC.AT Subject: ANNOUNCING c2cweb: C/C++ source code to CWEB Date: Mon, 28 Mar 94 08:10:38 MEZ Message-ID: <16F8772FE.A7621GAC@AWIUNI11.EDVZ.UniVie.AC.AT> To: LitProg@SHSU.EDU Here is the readme file of the c2cweb11.zip package. I've uploaded it at pip.shsu.edu Happy TeXing! Werner This is the c2cweb package Version 1.1 (8-Mar-1994) =================================================== Copyright (C) 1994 Werner Lemberg [see below for a German introduction] c2cweb will transform plain C or C++ code into a CWEB file to get a pretty formatted output. A modified CWEAVE (which transforms the CWEB file into a TeX file, see below) is included also. Some c2cweb highlights: variables and function names in italics reserved words (int, char, return etc.) in bold face strings in typewriter type comments in typwriter type or roman an index(!) of all variables, constants, function names etc. each function gets a section and more c2cweb.zip contains the following files: c2cweb.txt this file history.txt the history file diff.txt GNU diff between Ver. 1.1 and Ver. 1.0 copying the GNU Copying License c2cweb.w a CWEB file of the program you should use cweave +ai c2cweb.w (using this package's cweave) to produce a TeX-output c2cweb.exe an executable for DOS and OS/2 compiler.w compiler dependent formatting commands (an output of c2cweb reads this file) c2cweb.ger a small german `package' to demonstrate national language support example.c a C code example with inserted c2cweb control commands emx.exe the emx DOS-extender (ver. 0.8h) (for VCPI) rsx.exe the rsx DOS-extender (rev. 3a) (for DPMI) emx.dll the emx runtime library for OS/2 (ver 0.8h) cweb/cweave.exe a modified executable (for DOS and OS/2) of CWEAVE Ver. 3.1 with three important new features: o the switch +a causes CWEAVE to produce a different output format, basically if(a) {bla bla bla... } instead of if(a) { bla bla bla... } o the switch +i causes CWEAVE to append () after a function name in the index (this makes only sense if all names are unique) o the #define statement handling was basically enhanced to allow macros with parameters cweb/cwea-os2.ch the change file for the above CWEAVE executable to compile with emx-gcc cweb/common.h this is needed to build cweave.exe cweb/comm-os2.ch change file for common.w cweb/makefile.os2 Makefile for CWEAVE cweb/cwebmac.tex the standard cwebmac.tex file (slight modified) cweb/cwebmaca.tex this alternative format file is read by TeX if you use the +a switch cweb/prod-alt.w this file is an include file of cwea-os2.ch; it contains the alternative syntax rules of CWEAVE if the switch a is on You should get the original CWEB package for documentation and the master CWEAVE (and CTANGLE) files (cweave.w, common.w, etc.). It will contain change files for different operating systems also. Copying ------- This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program 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 this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. How to use ---------- The only change the user has to do normally is to insert /*@@*/ starting an empty line outside of a comment or string before the first function block (normally main(){ ... }) in the C code. After this command c2cweb writes each function block into a section. Before /*@@*/ all stuff is written into a (possibly large) section. If you want to structure this further or if you have structure definitions between functions, use /*@*/ to start a new section without starting the function block algorithm (and of course /*@@*/ before the next function). The function algorithm simply counts paired braces; if none are open, a new section will begin. The file example.c has these control codes inserted already. The syntax is c2cweb [switches] csourcefile(s) | @responsefile(s) The possible switches are: -v: all comments are written in typewriter type. You will need this if you have formatted your comments, for example /********************/ /* example.c */ /********************/. -t value: all tabs will be expanded, and the -t switch defines the tab length (default value is 4). -l: causes all linefeeds inside of C text to be output explicitly by inserting @/ (a CWEB control code) at the end of each code line. -o directory: sets the output directory which must exist already. -b "titlestring": defines a title with the titlestring enclosed in double quotes. This string will be passed directly to \TeX. -1: one-sided output (i.e. left header is the same as right header). The last steps are calling CWEAVE with the transformed master file and then calling TeX to get a printable .dvi-file. An example: your input files are header1.h, header2.h, file1.c, file2.c, file3.c you must call then c2cweb [options] header*.h file*.c to get the *.*w files. c2cweb will now process your files and tell you which file is the input file for CWEAVE (we'll assume file3.cw). After calling cweave [options] file3.cw you get a .tex file (and some additional auxiliary files) which should be processed further by PLAIN TeX (LaTeX is not supported): tex file3[.tex] Please read the `Hints and Tricks' section about enhancements and limitations of c2cweb in the file c2cweb.w (of course after processing with CWEAVE and TeX :-). Author ------ Werner Lemberg (a7621gac@univie.ac.at) Please report any errors, comments or suggestions to this email-address. N.B.: If you like this program, send me a postcard ! Werner Lemberg Goldschlagstr. 52/14 A-1150 Vienna/Austria -------------------------------------------------------------------------------- c2cweb Paket Version 1.1 (8-Mar-1994) ===================================== Copyright (C) 1994 Werner Lemberg c2cweb verwandelt gewhnlichen C - oder C++ - Quellcode in eine CWEB-Datei, um einen gut formatierten Ausdruck zu erhalten. Dieses Paket enthlt auaerdem eine modifizierte Version von CWEAVE (welche die CWEB-Datei in eine TeX-Datei transformiert). Besonderheiten u.a.: Variablen und Funktionsnamen in Kursivschrift reservierte Wrter (int, char, return etc.) in Fettschrift Strings in Schreibmaschinenschrift Kommentare in Normal- oder Schreibmaschinenschrift ein Index(!) aller Variablen, Konstanten, Funktionsnamen etc. jede Funktion fllt einen eigenen Abschnitt c2cweb.zip enthlt folgende Dateien: c2cweb.txt diese Datei history.txt Entstehungsgeschichte von c2cweb diff.txt GNU diff zwischen Ver. 1.1 und Ver. 1.0 copying GNU Kopierlizenz c2cweb.w die CWEB-Realisation dieses Programms Um eine TeX .dvi-Datei zu erhalten sollte man cweave +ai c2cweb.w eingeben (mit der CWEAVE-Version dieses Pakets) c2cweb.exe ausfhrbare Programme fr DOS und OS/2 compiler.w Compiler-abhngige Formatierbefehle (von c2cweb erzeugte Dateien inkludieren diese Datei) c2cweb.ger ein kleines Deutsch-`Paket', um die Untersttzung von nichtenglischen Sprachen zu demonstrieren. example.c ein C-Code-Beispiel mit bereits eingefgten c2cweb- Kontrollbefehlen emx.exe emx DOS-Extender (Ver. 0.8h) (fr VCPI) rsx.exe rsx DOS-Extender (Rev. 3a) (fr DPMI) emx.dll emx Laufzeit-Bibliothek fr OS/2 (Ver. 0.8h) cweb/cweave.exe eine modifizierte Version von CWEAVE Version 3.1 (fr DOS und OS/2) mit drei wichtigen neuen Eigenschaften: o mit der Option +a formatiert CWEAVE den Quellcode anders, und zwar im Prinzip if(a) {bla bla bla... } anstelle von if(a) { bla bla bla... } o die Option +i veranlaat CWEAVE, jedem Funktionsnamen () im Index anzuhngen (nur sinnvoll, wenn alle Namen eindeutig sind) o die Behandlung von Prprozessorbefehlen (#define etc.) wurde entscheidend verbessert, um Makros mit Parametern zu ermglichen cweb/cwea-os2.ch Change-Datei fr cweave.w (zu kompilieren mit emx-gcc) cweb/common.h wird bentigt fr die Kompilation von cweave.exe cweb/comm-os2.ch Change-Datei fr common.w cweb/makefile.os2 Make-Datei fr CWEAVE cweb/cwebmac.tex ursprngliche cwebmac.tex-Datei (leicht verndert) cweb/cwebmaca.tex diese alternative Formatdatei wird von TeX gelesen, wenn die +a-Option angegeben ist cweb/prod-alt.w diese Datei ist eine Include-Datei von cwea-os2.ch; sie enthlt die alternativen Syntaxregeln, falls Option +a verwendet wird Es ist empfehlenswert, sich das originale CWEB-Paket zu besorgen, welches die Dokumentation und die CWEB-Dateien fr CWEAVE (und CTANGLE) enthlt (cweave.w, common.w, etc.). Auaerdem sind Change-Dateien fr andere Betriebssysteme enthalten. Verwendung ---------- Die einzige Vernderung, die der Anwender normalerweise machen mua, ist das Einfgen von /*@@*/ am Anfang einer leeren Zeile auaerhalb eines Kommentars oder Strings vor dem ersten Funktionsblock (das ist in der Regel main(){ ...}) im C-Quellcode. Nach diesem Befehl erzeugt c2cweb fr jede Funktion einen eigenen Abschnitt. Vor /*@@*/ wird alles in eine einzige (u.U. groae) Sektion geschrieben. Will man solche Abschnitte zustzlich strukturieren oder hat man Struktur-Definitionen zwischen Funktionen, sollte man /*@*/ verwenden, um einen neuen Abschnitt zu beginnen ohne den Funktionsalgorithmus einzuschalten (und natrlich /*@@*/ vor der nchsten Funktion). Der Funktionsalgorithmus zhlt einfach paarweise geschwungene Klammern; falls keine mehr offen, wird ein neuer Abschnitt begonnen. In der Beispieldatei example.c sind diese Kontrollcodes bereits enthalten. Aufruf: c2cweb [Optionen] C-Quelldatei(en) | @Response-Datei(en) Folgende Option sind mglich: -v: alle Kommentare werden in Schreibmaschinenschrift ausgegeben. Dieser Schalter ist notwendig, falls die Kommentare bereits formatiert sind, zum Beispiel /********************/ /* example.c */ /********************/. -t Wert: all Tabulator-Stopps werden expandiert; -t Wert definiert die Tabulatorweite (Grundeinstellung ist 4). -l: Zeilenumbrche in der Eingabe innerhalb von C-Text bleiben in der Ausgabe erhalten durch explizites Anhngen von @/ (einem CWEB Kontrollcode) an jede Code-Zeile. -o Verzeichnis definiert das Ausgabeverzeichis (mua bereits existieren). -b "Titel": definiert einen Titel (in doppelten Anfhrungszeichen). Dieser String wird direkt an TeX weitergegeben. -1: einseitige Ausgabe (d.h., linker Seitenkopf wird dem rechten Seitenkopf gleichgesetzt). Die letzten Schritte sind das Aufrufen von CWEAVE mit der transformierten Hauptdatei und danach der Aufruf von TeX, um eine druckfhige .dvi-Datei zu erhalten. Ein Beispiel: die Eingabedateien: header1.h, header2.h, file1.c, file2.c, file3.c Man mua jetzt c2cweb [Optionen] header*.h file*.c aufrufen, um die *.*w-Dateien zu erhalten. c2cweb bearbeitet jetzt alle Eingabedateien und teilt mit, welche Datei die Eingabedatei fr CWEAVE ist (hier im Beispiel sei es file3.cw). Nach dem Aufruf cweave [Optionen] file3.cw erhlt man eine .tex-Datei (und einige zustzliche Hilfsdateien), die mit PLAIN TeX weiterverarbeitet werden mua (LaTeX wird nicht untersttzt): tex file3[.tex] Im Abschnitt `Hints and Tricks' in der Datei c2cweb.w werden weitere Verbesserungen und Beschrnkungen von c2cweb beschrieben. Autor ----- Werner Lemberg (a7621gac@univie.ac.at) Bitte alle Fehler, Kommentare oder Bemerkungen an obige email-Adresse schicken. N.B.: Wenn Ihnen das Programm gefllt, schicken Sie mir doch eine Postkarte ! Werner Lemberg Goldschlagstr. 52/14 A-1150 Vienna/Austria ================================================================================ Archive-Date: Tue, 29 Mar 1994 03:34:15 CST Sender: LP-Mgr@SHSU.edu From: ras@dynastar.princeton.edu (Robert Shillingsburg) Reply-To: LitProg@SHSU.edu, ras@DYNASTAR.PRINCETON.EDU Subject: Yet another example program (nuweb) Message-ID: <1994Mar28.175951.22184@Princeton.EDU> Keywords: literate nuweb example socket Date: Mon, 28 Mar 1994 17:59:51 GMT To: LitProg@SHSU.EDU I have written an example literate program (using nuweb) which traces the development of a simple sockets-based multiuser application. Its URL is "http://www.cs.princeton.edu/grad/ras/sockets.ps". I'm not asking for critiques (or even bug reports); I'm just making it available to those who may find it useful. If you would like the source, send me e-mail. Enjoy. -Rob -- *********************************************************************** (___) * Rob Shillingsburg Princeton University Computer Science * |===| * ras@cs.princeton.edu This is a *UNIX* system! I know this! * \_/ *********************************************************************** RoboCow ================================================================================ Archive-Date: Tue, 29 Mar 1994 09:45:46 CST Sender: LP-Mgr@SHSU.edu From: lynbech@avignon.daimi.aau.dk (Christian Lynbech) Reply-To: LitProg@SHSU.edu, lynbech@AVIGNON.DAIMI.AAU.DK Subject: The essence of LP (was Re: comp.programming.literate FAQ) Date: 29 Mar 1994 15:09:59 GMT Message-ID: To: LitProg@SHSU.EDU At the danger of mudling up this discussions, I will offer my own version of why something like scheme's macro facility isn't strictly Literate Programming to me either. To me, the refinement aspect of LP is the most important. This sets LP (or rather the tools that support it) aside from various hacks one could do for modularizing and formatting ones code. Refinements are important because they support one of the two dimensions of Structure Programming, which I believe like many other, is A Good Thing (I'll come back to these dimensions). Knuth says in his article on programming with goto's (included in his book: Literate Programming): \begin{quote} We understand complex things by systematically breaking them into successively simpler parts and understanding how these parts fit together locally. \end{quote} Or as Tony Hoare said, when Knuth asked him to define structured programming: \begin{quote} The systematic use of abstraction to control a mass of detail, and also a means of documentation which aids program design. \end{quote} The refinement notion has a definite advantage in being low-cost (as oposed to real functions or procedures), syntax-independent and transparent to the product. Language macros are intricate parts of the product, and may have subtile effects not easily recognized from the code alone, i.e. they may need real debugging. The concepts of purely syntactically expansion is much easier. As it has already been said: macros is a device for extending the syntax of the language. The two dimensions of structured programming, is something I read somewhere I unfortunately cannot remember. But if I remember correctly, the main idea is that structured programming has two dimensions: one horizontal and one vertical. The horizontal covers modularization of the code, with clearly defined interfaces between the components. This is supported by the language and its type system. For instance, pascal has rich constructs for making a good job here, with procedures and composite types. The vertical dimension covers the stepwise construction of the program, working from the large perspective towards the fine details, something elegantly supported by refinements. As I see it, few languages support this dimension to any reasonable degree. Scheme perhaps, but certainly not neither Pascal nor miranda. Their function/procedure concept is much too coarse-grained for this purpose. Just rambling along, ------------------------------------------------------------------------------ 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: Wed, 30 Mar 1994 10:04:04 CST Sender: LP-Mgr@SHSU.edu From: ramsdell@triad.mitre.org (John D. Ramsdell) Subject: Refinements is bad terminology Date: 30 Mar 1994 12:01:44 GMT Message-ID: Reply-To: LitProg@SHSU.edu, ramsdell@mitre.org To: LitProg@SHSU.EDU I think that calling the macro expansion activity employed by many literate programming tools refinement is very misleading. To me, refinement conjures up some notion of preserving some aspect of the semantics of an object while adding in more semantics in the form of making the object more concrete. The most complex literate programming tools provide an abstraction mechanism implemented by the most primitive form of macro expansion: character based expansion in which the strings are uninterpreted. Tools that really support refinement have some knowledge of the semantics of the object being refined. For example, consider Kestrel's REFINE tool. It manipulates representations of algorithms that have been assigned a formal interpretation in a precisely defined logic. You might read Richard K. Jullig's article "Apply Formal Software Synthesis" in IEEE Software May 1993, so see how others use the term refinement. It is okay to say that many literate programming tools provides primitive support for refinement, but let's be clear as to how minimal that support is. These tools facilitate the documentation of the refinement processes. They really are refinement documentation tools. In my opinion, focusing on refinement simply emphasizes a short coming of the current generation of literate programming tools. John ================================================================================ Archive-Date: Wed, 30 Mar 1994 13:44:40 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: Refinements is bad terminology Date: 30 Mar 1994 18:15:44 GMT Message-ID: <2ncfkg$hih@rs18.hrz.th-darmstadt.de> To: LitProg@SHSU.EDU In article , ramsdell@triad.mitre.org (John D. Ramsdell) writes: > I think that calling the macro expansion activity employed by many > literate programming tools refinement is very misleading. > > [...] > > Tools that really support refinement have some knowledge of the > semantics of the object being refined. For example, consider > Kestrel's REFINE tool. I have to confess that I use the term `refinement' as it was coined by N.Wirth in ``Program Development by Stepwise Refinement'' [CACM 14(4), p.221-227] and used by Dijkstra & Hoare in _Structured Programming_ and by Gries in _The Science of Programming_. There refinements don't ``have some knowledge of the semantics of the object being refined'' per se; there are pre- and postconditions both the refinement placeholder and the refinement itself obey, the refinement often more strictly. See also Hoare's new article ``Algebra and Models'' [SEN 18(5), p.1-8], an abstract of his keynote address to the 1st ACM Symposium on the Foundations of Software Engineering. Up to now this usage was sufficient for me (as I don't need _more_ formalism than Dijkstra uses...) > You might read Richard K. Jullig's article "Apply Formal > Software Synthesis" in IEEE Software May 1993, so see how others use > the term refinement. Oh yes, I remember that paper. There `refinement' was used for the semi-automatic transformation of an abstract data type to a concrete data type (by an inference machine based on a description in 1st order logic). It might be that this is the usage in the AI field (where Jullig comes from obviously), but this is definitely _not_ so in software engineering. Compare, e.g., to Liskov & Guttag's _Abstraction and Specification in Program Development_ (and for me Liskov is definitely an authority in this area, after all _she_ coined the term `abstract data type'!). Or Ian Summerville's _Software Engineering_. (Btw, Ian has also written a good article about the problems between SE and AI folks; may be fetched by anonymous ftp from ftp.comp.lancs.ac.uk.) > To me, > refinement conjures up some notion of preserving some aspect of the > semantics of an object while adding in more semantics in the form of > making the object more concrete. Yes, here I agree with you. And I don't see the contradiction: A piece of code is more concrete than a placeholder that notes the pre- and post-conditions. As explained by Wirth in his article that is worth to be read from time to time... Regards, Joachim Schrod -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Dipl.-Inform. Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de Computer Science Department Technical University of Darmstadt, Germany ================================================================================ Archive-Date: Thu, 31 Mar 1994 04:17:13 CST Sender: LP-Mgr@SHSU.edu From: maavl@cwi.nl (Marc van Leeuwen) Reply-To: LitProg@SHSU.edu, maavl@CWI.NL Subject: Re: Refinements is bad terminology Message-ID: Date: Thu, 31 Mar 1994 09:42:40 GMT To: LitProg@SHSU.EDU In article <2ncfkg$hih@rs18.hrz.th-darmstadt.de>, schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes: |> Yes, here I agree with you. And I don't see the contradiction: A |> piece of code is more concrete than a placeholder that notes the pre- |> and post-conditions. Sorry about my ignorance on this point but what is all this talk about pre- and post-conditions about? Has anyone ever seen a real (as opposed to toy) pre- or post-condition? Could you mention a module name in TeX The Program or the Stanford GraphBase (or some other published literate program) that mentions such a condition? It's probably due to my wrong upbringing, but to me pre- and post-conditions always seemed to be extremely impractical formal expressions to be attached to parts of imperative programs (often larger than the part itself) for proving that the program meets a formal specification (and which some would believe are helpful in finding an implementation for those specifications); something that I have never seen done for a real-world program. This is not a criticism of the remarks above, just a question to enlighten me about the true meaning of these terms. Marc van Leeuwen ================================================================================ Archive-Date: Thu, 31 Mar 1994 09:40:46 CST Sender: LP-Mgr@SHSU.edu From: marcus@x4u2.desy.de (Marcus Speh) Subject: Literate Programming on the World Wide Web [Revised 15 March 1994] Date: 31 Mar 1994 10:10:11 GMT Message-ID: Reply-To: LitProg@SHSU.edu, marcus@x4u.desy.de To: LitProg@SHSU.EDU Archive-name: www/resources/literate-programming Last-modified: 15 March 1994 Posting-Frequency: monthly ----------------------------------------------------------------------------- * Recent Changes [-> from the home page] ----------------------------------------------------------------------------- o Preview on the virtual course -> GNA OOP course [-> "Virtual Course"] o New large literate example with C++ [-> "Examples"] o NOWEB 2.5 ported to DOS [-> "Tools"] o More samples by Lee Wittenberg [-> "Examples"] ----------------------------------------------------------------------------- * Literate Programming on the World Wide Web ----------------------------------------------------------------------------- FYI, there is a wealth of information on Literate Programming, the art of structured programming and documentation [like WEB-like systems with (La)TeX formatting] available on the World Wide Web [WWW], a distributed HyperText system, a network of documents connected by links which can be activated electronically. Examples for LitProg environments are WEB for Pascal (DEK), CWEB for C/C++ (Levy/Knuth), FWEB for C/C++/Fortran/ratfor/TeX (Krommes), various language independent tools...and many more. ----------------------------------------------------------------------------- * How to get to the Web ----------------------------------------------------------------------------- If you have a WWW browser up and running, try going to http://info.desy.de/general/users.html and look for "Literate Programming" in the panel which appears. The precise URL is http://info.desy.de/user/projects/LitProg.html If you have no clue what WWW is, you can go over the Internet with telnet info.cern.ch which brings you to the WWW Home Page at CERN. You are now using the simple line mode browser. To move around the Web, enter the numbers given after an item. To go to the Literate Programming documents, enter go http://info.desy.de/user/projects/LitProg.html This is what you should see now: ----------------------------------------------------------------------------- * What you will see here ----------------------------------------------------------------------------- Getting Start(l)ed[2] A first look into Literate Programming with WEB Course[3] Planned GNA[4] Internet course on Literate Programming Editing[5] GNU Emacs mode for WEB programming Tools[6] Common, freely available Literate Programming environments Examples[7] Literate Programming archives and selected examples Discussion[8] Discussion on LitProg takes place on a mailing list and a newsgroup Program Library[9] George D. Greenwade's Literate Programming Library at Niord.shsu.edu. Experimental service: Archive Search[10] FAQs[11] Lists of Frequently Asked Questions: General and FWEB Further Reading Nelson Beebe's Literate Programming bibliography at ftp.math.utah.edu in directory /pub/tex/bib[12](files litprog.*) HyperLitProg[13] Literate Programming using HyperText[14] Techniques OO-LitProg[15] Opinions and examples on Object-Oriented[16] Literate Programming [[Now you can continue climbing down the documentation tree by entering numbers 1-16 and follow your own interests]] ----------------------------------------------------------------------------- * More on Browsing the Web ----------------------------------------------------------------------------- A very nice way of "browsing" through WWW uses X-based tools like "tkWWW" or "NCSA Mosaic". For the latter, binaries for many platforms (ready for use) and sources are available via anonymous FTP from ftp.ncsa.uiuc.edu in directory Web/Mosaic-binaries. For vt100 terminals there is a much-used browser called "Lynx" which can be obtained by FTP from ftp2.cc.ukans.edu in the pub/lynx directory. Emacs users will like the "W3" browser, FTP to cs.indiana.edu:/pub/elisp/w3. There is a FTP repository for browser software at info.cern.ch (including a hypertext browser/editor for NeXTStep 3.0 and tkWWW). If you cannot go through TELNET, you can still retrieve WWW documents by e-mail: send Email to test-list@info.cern.ch with one or more lines of the form send [http-address] e.g. send http://info.desy.de/user/projects/LitProg.html at the bottom of the page you'll find all links of that document listed. Your mail system must have a mail gateway to internet mail. ----------------------------------------------------------------------------- * Contact for Further Information ----------------------------------------------------------------------------- Please feel free to contact me for questions, suggestions and further contributions, or just to tell me whether you found this information useful in any way. For questions related to WWW, consult the WWW-FAQ: available via anonymous FTP from rtfm.mit.edu in directory pub/usenet/news.answers/www/faq, or on WWW at URL http://www.vuw.ac.nz:80/who/Nathan.Torkington/ideas/www-faq.html Enjoy! Marcus Speh for GNA. ***************************************************************************** Copyright 1993-94 Globewide Network Academy, Inc. Distributed under the terms of the GNU Public License. Permission is granted to copy this document for free distribution so long as it remains intact and unmodified. See more on WWW at http://uu-gna.mit.edu:8001/uu-gna/index.html or get the GNA FAQ via anonymous FTP to ftp.desy.de [131.169.10.115] as file pub/uu-gna/faq.txt ------------------------------------------------------------------------- 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: Thu, 31 Mar 1994 13:27:27 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 31 Mar 94 14:27:21 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, maavl@cwi.nl Subject: Re: Refinements is bad terminology Message-ID: Marc van Leeuwen writes: > Sorry about my ignorance on this point but what is all this talk about pre- > and post-conditions about? Has anyone ever seen a real (as opposed to toy) > pre- or post-condition? Could you mention a module name in TeX The Program > or the Stanford GraphBase (or some other published literate program) that > mentions such a condition? It's probably due to my wrong upbringing, but to > me pre- and post-conditions always seemed to be extremely impractical formal > expressions to be attached to parts of imperative programs (often larger > than the part itself) for proving that the program meets a formal > specification (and which some would believe are helpful in finding an > implementation for those specifications); something that I have never seen > done for a real-world program. This is not a criticism of the remarks above, > just a question to enlighten me about the true meaning of these terms. I can't speak for literate programs, but the programming language Eiffel provides support for ``real'' pre- and postconditions that are extremely practical. Meyer describes their use as ``programming by contract,'' an extremely powerful idea and the best (some would say only, but I'm not about to get involved in *that* religous war) reason to program in Eiffel. Meyer describes the concept (and the language) in a number of books and articles, most notably _Object-oriented_Software_Construction_ and _Eiffel:_The_Language_. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | Do we not feast upon trivialities to Kean College of New Jersey | divert attention from the truly portentous Union, NJ 07083 | issues that engulf us? USA | | -- Stephen Jay Gould (1994) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 31 Mar 1994 13:35:04 CST Sender: LP-Mgr@SHSU.edu From: weco@crash.cts.com (Mark Shackelford - Wintriss Engineering) Reply-To: LitProg@SHSU.edu, weco@CRASH.CTS.COM Subject: REQUEST: looking for revision control s/w Date: Thu, 31 Mar 1994 17:34:44 GMT Message-ID: To: LitProg@SHSU.EDU ================================================================================ Archive-Date: Thu, 31 Mar 1994 14:17:41 CST Sender: LP-Mgr@SHSU.edu From: sutlief@u.washington.edu (Steve Sutlief) Reply-To: LitProg@SHSU.edu, sutlief@U.WASHINGTON.EDU Subject: novice noweb question Date: 31 Mar 1994 19:42:33 GMT Message-ID: <2nf939$k6f@news.u.washington.edu> To: LitProg@SHSU.EDU I am using noweb on unix (as well as dos). When I noweave C and C++ code on unix the curly braces and \n do not appear in the tex file. Does anyone know why this is happening and how to fix it? - sutlief@u.washington.edu Here is an example (which notangles fine): q> more hello.nw \title{Hello World} \section{Hello World} <<*>>= #include main() { printf("hello world\n"); return 0; } @ q> noweave hello.nw > hello.tex q> more hello.tex \documentstyle[noweb]{article}\pagestyle{noweb}\noweboptions{}\begin{document}\f ilename{hello.nw}\nwbegindocs{0}\title{Hello World} \section{Hello World} \nwenddocs{}\nwbegincode{1}\moddef{*}\endmoddef #include main() printf("hello world return 0; \nwendcode{}\nwbegindocs{2}\nwdocspar \nwenddocs{}\end{document} ================================================================================ Archive-Date: Thu, 31 Mar 1994 15:40:21 CST Sender: LP-Mgr@SHSU.edu Date: Thu, 31 Mar 94 16:40:06 EST From: Lee Wittenberg Reply-To: LitProg@SHSU.edu, leew@PILOT.NJIN.NET To: LitProg@shsu.edu, sutlief@u.washington.edu Subject: Re: novice noweb question Message-ID: sutlief@u.washington.edu writes: > I am using noweb on unix (as well as dos). When I noweave C and C++ code on > unix the curly braces and \n do not appear in the tex file. Does anyone know > why this is happening and how to fix it? > - sutlief@u.washington.edu It sounds as if you have a defective copy of noweb. Perhaps you are using the Awk filters and a ``nonstandard'' Awk. You might want to try the Icon versions instead. As far as I know, Norman Ramsey uses noweb on Unix and has no problems (he'd certainly fix them if he had!). Of course, I believe he uses the Icon rather than the Awk implementation, but I'm sure he's tested both of them. Does the same problem occur in DOS? The DOS noweb (v2.5) uses the Icon filters primarily to avoid this kind of problem. I do a lot of programming in C & C++ and have not run into this problem. -- Lee ------------------------------------------------------------------------ Lee Wittenberg | Computer Science Department | Do we not feast upon trivialities to Kean College of New Jersey | divert attention from the truly portentous Union, NJ 07083 | issues that engulf us? USA | | -- Stephen Jay Gould (1994) leew@pilot.njin.net | ------------------------------------------------------------------------ ================================================================================ Archive-Date: Thu, 31 Mar 1994 16:06:51 CST Sender: LP-Mgr@SHSU.edu From: norman@flaubert.bellcore.com (Norman Ramsey) Reply-To: LitProg@SHSU.edu, norman@FLAUBERT.BELLCORE.COM Subject: Seeking account of experiences with noweb Message-ID: Date: Thu, 31 Mar 1994 20:51:46 GMT To: LitProg@SHSU.EDU If you've used noweb on a project that mattered to you (only you know what's important), I'd like to talk to you. I'm publishing an article about noweb, and the editorial staff of IEEE Software would like to hear more about how people (other than me and my colleagues) have used noweb. They're especially interested to hear about using noweb in ``practical'' situations. (Again, if you think it was practical, then it was.) If you're in North America, send me your phone number and I'll give you a call. If you're elsewhere, email may be easier than a phone call. Just for fun, I'd also like to hear from nuweb people, since nuweb and noweb are as alike as two peas. Norman Ramsey email: norman@bellcore.com tel: +1 201 829 4038 -- Norman Ramsey norman@bellcore.com