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.

King In Yellow

From Esolang
Jump to navigation Jump to search

King In Yellow(or just KIY) is an Esoteric programming language created by User:Yayimhere. Even though the original concept is unknown(as it was adapted/expanded from a language yayimhere had discarded earlier), its current concept is allowing program bits to never be executed yet still have an effect on the memory.

Memory

Memory is held in two places. One is a bit register, which is 1 if the latest created module is recursive, 0 otherwise. The algorithm for checking is implementation dependent. Modules are single line programs stored with a name. these names must always be surrounded by ( & ). The code in modules is usually not executed

Commands

Every line must be a module definition, but they may also be expressions, and all other commands must be located in expressions.

  • x = y⋻: defines module x with the expression body y. Redefinition is legal.
  • K x y: forces execution of the program in y, then in x, and then returns x, leaving the whole expression permanently changed, in the place the K was executed.
  • ⧆ x: returns x as an unassigned module name, surrounding it in brackets. May be left as the name on an assignment.
  • 0 y: if there exists an expression F which does not "K away" the most recent module x, removes the recursion of x if it has any, and which is the shortest in text of all possible F's which fit the condition, 0 y is shorthand for y = F⋻, otherwise its a NOP.
  • 1: refers to the module most recently made with a computer generated name.
  • F X ↛ ...: F is an operator which takes space separated arguments, and it simply separates X from the arguments after it, where X is the leftmost argument which is "unfilled" by some other value, and so, everything between the leftmost argument that does have a value at this point, and the arrow is filled in as X.
  • ε: shorthand for K 0 (d) ↛ (p) = (p)⋻ ↛ where both p & d are computer generated names for modules. Such a name is outside of ascii, or any other encoding of names for modules. ε functions as a NOP, as there is no way to make a variable thats recursive with only itself, stop being recursive.
  • xₙ: Nests x n layers into recursion, and replaces any instances of x left over, with ε, unless this would result simply in ε, in which it simply re-returns x. The following base 10 subscripts are used: ₀₁₂₃₄₅₆₇₈₉.

All spaces are required. All the operators scopes reach out as long s possible until something that stops them is reached(i.e brackets, arrows, or syntax specific delimiters)

Special Case

In the case you have something like (X) = (Y) = (X)⋻⋻, where you get recursion as:

(Y) = (X)⋻
(Y) = (Y) = (X)⋻⋻
(Y) = (Y) = (Y) = (X)⋻⋻

and so on, whenever calling it, it is rewritten as follows:

... = (Y) = Z⋻... -> ... = K * (Y) Z ↛ Z #where Z is not equal to (Y) = W⋻

* is an implicit function, which takes in a module, and an expression, and replaces every module in that expression, with the input module, and then returns the resulting expression.

Examples

Infinite loop

(x) = K (x) ε⋻

Computational class

KIY's computational class is currently unknown, however it seems less than turing complete, HOWEVER, may still be uncomputable, by the F check/finding. But this is total speculation of course.