IncLoop

From Esolang
Jump to navigation Jump to search
IncLoop
Designed by User:Orisphera
Appeared in 2021
Computational class Total
Major implementations Interpreter
File extension(s) {{{files}}}

IncLoop in a programming language designed to have short programs that might never halt if you run it on a real computer though theoretically an infinite loop is impossible

Specification

IncLoop has a counter that starts at 0 and two commands:

  • . increases the counter by 1
  • (...) repeats whatever is inside for the amount of times equal to the value of counter when the loop was entered

Practically infinite loops

The idea is that the program runs for so long that no one can wait until it finishes. One way is ..(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((()))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))). However, there are much shorter variants. The shortest variant is ...(((.))) To estimate its time, let's measure it by the final value of the counter, which is how many times a . was executed.

  • . increases it by 1
  • (.) doubles it
  • ((.)) multiplies it by 2 to the power of it

If it is at least 2 and we perform ((.)) at least thrice, it will become at least 8 after first time, at least 2048 after the second time, and at least 2**2059 finally, which is much more than the first way runs. We can do that with ..((.))((.))((.)), ...(((.))), or ..((((.)))).

External resources