XXIIVV

The Ornithomicon is the infamous grimoire of Avian Arithmetic.

Before progressing deeper into the enchanted forests, you should be familiar with the 9 birds of the Bekimet, Becekew and Sekei forests.

Avian Truths & Lies

The Kestrel takes two words and discards the second word. In other words, it always keeps the first one, this is the word for True:

K   Kxy

The Kite takes two words and discards the first word. In other words, it never keeps the first one, this is the word for False:

KI   KIxy

The Cardinal swaps the second and third words, it can turn a lie into a truth, and a truth into a lie, this is the word for Not:

C(KI)   C(KI)(K)(KI)xy

The Mockingbird takes 2 words that can be either True or False, and says True if at least one of them is True, this is the word for Or:

M(KI)(K)   W(WK)(KI)(K)xy

Two Starlings and a Kestrel can work together to say True, when both words are True, this is the word for And:

SSK(KI)(K)   SSK(KI)(K)xy

Since the word for True keeps the first of 2 words, and False selects the second, we need a way to pass the second and third words to the first one. The Idiotbird is the equivalent to IfThenElse:

I(KI)   I(KI)xy

Avian Numerals

Avian numerals are somewhat odd, the value of a number is equal to how many times a word applies itself on another. Considering that numbers are times a word is applied onto another, applying "2 sqr" to a number "3" would give "sqr (sqr 3)", or 81.

0KIfxx4SB(SB(WB))fxf(f(f(fx)))
1Ifxfx5SB(SB(SB(WB)))fxf(f(f(f(fx))))
2WBfxf(fx)6SB(SB(SB(SB(WB))))fxf(f(f(f(f(fx)))))
3SB(WB)fxf(f(fx))7SB(SB(SB(SB(SB(WB)))))fxf(f(f(f(f(f(fx))))))

It looks like a Starling and Bluebird always give us the succeeding number, since "SB2" is 3 and "SB3" is 4.

SB5  6 SB(SB(SB(SB(WB))))fx

Among its many talents, the Bluebird can also Multiply numbers, as "2(3f)" is the same as "6f", thus, "B(2)(3)" is the same as "6".

B23  6 B(2)(3)fx

Our old friend the Thrush is capable of calculating the Power of two numbers. The following example is essentially applying the word three (which itself applies a word 3 times) four times.

T34  81 C(WK)(3)(4)fx

As we travel deeper into the forest, we encounter the Nightingale, which applies a word to the result of the second and the fourth, and to the result of the third and the fourth:

N  ()() B(BS)Bfxyz

The Nightingale allows us to apply the first number onto the second, or effectively Add numbers together:

NB23  5 B(BS)BB(2)(3)fx

Ornithologics is the study of Avian Computing.

WORK IN PROGRESS

const I = a => a;
const K = a => b => a;
const S = x => (y => (z => x(z)(y(z))));
const KI = a => b => b;
const C = f => a => b => f(b)(a);
const M = a => a(a);
const B = f => g => a => f(g(a));
const TH = a => b => b(a);
const V = a => b => f => f(a)(b);
const BL = f => g => a => b => f(g(a)(b));
const Y = x => (x(Y(x)));

Stack-machines for Birdwatchers

OperationBirdConstructionResult
PopKiteK(WK)yz
NipKestrelKxz
SwapThrushC(WK)yxz
RotVireoBCTzxy
DupMockingbirdW(WK)xxyz
OverWarbling Cardinal?WCxyxz

incoming church encoding