From Esolang
Jump to navigation Jump to search

Note that h is typically lowercased.

h is a programming language created by Nerdaxe#9443 which is extremely limited.

Every program is an arbitrarily long but finite list of unbounded integers, separated by commas. The accumulator and index of the current cell are set to 0 initially; cells are 0-indexed.

Say that the accumulator is A, the index of the cell being pointed to by the IP is C and i(n) is the value of the nth cell. The operation order:

  • A is set to i(i(C)) - A
  • i(i(C)) = A
  • if A is negative, C becomes i(C+1), otherwise C becomes C+2

Execution ends when the instruction pointer goes to an index larger or smaller than the largest/smallest index in the list, respectively.

Sample programs


A is a placeholder for any integer. This program will eventually print


Hello, World!

A strict version of the Hello, World! program is technically impossible, because all output is a list of numbers.

Infinite Loop


By VilgotanL, explanation using pseudo-code similar to subleq assembler:

neg1 2 #acc is now -1
zero 4 #acc is now 1, the variable zero is 1
zero 6 #acc is now 0, the variable zero is 0
neg1 2 #acc is now -1, go back to 2
neg1:-1 zero:0 #variables



Computational class

The computational class of h is unknown. A variant, h2, was created by User:Andrew3335 in the hopes of being a suitable Turing-complete replacement if h itself is not turing complete. The only deviance from h in h2 is that the list of integers that serves as the initial program is assumed to have an infinite amount of 0s appended to its end, such that the only way to end execution is now for the instruction pointer to go to a cell whose index is smaller than 0.


while -1<p:
    if a<0:p=m[p+1]
print (m)

Heavily golfed Python 3 program by Nerdaxe.