aboutsummaryrefslogtreecommitdiff
path: root/docs/doc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/doc')
-rw-r--r--docs/doc/context.html5
-rw-r--r--docs/doc/couple.html5
-rw-r--r--docs/doc/depth.html5
-rw-r--r--docs/doc/extensions.html5
-rw-r--r--docs/doc/fromDyalog.html5
-rw-r--r--docs/doc/functional.html5
-rw-r--r--docs/doc/group.html5
-rw-r--r--docs/doc/index.html5
-rw-r--r--docs/doc/indices.html5
-rw-r--r--docs/doc/join.html5
-rw-r--r--docs/doc/leading.html5
-rw-r--r--docs/doc/logic.html5
-rw-r--r--docs/doc/prefixes.html5
-rw-r--r--docs/doc/primitive.html5
-rw-r--r--docs/doc/syntax.html5
-rw-r--r--docs/doc/transpose.html5
-rw-r--r--docs/doc/types.html5
-rw-r--r--docs/doc/windows.html5
18 files changed, 72 insertions, 18 deletions
diff --git a/docs/doc/context.html b/docs/doc/context.html
index 8d108e5f..1c7f5c11 100644
--- a/docs/doc/context.html
+++ b/docs/doc/context.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqns-context-free-grammar">BQN's context-free grammar</h1>
<p>APL has a problem. To illustrate, let's look at an APL expression:</p>
diff --git a/docs/doc/couple.html b/docs/doc/couple.html
index 7f017325..4756be2c 100644
--- a/docs/doc/couple.html
+++ b/docs/doc/couple.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="couple-and-merge">Couple and Merge</h1>
<p>Solo/Couple (<code><span class='Function'>≍</span></code>) and Merge (<code><span class='Function'>&gt;</span></code>) are functions that create a higher-rank array from lower-rank components. Each takes some number of inner arrays organized in an outer structure, and creates a single array combining all elements of those inner arrays. For example, let's couple two arrays of shape <code><span class='Number'>2</span><span class='Ligature'>‿</span><span class='Number'>3</span></code>:</p>
diff --git a/docs/doc/depth.html b/docs/doc/depth.html
index e7f8f143..8c293d9a 100644
--- a/docs/doc/depth.html
+++ b/docs/doc/depth.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="depth">Depth</h1>
<p>The depth of an array is the greatest level of array nesting it attains, or, put another way, the greatest number of times you can pick an element starting from the original array before reaching a non-array. The monadic function Depth (<code><span class='Function'>≡</span></code>) returns the depth of its argument, while the 2-modifier Depth (<code><span class='Modifier2'>⚇</span></code>) can control the way its left operand is applied based on the depth of its arguments. Several primitive functions also use the depth of the left argument to decide whether it applies to a single axis of the right argument or to several axes.</p>
diff --git a/docs/doc/extensions.html b/docs/doc/extensions.html
index 69406354..32deff8a 100644
--- a/docs/doc/extensions.html
+++ b/docs/doc/extensions.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqn-extensions">BQN extensions</h1>
<p>This page describes features that are not part of the core BQN specification, but may be specified in the future. If specified, these features would be optional, so that an implementation could choose to support them or not.</p>
diff --git a/docs/doc/fromDyalog.html b/docs/doc/fromDyalog.html
index f2d3f85b..d464572b 100644
--- a/docs/doc/fromDyalog.html
+++ b/docs/doc/fromDyalog.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqndyalog-apl-dictionary">BQN–Dyalog APL dictionary</h1>
<p>A few tables to help users of Dyalog APL (or similar) get started quickly on BQN. Here we assume <code><span class='Value'>⎕</span><span class='Function'>ML</span></code> is 1 for Dyalog.</p>
diff --git a/docs/doc/functional.html b/docs/doc/functional.html
index 7e208167..942fcc41 100644
--- a/docs/doc/functional.html
+++ b/docs/doc/functional.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="functional-programming">Functional programming</h1>
<p>BQN boasts of its functional capabilities, including first-class functions. What sort of functional support does it have, and how can a BQN programmer exercise these and out themself as a Schemer at heart?</p>
diff --git a/docs/doc/group.html b/docs/doc/group.html
index 5c622052..a14065b1 100644
--- a/docs/doc/group.html
+++ b/docs/doc/group.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="group">Group</h1>
<p>BQN replaces the <a href="https://aplwiki.com/wiki/Key">Key</a> operator from J or Dyalog APL, and <a href="https://aplwiki.com/wiki/Partition_representations">many forms of partitioning</a>, with a single (ambivalent) Group function <code><span class='Function'>⊔</span></code>. This function is somewhat related to the K function <code><span class='Function'>=</span></code> of the same name, but results in an array rather than a dictionary.</p>
diff --git a/docs/doc/index.html b/docs/doc/index.html
index 758a9696..56f21c0d 100644
--- a/docs/doc/index.html
+++ b/docs/doc/index.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqn-documentation">BQN documentation</h1>
<p>Here is the documentation for BQN, describing what features BQN has, how to use them (with examples), and why they were chosen. As it is considerably more in-depth than the <a href="../spec/index.html">specification</a>, the documentation is much less complete. The following pages are present now:</p>
diff --git a/docs/doc/indices.html b/docs/doc/indices.html
index 5366bdb6..8502faa8 100644
--- a/docs/doc/indices.html
+++ b/docs/doc/indices.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="indices">Indices</h1>
<p>One-dimensional arrays such as K lists or Python arrays have only one kind of index, a single number that refers to an element. For multidimensional arrays using the leading axis theory, there are several types of indexing that can be useful. Historically, nested APL designs have equivocated between these, which I believe can lead to subtle errors when programming. BQN focuses on single-number (depth 0) indices, which can refer to list elements or array major cells (or more generally indexing along any particular axis). When using this kind of element index, indexed arrays are required to be lists. Only two functions allow the use of list element indices: Range (<code><span class='Function'>↕</span></code>), which can accept a list argument, and Pick (<code><span class='Function'>⊑</span></code>), which uses the depth-1 arrays in its left argument as index scalars or lists. Others use single-number indices to refer to cells.</p>
diff --git a/docs/doc/join.html b/docs/doc/join.html
index ae600d17..1ad4450c 100644
--- a/docs/doc/join.html
+++ b/docs/doc/join.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="join">Join</h1>
<p>Join (<code><span class='Function'>∾</span></code>) is an extension of the monadic function <a href="https://aplwiki.com/wiki/Raze">Raze</a> from A+ and J to arbitrary argument ranks. It has the same relationship to Join to, the dyadic function sharing the same glyph, as <a href="couple.html">Merge</a> (<code><span class='Function'>&gt;</span></code>) does to Couple (<code><span class='Function'>≍</span></code>): <code><span class='Value'>a</span><span class='Function'>≍</span><span class='Value'>b</span></code> is <code><span class='Function'>&gt;</span><span class='Value'>a</span><span class='Ligature'>‿</span><span class='Value'>b</span></code> and <code><span class='Value'>a</span><span class='Function'>∾</span><span class='Value'>b</span></code> is <code><span class='Function'>∾</span><span class='Value'>a</span><span class='Ligature'>‿</span><span class='Value'>b</span></code>. While Merge and Couple combine arrays (the elements of Merge's argument, or the arguments themselves for Couple) along a new leading axis, Join and Join to combine them along the existing leading axis. Both Merge and Join can also be called on a higher-rank array, causing Merge to add multiple leading axes while Join combines elements along multiple existing axes.</p>
diff --git a/docs/doc/leading.html b/docs/doc/leading.html
index 92200f77..32a38724 100644
--- a/docs/doc/leading.html
+++ b/docs/doc/leading.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="the-leading-axis-convention">The leading axis convention</h1>
<p>Several primitive functions manipulate the right argument, or sometimes both arguments, along one or more axes. According to the <a href="https://aplwiki.com/wiki/Leading_axis_theory">leading axis model</a>, it's best to make the primitives operate on initial axes, because the Rank modifier then allows it to apply to later axes as well. Here we'll see how this pattern works in BQN.</p>
diff --git a/docs/doc/logic.html b/docs/doc/logic.html
index 020a3cdd..f3b4e203 100644
--- a/docs/doc/logic.html
+++ b/docs/doc/logic.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="logic-functions-and-or-not-also-span">Logic functions: And, Or, Not (also Span)</h1>
<p>BQN retains the APL symbols <code><span class='Function'>∧</span></code> and <code><span class='Function'>∨</span></code> for logical <em>and</em> and <em>or</em>, and changed APL's <code><span class='Value'>~</span></code> to <code><span class='Function'>¬</span></code> for <em>not</em>, since <code><span class='Value'>~</span></code> looks too much like <code><span class='Modifier'>˜</span></code> and <code><span class='Function'>¬</span></code> is more common in mathematics today. Like J, BQN extends Not to the linear function <code><span class='Number'>1</span><span class='Modifier2'>⊸</span><span class='Function'>-</span></code>. However, it discards <a href="https://aplwiki.com/wiki/GCD">GCD</a> and <a href="https://aplwiki.com/wiki/LCM">LCM</a> as extensions of And and Or, and instead uses bilinear extensions: And is identical to Times (<code><span class='Function'>×</span></code>), while Or is <code><span class='Function'>×</span><span class='Modifier2'>⌾</span><span class='Function'>¬</span></code>, following De Morgan's laws (other ways of obtaining a function for Or give an equivalent result—there is only one bilinear extension).</p>
diff --git a/docs/doc/prefixes.html b/docs/doc/prefixes.html
index cf9759f6..29c3b9cd 100644
--- a/docs/doc/prefixes.html
+++ b/docs/doc/prefixes.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="prefixes-and-suffixes">Prefixes and Suffixes</h1>
<p>The Prefixes (<code><span class='Function'>↑</span></code>) function gives a list of all prefixes of its argument array along the <a href="leading.html">first axis</a>, and Suffixes (<code><span class='Function'>↓</span></code>) gives a similar list for suffixes. Because the result can be much larger than the argument, these functions may not be used often in high-performance code, but they are a powerful conceptual tool and can make sense for algorithms that are inherently quadratic.</p>
diff --git a/docs/doc/primitive.html b/docs/doc/primitive.html
index a245632e..797df0a7 100644
--- a/docs/doc/primitive.html
+++ b/docs/doc/primitive.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqn-primitives">BQN primitives</h1>
<p><em>Primitives</em> are functions and modifiers that are built into the language.</p>
diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html
index d1cb06ac..a87eef7a 100644
--- a/docs/doc/syntax.html
+++ b/docs/doc/syntax.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="syntax-overview">Syntax overview</h1>
<p>BQN syntax consists of expressions where computation is done with a little organizing structure around them like assignment, functions, and list notation. Expressions are where the programmer is in control so the design tries to do as much as possible with them before introducing special syntax.</p>
diff --git a/docs/doc/transpose.html b/docs/doc/transpose.html
index a69f1991..c888989e 100644
--- a/docs/doc/transpose.html
+++ b/docs/doc/transpose.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="transpose">Transpose</h1>
<p>As in APL, Transpose (<code><span class='Function'>⍉</span></code>) is a tool for rearranging the axes of an array. BQN's version is tweaked to align better with the leading axis model and make common operations easier.</p>
diff --git a/docs/doc/types.html b/docs/doc/types.html
index 465b20d8..841c8359 100644
--- a/docs/doc/types.html
+++ b/docs/doc/types.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="types">Types</h1>
<p>BQN supports the following fundamental types:</p>
diff --git a/docs/doc/windows.html b/docs/doc/windows.html
index 41923fa6..4831bd28 100644
--- a/docs/doc/windows.html
+++ b/docs/doc/windows.html
@@ -1,4 +1,7 @@
-<head><link href="../style.css" rel="stylesheet"/></head>
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+</head>
<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="windows">Windows</h1>
<p>In BQN, it's strongly preferred to use functions, and not modifiers, for array manipulation. Functions are simpler as they have fewer moving parts. They are more concrete, since the array results can always be viewed right away. They are easier to implement with reasonable performance as well, since there is no need to recognize many possible function operands as special cases.</p>