We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Heartfuck

From Esolang
Jump to navigation Jump to search

Heartfuck is a brainfuck-based language, its pretty much just brainfuck but with added commands and proprietary cells.

Instructions

Instruction table
Instruction Description
+-><[],. Same as brainfuck.
( Start a sub-interpreter.
) Stop the sub-interpreter.
* Wait 0,1 seconds.
/ Copy the value of current cell to the left cell.
\ Copy the value of current cell to the right cell.

Examples

++[(.)+*]  

the interpreter increments to the cell two times, then it goes to a loop, activates the sub-interpreter which prints the cell

(note, while the subinterpreter does things on its own, the main interpreter still does all the code at the same time)

then the main interpreter increments, waits 0,1 seconds, and the loop starts over again.

[++(-(.))]  

this piece of code adds number 2, creates a sub-interpreter, in the sub-interpreter the value gets decremented, the sub-interpreter creates an another sub-interpreter which just outputs the value, and then the loop starts all over again. basically sub-interpreter two times in a row.

whats about these proprietary cells? basically, these are cells intended for different things, for example, cell -1 is for sound, cell -2 is for graphics.

+++\>. 

this piece of code copies the value 3 from the cell 1 to the cell 2 and outputs it.

>+<+++\>. 

this is a variant of the previous piece of code, but this time the second cell already has th value 1, so what its gonna do isn't outputing 3, but rather 4 because these instructions copy the values, not overwrite them