Bits of Freedom
Bits of Freedom

Tinkerer and thinker on everything free and open. Exploring possibilities and engaging with new opportunities to instigate change.

Jonas Öberg
Author

Jonas is a dad, husband, tinkerer, thinker and traveler. He's passionate about the future and bringing people together, from all fields of free and open.

Share


My Newsletters


If you're interested in what Commons Machinery, Elog.io, or myself are up to, I'd love for you to be part of my notification lists. It's pretty low volume, a few messages per month, depending on which notifications you sign up for. Thanks for taking an interest!

Read more & subscribe
Bits of Freedom

Interview with Chet Ramey (from 2002)

Jonas ÖbergJonas Öberg

In 2002--2003 I did a serious of interviews with people from the free software community, focusing on some of the members of our community who had been around since the very early days. One of the interviews I did was with Chet Ramey, one of the early contributors and maintainers of Bash. Here is that interview.

Two software projects you've been involved in over the years, and continue to maintain for the GNU Project, are bash and readline. How did you get involved in writing those?

Well, it started back in 1989.

Brian Fox had begun writing bash and readline (which was not, at that time, a separate library) the year before, when he was an employee of the FSF. The story, as I recall it, was that a volunteer had come forward and offered to write a Bourne shell clone. After some time, he had produced nothing, so RMS directed Brian to write a shell. Stallman said it should take only a couple of months.

At that time, in 1989, I was looking around for a better shell for the engineers in my department to use on a set of VAXstations and (believe it or not) some IBM RTs running the original version of AIX. Remember, back then, there was nothing else but tcsh. There were no free Bourne shell clones. Arnold Robbins had done some work, based on work by Doug Gwyn and Ron Natalie at the Ballistics Research Laboratory, to add things like editing and job control to various versions of the Bourne shell, but those changes obviously required a licensed copy to patch. Ken Almquist was in the midst of writing ash, but that had not seen the light of day either. Charles Forsyth's PD clone of the V7 shell, which became the basis of the PD ksh, was available, but little-known, and certainly didn't have the things I was looking for: command-line editing with emacs key bindings and job control.

I picked up a copy of bash from somewhere, I can't remember where, and started to hack on it. Paul Placeway, then at Ohio State (he was the tcsh maintainer for many years), had gotten a copy and was helping Brian with the readline redisplay code, and I got a copy with his changes included. (If you look at the tcsh source, the BSD `editline' library, and the readline source, you can tell they all share a common display engine ancestor.) I took that code, made job control work, fixed a bunch of bugs, and (after taking a deep breath) sent the changes off to Brian. He seemed impressed, incorporated the fixes into his copy, and we began corresponding.

When Brian first released bash to the world, I fixed all the bugs people reported and fed the fixes back to Brian. We started working together as more or less co-maintainers, since Brian was looking for someone to take over some of the work. I wrote a bunch of code and the first cut of the manual page.

After a while, Brian moved onto other things, and bash development stalled. I still needed to support bash for my department, and I liked working on it, so I produced several `CWRU' bash releases. Brian came back into the picture for a while, so we folded our versions together, resulting in bash-1.10. By the time bash-1.14 was released, Brian had eased out of the development, and I took over.

Bash is based on the POSIX Shell and Utilities Standard. But this standard was published in late 1992 after six years of work, several years after the first bash. How much ideas from bash went into the final POSIX standard, and how does the development of the standard continue today?

There were contributions from both directions while the POSIX standard (at least 1003.2) was being developed. RMS was a balloting member of the IEEE 1003.2 working group, and I believe that Brian was too, at least while he was employed by the FSF. I was on several of the mailing lists, and contributed ideas and reviews of proposals floated on the lists before being formalized.

Bash had test implementations of many of the newer features from POSIX.2 drafts, starting with about draft 9 of the original 1003.2, and I think that the feedback we provided, both as implementors and users, was useful to the balloting group. We didn't agree with all of the standard's decisions; that's why bash has a `posix mode' to this day.

