Computing Pages

by Francesc Hervada-Sala


Unix: A Text-Aware Environment

Unix is not as many operating systems a mere conglomerate of services, but it is based upon a design principle that organizes all the software — not only the base system but also user defined commands and third party programs — as a consistent whole. A Unix system builds an integrated, powerful, clean development environment. What makes Unix different from other systems is its text-awareness. It is not really text-oriented, because it does not base upon an explicit unified concept of text, but it can be perceived as a predecessor of text-orientation.

At the heart of the system there is a text structure, the file system, that organizes and unifies all system resources. It defines a consistent name space for all entities the system is aware of.

The file is itself a variant of text, too, although it is restricted to a list of character strings. The file is used also as interface between programs, being standard input and output, pipes, etc., all just files. The file is also used as ”run control file“ to pass parameters to programs. This allows a simple text editor to be a universal tool for controlling all aspects of the system's functionality regardless of software packages. This facilitates the programmatic control over the system's behavior, too, because all filters and tools that edit text files can be used to change settings. Note the extreme efficiency of this approach and the high costs one would have to pay in non-text-based systems to get similar functionality. In fact non-text-based systems cannot afford such functionality and remain much more limited.

The shell is a language-based interface to the operating system. Its grammar consisting of a verb (command), prefixed options and arguments is simple and general, easy to learn and consistently supported by script and programming languages. The user can define custom verbs either through the shell linguistic mechanisms such as alias and user-defined functions or through shell scripts or programs.

The linguistic style is not restricted to a particular way of ”interacting“ with the system, its principle is throughout applied as design principle and conforms the overall software architecture. One does not think of software as operating system plus some ”applications,“ one thinks of it rather as a pool of available ”commands.“ An application is a stand-alone software unit that gets total control of a process — it determines its flow, data and interfaces — in order to perform a complex task. A command is a special-purpose software unit that receives a context and applies a specific transformation to it. To get a job done, the user builds a complex expression that combines multiple commands and lets the system execute it. Whereas in an application-oriented system you need a new application or at least a programmatic extension to an existing one for each new kind of job to be done, in a Unix system you just need to build a new sentence to get it done. As a result, a user of an application-oriented operating system is a prisoner whose possibilities are restricted to a closed set of functionality provided out of the box by the installed software packages, whereas a Unix user is a free citizen than can get all sorts of new functionality just combining predefined components at will.

Not only Unix as a product is text-aware, but also the culture that has grown around it. Its programmers share some good style norms that are all text-centered. They praise human readable text formats for control and inter-process communication, simplicity in the parts, the complexity being handled by intelligent combination, succinctness but completeness in documentation, transparency in source code. These are all values that refer to good qualities of text.

The text-awareness of Unix relates to the traditional core of the system. Unfortunately later extensions loose this principle and are in my opinion not progress, but decadence. The graphical desktop surfaces lack any text-awareness. The fashionable XML is a monster. With its unreadable appearance, these files destroy the legibility and compactness of the Unix configuration files and the richness of multiple notations, each of which was designed for a particular purpose. Further XML is not line-oriented and thus all system tools and mechanisms for querying and updating files are useless. In general the traditional values of the ”old Unix school“ vanish gradually, as the operating system becomes mainstream and inevitably bloats.

The right approach is followed by Unix's successor Plan 9, an interesting experimental operating system that is even more text-aware and more consistent.

Print Contact

Unix: A Text-Aware Environment

Text-Oriented Software (Book)

Text-Oriented Software

Copyright

Preface

Text

Text Structure

Comparing Text to Other Structures

Text Query

Languages

Text-Orientation

Imagine

Text-Oriented IDE

Text-Oriented Programming Languages

Files and Text

Programs and Text

Text-Oriented Compiling

Case Studies

Sample: Program Parameters

Unix: A Text-Aware Environment

Universaltext Interpreter

Background

What is Text?

What is Text-Orientation?

Just Once: A Programming Ideal

Why is Computing Important?