The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Proliferation of options is great simplification of pipes, really?
@ 2021-02-22  2:34 Will Senn
  2021-02-22  3:32 ` G. Branden Robinson
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Will Senn @ 2021-02-22  2:34 UTC (permalink / raw)
  To: TUHS main list

[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]

All,

So, we've been talking low-level design for a while. I thought I would 
ask a fundamental question. In days of old, we built small 
single-purpose utilities and used pipes to pipeline the data and 
transformations. Even back in the day, it seemed that there was tension 
to add yet another option to every utility. Today, as I was marveling at 
groff's abilities with regard to printing my man pages directly to my 
printer in 2021, I read the groff(1) page:

example here: https://linux.die.net/man/1/groff

What struck me (the wrong way) was the second paragraph of the description:

The groff program allows to control the whole groff system by command 
line options. This is a great simplification in comparison to the 
classical case (which uses pipes only).

Here is the current plethora of options:
groff [-abcegilpstzCEGNRSUVXZ] [-d cs] [-f fam] [-F dir] [-I dir] [-L 
arg] [-m name] [-M dir] [-n num] [-o list] [-P arg] [-r cn] [-T dev] [-w 
name] [-W name] [file ...]

Now, I appreciate groff, don't get me wrong, but my sensibilities were 
offended by the idea that a kazillion options was in any way simpler 
than pipelining single-purpose utilities. What say you? Is this the 
perfected logical extension of the unix pioneers' work, or have we gone 
horribly off the trail.

Regards,

Will

[-- Attachment #2: Type: text/html, Size: 1822 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread
* [TUHS] Proliferation of options is great simplification of pipes, really?
@ 2021-02-23  2:47 M Douglas McIlroy
  2021-02-23 10:42 ` Jaap Akkerhuis
  2021-02-23 13:49 ` Ralph Corderoy
  0 siblings, 2 replies; 24+ messages in thread
From: M Douglas McIlroy @ 2021-02-23  2:47 UTC (permalink / raw)
  To: tuhs

> I can imagine a simple perl (or python or whatever) script that would run
> through groff input [and] determine which preprocessors are actually
> needed ...

Brian imagined such and implemented it way back when. Though I used
it, I've forgotten its name. One probably could have fooled it by
tricks like calling pic only in a .so file and perhaps renaming .so.
But I never heard of it failing in real life. It does impose an extra
pass over the input, but may well save a pass compared to the
defensive groff -pet that I often use or to the rerun necessary when I
forget to mention some or all of the filters.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [TUHS] Proliferation of options is great simplification of pipes, really?
@ 2021-02-23 15:04 Steve Simon
  2021-02-24  2:42 ` M Douglas McIlroy
  0 siblings, 1 reply; 24+ messages in thread
From: Steve Simon @ 2021-02-23 15:04 UTC (permalink / raw)
  To: tuhs

its written in rc(1) and uses plan9 regex which
sometimes differ from unix ones a little but
there is doctype:

http://9p.io/magic/man2html/1/doctype
http://9p.io/sources/plan9/rc/bin/doctype

-Steve

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [TUHS] Proliferation of options is great simplification of pipes, really?
@ 2021-02-24 19:38 Norman Wilson
  0 siblings, 0 replies; 24+ messages in thread
From: Norman Wilson @ 2021-02-24 19:38 UTC (permalink / raw)
  To: tuhs

To fill out the historical record, the earliest doctype I know of
was a shell (not rc) script.  From my basement heater that happens
to run 10/e:

b$ man doctype | uniq

     DOCTYPE(1)                                             DOCTYPE(1)

     NAME
          doctype - guess command line for formatting a document

     SYNOPSIS
          doctype [ option ... ] [ file ]

     DESCRIPTION
          Doctype guesses and prints on the standard output the com-
          mand line for printing a document that uses troff(1),
          related preprocessors like eqn(1), and the ms(6) and mm
          macro packages.

          Option -n invokes nroff instead of troff. Other options are
          passed to troff.

     EXAMPLES
          eval `doctype chapter.?` | apsend
               Typeset files named chapter.0, chapter.1, ...

     SEE ALSO
          troff(1), eqn(1), tbl(1), refer(1), prefer(1), pic(1),
          ideal(1), grap(1), ped(9.1), mcs(6), ms(6), man(6)

     BUGS
          It's pretty dumb about guessing the proper macro package.

     Page 1                    Tenth Edition       (printed 2/24/2021)

doctype(1) is in the 8/e manual, so it existed in early 1985;
I bet it's actually older than that.  The manual page is on
the V8 tape, but, oddly, not the program; neither is it in
the V10 pseudo-tape I cobbled together for Warren long ago.
I'm not sure why not.

The version in rc is, of course, a B-movie remake of the
original.

Norman Wilson
Toronto ON

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-02-24 19:38 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22  2:34 [TUHS] Proliferation of options is great simplification of pipes, really? Will Senn
2021-02-22  3:32 ` G. Branden Robinson
2021-02-22  4:32   ` Dan Stromberg
2021-02-22  4:34   ` Will Senn
2021-02-22  5:45     ` G. Branden Robinson
2021-02-22 15:49   ` John P. Linderman
2021-02-22 15:57     ` William Cheswick
2021-02-22 16:03       ` John P. Linderman
2021-02-22 21:16         ` G. Branden Robinson
2021-02-22 16:02     ` Warner Losh
2021-02-22 16:12     ` Robert Clausecker
2021-02-22 17:15       ` John Cowan
2021-02-23  0:24       ` Steffen Nurpmeso
2021-02-22 21:14     ` G. Branden Robinson
2021-02-22  7:20 ` Rich Morin
2021-02-22 18:27 ` Jon Steinhart
2021-02-22 19:30   ` Richard Salz
2021-02-23  2:47 M Douglas McIlroy
2021-02-23 10:42 ` Jaap Akkerhuis
2021-02-23 13:23   ` Brantley Coile
2021-02-23 13:49 ` Ralph Corderoy
2021-02-23 15:04 Steve Simon
2021-02-24  2:42 ` M Douglas McIlroy
2021-02-24 19:38 Norman Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).