Path: delphi.bc.edu!cam-news-feed3.bbnplanet.com!cam-news-hub1.bbnplanet.com!news.bbnplanet.com!news.maxwell.syr.edu!news-peer.sprintlink.net!news.sprintlink.net!sprint!ais.net!uunet!in2.uu.net!128.255.40.11!news.uiowa.edu!news From: jones@pyrite.cs.uiowa.edu (Douglas W. Jones,201H MLH,3193350740,3193382879) Newsgroups: alt.folklore.computers,comp.lang.misc Subject: Re: Announcing the Bad Languages page Date: 30 Apr 1997 16:13:25 GMT Organization: The University of Iowa Lines: 76 Message-ID: <5k7r35$jlu@flood.weeg.uiowa.edu> References:NNTP-Posting-Host: pyrite.cs.uiowa.edu Xref: delphi.bc.edu alt.folklore.computers:149880 comp.lang.misc:26848 From article , by connorbd@cleo.bc.edu (Brian Connors): > Wondering if there's anything out there worse than Ada? Tired of > Obfuscated C? Are you bored with traditional, usable programming > languages? I once wrote a text editor (for Modcomp computers) that was vaguely based on QED, the ancestor of Unix ED, but terser and probably Turing-complete. From memory, here is the language. pattern matching wildcards * - match any number of repeats of the previous character . - match any character ^ - match the null character at start of line $ - match the null character at end of line line specifiers . - the current line nnn - make line nnn the current line +nnn - advance nnn lines -nnn - go back nnn lines /pat/ - the next line containing pat, a search pattern // - the next line containing most recently used pattern \pat\ - the next line backwards containing pat \\ - the next line back containing most recently used pattern simple commands - make the indicated line the current line i - enter insert mode (put text before current line) a - enter append mode (put text after current line) s/pat/text/ - substitute text for pattern on the current line once only d - delete the current line d - delete the current to the specified line p - print the current line p - print the current to the specified line c - save the current line in the copy buffer c - save the current to the specified line in copy buffer ic - insert the copy buffer before the current line ac - insert the copy buffer after the current line j - join current line to next line compound commands g( ... ) - repeat indicated commands (exit loop if body makes no edit) x - exit enclosing g x - exit enclosing g if pattern matches current line r - restart enclosing g (not really useful) r - restart enclosing g if pattern matches current line Here's a little exercise that can generate interesting wallpaper: g(cicpg(s/x /xX/)g(s/ x/Xx/)g(s/xxx/x_x/)g(s/_xx/__x/)g(s/X/x/)g(s/_/ /)) Apply the above to a line containing this text (vertical bars, spaces and tabs all included), and show the output: | x x x | I should note that I wrote version one of this editor in FORTRAN IV using punched cards in the spring or summer of 1974, and that I subsequently used it to write the software on which my MS thesis was based, and also to write my MS thesis. Many others have used it around the MODCOMP community, but I have no idea if the source code or any documentation still exists. Doug Jones jones@cs.uiowa.edu