Couldn't find any good quote here yet.
I don't know much about different computational models, so can't really tell what model this is. But what you probably want to hear is "Is this Turing-complete or not?". This is clearly not a Turing-complete language, as you can most probably notice when you read this document. This was never meant to be Turing-complete, either. But I'm sure you'll still find this quite enjoyable if you're a friend of esolangs.
The name Trigger comes from a word "trigger" that is meant to indicate a toggle. This language is based on toggles/triggers, as you can soon find out.
Trigger was created 26.7.2005. I noticed at #esoteric that some guy called Gs30ng had an interesting language idea called Switch. However, there were some things that I didn't like in that language. As well, there were some things I wanted see differently and what Gs30ng wanted to do differently (for example he wanted to make his language Turing-complete, and so on), so I decided to make my own language. Without Gs30ng's excellent work I would've never made up Trigger. Or at least not for many years. Thanks! :) Gs30ng continued his work on his language Udage (formerly Switch).
Trigger is a limited programming language. It's not Turing-complete and doing many things can get easily complicated and tricky. But well, that's part of the fun. This language is pretty much an experiment language; purposefully left limited to see what kind of interesting programs people can code up with this. Remember to send me your programs!
You can have 256 memory places in Trigger. Each of them is a bit that can have either value 0 or 1. Every trigger is initially set to 0.
Initially the instruction pointer is 0. Instruction pointer moves only right. When instruction pointer is larger than the size of the program execution of the program ends. Programs itself can be as large as the interpreter can handle.
The language has no specific instruction characters like esolangs usually. Trigger works by matching patterns (rows of same character in this case) and doing different things depending on the length of the instruction pattern.
Instruction patterns are treated as one command. The interpreter must slice the program code to find the right commands. To see what I mean, read on.
Trigger uses UNIX new-line (dec 10).
Here are the instruction patterns that Trigger searches and executes. There's four commands. One for changing the values in memory, one for doing jumps (and loops), one for output, and one for input. First I thought to leave the input part out, but then I thought that it's good to have input ability to get more interesting programs made and so on. You can use any ASCII values you like.
This pattern consist only of one character. This performs the NOT operation (0 changes to 1, 1 changes to 0) to the trigger in question. For example the program
BNOTs the value of 'B' trigger. Since all the triggers are set to zero initially, 'B' trigger gets value 1.
AABtwo same characters "AA" launch a conditional jump command that takes the next character "B" as argument and works the following way:
b aab bcauses the interpreter to randomly select whether go to the left 'b' or the right 'b', since both are equally 'far' away from the instruction pattern.
BA AAB Bthe 'B' has value 0 after the program is executed. When the program starts, 'B' gets value 1, and when the program jumps to the last 'B', then the 'B' trigger gets its value flipped to 0.
fffwill print out the ASCII character 'f'. Three UNIX new-lines in a row will print out a new-line. The value of 'f' won't change during that program (see below).
((((will read the next bit from the input channel and set it to '(' trigger's value.
When interpreter is reading the code, it must slice the code into instruction patterns. As well, only one instruction pattern is executed, not the parts forming it. For example, program
zzzwould not be executed this way: NOT(z) NOT(z) NOT(z) OUTPUT('z'). It would be executed as this: OUTPUT('z'). Same goes for the following program
22222It wouldn't be executed as: NOT(2) NOT(2) NOT(2) OUTPUT('2') NOT(2) INPUT(2) NOT(2). It would be executed just as: INPUT(2) NOT(2). Code is executed from left to right, and instruction patterns formed from left to right.
Big thanks to int-e for the interpreter! Download it here.
Will be here soon..
Thanks to the following people:
Trigger was made by Keymaker (partly (see above)).