http://invisible-island.net/ded/
Copyright © 2019 by Thomas E. Dickey


Dating the DIRED program

Synopsis

This is a collection of notes and links related to the dired program.

History

Very briefly: the name "dired" has been applied to a succession of programs (and parts of programs) for editing directories.

I have found no connection between dired and flist, which use the same idea.

Early dired

Here is a chronology for the earlier dired using the information from the saildart archive:

To summarize, the program was under development for a few years, but not published until late 1977. At that point, further changes were needed, and users provided feedback (and problem reports). About 20% of the 3300-line assembly-language program changed as a result. After Kugel left Stanford in 1978, development of this older dired stopped, although it was in use for some time. The older source code is unavailable (i.e., before the updates in late 1977), but the older documentation is available.

Adoption by emacs

“E” is one editor; “EMACS” is another. At some point, within a year or so after its general use by the SAIL community, someone decided to add a similar feature to EMACS. In AI Memo 519 (mid-1979), Stallman mentioned this:

DIRED enables a user to edit his file directory. He is shown a listing of his directory, which he can move from one file to another with the usual cursor-motion commands, but other commands are provided to move, examine, compare and delete files. Command are also available to find files which appear to be deletable (for example, old versions of programs, and temporary files) and mark them, tentatively, to be deleted later. DIRED has been implemented mostly by users.

