Hi
Jump to navigation
Jump to search
Hi is a trivial esolang where everything prints "hi".
Examples
Hello, World!
Output:
hihihihihihihihihihihihihi
Implementations
Two implementations in Common Lisp shall be adduced, the first resorting to a short cut by exploiting the Hi source code length, the second veridically processing its content.
The nimble counting variant assumes the form:
(defun interpret-Hi (code) "Interprets the piece of Hi source CODE and returns NIL." (declare (type string code)) (loop repeat (length code) do (format T "hi")))
A rendition invested with enhanced honesty and industriousness constitutes:
(defun interpret-Hi (code) "Interprets the piece of Hi source CODE and returns NIL." (declare (type string code)) (loop for token of-type character across code do (format T "hi")))
Four implementations in Python shall also be adduced:
print("hi"*len(input()))
the second:
print("".join(["hi" for i in input()]))
the third:
while True: for i in input("hi\n"): print("hi",end=)
and the forth:
for I in input():print("hi",end="")
The first two are respectively equivalent to the two Common Lisp implementations above.
A ><> implementation:
>i:01-=?v00. v &0 r+1< >&1+&:?v&2-&>"ih"oo&:?v; ^ ~< ^ &-1<
… and a brainfuck one too:
+[,>+<]>-<++++++++[>>+++++++++++++<<-]>[>.+.-<-]