The standards process continued with The Open Group and their Single Unix Specification. The IEEE chartered several working groups to modify the standards and produce new ones, and eventually in the fullness of time, the two groups combined their efforts. The result of that collaboration is the just-released SUS v3, which is also known as Posix-2002. Check out http://www.opengroup.org for more details and a web-accessible version of the standard.

When it comes to readline, it is developed together with bash, but has found a tremendous number of uses outside of bash. Like bash, it is licensed under the GPL. Have you ever been approached by a proprietary software developer wanting to have readline relicensed to that they could use it in their software?

Sure, all the time. It's not just commercial entities, either. Groups who release their code under a BSD or X11-style license have inquired as well.

The most common request is, of course, that the LGPL replace the GPL. I let the FSF handle those. Their point of view, as I understand it, is that for libraries without other compatible implementations, that GPL is the preferred license.

Of course, bash isn't the only Free Software shell available. The shell zsh, for example, prides itself in combining features from bash, ksh and tcsh. What do you think of those other shells?

zsh, pd-ksh, ash/BSD sh -- they're all fine. The projects have slightly different focuses, and in the true spirit of free/open-source software, scratch a slightly different itch.

There's been a fair bit of feature migration between the different shells, if little actual code. I'm on the zsh mailing lists, and the zsh maintainers, I'm sure, are on the bash lists. (After I answered a question about bash on a zsh list, there was a follow-up asking in a rather suspicious tone whether or not "we are being monitored".) I've also seen a statement to the effect that "the only reason zsh has [feature x] is that bash has it". The bash programmable completion code was inspired by zsh. I've certainly picked up ideas from pdksh also.

Since bash is so much used in scripting on various platforms, many people depend on its functionality remaining compatible between revisions. Has there ever been a time when you were tempted to introduce a new feature, but decided against it for the sake of compatibility?

Once or twice. People have been burned by new features in the past -- for instance, when the $"..." and $'...' quoting features were introduced. The previous behavior of those constructs was undefined, but Red Hat used them in some of their system scripts and relied on the old behavior. That's why the COMPAT file exists.

Usually, though, the question is whether or not old bugs should be fixed because people have come to depend on them. The change in the grammar that made {...;} work like POSIX says it should was one such change; changing the filename expansion code to correctly use locales was another. I generally fall on the side of correctness.

Other times I've hesitated to introduce new features because I was not sure that the approach was correct, and did not want to have to support the syntax or feature in perpetuity. Exporting array variables is one.

A final example is the DEBUG trap. Bash currently implements that with the ksh88 semantics, which say that it's run after each simple command. I've been kicking around the idea of moving to the ksh93 semantics, which cause the trap to be run before each simple command. Existing bash debuggers, including the rudimentary one in the distribution, rely on the current behavior.

My preferred method of changing bash is to make the new behavior the default, and have a configuration option for the old behavior.

Speaking of new features, how is the development going with bash today? Do you introduce new features regularly, or has bash reached a state of maturity?

Bash development is proceeding, and new features are still being
introduced. Reaching a state of maturity and introducing new features are not mutually exclusive. The new features are both user-visible and internal reimplementations.

I picked up my release methodology from the old UCB CSRG, which did BSD Unix, and introduce new features with even-numbered releases and emphasize stability in odd-numbered releases.

Programmable completion and the arithmetic for statement, for instance, were introduced in bash-2.04. Since the release of bash-2.05a, I've added shell arithmetic in the largest integer size a machine supports, support for multibyte characters in bash and readline, and the ability to use arbitrary date formats in prompt expansions. There will be some more new stuff before the next release.

Two programs you've authored yourself, but that are not part of the GNU project, are CE (Chet's Editor) and the EMM mail manager. Could you tell us briefly what prompted you to write them and if you continue to develop them today?

Well, let's see.

