aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/birds.html
blob: 09f70f8425fa56bdf639de4955159692476200fb (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
<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>Some people consider it reasonable to name <a href="primitive.html#modifiers">combinators</a> after types of birds. <a href="https://blog.lahteenmaki.net/combinator-birds.html">Here's</a> one compendium of such names, and <a href="https://wiki.xxiivv.com/site/ornithodex.html">another</a> that lacks its obsessive completeness but makes up for it with rambling accounts of imagined forests. 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='Function'>S</span><span class='String'>'</span></code></td>
<td>Golden Eagle</td>
<td><code><span class='Value'>Ê</span></code>-like: <code><span class='Value'>labcde.a</span><span class='Paren'>(</span><span class='Value'>bde</span><span class='Paren'>)(</span><span class='Value'>cde</span><span class='Paren'>)</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>The name &quot;Golden Eagle&quot; is a <a href="https://nitter.net/code_report/status/1440208242529882112#m">fever dream</a> of bird enthusiast Conor Hoekstra, who saw it emerge disordered from the Bald Eagle when arguments <code><span class='Value'>fg</span></code> are set equal to <code><span class='Value'>cd</span></code>.</p>