Stallman of course was familiar with E. On page 19, Stallman indicated that he started implementing the display processor in 1974 “inspired by the editor E of the Stanford Artificial Intelligence Lab”). In an appendix on pages 26-27, Stallman pointed out the deficiences of four other editors (including E). Ciccarelli's earlier paper gives more details on using dired, but provides no perspective. Dan Weinreb's blog quoted mail from November 1976 (shortly after “DRD” was mentioned in E's documentation) indicating that MM DIRED had recently been implemented in EMACS.

The early descriptions of MM DIRED in EMACS mention these features which were documented in dired:

There was no mention of MM DIRED sorting the list of files (dired allowed sorting alphabetically or by file-extension). Neither Gosling's nor Greenberg's descriptions of this feature mention file-sorting.

Later dired

The third part of the story should begin in 1980, but there is no available source for that. Move on to 1982.

In mid-1982, the third implementation of dired was announced:

Message-ID: <bnews.sri-unix.1635>
Newsgroups: net.sources
Path: utzoo!decvax!cca!mclure@sri-unix
X-Path: utzoo!decvax!cca!mclure@sri-unix
From: mclure@sri-unix
Date: Sun Jun  6 05:25:54 1982
Subject: dired directory editor
Posted: Sun Jun  6 01:17:01 1982
Received: Sun Jun  6 05:25:54 1982

Here's a program called Dired that we've found useful for maintaining
directories and files.  It is less cumbersome and easier to use than
vsh (visual shell) and seems better for quick sessions of pruning back
directories.  It runs on our v7 2.8 BSD system, and ran on virgin v7
before.  There shouldn't be much which hardwires it to these versions
however.  It requires Berkeley's Termcap.  Essentially, you 'edit' a
directory listing similar to what ls(1) produces.  The idea was taken
from similar programs running on TOPS-20/Tenex/etc.

                                        Stuart Cracraft
                                        mclure@sri-unix
                                        ucbvax!menlo70!sri-unix!mclure

This happened to be a program with the same name, inspired by the earlier (similar) programs, but different:

Like the previous programs, files were marked for deletion at the end of a session. That was the only feature carried forward.

Greenberg went into some detail on the obscure things done to support terminals in SAIL (see the section The SUPDUP-OUTPUT ARPANET Protocol). None of that is relevant anymore, nor has it been since the 1980s.

Comments in the source-code indicate that Stuart Cracraft and Jay Lepreau began work on this program in 1980 and 1981, respectively.

Late in 1983, Charlie Hill announced an improved version. This was probably the version which I saw, and began improving. A little later, in 1984, Jay Lepreau incorporated more improvements from Charlie Hill, calling this “ded” (which Bill Paulsen pointed out to me).

I had not noticed, because I had moved to an Apollo and VMS environment a few weeks before. Subsequently, I developed a related program (flist) for VMS, and after that, began a new directory editor which I called “ded” (i.e., the same name, but different source code and different capabilities). When I moved to the Software Productivity Consortium in late 1987, I began again (while negotiating taking my tools), and reused the directory browser in when developing the current ded.

At the same time, some work was done with Lepreau's ded, as seen in the Sprite093 files. However, there is a gap between 1987 and my next sighting of this program about ten years later.

But even before that, there was a third newer dired, written by Michael J. Lijewski. Version 2.0 was presented at the beginning of October 1993. The archives for comp.sources.reviewed also show these versions:

This program was written in C++. Its manual page said

Dired is a directory editor modelled after Dired Mode in GNU Emacs.

One of the reviewers commented:

It also has the ability to change the ordering of the files (based on   
modified, changed or accessed time) something lacking in the standard   
emacs dired.  However, when changing the ordering, a directory rescan   
has to be performed manually.

Few people noticed this posting. At least one of the developers in Utah noticed. Nelson Beebe resumed development on the Lepreau program, providing a 2.00 in mid-1995, continuing for another year to 2.03 before another developer became interested. At the same time, I was (attempting to) work with the ncurses developers to incorporate my SIGWINCH improvements. In the middle of that, I provided my source for ded, as noted in an email reply:

ftp.clark.net:/pub/dickey/ded

That effort came to naught; I ended up as the ncurses developer. Because ded is mentioned in the ncurses release announcements, the Utah developers may have noticed this. Perhaps not:

Gustafson followed the 3.05 release with an article in Linux Gazette, saying

The directory navigator and program launcher called "DIRED" in the original incarnations of EMACS has two stand-alone Unix clones. Mike Lijewski's "dired" 2.2 is written in C++ (1996). The original "dired" was written in C by Stuart Cracraft (1980), available as version 3.05 (1997).

Historically, shortly after emacs "dired" appeared in the TECO implementation, a stand-alone version was written by Stuart Cracraft (1980). The emacs version and the C version have not kept up with one another.

Lijewski wrote "dired" in 1990, while at Cornell University Theory Center, without any knowledge of Cracraft's "dired". The Theory Center ran on IBM VM/CMS, under which there is a utility call "file manager". This program manages the flat VM/CMS file system and represents the main user interface into files. The creation of "dired" eased the transition from VM/CMS to Unix.

Lijewski's "dired" has the advantage of hindsight and C++ program development so it promises to be written in modern syntax and very maintainable. Cracraft's "dired" was rewritten in 1996 in ANSI C. It suffers with flaws in both design and readability, but the features are there.

However, Gustafson did not identfy a source of information for the timeframe in the sentence about TECO (3-4 years is not “shortly after” in any case). The comment about VM/CMS is questionable (he is referring to filelist, an XEDIT script which imitated flist). I have found no source for the 2.2 dired release. Perhaps that was via private email. Lijewski's earlier versions do not mention VM/CMS, discussing only his success in running it on a half-dozen BSD/BSD-compatible systems, but he did comment on this in a posting to comp.lang.c++ in September 1991 (before the first review). Lijewski's comments about C++ versus dired in any case indicate that he was not optimistic about its portability.

Comparing with ded

Each of those programs (from Lepreau, Lijewski, Beebe, Gustafson and even bzdired) is a termcap application (some mention curses in their documentation, such as Beebe's webpage about dired), but the programs use termcap calls). Given that, the program (rather than the library) is what determines how cursor-keys are recognized. Rather than using the terminal description, they rely upon program logic to recognize common cases. I did that in ded, but aside from test-compiles with SunOS 4 (i.e., BSD curses) in the 1990s, have not used that approach since 1994 (see cmdch.c).

Key bindings are a nuisance, but managing lists of files is the purpose of the directory editor. Emacs' dired mode handles that by allowing multiple dired buffers. The standalone programs other than ded do not do that. Depending on the program those either

In ded I manage all of the lists of files as a ring from which a shell command can refer to the preceding or succeeding list.

There is (by design) no single-keystroke command in ded for deleting files. Other programs do that. The original dired feature of marking files for deletion on exit is not used in later programs (even Emacs, since dired has been a major-mode for a long time rather than a subsystem). All that remains of dired's original purpose is in displaying a list of filenames on which some operation might be performed.

Resources

Early DIRED program

Emacs

Later DIRED program(s)