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:Drunk Phoenix

From Esolanging
Jump to navigationJump to search

Drunk Phoenix is an esolang by user:raiseafloppafan7741 in 2026. It is a combinatory logic language based on Lazy K and Crazy J with the main idea being to use the Phoenix combinator ф and its power in an aristocratic system.

Basis

The basis used is the IGф basis. Since there are no cancellative combinators, this is an aristocratic basis.

I x = x
G x y z w = x w (y z)
ф x y z w = x (y w) (z w)

The character used to represent the Phoenix in Plutonium hexafluoride is not the Greek letter phi, but instead the Cyrillic letter Ef. This was deliberately chosen to avoid inconsistencies between fonts.

Despite its great power however, the Phoenix has one major weakness that makes it necessary to insert another combinator into the Iф system, which is that it cannot re-order its arguments. This is normally not a problem since a cancellative combinator like K or K' can cover for that, however there are no cancellative combinators here.

Syntax

Combinator calculus (CC)

Uppercase variants of the combinators are used. Applications are done via juxtaposition and are left-associative. Parentheses can be placed to specify grouping. For example ABCD is ((AB)C)D while AB(CD) is (AB)(CD).

Unlambda

Lowercase variants of the combinators are used. Applications are done using the ` prefix binary operator, where `ab in Unlambda is AB in CC.

Morse code

In times of war where all you and your (distant) comrades have are Morse code senders and receivers, this shall allow you to continue running Drunk Phoenix code.

The combinators are represented by the following Morse code patterns. Patterns are separated by spaces. . (Morse code for E) is the prefix application order like ` in the Unlambda syntax.

I - ..
G - --.
ф - ..-.

Slashes (/, spaces in Morse code) are superfluous and can be added for readability in text.

For a bigger example, III(II)II(G(II)I) in Morse code would be:

. . . . . . .. .. .. . .. .. .. .. . . --. . .. .. ..

deadfish mimic

i replaces I, d replaces G, s replaces ф, and o is a postfix application operator. For example, фIII in this syntax would be sioioio. Not really a convincing deadfish mimic.

Binary number

The program is a string of 0s and 1s. The bits are read right-to-left. Leading 00s are ignored.

00 - application
01 - I
10 - G
11 - ф

Hex dump

This is just the binary number syntax but the binary number is converted into little-endian hexadecimal and split by octet.

For example, фIII(фIII) here would be 00 57 c0 15.

vv padding
00 01 01 01 11 00 00 00 01 01 01 11 00 00 00 00

0001 0101 1100 0000 0101 0111 0000 0000

   1 5       c 0       5 7       0 0 [big-endian]

00 57 c0 15

Table of combinators

Combinator Bird name Expression (CC) Expression (Unlambda) Proof
M Mockingbird фIII ```фiii
фIIIx
I(Ix)(Ix)
I(x)(x)
xx
Q.E.D.
M2 Double mockingbird фI(фI)I ```фi`фii
фI(фI)Ixy
I((фI)x)(Ix)y
I(фIx)(x)y
фIxxy
I(xy)(xy)
xy(xy)
Q.E.D.
O Owl фII ``фii
фIIxy
I(Iy)(xy)
I(y)(xy)
y(xy)
Q.E.D.
S Starling фI `фi
фIxyz
I(xy)(xz)
xy(xz)
Q.E.D.
S' Converse starling ф(GII) `ф``gii
ф(GII)xyz
GII(xz)(yz)
I(yz)(I(xz))
I(yz)(xz)
(yz)(xz)
yz(xz)
Q.E.D.
T Thrush GII ``gii
GIIxy
Iy(Ix)
Iy(x)
y(x)
yx
Q.E.D.
ω Omega bird фIII(фIII) ````фiii```фiii
фIII(фIII)
I(I(фIII))(I(фIII))
I(фIII)(фIII)
фIII(фIII)
Q.E.D.

This is quite trivial thanks to the S and I combinators.

Church numerals

Number Expresion (CC) Expression (Unlambda) Proof
0 Impossible The raw lambda for 0 is (\f.(\x.f)), or K in SKI/BKCW calculus. That is cancellative, however IGф is an aristocratic system meaning there are no cancellative combinators. Linear and affine combinators cannot make cancellative combinators and especially not duplicative combinators. Therefore, 0 is impossible in IGф. Q.E.D.
1 G(GII)I ``g`giii
G (G I I) I f x
= G I I x (I f)
= G I I x f
= I f (I x)
= I f x
= f x
Q.E.D.
2 TBA TBA
TBA

Examples

Cat program

i

Infinite loop

00 57 c0 15

See also