[TUHS] SNOBOL and RATSNO [ really pic ]

Larry McVoy lm at mcvoy.com
Thu Aug 11 04:02:10 AEST 2022


On Wed, Aug 10, 2022 at 10:44:32AM -0700, Jon Steinhart wrote:
> arnold at 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.


More information about the TUHS mailing list