How did tangle and weave get their names?


From:     Daniel Luecking
Date: 09 Dec 1992
I know very little about WEB (actually not terribly much about programming in general). I follow this list because of an overdeveloped curiosity gland. Now I am curious why "tangle" and "weave" were given those names. I realize that Knuth likes to play with words and the connection with the word "web" is unmistakable, but why choose "tangle" for the process that produces the program source and "weave" for the process that produces the TeX file for documentation? (Rather than, say, the other way around.) I have something of a bad memory for names and I need hooks to hang them on. Presently I reason: Tangle and TeX both start with "T" so naturally they are not associated, thus weave produces the TeX file. I would prefer a less perverse hook.


From:     Timothy Larkin
Date: 09 Dec 1992
From the WEB user manual: The TANGLE program is so named because it takes a given web and moves the modules from their web structure into the order required by Pascal; the advantage of programming in WEB is that the algorithms can be expressed in "untangled" form, with each module explained separately. The WEAVE program is so named because it takes a given web and intertwines the TeX and Pascal portions contained in each module, then it knits the whole fabric into a structured document. (Get it? Wow.) Perhaps there is some deep connection here with the fact that the German word for "weave" is "web", and the corresponding Latin imperative is "texe"!


From:     Charlie Farnum
Date: 09 Dec 1992
Tangle produces ugly, tangled up Pascal code (tangle intentionally produces code that is difficult to read).

Weave produces a TeX file that eventually produces a beautiful, tapestry-like document.


From:     Marcus Speh
Date: 09 Dec 1992
Now I am curious why "tangle" and "weave" were given those names. I realize that Knuth likes to play with words and the connection with the word "web" is unmistakable, ...

Is it really? -- In his "FWEB User's Manual" [M-2.6], John Krommes is quoting DEK himself: "The name WEB itself was chosen in honor of [Knuth's] wife's mother, Wilda Ernestine Bates."

...but why choose "tangle" for the process that produces the program source and "weave" for the process that produces the TeX file for documentation?

because... "The TANGLE program is so named because it takes a given web and moves the modules from their web structure into the order required by the compilers... The WEAVE program is so named because it takes a given web and intertwines the TeX and code portions contained in each module, then it knits the whole fabric into a structured document... Perhaps there is some deep connection here with the fact that the German word for 'weave' is 'web', and the corresponding Latin imperative is 'texe'!"


From:     John Fieber
Date: 09 Dec 1992
Tangle produces ugly, tangled up Pascal code.

If that isn't the understatement of the week... Actually, the various web systems that have evolved since the first Pascal web tend not to "tangle" the code so the name may not be so appropriate any more. I am sure it will remain for historical reasons though.

Weave produces a TeX file that eventually produces a beautiful, tapestry-like document.

Tangle produces a source file that eventually produces a beautiful functioning program (in theory, practice may differ).


From:     Bart Childs
Date: 09 Dec 1992
A quote from the original paper about literate programming (which is reprinted in the book, Literate Programming.) "I chose the name WEB partly because it was one of the few three-letter words of English that hadn't already been applied to computers. But as time went on, I have become extremely pleased with the name, because I think that a complex piece of software is, indeed, best regarded as a web that has been delicately pieced together from simple materials. We understand a complicated system by understanding its simple parts, and by understanding the simple relations between those parts and their immediate neighbors. If we express a program as a web of ideas, we can emphasize its structural properties in a natural and satisfying way."

Please don't consider this a flame (Dan Luecking's note) but the actual names are not all that important. I know that Don wrote somewhere that WEB is/was the initials of his Mother-in-Law's maiden name, Wilda Ernestine Bates. The tenor of that statement was please don't make something out of the (non)mnemonic/(non)acronym.

I don't recall any real statement as to why tangle and weave except that they go with WEBs. You might want to think of the results of our verbs tangle and weave. The result of weaving should be visually nice. The document can be whereas the program (especially tangle output) is not.