aboutsummaryrefslogtreecommitdiff
path: root/docs/doc
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:35:02 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:35:02 -0400
commit4b9b761cc990f9247083ea28a32d9123bb752818 (patch)
tree9e491c67662f8378ba39c8da90b6ae6a6783d596 /docs/doc
parentc63290ae05990f54619207ac6ee0b3fbf6f9c145 (diff)
Add a main repository link to html files and titles to spec files
Diffstat (limited to 'docs/doc')
-rw-r--r--docs/doc/context.html1
-rw-r--r--docs/doc/depth.html1
-rw-r--r--docs/doc/fromDyalog.html1
-rw-r--r--docs/doc/functional.html1
-rw-r--r--docs/doc/group.html1
-rw-r--r--docs/doc/index.html1
-rw-r--r--docs/doc/indices.html1
-rw-r--r--docs/doc/join.html1
-rw-r--r--docs/doc/logic.html1
-rw-r--r--docs/doc/transpose.html1
-rw-r--r--docs/doc/windows.html1
11 files changed, 11 insertions, 0 deletions
diff --git a/docs/doc/context.html b/docs/doc/context.html
index f511c1ef..90963840 100644
--- a/docs/doc/context.html
+++ b/docs/doc/context.html
@@ -1,4 +1,5 @@
<head><link href="../style.css" rel="stylesheet"/></head>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqn-s-context-free-grammar">BQN's context-free grammar</h1>
<p>APL has a problem. To illustrate, let's look at an APL expression:</p>
<pre><span class='Value'>a</span> <span class='Value'>b</span> <span class='Value'>c</span> <span class='Value'>d</span> <span class='Value'>e</span>
diff --git a/docs/doc/depth.html b/docs/doc/depth.html
index ea3ad9c7..92e05dd3 100644
--- a/docs/doc/depth.html
+++ b/docs/doc/depth.html
@@ -1,4 +1,5 @@
<head><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>
<h2 id="the-depth-function">The Depth function</h2>
diff --git a/docs/doc/fromDyalog.html b/docs/doc/fromDyalog.html
index 723b832b..70bdb134 100644
--- a/docs/doc/fromDyalog.html
+++ b/docs/doc/fromDyalog.html
@@ -1,4 +1,5 @@
<head><link href="../style.css" rel="stylesheet"/></head>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="bqn-dyalog-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>
<h2 id="for-reading">For reading</h2>
diff --git a/docs/doc/functional.html b/docs/doc/functional.html
index bc1b7c73..7e208167 100644
--- a/docs/doc/functional.html
+++ b/docs/doc/functional.html
@@ -1,4 +1,5 @@
<head><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>
<p>First, let's be clear about what the terms we're using mean. A language has <em>first-class functions</em> when functions (however they are defined) can be used in all the same ways as &quot;ordinary&quot; values like numbers and so on, such as being passed as an argument or placed in a list. Lisp and JavaScript have first-class functions, C has unsafe first-class functions via function pointers, and Java and APL don't have them as functions can't be placed in lists or used as arguments. This doesn't mean every operation is supported on functions: for instance, numbers can be added, compared, and sorted; while functions could perhaps be added to give a train, comparing or sorting them as functions (not representations) isn't computable, and BQN doesn't support any of the three operations when passing functions as arguments.</p>
diff --git a/docs/doc/group.html b/docs/doc/group.html
index 4f3a6b62..8a562285 100644
--- a/docs/doc/group.html
+++ b/docs/doc/group.html
@@ -1,4 +1,5 @@
<head><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>
<p>The BQN prototype does not implement this function: instead it uses <code><span class='Function'>⊔</span></code> for a Group/Key function very similar to <code><span class='Brace'>{</span><span class='Value'>⊂⍵</span><span class='Brace'>}</span><span class='Value'>⌸</span></code> in Dyalog APL, and also has a Cut function <code><span class='Value'>\</span></code>. The new BQN Group on numeric arguments (equivalently, rank-1 results) can be defined like this:</p>
diff --git a/docs/doc/index.html b/docs/doc/index.html
index a822c0a9..2e873e3c 100644
--- a/docs/doc/index.html
+++ b/docs/doc/index.html
@@ -1,4 +1,5 @@
<head><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>
<p>Concepts:</p>
diff --git a/docs/doc/indices.html b/docs/doc/indices.html
index 68651b13..5366bdb6 100644
--- a/docs/doc/indices.html
+++ b/docs/doc/indices.html
@@ -1,4 +1,5 @@
<head><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>
<p>The following functions take or return indices. Except where marked, the indices are in the result; this is by far the most common type of index use. <code><span class='Function'>⊔</span></code> is given two rows as it falls into both cases. Note that in the result case, there is usually no possibility for the programmer to select the format of indices. Instead, the language should be carefully designed to make sure that the kind of index returned is as useful as possible.</p>
diff --git a/docs/doc/join.html b/docs/doc/join.html
index 4df484c4..b6ac1ace 100644
--- a/docs/doc/join.html
+++ b/docs/doc/join.html
@@ -1,4 +1,5 @@
<head><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 Merge (<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>
<p>Join can be used to combine several strings into a single string, like <code><span class='Value'>array.join</span><span class='Paren'>()</span></code> in Javascript (but it doesn't force the result to be a string).</p>
diff --git a/docs/doc/logic.html b/docs/doc/logic.html
index 2235259a..7ac951d8 100644
--- a/docs/doc/logic.html
+++ b/docs/doc/logic.html
@@ -1,4 +1,5 @@
<head><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>
<p>If the arguments are probabilities of independent events, then an extended function gives the probability of the boolean function on their outcomes (for example, if <em>A</em> occurs with probability <code><span class='Value'>a</span></code> and <em>B</em> with probability <code><span class='Value'>b</span></code> independent of <em>A</em>, then <em>A</em> or <em>B</em> occurs with probability <code><span class='Value'>a</span><span class='Function'>∨</span><span class='Value'>b</span></code>). These extensions have also been used in complexity theory, because they allow mathematicians to transfer a logical circuit from the discrete to the continuous domain in order to use calculus on it.</p>
diff --git a/docs/doc/transpose.html b/docs/doc/transpose.html
index 43b51b48..51e8b91a 100644
--- a/docs/doc/transpose.html
+++ b/docs/doc/transpose.html
@@ -1,4 +1,5 @@
<head><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>
<h2 id="monadic-transpose">Monadic Transpose</h2>
diff --git a/docs/doc/windows.html b/docs/doc/windows.html
index fa2202dc..79d18e77 100644
--- a/docs/doc/windows.html
+++ b/docs/doc/windows.html
@@ -1,4 +1,5 @@
<head><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>
<p>The Window function replaces APL's Windowed Reduction, J's more general Infix operator, and Dyalog's Stencil, which is adapted from one case of J's Cut operator.</p>