> I've always believed that pic was so well designed
> because it took a day to get the print out (back then),
I'm afraid this belief is urban legend. Credit for pic is due 100% to
Kernighan, not to the contemporary pace of computing practice.
Even in the 1950s, we had one-hour turnaround at Bell Labs. And the
leap from batch processing had happened well before pic. Turnaround on
modest Unix source files and tests has changed little in the past
fifty years.
Doug
On Tue, Aug 09, 2022 at 06:18:52PM -0400, Douglas McIlroy wrote:
> > I've always believed that pic was so well designed
> > because it took a day to get the print out (back then),
>
> I'm afraid this belief is urban legend. Credit for pic is due 100% to
> Kernighan, not to the contemporary pace of computing practice.
Well kudos to Brian then. Pic is one the best designed tools I've ever
seen.
Hi All. Douglas McIlroy <douglas.mcilroy@dartmouth.edu> wrote: > > I've always believed that pic was so well designed > > because it took a day to get the print out (back then), > > I'm afraid this belief is urban legend. Credit for pic is due 100% to > Kernighan, not to the contemporary pace of computing practice. I occassionally forward TUHS items (that I think are) of interest to Brian. I have in the past forwarded one of Larry's "I like pic because I can read the code and visualize the picture" emails to him. He responded that he didn't work that way. :-) Here, by permission, is his response to Larry's latest note of that kind, which I think is also of more or less general interest: > Date: Tue, 9 Aug 2022 19:03:00 -0400 (EDT) > From: Brian Kernighan <bwk@cs.princeton.edu> > To: arnold@skeeve.com > Subject: Re: larry mcvoy on pic, again > > I don't know that I would read too much into the development of > Pic, though my memory is so dim that it would all be made up > anyway. > > One observation: with Yacc and Lex available, languages were a lot > easier to implement; I had already done a troff preprocessor so > that aspect was well in hand. And I was actually the owner of > troff at the same time, so I could mix and match (e.g., the > primitives for drawing lines). I think that "seeing the output" > wasn't too hard, either because I could use the typesetter, or the > Tectronix 4014 (?) for which there was a troff output emulator > that I think I wrote. > > The main issues as I recall were figuring out coordinate systems, > since Pic had Y going positive as with conventional plotting, > while troff had it going negative (down the page is higher Y > values). > > But it's all kind of fuzzy at this point.
Well, I stand behind my comments. Take a look at what xfig(1) produces and contrast that with even an average pic(1) source file. You can't see what xfig is saying but you can easily see what pic is saying. Maybe people just haven't written much pic, but what you can do with it, and see without rendering it, is pretty amazing. I got James Clark to add the 'i'th concept so you could do for loops to lay out elements and I wrote a pic script where you could set variables like cpus, networks, disks and it would draw different configurations of a SPARCcluster. Pic is pretty neat, I find it easier to read than any of the other troff preprocessors. On Wed, Aug 10, 2022 at 09:05:20AM -0600, arnold@skeeve.com wrote: > Hi All. > > Douglas McIlroy <douglas.mcilroy@dartmouth.edu> wrote: > > > > I've always believed that pic was so well designed > > > because it took a day to get the print out (back then), > > > > I'm afraid this belief is urban legend. Credit for pic is due 100% to > > Kernighan, not to the contemporary pace of computing practice. > > I occassionally forward TUHS items (that I think are) of interest > to Brian. I have in the past forwarded one of Larry's "I like pic > because I can read the code and visualize the picture" emails to > him. He responded that he didn't work that way. :-) > > Here, by permission, is his response to Larry's latest note of > that kind, which I think is also of more or less general interest: > > > Date: Tue, 9 Aug 2022 19:03:00 -0400 (EDT) > > From: Brian Kernighan <bwk@cs.princeton.edu> > > To: arnold@skeeve.com > > Subject: Re: larry mcvoy on pic, again > > > > I don't know that I would read too much into the development of > > Pic, though my memory is so dim that it would all be made up > > anyway. > > > > One observation: with Yacc and Lex available, languages were a lot > > easier to implement; I had already done a troff preprocessor so > > that aspect was well in hand. And I was actually the owner of > > troff at the same time, so I could mix and match (e.g., the > > primitives for drawing lines). I think that "seeing the output" > > wasn't too hard, either because I could use the typesetter, or the > > Tectronix 4014 (?) for which there was a troff output emulator > > that I think I wrote. > > > > The main issues as I recall were figuring out coordinate systems, > > since Pic had Y going positive as with conventional plotting, > > while troff had it going negative (down the page is higher Y > > values). > > > > But it's all kind of fuzzy at this point. -- --- Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat
Oh, I'm not arguing with any of this. I'm merely noting that
you are unusual in your ability to easily visualize pic results
from looking at the code.
Arnold
Larry McVoy <lm@mcvoy.com> wrote:
> Well, I stand behind my comments. Take a look at what xfig(1)
> produces and contrast that with even an average pic(1) source
> file. You can't see what xfig is saying but you can easily see
> what pic is saying.
>
> Maybe people just haven't written much pic, but what you can do
> with it, and see without rendering it, is pretty amazing.
>
> I got James Clark to add the 'i'th concept so you could do for
> loops to lay out elements and I wrote a pic script where you
> could set variables like cpus, networks, disks and it would
> draw different configurations of a SPARCcluster.
>
> Pic is pretty neat, I find it easier to read than any of the
> other troff preprocessors.
>
> On Wed, Aug 10, 2022 at 09:05:20AM -0600, arnold@skeeve.com wrote:
> > Hi All.
> >
> > Douglas McIlroy <douglas.mcilroy@dartmouth.edu> wrote:
> >
> > > > I've always believed that pic was so well designed
> > > > because it took a day to get the print out (back then),
> > >
> > > I'm afraid this belief is urban legend. Credit for pic is due 100% to
> > > Kernighan, not to the contemporary pace of computing practice.
> >
> > I occassionally forward TUHS items (that I think are) of interest
> > to Brian. I have in the past forwarded one of Larry's "I like pic
> > because I can read the code and visualize the picture" emails to
> > him. He responded that he didn't work that way. :-)
> >
> > Here, by permission, is his response to Larry's latest note of
> > that kind, which I think is also of more or less general interest:
> >
> > > Date: Tue, 9 Aug 2022 19:03:00 -0400 (EDT)
> > > From: Brian Kernighan <bwk@cs.princeton.edu>
> > > To: arnold@skeeve.com
> > > Subject: Re: larry mcvoy on pic, again
> > >
> > > I don't know that I would read too much into the development of
> > > Pic, though my memory is so dim that it would all be made up
> > > anyway.
> > >
> > > One observation: with Yacc and Lex available, languages were a lot
> > > easier to implement; I had already done a troff preprocessor so
> > > that aspect was well in hand. And I was actually the owner of
> > > troff at the same time, so I could mix and match (e.g., the
> > > primitives for drawing lines). I think that "seeing the output"
> > > wasn't too hard, either because I could use the typesetter, or the
> > > Tectronix 4014 (?) for which there was a troff output emulator
> > > that I think I wrote.
> > >
> > > The main issues as I recall were figuring out coordinate systems,
> > > since Pic had Y going positive as with conventional plotting,
> > > while troff had it going negative (down the page is higher Y
> > > values).
> > >
> > > But it's all kind of fuzzy at this point.
>
> --
> ---
> Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat
arnold@skeeve.com writes:
> Oh, I'm not arguing with any of this. I'm merely noting that
> you are unusual in your ability to easily visualize pic results
> from looking at the code.
Not at all. I'm a big fan of pic too. And I've written preprocessors
for it, such as one that generated GANTT charts.
To me, the best feature of pic is invisible elements. As Larry pointed
out, xfig uses absolute coordinates and is a mess. When I use pic, I
usually start out with a big invisible box and hang things off of it.
That makes it trivial to do things like shrinking or growing just by
changing the invisible box size.
In my opinion, the biggest failing of pic comes from the one-way connection
to troff. It's really hard to do things like "box that fits this text".
Jon
On Wed, Aug 10, 2022 at 10:44:32AM -0700, Jon Steinhart wrote:
> arnold@skeeve.com writes:
> > Oh, I'm not arguing with any of this. I'm merely noting that
> > you are unusual in your ability to easily visualize pic results
> > from looking at the code.
>
> Not at all. I'm a big fan of pic too. And I've written preprocessors
> for it, such as one that generated GANTT charts.
>
> To me, the best feature of pic is invisible elements. As Larry pointed
> out, xfig uses absolute coordinates and is a mess. When I use pic, I
> usually start out with a big invisible box and hang things off of it.
> That makes it trivial to do things like shrinking or growing just by
> changing the invisible box size.
>
> In my opinion, the biggest failing of pic comes from the one-way connection
> to troff. It's really hard to do things like "box that fits this text".
Jon gets it, I'm not the only one. I do the same thing with a big
invisble box, it gives you a mental place to place things.
Also agree with the "box that fits this text" problem, pic really could
use a sizeof("this text in the current font/point size/line spacing")
that returns x,y. But I don't see how to do that because pic doesn't
have that info, pic would need to be able to ask troff what those are.
Oh, and I've written my own crappy version of grap(1) that spits out
pic, it was pretty easy.
So at least Jon sees pic like I do and I suspect there are plenty more
who do as well. Spend some time writing some pic scripts and I suspect
anyone can get good at seeing what it is doing. It's a super pleasant
little language.
Larry McVoy writes:
> Jon gets it, I'm not the only one. I do the same thing with a big
> invisble box, it gives you a mental place to place things.
>
> Also agree with the "box that fits this text" problem, pic really could
> use a sizeof("this text in the current font/point size/line spacing")
> that returns x,y. But I don't see how to do that because pic doesn't
> have that info, pic would need to be able to ask troff what those are.
>
> Oh, and I've written my own crappy version of grap(1) that spits out
> pic, it was pretty easy.
>
> So at least Jon sees pic like I do and I suspect there are plenty more
> who do as well. Spend some time writing some pic scripts and I suspect
> anyone can get good at seeing what it is doing. It's a super pleasant
> little language.
Stop being so agreeable, go fishing or something :-)
Might have mentioned this before, but I have a toolchain for converting
pic to SVG as that's the only vector format that can be included in word
documents.
On 10 Aug 2022 11:04 -0700, from jon@fourwinds.com (Jon Steinhart): > Might have mentioned this before, but I have a toolchain for converting > pic to SVG as that's the only vector format that can be included in word > documents. Would that happen to be available somewhere, for posterity? -- Michael Kjörling • https://michael.kjorling.se • michael@kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”
> Would that happen to be available somewhere, for posterity? pic2plot, from the plotutils package, will do pic -> various formats, including svg. De
[-- Attachment #1: Type: text/plain, Size: 3537 bytes --] I used to work for a computer manufacturer that was nearly dead - lots of cubicles piled full of junk. The reference manuals had these very nice diagrams of the computer boards detailing the connectors on the board edges. Imagine my surprise when I discovered all the artwork was PIC generated… Joe Joe McGuckin ViaNet Communications joe@via.net 650-207-0372 cell 650-213-1302 office 650-969-2124 fax > On Aug 10, 2022, at 10:37 AM, arnold@skeeve.com wrote: > > Oh, I'm not arguing with any of this. I'm merely noting that > you are unusual in your ability to easily visualize pic results > from looking at the code. > > Arnold > > Larry McVoy <lm@mcvoy.com> wrote: > >> Well, I stand behind my comments. Take a look at what xfig(1) >> produces and contrast that with even an average pic(1) source >> file. You can't see what xfig is saying but you can easily see >> what pic is saying. >> >> Maybe people just haven't written much pic, but what you can do >> with it, and see without rendering it, is pretty amazing. >> >> I got James Clark to add the 'i'th concept so you could do for >> loops to lay out elements and I wrote a pic script where you >> could set variables like cpus, networks, disks and it would >> draw different configurations of a SPARCcluster. >> >> Pic is pretty neat, I find it easier to read than any of the >> other troff preprocessors. >> >> On Wed, Aug 10, 2022 at 09:05:20AM -0600, arnold@skeeve.com wrote: >>> Hi All. >>> >>> Douglas McIlroy <douglas.mcilroy@dartmouth.edu> wrote: >>> >>>>> I've always believed that pic was so well designed >>>>> because it took a day to get the print out (back then), >>>> >>>> I'm afraid this belief is urban legend. Credit for pic is due 100% to >>>> Kernighan, not to the contemporary pace of computing practice. >>> >>> I occassionally forward TUHS items (that I think are) of interest >>> to Brian. I have in the past forwarded one of Larry's "I like pic >>> because I can read the code and visualize the picture" emails to >>> him. He responded that he didn't work that way. :-) >>> >>> Here, by permission, is his response to Larry's latest note of >>> that kind, which I think is also of more or less general interest: >>> >>>> Date: Tue, 9 Aug 2022 19:03:00 -0400 (EDT) >>>> From: Brian Kernighan <bwk@cs.princeton.edu> >>>> To: arnold@skeeve.com >>>> Subject: Re: larry mcvoy on pic, again >>>> >>>> I don't know that I would read too much into the development of >>>> Pic, though my memory is so dim that it would all be made up >>>> anyway. >>>> >>>> One observation: with Yacc and Lex available, languages were a lot >>>> easier to implement; I had already done a troff preprocessor so >>>> that aspect was well in hand. And I was actually the owner of >>>> troff at the same time, so I could mix and match (e.g., the >>>> primitives for drawing lines). I think that "seeing the output" >>>> wasn't too hard, either because I could use the typesetter, or the >>>> Tectronix 4014 (?) for which there was a troff output emulator >>>> that I think I wrote. >>>> >>>> The main issues as I recall were figuring out coordinate systems, >>>> since Pic had Y going positive as with conventional plotting, >>>> while troff had it going negative (down the page is higher Y >>>> values). >>>> >>>> But it's all kind of fuzzy at this point. >> >> -- >> --- >> Larry McVoy Retired to fishing http://www.mcvoy.com/lm/boat [-- Attachment #2: Type: text/html, Size: 6575 bytes --]
Dennis Boone writes:
> > Would that happen to be available somewhere, for posterity?
>
> pic2plot, from the plotutils package, will do pic -> various formats,
> including svg.
Huh. Wasn't aware of that one, but seems to rely on a groff svg driver
which I've never seen.
What I've done is pic -> groff -> ps2pdf -> pdf2svg -> inkscape.
Inkscape is used just to crop bounding box to the image size so
that there's not a huge amount of whitespace.
On Wed, Aug 10, 2022 at 2:24 PM Jon Steinhart <jon@fourwinds.com> wrote:
> Dennis Boone writes:
> > > Would that happen to be available somewhere, for posterity?
> >
> > pic2plot, from the plotutils package, will do pic -> various formats,
> > including svg.
>
> Huh. Wasn't aware of that one, but seems to rely on a groff svg driver
> which I've never seen.
>
> What I've done is pic -> groff -> ps2pdf -> pdf2svg -> inkscape.
> Inkscape is used just to crop bounding box to the image size so
> that there's not a huge amount of whitespace.
Google has built an in-house documentation system
based on extended markdown, and it was very nice:
check your text markdown files into a specially-named
subdirectory in the monorepo and point a web browser
at an internal service for a nicely rendered web version,
available immediately. There was a syntax for including
graphviz markup, and something similar for (I think)
state diagrams, but support for more general drawing
was missing, and I thought pic(1) would be just dandy,
if it could be persuaded to generate SVG.
I wrote to Brian, who works part-time at Google, and
pitched the idea to him, and he extended pic to
generate SVG, though it wasn't clear to what sources
he was modifying, exactly. Then the pandemic hit, and
I ended up leaving Google, so I don't think it went
beyond that, but IIRC he said that coercing pic to
generate SVG wasn't particularly difficult.
- Dan C.
Hi Larry,
> Also agree with the "box that fits this text" problem, pic really
> could use a sizeof("this text in the current font/point size/line
> spacing") that returns x,y. But I don't see how to do that because
> pic doesn't have that info, pic would need to be able to ask troff
> what those are.
Rather than work out the coordinates of everything, could pic punt some
of that downstream to troff by producing expressions which rest on
variables set by troff to, say, the width of a diversion. The order of
evaluation presented to troff would obviously have to be topological on
the dependencies which bars cycles. It would add elasticity to a
drawing.
The other approach would be a multi-pass effort where pic initially
assumes unknown dimensions, like some text's width, but also outputs
troff which will store the actual width for input to pic on future runs.
--
Cheers, Ralph.
Dan Cross <crossd@gmail.com> wrote:
> I wrote to Brian, who works part-time at Google, and
> pitched the idea to him, and he extended pic to
> generate SVG, though it wasn't clear to what sources
> he was modifying, exactly. Then the pandemic hit, and
> I ended up leaving Google, so I don't think it went
> beyond that, but IIRC he said that coercing pic to
> generate SVG wasn't particularly difficult.
I'm sure he'd have been messing with his own sources. These
days it'd be best to tr to get new features into GNU pic
(IMHO, of course).
Arnold
On Thu, Aug 11, 2022 at 8:13 AM <arnold@skeeve.com> wrote:
> Dan Cross <crossd@gmail.com> wrote:
> > I wrote to Brian, who works part-time at Google, and
> > pitched the idea to him, and he extended pic to
> > generate SVG, though it wasn't clear to what sources
> > he was modifying, exactly. Then the pandemic hit, and
> > I ended up leaving Google, so I don't think it went
> > beyond that, but IIRC he said that coercing pic to
> > generate SVG wasn't particularly difficult.
>
> I'm sure he'd have been messing with his own sources. These
> days it'd be best to tr to get new features into GNU pic
> (IMHO, of course).
Oh surely. I just don't know what sources those would
be, exactly; presumably some derivative he's been
shepherded all these years? I wonder what it is....
- Dan C.
[-- Attachment #1: Type: text/plain, Size: 1746 bytes --] [looping in groff list] At 2022-08-11T10:34:50-0400, Dan Cross wrote: > On Thu, Aug 11, 2022 at 8:13 AM <arnold@skeeve.com> wrote: > > Dan Cross <crossd@gmail.com> wrote: > > > I wrote to Brian, who works part-time at Google, and pitched the > > > idea to him, and he extended pic to generate SVG, though it wasn't > > > clear to what sources he was modifying, exactly. Then the pandemic > > > hit, and I ended up leaving Google, so I don't think it went > > > beyond that, but IIRC he said that coercing pic to generate SVG > > > wasn't particularly difficult. > > > > I'm sure he'd have been messing with his own sources. These days > > it'd be best to tr to get new features into GNU pic (IMHO, of > > course). > > Oh surely. I just don't know what sources those would be, exactly; > presumably some derivative he's been shepherded all these years? I > wonder what it is.... Per Kernighan's _Unix: A History and a Memoir_ (2020), it seems likely that it was simply groff. "Camera-ready copy for this book was produced by the author in Times Roman and Helvetica, using groff, ghostscript, and other open source Unix tools." (copyright page) Further, figure 5.4 in that work was "created with Pic" (p. 95). GNU pic is already parameterized in the output format it produces, supporting four variants: "tpic" (`-c` option), "tex" (`-t`), "fig" (`-f`), and "troff". "fig" support has been #defined out for years and may never have been completed. SVG output, perhaps behind an `-s` flag, would be extremely helpful toward simplifying groff's HTML output story. (The other barrier is tbl's production of HTML tables, Savannah #60052.[1]) Regards, Branden [1] https://savannah.gnu.org/bugs/?60052 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]
"G. Branden Robinson" <g.branden.robinson@gmail.com> wrote: > > Oh surely. I just don't know what sources those would be, exactly; > > presumably some derivative he's been shepherded all these years? I > > wonder what it is.... > > Per Kernighan's _Unix: A History and a Memoir_ (2020), it seems likely > that it was simply groff. Knowing BWK, I personally doubt that he'd have messed with GNU pic when he has his own copy of the original program that he himself wrote. I'm also quite sure that he prefers C to C++. > "Camera-ready copy for this book was produced by the author in Times > Roman and Helvetica, using groff, ghostscript, and other open source > Unix tools." (copyright page) Sure, because he works on Linux and MacOS and the GNU tools are easily installable and "just work". Of course, Dan could always just ask Brian what he did. :-) Arnold
[-- Attachment #1: Type: text/plain, Size: 874 bytes --] At 2022-08-12T00:46:57-0600, arnold@skeeve.com wrote: > "G. Branden Robinson" <g.branden.robinson@gmail.com> wrote: > > > Oh surely. I just don't know what sources those would be, exactly; > > > presumably some derivative he's been shepherded all these years? I > > > wonder what it is.... > > > > Per Kernighan's _Unix: A History and a Memoir_ (2020), it seems > > likely that it was simply groff. > > Knowing BWK, I personally doubt that he'd have messed with GNU pic > when he has his own copy of the original program that he himself wrote. Wishful thinking on my part, maybe. > I'm also quite sure that he prefers C to C++. No doubt--but groff is pretty accessible to C programmers, being almost entirely of an ancient vintage of C++. We don't have rvalue references inside lambda expressions inside templates, for instance. Regards, Branden [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --]