This really goes back…… and is a hoot besides. Mix one part insanity, one part text editing, two parts programming language, and nine parts line noise: what do you get? Why, TECO of course! EMACS was even written in TECO!
TECO stands for the Tape Editor and COrrector, and was a text editor that basically included its own language. In this age of full-screen color graphic displays, it can be hard to imagine what it must have been like in the days of paper tape when TECO was created (one mistake and you start over!). The best description I found of TECO is an article by Mark Chu-Carroll in his Friday Pathological Programming Language series. He calls TECO the world’s most useful pathological programming language.
I won’t go into it too much – the documentation is surprisingly complete for a computer program of this age and obscurity. One fun thing to note is that every character is a command – not every text character, not every alphabetic character, not alphanumerics – every character is a command. Let that sink in – ^C? Abort TECO’s command sequence. ^X? Search mode flag. ^U? Kill command line….. or put a string into a specified register!
For some of us, this makes editing fun – and gives it a little edge! No screen editing here…..
Here are some sources of fun:
As an example of TECO programming, (courtesy of Mark Chu-Carroll) here is a brainfsck interpreter written in TECO!
@^UB#@S/{^EQQ,/#@^UC#@S/,^EQQ}/@-1S/{/#@^UR#.U1ZJQZ\^SC.,.+-^SXQ-^SDQ1J#
@^U9/[]-+<>.,/<@:-FD/^N^EG9/;>J30000<0@I//>ZJZUL30000J0U10U20U30U60U7
@^U4/[]/@^U5#<@:S/^EG4/U7Q7; -AU3(Q3-91)"=%1|Q1"=.U6ZJ@i/{/Q2\@i/,/Q6\@i/}
/Q6J0;'-1%1'>#<@:S/[/UT.U210^T13^TQT;QT"NM5Q2J'>0UP30000J.US.UI
<(0A-43)"=QPJ0AUTDQT+1@I//QIJ@O/end/'(0A-45)"=QPJ0AUTDQT-1@I/
/QIJ@O/end/'(0A-60)"=QP-1UP@O/end/'(0A-62)"=QP+1UP@O/end/'(0A-46)"=-.+QPA
^T(-.+QPA-10)"=13^T'@O/end/'(0A-44)"=^TUT8^TQPJDQT@I//QIJ@O/end/'(0A-91)
"=-.+QPA"=QI+1UZQLJMRMB\ -1J.UI'@O
/end/'(0A-93)"=-.+QPA"NQI+1UZQLJMRMC\-1J.UI'@O/end/'
!end!QI+1UI(.-Z)"=.=@^a/END/^c^c'C>
I’d like to see it work once….. There are TECO clones for MSDOS, Windows, and UNIX.
And by the way: TECO remains available to this day on OpenVMS – which operating system will celebrate its 30th anniversary on October 25th. Mark your calendars!