ce is a descendent of David Conroy's original microemacs. I got
interested in editors after I took a Software Engineering class my sophomore year in college in which we studied the `ed' clone from Kernighan and Plaugher's Software Tools in Pascal. That interest was reinforced when I got into a discussion with a campus recruiter who was interviewing me my senior year about the best data structure to use to represent the text in an editor. It's got it's own following, especially among Unix users at CWRU, but I've never publicized it. I still work on ce, and it's up to version 4.4. I have a version 4.5 ready for release, if I ever get around to doing the release engineering.

emm was my Master's project. It was driven by the desire to make a mail manager similar in features to the old MM-20 mail system, which I remember fondly from my DEC-20 days. I wanted to bring that kind of functionality to Unix, since at the time I started on it my department contained a number of old DEC-20 people moving to Unix. It's got a few users, though I don't think anyone's ever fetched it from ftp.cwru.edu. I still develop it, and find myself much more productive with it than any other mail program. There were days I'd get thousands of mail messages a day -- thankfully, in the past -- and it's easy to manage that volume of mail once you're used to emm.

When was your first interaction with computers and what was it about them that made you get involved in writing your own code for them?

Believe it or not, I really didn't use computers until I got to
college. And when I got there, I really didn't have any intention of concentrating in computing. I met the right people, I guess, and they were influential. At that time, lots of guys in my fraternity were studying Computer Engineering, and I found it fascinating. Still do.

You currently live in Cleveland, Ohio where you work at Case Western Reserve University. This, incidently, is also where you graduated with a B.S. in Computer Engineering and from where you received your Master's in Computer Science almost nine years ago. If I calculate this correctly, you've now worked about 13 years at CWRU. What's so great about working there that has made you stay all these years?

It's been longer than that. Counting my time as a student, I've been working for essentially the same department for 17 years.

I guess what I find attractive about working at CWRU has to do with the university environment: the informality, the facilities available at a university, and the academic community. The people I work with are great, too, and a bunch of them have been at CWRU for years and years.

One of your spare time hobbies is sports. Everything from sailing to golfing. No, wait, golfing is one of sports you really dislike. Why's that?

It just has no appeal for me. I can't think of a sport I find more boring (well, there's curling, but nobody knows what that is). I'm sure people feel the same way about sports I like, too. Think about how you'd feel about watching an America's Cup yacht race on television.

Sports you do enjoy though includes sailing, basketball and football. Did you ever get around to participating in them yourself?

I still play basketball once or twice a week. I used to play three or four times a week, back before I had back surgery, but haven't been able to find the time to play that much since.

I do like to sail, but I don't own a boat (a sailboat is a big hole in the water you pour money into). I had a chance to crew for someone last summer, but things never came together.

Between your two kids, work, bash, readline, five cats, a dog, fishes and sports, do you ever find some spare time or do you have some trick to share with us about how you manage to find time for everything you like?

No, I have no magic to share. I have the same struggles to find time to do everything as everybody else. I have it easy compared to my wife, though. I'm amazed that she packs as much into her days as she does.

Finally, where did you go for vacation last year and what's your plans for this years vacation?

Last year? Let's see. I actually went on two vacations.

On the first, I helped chaperon a group of high school students on a trip to Europe. Every other year, my sister-in-law, a high-school Latin teacher in Pennsylvania, gets together with the German teacher at her school and takes a group of students to Italy and Germany. We've also been to Austria, Switzerland, France, and England on these trips. They're both early-to-bed, early-to-rise people, so I get to handle the late-night incidents, like the time a student broke her hotel room key off in the door, or when one plugged in a hair drier and blew the fuses for an entire hotel floor.

The second was a family vacation. My parents, brothers, sister-in-law, niece and nephew, and my wife and kids spent a week in a rented house in North Carolina. That was the first family vacation we'd had in a long time, and it was great.

This year? I'm not sure.

Jonas Öberg
Author

Jonas Öberg

Jonas is a dad, husband, tinkerer, thinker and traveler. He's passionate about the future and bringing people together, from all fields of free and open.