Time Out
Paradigm(s) | imperative |
---|---|
Designed by | Daniel Temkin |
Appeared in | 2015 |
Memory system | stack-based |
Computational class | Turing complete |
Reference implementation | Time Out interpreter, source code |
File extension(s) | No files in current implementation |
Time Out is a language by User:Rottytooth where every meaningful action occurs between the lines of code. It tries to do for the Web what Folders did for Windows.
Concept
Time Out is not written in textual code but in the amount of time that another interpreted language takes to run a line of code. Time Out programs are usually written in a "Sleep" language, a language built on JavaScript with only a sleep command. As it runs, the Time Out interpreter cycles through its command list. Whatever command the interpreter lands on when the time out has ended is executed.
Time Out runs in the browser. When Time Out is not running in the active tab, in most browsers it tends to run too slow and so "miss" the intended command, which also throws off the timing for the rest of the program. The only reliable way to ensure a Time Out program runs correctly is to set it to your active tab, and sit and wait, watching the commands being processed one by one. If you bring up another tab, or even another application, it will likely fail.
The speed is set to 30ms/command by default, and can be adjusted according to the speed of the machine and patience of the programmer.
Language Overview
Each line of code is in this format:
timeOut.Set(###);
The parameter for Set is the number of commands to skip over. The speed at which Time Out cycles through commands can be set, but defaults to 30ms for each command. Time Out's cycle is 200 commands (so ordinarily this is 6 seconds to go all the way around the list), although many are currently unassigned. Underneath, Time Out is a stack-based language with commands borrowed from Forth, etc.
The first 106 commands simply add useful literals to the stack. These are followed by operators and then commands like DUP, SWAP, EMIT, etc.
Every Time Out program ends with:
timeOut.Set(forever);
Examples
Hello World
timeOut.Set(87); // ! timeOut.Set(132); // d timeOut.Set(8); // l timeOut.Set(6); // r timeOut.Set(197); // o timeOut.Set(34); // W timeOut.Set(4); // space timeOut.Set(4); // , timeOut.Set(158); // o timeOut.Set(197); // l timeOut.Set(200); // l timeOut.Set(193); // e timeOut.Set(29); // H timeOut.Set(59); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(200); // CONCAT timeOut.Set(8); // EMIT timeOut.Set(forever);
200 is a complete cycle -- the first 200 goes from the first "l" to the second, the others cycle through repetitions of CONCAT