From mboxrd@z Thu Jan 1 00:00:00 1970 From: downing.nick@gmail.com (Nick Downing) Date: Mon, 27 Feb 2017 13:13:10 +1100 Subject: [TUHS] The size of EMACS, and what hides in kLOCs In-Reply-To: References: Message-ID: Hmmm Emacs... Editor too large :) Well I don't use Emacs because it is the opposite of minimal, I mean partly from a purist standpoint, partly from a practical standpoint since we often have to do things like editing fstab before the system is fully up. I think Joerg mentioned use of vi "for emergencies" and that is always gonna be necessary, even for the Emacs people here. But if I'm gonna learn something "for emergencies" I'd probably rather just standardize on it, as I have done with vi. That's not to say I like vi, in fact I detest it, it is clunky and counterintuitive and modal and... I just can't stand the way it puts the cursor "on" the current character, so that you have to use "i" to insert before or "a" to insert after... and you can't standardize on "i" or "a" since "i" is needed at the start of the line and "a" at the end of the line... I can't stand the way it's line-oriented (obviously to do with its "ex" heritage) and so you can't search on ^M (can replace, luckily). I also have never fully bothered to learn the "vi" command set since I felt I was kind of "camping" until I found a better alternative, so I have improvised some truly strange sequences to do common things like deleting a line. Haha. And recently when I was working in the simulator with "old vi" rather than vim, I discovered it has some really bad limitations like line length... HOPEFULLY these are removed in "new vi", I will have to try reno in the simulator some time. But now to the point of my post, which is a bit of a convoluted story that DOES touch on Emacs at the end. Well way back in the early 80s when people believed that MSDOS would be distributed with a custom BIOS per machine like CP/M was... and each manufacturer had their MSDOS solution which was generally an 8086 or 8088 at around 5 MHz and wasn't IBM compatible... various relatives of mine did their own market research and bought interesting MSDOS machines. The most interesting and powerful at the time was my uncle's Victor 9000 aka Apricot ACT, it was a very futuristic machine for its time, with an 800x600 monochrome text and graphic display, variable speed floppies, I think he had 256k or maybe 512k in it, but it could go up to about 768k or more, unlike IBM's later PC. And, with the Victor 9000 was shipped a pretty good development system including... a text editor of TRULY AMAZING abilities. So the text editor was called PMATE, and it was supplied by Phoenix Software Associates (P=Phoenix MATE=Original name of the editor before they licensed it from its author). Yep that's Phoenix that later became famous for BIOSes. Later on they ported PMATE to IBM XT as well, basically they just changed the memory mapped screen to B000 or B800 as required by IBM's MDA or CGA respectively. I used PMATE for many years, it had an unbelievably great macro language, it had 10 buffers, you could put macros or text in each buffer, buffers could execute each other, it could grab text into a buffer and reinsert it somewhere else in your document, it could do search and replace with wildcards (not regular expressions unfortunately), it could do integer math (without operator precedence), it had various stacks and variables and control flow and looping constructs, various disk buffering modes and other settings. So using PMATE I was unbelievably productive, it was great for software development and for stuff like data entry or letter writing too. For instance my mum was secretary of the basketball club that myself and my brothers played for, we used to manage team lists and mailing lists and fixtures etc, as text files in PMATE, and when we were ready to do a mailout, we would have PMATE do a very specialized merge of all kinds of data from different files, and then generate an output that would be imported into WordPerfect 5.1 and laser printed. Another time a guy was doing an election campaign and he wanted all the electoral rolls for our district typed in (paper form was available from public record). So I got a bunch of friends together and we spent a week typing stuff into PMATE, after I implemented an autocomplete facility in macros that significantly sped things up by copying stuff from the previous line entered, etc etc. (The guy paid us about $4000 for this, and we spent part of the money buying a Streetfighter II arcade machine that was then communally owned by the group which I had got together to do the data entry job, very fun times for all :) ) Sad to say, the day came when PMATE had to be retired as I had switched over my primary development first to Windows (where PMATE worked but limped a bit due to its 64K limitation, despite all the tricky disk buffering it had), and then to Linux where PMATE did not work. I briefly tried running it under emulation. I did use the configuration utility to patch it to generate ANSI type scape sequences instead of using the memory mapped screen, and I even did some CP/M to native disk access translation (I was using the Z80 version which was called ZMATE, since the 8088 port didn't offer significant advantages in this setting). It was more or less useable, but just too clunky for everyday use compared with vi. Anyway I deeply mourned the loss and spent years trying to reverse engineer it, I did at one stage make a 386 version that worked under a DOS extender, but it would occasionally crash and I never got it debugged. In the course of all this I was VERY VERY keen to understand more about PMATE, finding the 8080 and Z80 versions on a little used CP/M archive was helpful, anyway it is written by a guy called Michael Aronsen (Arunsen?) and hence got it's name "Michael Aronsen's Text Editor". I was thinking what a genius this guy is and wondering why he dropped out of the scene and is no longer to be found anywhere online. I guess it was just a college project he did because he needed an editor, and eventually he sold it to Phoenix and washed his hands of it. WELL strangely whenever I searched for MATE or PMATE, as well as lots of advertisements for the Pee-Mate (a device which allows women to pee into a bottle during lectures or long train trips etc), it would often come up on lists of TECO implementations. I ignored this, having no idea what TECO was, or if I briefly looked at it, then I missed the true significance. Well lately, there was a reference on this list to LUSERing and the Incompatible Timesharing System (ITS), and I was idly browsing Wikipedia etc about ITS, reading some technical documents etc, and there was a lot of mention of Teco, this piqued my interest so I downloaded something like Tecoc or Video Teco and compiled it and gave it a shot... LO AND BEHOLD, PMATE IS REINCARNATED!!!! On Mon, Feb 27, 2017 at 12:19 PM, Jason Stevens wrote: > Emacs was the central exploit that "Jagger" used to gain root access once he > got his way on a box. > > It's a fantastic book, with good lessons in there that still ring true, such > as keeping a log, documenting what you did and why, not emailing passwords > and running a honeypot. > > It also showed that if you weren't in the clique you didn't get source > access and that finding even part of it was a big deal. > > It's a shame his next book, silicone snake oil missed the mark by so much. > > > On February 27, 2017 12:05:19 AM GMT+08:00, Nemo wrote: >> >> On 26 February 2017 at 07:46, Michael Kjörling >> wrote: >>> >>> On 26 Feb 2017 07:39 -0500, from jnc at mercury.lcs.mit.edu (Noel Chiappa): >>>> >>>> I was never happy with the size of EMACS, and it had nothing to do with >>>> the >>>> amount of memory resources used. That big a binary implies a very large >>>> amount >>>> of source, and the more lines of code, the more places for bugs... >>> >>> >>> But remember; without Emacs, we might never have had _The Cuckoo's >>> Egg_. Imagine the terror of that loss. >> >> >> Hhhmmm.... I must dig my copy out of storage because I do not remember >> emacs in there. >> >> As for emac uses, my wife was on (non-CS) staff at a local college >> affiliated with U of T. At the time, DOS boxes sat on staff desks and >> email was via a telnet connection to an SGI box somewhere on campus. >> A BATch file connected and ran pine but shelled out to an external >> editor. What was the editor? Well, I saw her composing a message >> once and ending the editor session by ^X^C. >> >> N. > > > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity.