Virtual timer expired

Danny Jared Epstein dje at
Fri Nov 16 00:13:04 UTC 1990

I have just started using SELF 1.0 and have run into a problem with the unixCommand primitive.  I have been using the SELF expression:

	 'emacs' unixCommand

to edit script files.  The problem is that some time later, the message:

	 Virtual timer expired

(usually followed by a number) appears on the screen and control is returned to SELF (ie. emacs is aborted).  On one occasion the effect was more serious: the console became inactive, ingnoring all key events, even after all the processes were killed.  The problem can be made to occur fairly reliably by holding down C-n to scroll through a fairly large file.  Using 'onintr -' to disable interrupts (in a shell script) has no effect.

The ability to invoke an editor from within SELF is essential because the user interface can only run from the console.  Until the user interface provides some way to edit code, we are stuck with text editors.  I have looked into getting access to the keyboard by reading '/dev/console' and it looks promising.  All you have to do is call the unix command:

	 stty raw -icanon -echo

before reading keys (and after the SELF prompt made its own settings).  The problem now is that there is no way to add slots without returning to the prompt.  When this is fixed, it should become possible to write a simple browser fairly easily, greatly improving the usability of the language.

	Danny Epstein

More information about the Self-interest mailing list