4 ms·
> Ramey told me via email that Readline, far from being an original idea, was created to implement functionality prescribed by the POSIX specification, which in
by gumby 7y ago
> Ramey told me via email that Readline, far from being an original idea, was created to implement functionality prescribed by the POSIX specification, which in the late 1980s had just been created.
This actually isn't true. The POSIX shell spec (1003 IIRC) was published in 1992. The headline library was in the first bash release; Brian might have written it before starting on bash. The inspiration was the TOPS-20 input JSYS (system call) mixed in with Emacs.
How do I know? Well you can ask Brian; as he reminded me it came from design discussions for bash I had with him on this very topic at the time, specifically that interactive text input should be a library.
- inflatableDodo 7y agoShould we all ask him individually? Is there some kind of batch process.
- brianjhanfox 7y agoI knew I was going to write readline, and I knew I was going to write it as a library. I wrote the vast majority of it on a weekend after I had a working shell. POSIX was mostly me telling David Korn that just because he had created a shitty user interface feature, we shouldn't be required to make that part of the specification.
- brianjhanfox 7y agoAnd I trust Gumby's memory almost to a fault :-) I had already written a version of Emacs for the Apple ][ and Apple //e called Amacs in 1983 or so. I loved Emacs and Zmacs, and wanted to build software that had that clarity of architecture. So I knew I wanted readline to have as much of the feature set of a genuine editor as made sense. I think Gumby was instrumental in talking to me about making a reasonable API for the completion part of readline. But I wrote a lot of code in the late 80s. And I wanted to use command line editing and completion in GDB, because we didn't have it. And I thought that was idiotic.
- inflatableDodo 7y agoHi, any thoughts on what would be a good place to start if someone was looking to write a terminal shell variant these days? Also, many thanks for all the useful things. :)
- gumby 7y agoAs bash is GPLed you could start with it. If you wanted to be more extreme perhaps you could think of a way to make lua the scripting language, or embed full shell controls into python.
- msla 7y ago> The inspiration was the TOPS-20 input JSYS (system call) mixed in with Emacs. I find this interesting, because the t in tcsh comes from TENEX, the immediate predecessor to TOPS-20. https://web.archive.org/web/20120414085306/http://www.tcsh.org/tcsh.html/THE_T_IN_TCSH.html https://web.archive.org/web/20120414085306/http://www.tcsh.o... > TENEX was created at Bolt, Beranek & Newman (a Cambridge, Massachusetts think tank) in 1972 as an experiment in demand-paged virtual memory operating systems. They built a new pager for the DEC PDP-10 and created the OS to go with it. It was extremely successful in academia. > In 1975, DEC brought out a new model of the PDP-10, the KL10; they intended to have only a version of TENEX, which they had licensed from BBN, for the new box. They called their version TOPS-20 (their capitalization is trademarked). A lot of TOPS-10 users (`The OPerating System for PDP-10') objected; thus DEC found themselves supporting two incompatible systems on the same hardware--but then there were 6 on the PDP-11! > TENEX, and TOPS-20 to version 3, had command completion via a user-code-level subroutine library called ULTCMD. With version 3, DEC moved all that capability and more into the monitor (`kernel' for you Unix types), accessed by the COMND% JSYS (`Jump to SYStem' instruction, the supervisor call mechanism [are my IBM roots also showing?]). https://groups.google.com/forum/?hl=en#!msg/net.sources/BC0V7oosT8k/MKNdzEG_c3AJ https://groups.google.com/forum/?hl=en#!msg/net.sources/BC0V... Purely as a side note, TOPS-20 was commonly called TWENEX ("Twenty TENEX", because the machines it ran on were branded DECSYSTEM-20 by DEC) and the ITS Emacs info file had an interesting note to this effect: https://github.com/PDP-10/its/blob/master/doc/info/emacs.147 https://github.com/PDP-10/its/blob/master/doc/info/emacs.147 Twenex Twenex is the operating system which DEC likes to call "TOPS-20". However, a person should not be forced to call a system "tops" unless he really thinks so. Come now, DEC, don't you think people will praise your products voluntarily? The name "Twenex" is also more appropriate because Twenex was developed from the Tenex system, and has no relationship to "TOPS-10". What's more, it's very euphonious.
- gumby 7y agoThe 10s at MIT ran a homegrown o/s (as had the 6 before them...there was no pdp-6 os available the first was delivered) until the OZ KL-20 was delivered. Allegedly arpa wanted security though I think that was an excuse. I believe ultcmd was written by ai lab graduate Warren Teitelman, inventor of DWIM, among other UI innovations.
- justaj 7y agoWas headline a library that readline was based off from? I couldn't find anything in my searches.
- chetramey 7y agoI trust Brian's memory on this. The original email that he and I exchanged about readline from 1989 referred to readline.c as a single source file, was it part of a separate library then? I, unfortunately, don't have bash sources before bash-1.02.
- chetramey 7y agoThis would be bash-0.93, around March, 1989.
- deleted 7y ago[deleted]