HQ9+fuck

From Esolang
Jump to navigation Jump to search

HQ9+Fuck is an esolang made by User:YufangTSTSU, as a possible Turing-complete variant of HQ9+.

Overview

The program initializes with a cell array of each ASCII in "Hello, World! \x00". The length is initialized with 15, though it could be extended by Q.

At the end of the program, if the 9s are more than the Fuck 9s, it execute a Fuck 9, otherwise if the cell at the pointer isn't zero, and the program isn't in an endless loop that hasn't outputted, jumps to the beginning. Otherwise, the program just ends.

After the execution, if H, Q, 9 or their Fuck variants has been executed the whole tape will be output, otherwise do nothing.

Flags None P-flag H-flag HP-flag Q-flag QP-flag QH-flag QHP-flag
H Outputs the cell at the pointer, and move the pointer to the right. Outputs the cell at the pointer, and move the pointer to the left. Move the pointer to the right. Move the pointer to the left. Same as without Q-flag.
+ Increment the cell at the pointer. Decrement the cell at the pointer when it's not zero, otherwise do nothing. Same as without H-flag or Q-flag.
9 Set the cell at the pointer to 99 if the cell at the pointer is zero, otherwise jump forward to the matching Fuck 9 if there's one, otherwise to the end of the program. Set the cell at the pointer to 99 if the cell at the pointer isn't zero, otherwise jump forward to the matching Fuck 9 if there's one, otherwise to the end of the program. Same as without Q-flag.
Fuck 9 If the cell at the pointer isn't zero do nothing, otherwise output the X-th paragraph of 99 bottles, and decrement the cell at the pointer, jump backward to the matching 9 if there's one, otherwise to the beginning of the program. If the cell at the pointer is zero do nothing, otherwise output the X-th paragraph of 99 bottles, and decrement the cell at the pointer, jump backward to the matching 9 if there's one, otherwise to the beginning of the program. If the cell at the pointer isn't zero do nothing, otherwise decrement the cell at the pointer, and jump backward to the matching 9 if there's one, otherwise to the beginning of the program. If the cell at the pointer is zero do nothing, otherwise decrement the cell at the pointer, and jump backward to the matching 9 if there's one, otherwise to the beginning of the program.
Fuck Fuck Output "FuckError: You fucked to much" to stderr, and terminates the program. Terminates the program.
Fuck H Toggle the H-flag.
Fuck + Toggle the P-flag.
Fuck Q Toggle the Q-flag.
Q Cut off the cells from where the pointer at, and connect it with the program source code. Take a 1-char input from user, and store it into the cell at the pointer.

HQ9+Fuck isn't case-sensitive, all the "9" and "+" could be replaced with "N" and "P", all the "Fuck" could be replaced with any word starts with "F", and all the characters other than these will be ignored. That means, Fuck 9, fxxk n, FUCK YOU 9, FN, Fantastic are all equivalent.

The standard file extension is .hq9+, but it could also be hq9+, without the dot. In this case, the program takes a integer as input from user. If it's multiple of 3, outputs "Fizz". If it's multiple of 5, outputs "Buzz". If it's none of them, output the integer itself.

Examples

Hello, world!

The program outputs "Hello, World! " by executing H 14 times in the loop from the end of the program.

H

Cheating quine

The program replace the whole tape with the program source code and output it.

Q

99 bottles of beer

The program executes the 9 and a implicit Fuck 9.

9

Increment the accumulator

...Yeah.

+

One Integer FizzBuzz


With the file name as hq9+.

Outputs "Jelly"

PPHHHHFHHHHHHPPPPPPPFHHFHFF

Both Hello World and Quine

The only executed command is H, so it just outputs "Hello, World! ".

Hello, World! 

Truth-machine

Fuck! QQHFuck! H
Fuck! +H++++++++++++++++++++++++++++++++++++++++++++++++Fuck! +
HHHHH+++++Fuck! +HHHHHFuck! +
9HHHHHFuck! +Fuck! HHFuck! HHHHHFuck! ++Fuck! 9Fuck! Fuck!

Interpreters