From Esolang
Jump to navigation Jump to search
Paradigm(s) functional
Designed by User:Melvin, User:SCKelemen
Appeared in 2021
Type system untyped
Memory system stack-based
Computational class Turing complete
Reference implementation [1]
Influenced by Combinatory Logic, Lambda Calculus, Gabriel Lebec, Samuel Kelemen
File extension(s) .birb, .bird,

Birb is an untyped, purely functional language based on Lambda Calculus and Combinatory Logic.

Language overview

The birb language is entirely comprised of bird emojis.


Symbol Name Lambda Calculus Combinator
πŸ¦‰ owl \ab.b(ab) owl
πŸ¦… eagle \abcde.ab(cde) eagle
πŸͺ½ wing \abcd.a(bd)(cd) phoenix
πŸ•ŠοΈ dove \abcd.ab(cd) dove
🦜 parrot \a.aa mockingbird
πŸ¦† duck \abc.c(ba) quacky
🐀 touring chick \ab.b(aab) turing
πŸ₯ kool chick \ab.a kestrel
🐣 hatching chick \abc.c(ab) quirky
🐦 simple bird \a.a identity
🦚 peacock \abc.b(ac) queer
🦀 dodo \ab.a(bb)\ab.a(bb) sage
🐧 penguin \abc.a(bc) blackbird
🦒 swan \ substitution
🦩 flamingo \abc.acb cardinal


  • [birb]+: Birb
  • everything else: Comment

Syntax errors are impossible as long as you use at least one birb.


Birbs stagger as they walk: they are reduced in alternating associative order, starting with left associativity at birb index ⌊len/2βŒ‹:

   🐦🐦 -> (🐦🐦)
   🐦🐦🐦 -> ((🐦🐦)🐦)
   🐦🐦🐦🐦 -> (🐦((🐦🐦)🐦))
   🐦🐦🐦🐦🐦 -> ((🐦((🐦🐦)🐦))🐦)
   🐦🐦🐦🐦🐦🐦 -> (🐦((🐦((🐦🐦)🐦))🐦))
   🐦🐦🐦🐦🐦🐦🐦 -> ((🐦((🐦((🐦🐦)🐦))🐦))🐦)


You can find more examples (with comments) in the samples/ directory.


  • πŸͺ½πŸ¦ -> 🦒
  • 🦒🐦 -> πŸ¦‰
  • πŸ¦‰πŸ¦ -> 🦜
  • πŸ•ŠοΈπŸ¦ -> 🐧
  • 🐧🐧 -> πŸ•ŠοΈ
  • 🦩🐧 -> 🦚
  • 🦩🦚 -> 🐧
  • πŸ¦©πŸ¦† -> 🐣

One can only imagine what happens if two parrots talk to each other: 🦜🦜 -> πŸ’₯. The same happens with 🐀🐀; they just can’t stop waddling!


For this example I use the Church numerals. Zero would then be encoded as πŸ₯🐦. The successor function can be written as 🦒🐧:

  • 🐦🐧🐦🦒🐧πŸ₯🐦 -> \\(10) (Church numeral 1)
  • πŸ¦πŸ§πŸ¦πŸ§πŸ•ŠοΈπŸ¦’πŸ§πŸ¦’πŸ§πŸ₯🐦 -> \\(1(10)) (Church numeral 2)

Similarly, one can translate the Church addition function to πŸͺ½πŸ§. Now, to calculate 1+2 based on their increments from zero:

  • πŸ¦πŸ¦πŸ•ŠοΈπŸ§πŸ•ŠοΈπŸ§πŸ¦πŸ§πŸ•ŠοΈπŸ§πŸ•ŠοΈπŸͺ½πŸ§πŸ¦’🐧🦒🐧πŸ₯🐦🦒🐧πŸ₯🐦 -> \\(1(1(10))) (Church numeral 3)

Also: 🐧 is a*b, 🦜 is n^n and 🦚🐦 a^b.

Note that there exist many alternative ways to do arithmetic. Try writing the functions above with other birbs!


You can create a pair [X,Y] using 🦩🦩🦩YX.

Typically, one would now construct a list using repeated application of pairs (Boehm-Berarducci/Church encoding). However, due to the reversed application and alternating associativity, the Mogensen-Scott encoding is more suitable:

List [X_1,X_2,...,X_n]: [🦩]ⁿ🦩X2X1...XN.


Birb is Turing complete, since one can construct any term of the Jot variant of Iota. A Jot term ((X s) k) is equivalent to 🐦🐦X🦒πŸ₯. Similarly, (s (k X)) is equivalent to πŸ¦πŸ¦†XπŸ₯🦒.


As of right now there is one interpreter, written by User:melvin in Haskell: [2]. It also features a BLC to birb transpiler.