aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/birds.html
blob: 801174962272b6b6a48ebf67798e82cf8214868e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<head>
  <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
  <link href="../style.css" rel="stylesheet"/>
  <title>BQN for birdwatchers</title>
</head>
<div class="nav">(<a href="https://github.com/mlochbaum/BQN">github</a>) / <a href="../index.html">BQN</a> / <a href="index.html">doc</a></div>
<h1 id="bqn-for-birdwatchers"><a class="header" href="#bqn-for-birdwatchers">BQN for birdwatchers</a></h1>
<p><em>There's now a <a href="https://dl.acm.org/doi/10.1145/3520306.3534504">paper</a> (<a href="https://raw.githubusercontent.com/codereport/Content/main/Publications/Combinatory_Logic_and_Combinators_in_Array_Languages.pdf">download</a>) on this topic! Wild!</em></p>
<p>Some people consider it reasonable to name <a href="primitive.html#modifiers">combinators</a> after types of birds. They make lists like the <a href="https://wiki.xxiivv.com/site/logic.html#ref">Ornithodex</a> or Lähteenmäki's comprehensive <a href="https://blog.lahteenmaki.net/combinator-birds.html">Combinator birds</a> (naturally, there's <a href="https://combinatorylogic.com/links.html">a list</a> for these lists). There is something wrong with these people. Some of these birds are not even real. &quot;Quixotic bird&quot;? Have you not heard of a quail? Nonetheless, I don't judge such afflicted souls (certainly not publicly), and have provided this translation table to explain BQN in terms they can understand.</p>
<table>
<thead>
<tr>
<th align="center">BQN</th>
<th>Bird 1</th>
<th>1</th>
<th>Bird 2</th>
<th>2</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center"><code><span class='Function'></span></code></td>
<td>Identity</td>
<td><code><span class='Function'>I</span></code></td>
<td>Kestrel</td>
<td><code><span class='Function'>K</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Function'></span></code></td>
<td>Identity</td>
<td><code><span class='Function'>I</span></code></td>
<td>Kite</td>
<td><code><span class='Function'>KI</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Modifier2'></span></code></td>
<td>Bluebird</td>
<td><code><span class='Function'>B</span></code></td>
<td>Blackbird</td>
<td><code><span class='Function'>B</span><span class='Value'></span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Modifier2'></span></code></td>
<td>Bluebird</td>
<td><code><span class='Function'>B</span></code></td>
<td>Psi</td>
<td><code><span class='Value'>ψ</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Modifier'>˙</span></code></td>
<td>Kestrel</td>
<td><code><span class='Function'>K</span></code></td>
<td></td>
<td><code><span class='Function'>KK</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Modifier2'></span></code></td>
<td></td>
<td><code><span class='Function'>B</span><span class='Value'></span><span class='Function'>CBSC</span></code></td>
<td>Queer</td>
<td><code><span class='Function'>Q</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Modifier2'></span></code></td>
<td>Starling</td>
<td><code><span class='Function'>S</span></code></td>
<td>~Dove</td>
<td><code><span class='Function'>D</span></code>-like: <code><span class='Value'>labcd.ac</span><span class='Paren'>(</span><span class='Value'>bd</span><span class='Paren'>)</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Modifier'>˜</span></code></td>
<td>Warbler</td>
<td><code><span class='Function'>W</span></code></td>
<td>Cardinal</td>
<td><code><span class='Function'>C</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Value'>k</span> <span class='Function'>G</span> <span class='Function'>H</span></code></td>
<td>Dove</td>
<td><code><span class='Function'>D</span></code></td>
<td>Eagle</td>
<td><code><span class='Function'>E</span></code></td>
</tr>
<tr>
<td align="center"><code><span class='Function'>F</span> <span class='Function'>G</span> <span class='Function'>H</span></code></td>
<td>Phoenix</td>
<td><code><span class='Value'>Φ</span></code></td>
<td>Pheasant</td>
<td><code><span class='Value'>Φ₁</span></code></td>
</tr>
</tbody>
</table>
<p>Lambda calculus doesn't have BQN's polymorphism on one or two arguments, so each BQN combinator corresponds to two lambda calculus forms depending on the number of arguments, giving the two columns of birds above.</p>
<p>Inputs are mapped to lambda calculus arguments according to the ordering <code><span class='Function'>𝔽𝔾</span><span class='Value'>𝕨𝕩</span></code>, and <code><span class='Function'>GFH</span></code> for a 3-train <code><span class='Function'>F</span> <span class='Function'>G</span> <span class='Function'>H</span></code>. For example, when I write that the combination <code><span class='Value'>𝕨</span> <span class='Function'>𝔽</span><span class='Modifier'>˜</span> <span class='Value'>𝕩</span></code> corresponds to a call of <code><span class='Function'>C</span></code> or <code><span class='Value'>labc.acb</span></code>, <code><span class='Value'>a</span></code> is <code><span class='Function'>𝔽</span></code> and <code><span class='Value'>bc</span></code> are <code><span class='Value'>𝕨𝕩</span></code>.</p>
<p>Bird enthusiast Conor Hoekstra now claims what he originally mistook for a &quot;<a href="https://nitter.net/code_report/status/1440208242529882112">Golden Eagle</a>&quot; is in fact a Pheasant. Announced in that <a href="https://github.com/codereport/Content/blob/main/Publications/Combinatory_Logic_and_Combinators_in_Array_Languages.pdf">paper</a> mentioned at the top, the new identification is based on Haskell Curry's use of <code><span class='Value'>Φ₁</span></code> for the combinator in a <a href="https://www.jstor.org/stable/1968422">1931 paper</a>.</p>