On Fri, 26 Feb 2016, Steffen Nurpmeso wrote:
But it's shit [pipes in mail(1)]. You cannot say "rawpipe" etc. It is not flexible, not configurable, it is dumb and cannot really be used for anything real,
It is very flexible. The inflated programs with cool features do not allow you to use the features in another way as the ones expected by the developer. You can complain that it is not "configuarable" so that you can use it comfortably, but exactly the flexibility is the advantage.
I disagree, because a mail handling system needs to be able to handle mail. I agree with lpr, it is good to have a printer that understands postscript. [...]
The question is, for what do we need lpr/lpd. I think mainly, for two things: (1) for handling the line printer daemon protocol, and (2) for managing the printer queue. If you use the computer alone and the printer is attached to your computer, you do not need lpr/lpd. You can just print file.ps with: "cat file.ps | ps2lj4l > /dev/lpt0" where ps2lj4l is a filter that transforms the format of file.ps to the language of the printer, it is the program you put in "if" of printcap. Ghostscript helps you to make the filter, if you want to print postscript files. The filter is not an issue of lpr/lpd, lpr/lpd is abstracted from the language of the printer and the format of the file. The purpose of lpr/lpd is to manage effectively the queue under race conditions in a busy printer. Perhaps one can abstract it more, make a daemon specialized in managing queues of tasks that may be anything (printer, fax, mail, etc), but this would not be traditional, standard unix/bsd. There must be a compromise. You can say, mail(1), lpr/lpd, ed are obsolte programs of the 70s and should be deleted from base. It would be a catastrophe for many people. The first time I was in front of a vt100 connected to a unix system (SunOS=BSD), I was helpless and begun using ed. It reminded me "sos" from Tops 10 that I used before (in teletypes). After a while I begun using emacs that I use till now for writing bigger things, but I use mainly vi for configuration files. For what do we have "ed" in base if we have also "vi" in base? Can we delete it? Should be it inflated with new features? No! I use "ed" for example in scripts, and "sed" is not always an alternative. Can you imagine putting emacs or vi in a script? There are many uses of these old, meager programs. Rodrigo.