HQ9+~

From Esolang
Jump to navigation Jump to search

HQ9+~ is an extension of HQ9+- by User:EZ132. It is Turing-complete. All valid HQ9+- programs are valid in HQ9+~, and will produce the same output.

There are five valid characters: H, Q, 9, +, -, and ~. The behaviors of H, Q, 9, +, and - are mostly inherited from HQ9+-. There are a few new behaviors:

  • If a H is followed by a tilde, it will print out the text of FizzBuzz up to the current value of the accumulator.
  • If Q is followed by a tilde, it will run the Truth-machine.
  • If an 9 is followed by a tilde, it will create and run a new Universal Turing machine. In line with the best data-hiding principles, there is no way to access the output of this Turing machine.
  • If a + is followed by a tilde, it will get input from the user. In line with the best data-hiding principles, there is no way to access the input.

See also