From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8618 invoked from network); 12 Jan 2022 18:06:57 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 12 Jan 2022 18:06:57 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id F0C4A9CFFA; Thu, 13 Jan 2022 04:06:55 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 555589CFCA; Thu, 13 Jan 2022 04:06:31 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="X+FaxD/1"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 0097F9CFCA; Thu, 13 Jan 2022 04:06:28 +1000 (AEST) Received: from mail-pj1-f46.google.com (mail-pj1-f46.google.com [209.85.216.46]) by minnie.tuhs.org (Postfix) with ESMTPS id 041299C78F for ; Thu, 13 Jan 2022 04:06:27 +1000 (AEST) Received: by mail-pj1-f46.google.com with SMTP id m13so6558276pji.3 for ; Wed, 12 Jan 2022 10:06:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=hWNr5auWwQt3rrTaXKbL6PIYOu4xjeCtA5+XRn2Rz3I=; b=X+FaxD/1NE+x9k6gwdDC4tjgEspFwT5xGGVY7kgdXnnKd7LfcSVTWRf1FYOUA95l/o HCKPybY/FnqEWDI3eCYrLbN/s5nXM0w6Z2V2x2I22IWCTCKxiPdDeBONPvvxs3Afj2Qh x66P2pVhRXloukhUl0gCyI58e+ic0ABIsdJbHCoTPT04UiSo840Zr0QwyBNlwvx0xgO8 ROD5REBZPCFgqlhjg69G/GVu83Pj5+xnXwaQDhPbiFGKHGrIf7fS/2qr9uxdZZa9rUCo gAvL8w5rXwkgG/p3Bw4IqQOMZKSFN8XiFnBmGmtXqwty44FhCPILOuKnGz0UFAYWvFg0 dWtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hWNr5auWwQt3rrTaXKbL6PIYOu4xjeCtA5+XRn2Rz3I=; b=QoSIb/In2pCb0zKTDJ+LjzzlfegXAtT9TlT5gTFoLw+AV/cm/oovmpTPHFWnIqxO1c 6HbxqwbAsAoFZDAOtFvWfeppoOv3E5mO/qUh880ewaP7bwF8W93FBa34/Ffczz0/SSve 6IOfmyZYSTg2VqPFDJ2IafCwHv4MMBGCDhcjmBVgAT0mIBN8LUqP6IGJhzhALTe0CxcB 989m68WsUoZtnbi7bOYl/gsQeC8Ck7eBB0FsgmGGfKcaQOHRh8iN6Far9fo1Y7do1T6L bBBZNQkyplydKUSGn/p/Cb84Ogf9Tq/imF13bhpDc5ik4JXmVjnf+2wuuddVnMpJ6DIJ 21Tw== X-Gm-Message-State: AOAM530TQ/t1j9IH9CtVPKmDqnCtHrwKy9eKlchMWbnlMBEoEfe4FTYS FDPezbKyeSPl5AkmdKt2l8vEsnHagGo= X-Google-Smtp-Source: ABdhPJwovttxXLW2ivGwLpr+KsjYFf7RvJj3iR/Hq82B3HnMWivS/TzRgH8Yo7sdLae5SfOWYGpjDQ== X-Received: by 2002:a62:3003:0:b0:4c1:6983:f1c3 with SMTP id w3-20020a623003000000b004c16983f1c3mr521833pfw.20.1642010785151; Wed, 12 Jan 2022 10:06:25 -0800 (PST) Received: from localhost.localdomain ([1.145.116.152]) by smtp.gmail.com with ESMTPSA id k13sm280607pfc.60.2022.01.12.10.06.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jan 2022 10:06:24 -0800 (PST) Date: Thu, 13 Jan 2022 05:06:21 +1100 From: "G. Branden Robinson" To: The Eunuchs Hysterical Society Message-ID: <20220112180619.mxzojchd62vpwm2f@localhost.localdomain> References: <20220101031511.GB8135@mcvoy.com> <20220111015901.GE25103@eureka.lemis.com> <4409b91cd794867d@orthanc.ca> <20220111024218.GE3441@mcvoy.com> <202201120854.20C8sDRR014233@freefriends.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aylxmsmqd5ikruxk" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Subject: [TUHS] *roff history as told to GNU X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --aylxmsmqd5ikruxk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Dan, At 2022-01-12T11:33:35-0500, Dan Cross wrote: > I have some questions about the earlier history. I've been collecting a detailed narrative history not just of the *roff _programs_ but also of the development on the language in the roff(7) manual page. Below I'll share a current chunk of it that is planned for the next release (groff 1.23). It has been heavily revised since groff 1.22.4. Many of my revisions have been motivated by accounts from this list, from the "history of man pages" (more of a history of troff) at manpages.bsd.lv, and the minnie TUHS archive. > As I understand it, in the beginning there was RUNOFF, which I believe > originated on CTSS? The CTSS sources contain a RUNOFF program that's > made up of ~1100 lines of MAD and ~1300 lines of assembler. This is a detail I hadn't encountered before; instead I've read claims that distorted it into being a solely high-level language project. > There is certainly a RUNOFF in Multics, written in BCPL (there's a > small "outer module transfer vector" program in ALM). As I understand it, _this_ RUNOFF is undisputedly Doug McIlroy's. > This is where it gets muddy for me; I understand this was roughly > ported to unix as `roff` by Ken and that at this point, It is hard to find an account of this period that _isn't_ muddy. Claims =66rom Murray Hill luminaries suggest that V0 and V1 Unix roffs were the collective work of Thompson, Ritchie, Ossanna, a fourth person who contributed the hyphenation algorithm (does someone have the name?), and McIlroy, because in Ritchie's words[1], this roff was "transliterated" =66rom Doug's BCPL codebase. > formatting was fairly primitive: suitable for hardcopy terminals and > line printers, and could do things like center lines and so forth, but > nothing fancy (https://www.cs.dartmouth.edu/~doug/reader.pdf). Yes. My contributions to groff's roff(7) page attempt to shed more light on this sort of thing. Sadly, at crucial periods sources and even documentation are missing. For example, there is an nroff entry in the Unix V2 manual table of contents, but no man page is present. In other early editions the reader is asked to see Ossanna for documentation, and it seems the corresponding artifacts might be lost to time. > Ossanna then took over and greatly expanded the capabilities of > `roff`, adding macros and traps and making it Turing-complete; this > was `nroff`, which grew to become `troff` once the C/A/T typesetter > was acquired. Yes. Here's what I have, though it looks better typeset[2]. Corrections from witnesses are warmly welcomed. Name roff - concepts and history of roff typesetting Description The term roff describes a family of document formatting systems known by names like troff, nroff, ditroff, and groff. A roff system consists of an extensible text formatting language and a set of programs for printing and converting to other text formats. Unix-like operating systems often distribute a roff system as a core package. [snip] History Computer-driven document formatting dates back to the 1960s. The roff system itself is intimately connected with the Unix operating system, but its roots go back to the earlier operating systems CTSS and Multics. The predecessor--RUNOFF roff's ancestor RUNOFF was written in the MAD language by Jerry Saltzer to prepare his Ph.D. thesis using the Compatible Time Sharing System (CTSS), a project of the Massachusetts Institute of Technology (MIT). The program is generally referred to in full capitals, both to distinguish it from its many descendants, and because bits were expensive in those days; five- and six-bit character encodings were still in widespread usage, and mixed- case alphabetics seen as a luxury. RUNOFF introduced a syntax of inlining formatting directives amid document text, by beginning a line with a period (an unlikely occurrence in human-readable material) followed by a "control word". Control words with obvious meaning like ".line length n" were supported as well as an abbreviation system; the latter came to overwhelm the former in popular usage and later derivatives of the program. A sample of control words from a RUNOFF manual of December 1966 was documented as follows (with the parameter notation slightly altered). The abbreviations will be familiar to roff veterans. Abbreviation Control word .ad .adjust .bp .begin page .br .break .ce .center .in .indent n .ll .line length n .nf .nofill .pl .paper length n .sp .space [n] In 1965, MIT's Project MAC teamed with Bell Telephone Laboratories and General Electric (GE) to inaugurate the Multics project. After a few years, Bell Labs discontinued its participation in Multics, famously prompting the development of Unix. Meanwhile, Saltzer's RUNOFF proved influential, seeing many ports and derivations elsewhere. In 1969, Doug McIlroy wrote one such reimplementation of RUNOFF in the BCPL language for a GE 645 running GECOS at the Bell Labs location in Murray Hill, New Jersey. In its manual, the control commands were termed "requests", their two-letter names were canonical, and the control character was configurable with a .cc request. Other familiar requests emerged at this time; no-adjust (.na), need (.ne), page offset (.po), tab configuration (.ta, though it worked differently), temporary indent (.ti), character translation (.tr), and automatic underlining (.ul; on RUNOFF you had to backspace and underscore in the input yourself). .fi to enable filling of output lines got the name it retains to this day. Unix and roff roff was one of the first Unix programs. McIlroy's runoff was, in Dennis Ritchie's term, "transliterated" from BCPL to DEC PDP-7 assembly language for the fledgling Unix operating system. It saw its name shortened to roff (perhaps under the influence of Ken Thompson), while adding support for automatic hyphenation with .hc and .hy requests; a generalization of line spacing control with the .ls request; and what later roffs would call diversions, with "footnote" requests. This roff indirectly funded operating systems research at Murray Hill, for it was used to prepare patent applications for AT&T to the U.S. government. This arrangement enabled the group to acquire a PDP-11; roff promptly proved equal to the task of typesetting the first edition of the manual for what would later become known as "Unix Version 1", dated November 1971. Output from all of the foregoing programs was limited to line printers and paper terminals such the IBM 2471 (based on the Selectric line of typewriters) and the Teletype Corporation Model 37. Proportionally-spaced type was unknown. New roff and Typesetter roff The first years of Unix were spent in rapid evolution. The practicalities of preparing standardized documents like patent applications (and Unix manual pages), combined with McIlroy's enthusiasm for macro languages, perhaps created an irresistible pressure to make roff extensible. Joe Ossanna's nroff, literally a "new roff", was the outlet for this pressure. By the time of Unix Version 3 (February 1973)--and still in PDP-11 assembly language--it sported a swath of features now considered essential to roff systems: definition of macros (.de), diversion of text thence (.di), and removal thereof (.rm); trap planting (.wh; "when") and relocation (.ch; "change"); conditional processing (.if); and environments (.ev). Incremental improvements included assignment of the next page number (.pn); no-space mode (.ns) and restoration of vertical spacing (.rs); the saving (.sv) and output (.os) of vertical space; specification of replacement characters for tabs (.tc) and leaders (.lc); configuration of the no-break control character (.c2); shorthand to disable automatic hyphenation (.nh); a condensation of what were formerly six different requests for configuration of page "titles" (headers and footers) into one (.tl) with a length controlled separately from the line length (.lt); automatic line numbering (.nm); interactive input (.rd), which necessitated buffer-flushing (.fl), and was made convenient with early program cessation (.ex); source file inclusion in its modern form (.so; though RUNOFF had an ".append" control word for a similar purpose) and early advance to the next file argument (.nx); ignorable content (.ig); and programmable abort (.ab). Third Edition Unix also brought the pipe(2) system call, the explosive growth of a componentized system based around it, and a "filter model" that remains perceptible today. Equally importantly, the Bell Labs site in Murray Hill acquired a Graphic Systems C/A/T phototypesetter, and with it came the necessity of expanding the capabilities of a roff system to cope with proportionally-spaced type, multiple type sizes, and a variety of fonts. Ossanna wrote a parallel implementation of nroff for the C/A/T, dubbing it troff (for "typesetter roff"). Unfortunately, surviving documentation does not illustrate what requests were implemented at this time for C/A/T support; the troff(1) man page in Fourth Edition Unix (November 1973) does not feature a request list, unlike nroff(1). Apart from typesetter-driven features, Unix Version 4 roffs added string definitions (.ds); made the escape character configurable (.ec); and enabled the user to write diagnostics to the standard error stream (.tm). Around 1974, empowered with multiple type sizes, italics, and a symbol font specially commissioned by Bell Labs from Graphic Systems, Brian Kernighan and Lorinda Cherry implemented eqn for typesetting mathematics. In the same year, for Fifth Edition Unix, Ossanna combined and reimplemented the two roffs in C, using preprocessor conditions of that language to generate both from a single source tree. Ossanna documented the syntax of the input language to the nroff and troff programs in the "Troff User's Manual", first published in 1976, with further revisions as late as 1992 by Kernighan. (The original version was entitled "Nroff/Troff User's Manual", which may partially explain why roff practitioners have tended to refer to it by its AT&T document identifier, "CSTR #54".) Its final revision serves as the de facto specification of AT&T troff, and all subsequent implementors of roff systems have done so in its shadow. A small and simple set of roff macros was first used for the manual pages of Unix Version 4 and persisted for two further releases, but the first macro package to be formally described and installed was ms by Lesk in Version 6. He also wrote a manual, "Typing Documents on the Unix System", describing ms and basic nroff/troff usage, updating it as the package accrued features. Sixth Edition additionally saw the debut of the tbl preprocessor for formatting tables, also by Lesk. For Unix Version 7 (January 1979), McIlroy designed, implemented, and documented the man macro package, introducing most of the macros described in groff_man(7) today, and edited volume 1 of the Version 7 manual using it. Documents composed using ms featured in volume 2, edited by Kernighan. Ossanna had passed away unexpectedly in 1977, and after the release of Version 7, with the C/A/T typesetter becoming supplanted by alternative devices such as the Mergenthaler Linotron 202, Kernighan undertook a revision and rewrite of troff to generalize its design. To implement this revised architecture, he developed the font and device description file formats and the device-independent output format that remain in use today. He described these novelties in the article "A Typesetter-independent TROFF", last revised in 1982, and like the troff manual itself, it is widely known by a shorthand, "CSTR #97". Kernighan's innovations prepared troff well for the introduction of the Adobe PostScript language in 1982 and a vibrant market in laser printers with built-in interpreters for it. An output driver for PostScript, dpost, was swiftly developed. However, due to AT&T software licensing practices, Ossanna's troff, with its tight coupling to the capabilities of the C/A/T, remained in parallel distribution with device-independent troff throughout the 1980s, leading some developers to contrive translators for C/A/T-formatted documents to other devices. An example was vtroff for Versatec and Benson-Varian plotters. Today, however, all actively maintained troffs follow Kernighan's device- independent design. Regards, Branden [1] "The Evolution of the Unix Time-Sharing System", Ritchie, 1984 [2] Formatted with: groff -man -P-c -Tascii -rLL=3D72n -rHY=3D0 -dAD=3Dl build/man/roff.7 (The `AD` string is new to groff 1.23 man(7).) --aylxmsmqd5ikruxk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmHfGJMACgkQ0Z6cfXEm bc7RVQ//ewcQ6HnA+mZfRKtwH1zr/yn+G3xXXAffGCXFjdteixiqqlHehewu2M+/ HaEnILpstwED5W+6b9eutIfUxF4FqSds+nY0yCP0YkR78TOZgf3BTwxfNUIAQ9ri lvsdNfwstLupvZi0Y9rzZfh1EPEFCDbcAty6FOydvcfawNjrjRlWXM52vRl4jKgK cH6y2+JtTU56VTN1a9bj4xbAyKIVMoGmi1DwavywWY1e35Af1yj/UdNZ7D0AF2vf 4DirFYo+BWShx/RlHskaGymSd687OaYWohNMZkGv+VYGV5fCZtAD1S7hRnXsfh6O 0SiLkohvjvTyJo/nQB1/uQHwAC2ch1qxVNvjR7ZaOZS4pnoKBGcKfMsuEgKW3t7c RmPMYaxbKJ0ySzZW4wPgLKdpecKJUQUgURPm7X7dIIpFxI4SAVIMzqcfmWCePtmc S3vR1mV/dnK+88ZZvZkGjSxNz/eACpRaHOnv0rC9rQn4fDW9kkFlgJVRbnwA8ohr uDnPZSdenipVpCwjBpLvbYJKbvWrV2M4ogr9IMz0ihRFLVh5DhxIEIz3qhwWyVrG lHUhleh/zZ7xPsOYX22JvP6UhmsTXqhaM0WHk4ONPxIrzcpWMKynlxckxTRd+kXB 8qGSeY+3eWosGeMFgVudfsAcdIAxwemRn4rsHRcgkboullJtRQI= =5Nt3 -----END PGP SIGNATURE----- --aylxmsmqd5ikruxk--