The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Perkin-Elmer Sort/Merge II vs Unix sort(1)
@ 2025-01-17 17:23 Diomidis Spinellis
  2025-01-17 19:10 ` [TUHS] " Bakul Shah via TUHS
  2025-01-17 20:07 ` John Levine
  0 siblings, 2 replies; 17+ messages in thread
From: Diomidis Spinellis @ 2025-01-17 17:23 UTC (permalink / raw)
  To: TUHS main list

I chanced upon a brochure describing the Perkin-Elmer Series 3200 / 
(previously Interdata, later Concurrent Computer Corporation) Sort/Merge 
II utility [1].  It is instructive to compare its design against that of 
the contemporary Unix sort(1) program [2].

- Sort/Merge II appears to be marketed as a separate product (P/N 
S90-408), whereas sort(1) was/is an integral part of the Unix used 
throughout the system.

- Sort/Merge II provides interactive and batch command input modes; 
sort(1) relies on the shell to support both usages.

- Sort/Merge II appears to be able to also sort binary files; sort(1) 
can only handle text.

- Sort/Merge II can recover from run-time errors by interactively 
prompting for user corrections and additional files.  In Unix this is 
delegated to shell scripts.

- Sort/Merge II has built-in support for tape handling and blocking; 
sort(1) relies on pipes from/to dd(1) for this.

- Sort/Merge II supports user-coded decision subroutines written in 
FORTRAN, COBOL, or CAL.  Sort(1) doesn't have such support to this day. 
One could construct a synthetic key with awk(1) if needed.

- Sort/Merge II can automatically "allocate" its temporary file.  For 
sort(1) file allocation is handled by the Unix kernel.

To me this list is a real-life demonstration of the differences between 
the, prevalent at the time, thoughtless agglomeration of features into a 
monolith approach against Unix's careful separation of concerns and 
modularization via small tools.  The same contrast appears in a more 
contrived setting in J. Bentley's CACM Programming Pearl's column where 
Doug McIlroy critiques a unique word counting literate program written 
by Don Knuth [3].  (I slightly suspect that the initial program 
specification was a trap set up for Knuth.)

I also think that the design of Perkin-Elmer's Sort/Merge II shows the 
influence of salespeople forcing developers to tack-on whatever features 
were required by important customers.  Maybe the clean design of Unix 
owes a lot to AT&T's operation under the 1956 consent decree that 
prevented it from entering the computer market.  This may have shielded 
the system's design from unhealthy market pressures during its critical 
gestation years.


[1] 
https://bitsavers.computerhistory.org/pdf/interdata/32bit/brochures/Sort_Merge_II.pdf
[2] https://s3.amazonaws.com/plan9-bell-labs/7thEdMan/v7vol1.pdf#page=166
[3] https://doi.org/10.1145/5948.315654

Diomidis - https://www.spinellis.gr

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] Re: Perkin-Elmer Sort/Merge II vs Unix sort(1)
@ 2025-01-17 18:12 Douglas McIlroy
  2025-01-18  4:29 ` G. Branden Robinson
  0 siblings, 1 reply; 17+ messages in thread
From: Douglas McIlroy @ 2025-01-17 18:12 UTC (permalink / raw)
  To: TUHS main list

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

> To me this list is a real-life demonstration of the differences between
> the, prevalent at the time, thoughtless agglomeration of features into a
> monolith approach against Unix's careful separation of concerns and
> modularization via small tools.  The same contrast appears in a more
> contrived setting in J. Bentley's CACM Programming Pearl's column where
> Doug McIlroy critiques a unique word counting literate program written
> by Don Knuth [3].  (I slightly suspect that the initial program
> specification was a trap set up for Knuth.)

It wasn't a setup. Although Jon's introduction seems to imply that he had
invited both Don and me to participate, I actually was moved to write the
critique when I proofread the 2-author column, as I did for many of Jon's
Programming Pearls. That led to the 3-author arrangement. Knuth and
I are still friends; he even reprinted the critique. It is also memorably
depicted at https://comic.browserling.com/tag/douglas-mcilroy.

Doug

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

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [TUHS] Re: Perkin-Elmer Sort/Merge II vs Unix sort(1)
@ 2025-01-21 21:53 Douglas McIlroy
  0 siblings, 0 replies; 17+ messages in thread
From: Douglas McIlroy @ 2025-01-21 21:53 UTC (permalink / raw)
  To: TUHS main list

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

All-in-one vs pipelined sorts brought to mind NSA's undeservedly obscure
dataflow language, POGOL, https://doi.org/10.1145/512927.512948 (POPL
1973). In POGOL one wrote programs as collections of routines that
communicated via named files, which the compiler did its best to optimize
away. Often this amounted to loop jamming or to the distributive law for
map over function composition. POGOL could, however, handle general
dataflow programming including feedback loops.

One can imagine a program for pulling the POGOL trick on a shell pipeline.
That could accomplish--at negligible cost--the conversion of a cheap demo
into a genuine candidate for intensive production use.

This consideration spurs another thought. Despite Unix's claim to build
tools to make tools, only a relativelly narrow scope of higher-order tools
that take programs as dara ever arose. After the bootstrapping B, there
were a number of compilers,  most notably C, plus  f77, bc, ratfor, and
struct. A slight variant on the idea of compiling was the suite of troff
preprocessors.

The shell also manipulates programs by composing them into larger programs.

Aside from such examples, only one other category of higher-order Unix
program comes to mind: Peter Weinberger's lcomp for instrumenting C
programs with instruction counts.

An offshoot of Unix were Gerard Holzmann's tools for extracting
model-checker models from C programs. These saw use at Indian Hill and most
notably at JPL, but never appeared among mainstream Unix offerings. Similar
tools exist in-house at Microsoft and elsewhere. But generally speaking we
have vey few kinds of programs that manipulate programs.

What are the prospects for computer science advancing to a stage where
higher-level programs become commonplace? What might be in one's standard
vocabulary of functions that operate on programs?

Doug

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

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

end of thread, other threads:[~2025-01-21 21:54 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-17 17:23 [TUHS] Perkin-Elmer Sort/Merge II vs Unix sort(1) Diomidis Spinellis
2025-01-17 19:10 ` [TUHS] " Bakul Shah via TUHS
2025-01-17 19:35   ` Marc Rochkind
2025-01-18 14:51     ` Diomidis Spinellis
2025-01-18 15:16       ` Larry McVoy
2025-01-18 15:40         ` Paul Winalski
2025-01-18 16:54           ` Marc Rochkind
2025-01-19  3:45           ` sjenkin
2025-01-18 16:00         ` Bakul Shah via TUHS
2025-01-18 16:25           ` Tom Lyon
2025-01-18 17:07             ` ron minnich
2025-01-18 19:39               ` Marc Rochkind
2025-01-17 20:07 ` John Levine
2025-01-18  4:46   ` Dave Horsfall
2025-01-17 18:12 Douglas McIlroy
2025-01-18  4:29 ` G. Branden Robinson
2025-01-21 21:53 Douglas McIlroy

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).