emergency holographic talker

introduction

For those not in the know, a talker is a Telnet-based inter-human real-time communication system. There are hundreds of them in operation, each supporting its own viciously divisive clique. What does one do when one's talker is down, as happens from time to time (the EW-too code being renowned for its stability... ahem)? Use another? That would be treason against one's clique! So here's the way to keep talking: the emergency holographic talker (EHT), a simple and dependable substitute service, ready for instant deployment wherever required.

the EHT

The EHT is a small, self-contained, portable Perl script. There is no configuration; just run it. It takes a port number on the command line, defaulting to 9999. There is no user database, because it doesn't save any state. Really, operating it couldn't be simpler.

The EHT is free software; you can redistribute and modify it under the terms of the GNU General Public License.

features

user-visible features

operator features

code size and source

The EHT is 23 lines long, each line consisting of 79 printable ASCII characters plus a newline. This is exactly the right size for reading the code: it's one screenful, minus one line for your shell prompt or editor status line, minus one column to make line endings clear. It can be safely cut&pasted — in one go, since it all fits onto one screen — which is often easier than doing a proper file download. It's the first deliberately-constructed single-screen-Perl program.

There have been two versions of the EHT released, both with this code layout. Version 0.0 was released in 2003-09 (the source on 2003-09-10, but the bare code a few days earlier). Version 0.1, released on 2004-07-12, is a revision of the older version. The revision corrected a handful of I/O bugs, added a feature (alphabetical sorting of the user list), and made the code more concise than it had been before. The revision, naturally, also had to reshuffle the code to maintain the desired layout while making these changes.

For those who are interested, the EHT is generated from a (slightly) more readable source. It even contains some comments, which may be illuminating to those who wish to study the code. Comparing the two versions may shed some light on the process of editing a single-screen-Perl program (but might also be terribly confusing).

prehistory

The earliest direct ancestor of the EHT was a 44-line Perl script written in about an hour on 2001-11-23 as a demonstration that Perl is the right language for writing talkers. This script was to be compared against several hundred lines of C++ that someone else had recently spent two days writing, which had a similar level of functionality but several bugs. To make the point about the expressivity of Perl more dramatically, I crudely removed the unnecessary whitespace to squash the code into as few lines as possible — fourteen, without making any great effort to minimise code size. (It can actually be made a lot shorter.)

This small talker is much more limited than the current EHT. It supports only broadcast communication, and lacks the "who" and "help" commands. It is also vulnerable to network and related problems, because it does all I/O sequentially. Despite never being intended for serious use, this was wheeled out for emergency use on a couple of occasions, it being the talker easiest to deploy when unprepared. It was after such an emergency deployment on 2003-09-01 that I decided to develop it seriously for this kind of use. At the same time I came up with the single-screen-Perl concept and aesthetics, leading to the rather striking code layout of the modern EHT.

The EHT also has an earlier predecessor, for which the code is now lost. It was about 50 lines of C, written around 1996, on a day when several of us were sampling every computer-based real-time communication system we could lay our hands on. It was the only one that didn't crash while we were using it. It was even more limited than the EHT ancestor discussed above: it had no concept of usernames, and would simply echo to all participants anything that anyone typed.