tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

tac (was Re: GNU shellery)



On Tue, Oct 03, 2017 at 06:50:35PM +0000, David Holland wrote:
> On Mon, Oct 02, 2017 at 04:04:41AM +0700, Robert Elz wrote:
>  > ps: the tac in gnu coreutils is by no means "original" - the tac command
>  > way predates GNU - I forget who created it initially, but the real original
>  > (non GPL'd) version could probably be found if there was a good reason
>  > for that.
> 
> Huh, I thought they'd invented it. Still, it shouldn't matter; it's
> obviously a good idea and it's not like everything the FSF does is
> ipso facto automatically wrong.

A colleague and I spent lunchtime today digging into the prehistory of
"tac".

It appears tac was written by some unknown person, then rewritten
by the late Jay Lepreau of the University of Utah in 1985 and sent
to CSRG for inclusion on the "contrib" tape of 4.3BSD, but may or
may not have shipped with 4.3 -- I can't find the "contrib" sources
for 4.3 in TUHS, maybe I'm not looking right.

If indeed it was in 4.3 "contrib" (which most sites installed) I guess
that's where most of us remember it from.  Or it may have been in
Lites (which Jay worked on) or Research Unix, since evidently Rob
Pike used it (see below).

It appears the copyright history on the version in coreutils
is not correct, though it was probably legitimately donated to FSF
at some point: there was a flame war over dual-licensing of GPL/BSD
code on the OSKit list where Jay was active and it appears he
or the University of Utah lost patience and relicensed a great deal
of code as GPL including code that had formerly had BSD style licenses
only.

Here is the header comment from the version it appears Jay sent
to CSRG:

/*
 * tac.c - Print file segments in reverse order
 *
 * Original line-only version by unknown author off the net.
 * Rewritten in 1985 by Jay Lepreau, Univ of Utah, to allocate memory
 * dynamically, handle string bounded segments (suggested by Rob Pike),
 * and handle pipes.
 */

The historical versions took very different command-line arguments
from the GNU version.  Jonathan Kamens posted Jay's version to
alt.sources in 1991: https://groups.google.com/forum/#!search/alt.sources$20uta$20tac$20kamens/alt.sources/WKEKVn9i-JA/LHqlL0Ay__YJ

https://groups.google.com/forum/#!search/utah$20tac$20gpl$20bsd%7Csort:relevance/muc.lists.freebsd.hackers/JaNrZz8_3LU/pI5cvX552WgJ
also discusses this, down towards the bottom of the thread.

Anyway, it seems highly likely this program came from BSD
Unix or perhaps its cousin Research Unix.  Welcome back.

-- 
  Thor Lancelot Simon	                                     tls%panix.com@localhost
 "The two most common variations translate as follows:
	illegitimi non carborundum = the unlawful are not silicon carbide
	illegitimis non carborundum = the unlawful don't have silicon carbide."


Home | Main Index | Thread Index | Old Index