Hardfuck

From Esolang
Jump to: navigation, search

Hardfuck is a Brainfuck derivative created by Zayne (why am I not surprised) and as the name suggests it is supposed to be harder than Brainfuck.

Commands

Command Description
> Move the pointer to the right
< Move the pointer to the left
+ Increment the memory cell under the pointer
- Decrement the memory cell under the pointer
. Get an input, output the input and store it at the pointer's cell
, Output the cell before the pointer
[ Jumps to the nearest ] if the value of the cell before the pointer is 0
] Jump back to the matching [ if the value of the cell after the pointer is nonzero
@ Stores the answer to the cell under the pointer multiplied by 4 in the cell before the pointer
/ Returns to the first cell

Everything else is a comment

Examples

Hello World

 sets the cell to 18
 >>>>>>>>>>>>>>>>>>
 multiplies 18 by 4 which is equal to 72 and stores it in cell 17
 @
 goes to cell 50
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 multiplies 50 by 4 which is equal to 200 and stores it in cell 49
 @
 we go to cell 49
 <
 and then do 99 negatives
 ---------------------------------------------------------------------------------------------------
 now cell 49 has the e we can go to cell 51
 >>
 now 50 is 204
 @
 we go back
 <
 and then
 ------------------------------------------------------------------------------------------------
 we have our first l
 >
 I'm being lazy
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 second l
 >
 o
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 now for the space
 >
 ++++++++++++++++++++++++++++++++
 now to do the W
 >
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 and the o
 >
 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 and the r
 >
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 l
 >
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 d
 >
 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 now to print it out
 />>>>>>>>>>>>>>>>>>,>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>,>,>>,>>,>>,>>,>>,>>,>>,>>,

Minified?

>>>>>>>>>>>>>>>>>>@>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>@<--------------------------------------------------------------------------------------------------->>@<--------------------------------------------------------------------------------- --------------->++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ >+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>++++++++++++++++++++++++++++++++>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/>>>>>>>>>>>>>>>>>>,>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>,>,>>,>>,>>,>>,>>,>>,>>,>>,

Interpreters

We haven't got any yet.