News for hackers. Stuff that matters.
Re:Things to Know About GNU Readline by gumby on Thursday August 22, 2019 @06:13PM (#20772872)
> 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.

Re:Things to Know About GNU Readline by brianjhanfox on Friday August 23, 2019 @02:12AM (#20774927)
And 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.

Re:Things to Know About GNU Readline by inflatableDodo on Friday August 23, 2019 @11:28AM (#20778611)
Hi, 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. :)
Re:Things to Know About GNU Readline by gumby on Friday August 23, 2019 @03:09PM (#20781387)
As 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.

Re:Things to Know About GNU Readline by brianjhanfox on Friday August 23, 2019 @02:06AM (#20774909)
I 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.
Re:Things to Know About GNU Readline by chetramey on Friday August 23, 2019 @11:24AM (#20778567)
I 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.

Re:Things to Know About GNU Readline by chetramey on Friday August 23, 2019 @11:46AM (#20778791)
This would be bash-0.93, around March, 1989.
Re:Things to Know About GNU Readline by inflatableDodo on Thursday August 22, 2019 @07:27PM (#20773307)
Should we all ask him individually? Is there some kind of batch process.
Re:Things to Know About GNU Readline by justaj on Friday August 23, 2019 @06:59AM (#20776242)
Was headline a library that readline was based off from? I couldn't find anything in my searches.
Re:Things to Know About GNU Readline by gumby on Friday August 23, 2019 @08:20AM (#20776736)
It was an autocorrect typo and by the time I noticed it was too late to edit the comment.
Re:Things to Know About GNU Readline by justaj on Friday August 23, 2019 @09:27AM (#20777303)
Oh I see, I should have probably caught that. Sorry, I'm still new to all of this.
Re:Things to Know About GNU Readline by msla on Friday August 23, 2019 @05:57AM (#20775927)
> 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.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/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

    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.
Re:Things to Know About GNU Readline by gumby on Friday August 23, 2019 @08:28AM (#20776792)
The 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.