Maxwells’ Silver Doofer: Episode 2: Reasonable Gratuitous Incompatibility

The Idris Users Manual is a tutorial-plus-reference-manual for “plain-old” users of an Idris system: Excellent tutorials on logging-in, how to enter commands, use of files and directories, text-editing, using the command-shell, and so on; plus reference manpages for the commmand-line programs, specific file-formats (password file, /dev/null, timezone, login-history file, mounted-filesystems list-file, etc); plus a system-administration guide.

Table of Contents:

Given my long-time UNIX experience, what am I going to need this manual for? Well, for the Maxwells’ Siler Doofer project I need to be able to inspect binary files in various ways, thus I am going to need the reference manpages for the “od” (Octal Dump) and “dd” utilities: the Idris utilities are not completely command-line-compatible with 6th Ed. Unix, nor 7th Ed, nor indeed any other UNIXen – but there is a very good reason for that…

Back in The Day:
Idris was a clean-room reimplementation of the ideas of 6th Edition UNIX, binary compatible with UNIX on the PDP-11, but improved in the following ways (of the ones that I can remember):

  • intentionally coded for easy portability
    Idris was ported to a lot of very different systems, including most models of PDP-11 (yes, even the LSI-11), a whole slew of different 68K-based minicomputers, Apple Macintosh, Atari ST, DEC VAX, IBM 370, IBM PC and compatibles, the multi-Transputer-based Parsys SN1000, an even an Intel 8080 system using bank-switched memory!

    This meant that the manner in which Idris was coded differed at the implementation level from AT&T UNIX – it could not just rely on the oddball PDP-11 double-word byte-order, or particular PDP-11 register-usage – it was much more modular, and used accessor functions to cover (most) low-level portability issues such as data-alignment, byte-order, cross-system binary compatibility of on-disk filesystem structures, etc.

  • carefully designed to not absolutely require memory-management hardware,

    …but to be able to take advantage of such should it be present.

    This alone means that the internals and structure of Idris are in places very different from the AT&T design. Note that AT&T UNIX for the LSI-11 and PDP-11/23 was quite different than that for the PDP-11s that included memory-management hardware – almost more like reimplementations; conversely, Idris used the same codebase for all the ’11s, and apart from the tiny CPU-context-switching and stack-munging assembly-code segment, used the same (conditional) C codebase for all different types and families of CPUs.

  • a hybrid process-scheduler

    …providing both “real-time” fixed-priority and “fair-share” adaptive-priority scheduling (this was a later addition, not present in the very first 1979 version which was “fair-share”-only).

  • Consistent command-line options for the provided utility programs.

    Most AT&T UNIX commands of the time each used their own somewhat idiosyncratic command-line options and filename-selection criteria, which could be a royal nuisance for users, especially when learning how to use the system.

This last reason is why I need the Idris manpages for “od” and “dd” – they have different command-line options than the UNIX versions.

Reasons: Back In the Day
Given that gratuitous although slight command-line incompatibility with UNIX could be seen as a disadvantage (as well as an advantage) for users, why did Whitesmiths do that? There was of course the “beauty and consistency” reasoning, but there was also the “legal threat” reason: at the time, AT&T were starting to think of UNIX as a potential commercial product, and were presumed to be open to the possibility of using the judiciary to attack and confound any “deliberately interface-compatible” commercial potential competitor. Yes, even well before the late-80s tsunami of look-and-feel lawsuits that later plagued the IT industry.

This reasoning meant that it would be wise to sacrifice absolute user-interface compatibility with AT&T UNIX in the (purported and real) name of user-interface consistency. Although it was a cosmetic change, the utility of the changes (easier use and training) was a point that could reasonably be argued in court as a rational technical difference should the need arise.

The Henhouse:
The same reasoning applied to Whitesmiths C Runtime Library, which was famously API-incompatibly with the UNIX C “stdio” library: again, it was presumed that AT&T might just apply legal pressure against any interface-compatible competitor; the C language proper was not thought to be at the same risk, as the core language had been described in detail (without assertion of formal intellectual property) in several freely-available publications, including of course the K&R book. The runtime library on the other hand, was more of a grey area, which did not get resolved until the 1989 ANSI C Standard was published, at which point “reimplementation” lawsuits became moot.

Famously, when Whitesmiths’ founder was appointed in charge of the Library Subcomittee of the ANSI X3.159 standardisation effort for the C language, one commentator made the dry observation that, due to that deliberate historical incompatibily, it was like “putting the fox in charge of the henhouse”.

Next episode, I’ll pick up on another key Idris manual needed for the project.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s