From mboxrd@z Thu Jan 1 00:00:00 1970 From: jnc@mercury.lcs.mit.edu (Noel Chiappa) Date: Sat, 2 Aug 2014 20:48:00 -0400 (EDT) Subject: [TUHS] Unix taste (Re: terminal - just for fun) Message-ID: <20140803004800.A747818C0A7@mercury.lcs.mit.edu> > From: "A. P. Garcia" > Being so small, I expected the editor to lack a scripting language. Well, there is a companion 'compiler' which converts extension source into the intermediate form (byte-code) which is interpreted by the editor. But it's even smaller (67KB!) and as fast as the editor itself. > I was pleasantly surprised that it does have one, and that it's a c > derivative ... "Extensible and modifiable" doesn't always mean the same > thing to everyone, and well, you're a kernel hacker. Take a quick look at a source file, e.g. one of mine: http://ana-3.lcs.mit.edu/~jnc/tech/cmd.e and you'll see i) what it's like (except for a few new editing-specific keywords, such as 'on ' in function definitions, it's pretty much C), and ii) it will give you a sense of the kind of things one writes in it, and how easy it is to do so. The underlying run-time basically just provides buffer, display, etc primitives, and pretty much all the actual editor commands are written in the 'extension' languge, even simple things like 'forward character' (^F), etc. The complete manual is available online, the run-time system is described here: http://www.lugaru.com/man/Primitives.and.EEL.Subroutines.html Epsilon comes (as of a few versions back, I haven't bothered to upgrade) with about 22K lines of source, which is the bulk of the actual editor; that turns into about 190KB of intermediate code. Noel