We are currently working on new rules that expand the scope of this website to allow more content, and are looking for feedback! See Esolanging:2026 topicality proposal to view and give feedback on the current draft.
Draft:Isk a language!
Isk a language! is a constraint language created based on treating combinator bases as declarative languages. User:Yayimhere and Markfan8901 once discovered constraint language programs could be translated into constraint languages. First, it defines the set of constraints, then how it derives from the basis. The basis used in Isk a language! is SKI(see its name).
Definitions and Notation
This is a list of things which are defined to make it easier to describe the constraints.
- Subprograms are a certain form of program. Their specifics are defined per solution, however, a subprogram is a difference in when it is executed.
- S, K, and I are all sets of programs.
Iis the set of programs which execute with no conditionals(seex ∨ y).Sis the set of programs which execute with at least three conditionals(seex ∨ y).Kis the set of programs which are neitherSnorI.
x ∨ ymeans "executexorybased on some condition of the program." This chains asx ∨ (y ∨ (z ∨ ...). It is assumed its possible to differentiate order between the two options.- The notation
F x y z ... = P, means "For any program inF(call itF_p), executingF_pfollowed byx ∨ y ∨ z ∨ ...is equivalent to executingP." Note thatF xjust executes the program followed byxwithout a conditional. (P)means "Pis executed as a subprogram."
Constraints
F x y = (F x) yI x = xK x y = xS f g x = f x (g x)
Derivation
Now, how is Isk a language! derived from a declarative language's program specifically? Well, first we must introduce some terms to make it easier to understand:
- ɧ: the declarative language in question, which is defined as:
- Programs are lists of definitions/declarations of combinators(in the syntax
F x y z ... = P). - The programs as a whole define combinator bases.
- The execution is, interestingly, irrelevant to our usage of ɧ.
- Programs are lists of definitions/declarations of combinators(in the syntax
- func expandifiers: a made up term, meaning "functionality expander", i.e it expands the functionality/ability for a language to describe things. For each func expandifier added to a language, it is able to describe more things.
Now, how does a ɧ program become a constraint language? Well, you have to define what the four func expandifiers are in terms of constraint languages, in such a way each definition in the program is readable as a single constraint. In the case of ɧ, the func expandifiers are the Combinators, Equalities, Applications, and Brackets. In the case of Isk a language!, the combinators are defined as sets of programs, equalities are defined as "executes the same function"(see also: Burro), Application of F onto x y z ... is defined as "executing some program in F followed by executing x ∨ y ∨ z ∨ ..", and brackets around an expression is defined as "execute that program as a subprogram", in which subprogram is left up to the individual solutions to define. Now, what ɧ program is Isk a language!? Well:
I x = x K x y = x S g f x = f x (g x)
which translates as follows:
I then x is like executing x K then x or y is like executing x S then g, f, or x is like executing f then x or (g x)
the only thing left out is how a combinator becomes a set of programs, which is an arbitrary choice taken. However, the way it happens in Isk a language! is easily formulated:
- If a combinator is linear: the set of programs which have no conditionals.
- If a combinator is duplicative: the set of programs which have a number of conditional more than or equal to the number of arguments it takes.
- If a combinator is cancelative: the set of programs which are not defined by some other combinator in the basis.
Now in the (fairly likely, all things considered) case of overlap, you can ∨ together different results(i.e say you have I x = x and B x y z = x (y z), then for the constraint, it would be (I ∨ B) x y z = (x y z) ∨ (x (y z))). Now, interestingly, figuring out what program is equivalent to the one currently running is a turing complete process(as thats just executing SKI). Another interesting thing to note, is that technically the combinators as commands only affect execution order, they never change memory(or would be unable to as per the constraints). However with recursive combinators, it's possible to have commands which don't do that. For example, the basis:
V x = V A x y = x A y I3 x y z = x y z
lets you have a command V, which always cancels the operation about to happen next to it, A which is always moved to thhe future, and I3 is a conditional.