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.

thing

From Esolang
Jump to navigation Jump to search

thing is an esolang based on the Collatz function.

Syntax

All programs have this form:

number , list of numbers , string

Semantics

Every program is interpreted as follows:

  • the first number is N
  • the string is W
  • and the collatz function is F
  • then for each number on the list. lets call one of the numbers K:
  • apply F to N, K times(this is U)
  • then check this condition C. make a string D where each pair of two digits in U(+20) is converted to an UTF-8 char(in the case of non visible characters, add one until visible), and see if this D is in W
  • if it is it will set W to D
  • set N to U
  • if no number K can be found that satisfies C, the program halts
  • loop until halts.