From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,81054609038e88e3 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Literate Programming in Ada, AdaDoc, AdaBrowse Date: 10 Oct 2004 17:39:34 +0100 Organization: Pushface Sender: simon@smaug.pushface.org Message-ID: References: <2sqmccF1oit5sU1@uni-berlin.de> <2sr234F1oog3tU1@uni-berlin.de> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1097426750 21661 62.49.19.209 (10 Oct 2004 16:45:50 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 10 Oct 2004 16:45:50 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Path: g2news1.google.com!news2.google.com!proxad.net!newsfeed.stueberl.de!npeer.de.kpn-eurorings.net!news.zanker.org!news.amigo.co.uk!news.clara.net!wagner.news.clara.net!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail Xref: g2news1.google.com comp.lang.ada:5001 Date: 2004-10-10T17:39:34+01:00 List-Id: Nick Roberts writes: > Wes Groleau wrote: > > Were the original "tangle" "web" and "weave" open source? > > I think they were in Pascal. Should be easy to convert to > > Ada and modify some of the details in the process. The way the Pascal code was compiled to produce TeX was using a special Pascal-to-C converter! I don't see any point in reworking that part of it. > Well, yes, but that doesn't address the problem I mentioned, that > have to run the tangle program evry time between changing the source > code (even slightly) and recompiling and running. > > Since (as I understand it) tangling involves reading and > interpreting /all/ the web files of the project, and regenerating > /all/ the source code files (obviously, there may be hundreds), it > just isn't a practical proposition for software development. I believe I have a counter-proof by existence; my current project uses a code generator that re-generates all the "framework" files every time (from Rational Rose UML models); the logic is written in separate bodies. The reason it works is the -m (minimal recompilation) switch to gnatmake, which checks whether a file whose timestamp has changed has changed semantically as well. Clearly this involves reading the file, so you need to do a full rebuild after lots of changes -- but in most cases it does quite well. I doubt you would have the whole project in one mammoth source file, you'd probably organize by chapters (for example). The time I did literate programming I used nuweb. I forget whether it could produce HTML, the native output was LaTeX; with pdfTeX (not sure of the capitalisation there!) you got very nice results. Another tool, which I never used, was noweb. -- Simon Wright 100% Ada, no bugs.