From 9bccc26a0c3231d7cc9adc37c1a850ef44fd436a Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Thu, 24 Sep 2020 11:00:52 -0400 Subject: Add breadcrumbs to generated html --- docs/doc/based.html | 2 +- docs/doc/block.html | 2 +- docs/doc/context.html | 2 +- docs/doc/couple.html | 2 +- docs/doc/depth.html | 2 +- docs/doc/extensions.html | 2 +- docs/doc/fromDyalog.html | 2 +- docs/doc/functional.html | 2 +- docs/doc/glossary.html | 2 +- docs/doc/group.html | 2 +- docs/doc/index.html | 2 +- docs/doc/indices.html | 2 +- docs/doc/join.html | 2 +- docs/doc/leading.html | 2 +- docs/doc/logic.html | 2 +- docs/doc/prefixes.html | 2 +- docs/doc/primitive.html | 2 +- docs/doc/shift.html | 2 +- docs/doc/syntax.html | 2 +- docs/doc/transpose.html | 2 +- docs/doc/types.html | 2 +- docs/doc/windows.html | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) (limited to 'docs/doc') diff --git a/docs/doc/based.html b/docs/doc/based.html index 68407f38..2389481b 100644 --- a/docs/doc/based.html +++ b/docs/doc/based.html @@ -3,7 +3,7 @@ BQN: Based array theory - +

Based array theory

"Like a normal programming language"

This page explains how BQN's array model (christened "based" in 1981) differs from the models used by existing APL dialects, and why the choice was made to discard APL's "everything is an array" dictum. If you're not wondering what the difference is, and don't think everything should be an array, then you can probably just read about BQN's type system instead.

diff --git a/docs/doc/block.html b/docs/doc/block.html index 8c7a7770..5aae039f 100644 --- a/docs/doc/block.html +++ b/docs/doc/block.html @@ -3,7 +3,7 @@ BQN: Blocks - +

Blocks

In BQN, a block is any piece of code surrounded with curly braces {}. Blocks can be used simply to group statements, or can define functions or modifiers. They are the sole large-scale structure used to organize programs.

Blocks are most commonly used to define functions by including one of the special names for arguments, 𝕨 or 𝕩. With the operands 𝔽 or 𝔾, they can also define 1-modifiers or 2-modifiers.

diff --git a/docs/doc/context.html b/docs/doc/context.html index ba87f85c..a46a4659 100644 --- a/docs/doc/context.html +++ b/docs/doc/context.html @@ -3,7 +3,7 @@ BQN's context-free grammar - +

BQN's context-free grammar

APL has a problem. To illustrate, let's look at an APL expression:

a b c d e
diff --git a/docs/doc/couple.html b/docs/doc/couple.html
index ee145b54..69f85bab 100644
--- a/docs/doc/couple.html
+++ b/docs/doc/couple.html
@@ -3,7 +3,7 @@
   
   BQN: Couple and Merge
 
-
+
 

Couple and Merge

Solo/Couple () and Merge (>) 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 23:

↗️
     p  35×3
diff --git a/docs/doc/depth.html b/docs/doc/depth.html
index a80cf4c9..d67ce4ed 100644
--- a/docs/doc/depth.html
+++ b/docs/doc/depth.html
@@ -3,7 +3,7 @@
   
   BQN: Depth
 
-
+
 

Depth

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 an atom. The monadic function Depth () returns the depth of its argument, while the 2-modifier Depth () 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.

The Depth function

diff --git a/docs/doc/extensions.html b/docs/doc/extensions.html index e3244153..e781194f 100644 --- a/docs/doc/extensions.html +++ b/docs/doc/extensions.html @@ -3,7 +3,7 @@ BQN extensions - +

BQN extensions

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.

Complex numbers

diff --git a/docs/doc/fromDyalog.html b/docs/doc/fromDyalog.html index be98d6ce..96320db6 100644 --- a/docs/doc/fromDyalog.html +++ b/docs/doc/fromDyalog.html @@ -3,7 +3,7 @@ BQN–Dyalog APL dictionary - +

BQN–Dyalog APL dictionary

A few tables to help users of Dyalog APL (or similar) get started quickly on BQN. Here we assume ML is 1 for Dyalog.

Terminology

diff --git a/docs/doc/functional.html b/docs/doc/functional.html index 04205144..a2902fa1 100644 --- a/docs/doc/functional.html +++ b/docs/doc/functional.html @@ -3,7 +3,7 @@ BQN: Functional programming - +

Functional programming

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?

First, let's be clear about what the terms we're using mean. A language has first-class functions when functions (however they are defined) can be used in all the same ways as "ordinary" 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.

diff --git a/docs/doc/glossary.html b/docs/doc/glossary.html index f6f2cc30..f8d2ded0 100644 --- a/docs/doc/glossary.html +++ b/docs/doc/glossary.html @@ -3,7 +3,7 @@ BQN glossary - +

BQN glossary

Below are short, and sometimes vague, definitions of terms used to describe BQN code.

Types

diff --git a/docs/doc/group.html b/docs/doc/group.html index be2192b2..9b74f0f6 100644 --- a/docs/doc/group.html +++ b/docs/doc/group.html @@ -3,7 +3,7 @@ BQN: Group - +

Group

BQN replaces the Key operator from J or Dyalog APL, and many forms of partitioning, with a single (ambivalent) Group function . This function is somewhat related to the K function = of the same name, but results in an array rather than a dictionary.

Definition

diff --git a/docs/doc/index.html b/docs/doc/index.html index 8668bba6..f578e4fc 100644 --- a/docs/doc/index.html +++ b/docs/doc/index.html @@ -3,7 +3,7 @@ BQN documentation - +

BQN documentation

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 specification, the documentation is much less complete. The following pages are present now:

Overview:

diff --git a/docs/doc/indices.html b/docs/doc/indices.html index 2fa56e29..b50cd571 100644 --- a/docs/doc/indices.html +++ b/docs/doc/indices.html @@ -3,7 +3,7 @@ BQN: Indices - +

Indices

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 (atomic) indices, which can refer to list elements or array major cells (or more generally indexing along any particular axis). When using atomic indices to select elements, the indexed array has to be a list. In contrast, elements of any array can be indicated by list indices with length equal to that array's rank. Only two BQN primitives use these list indices: Range (), which returns an array of them if given a list argument, and Pick (), where the depth-1 components of an array left argument are list indices.

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. 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.

diff --git a/docs/doc/join.html b/docs/doc/join.html index 312a1f95..aa2637dd 100644 --- a/docs/doc/join.html +++ b/docs/doc/join.html @@ -3,7 +3,7 @@ BQN: Join - +

Join

Join () is an extension of the monadic function Raze 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 (>) does to Couple (): ab is >ab and ab is ab. 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.

Join can be used to combine several strings into a single string, like array.join() in Javascript (but it doesn't force the result to be a string).

diff --git a/docs/doc/leading.html b/docs/doc/leading.html index b2f2cda6..b96c2d9a 100644 --- a/docs/doc/leading.html +++ b/docs/doc/leading.html @@ -3,7 +3,7 @@ BQN: The leading axis convention - +

The leading axis convention

Several primitive functions manipulate the right argument, or sometimes both arguments, along one or more axes. According to the leading axis model, 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.

Monadic functions

diff --git a/docs/doc/logic.html b/docs/doc/logic.html index e19e4e92..0ede46e7 100644 --- a/docs/doc/logic.html +++ b/docs/doc/logic.html @@ -3,7 +3,7 @@ BQN: Logic functions: And, Or, Not (also Span) - +

Logic functions: And, Or, Not (also Span)

BQN retains the APL symbols and for logical and and or, and changed APL's ~ to ¬ for not, since ~ looks too much like ˜ and ¬ is more common in mathematics today. Like J, BQN extends Not to the linear function 1-. However, it discards GCD and LCM as extensions of And and Or, and instead uses bilinear extensions: And is identical to Times (×), while Or is ׬, following De Morgan's laws (other ways of obtaining a function for Or give an equivalent result—there is only one bilinear extension).

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 A occurs with probability a and B with probability b independent of A, then A or B occurs with probability ab). 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.

diff --git a/docs/doc/prefixes.html b/docs/doc/prefixes.html index 34b52fc7..9aa3dd20 100644 --- a/docs/doc/prefixes.html +++ b/docs/doc/prefixes.html @@ -3,7 +3,7 @@ BQN: Prefixes and Suffixes - +

Prefixes and Suffixes

The Prefixes () function gives a list of all prefixes of its argument array along the first axis, and Suffixes () 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.

↗️
     "abcde"
diff --git a/docs/doc/primitive.html b/docs/doc/primitive.html
index bca3ee06..4ce6a7c4 100644
--- a/docs/doc/primitive.html
+++ b/docs/doc/primitive.html
@@ -3,7 +3,7 @@
   
   BQN primitives
 
-
+
 

BQN primitives

Primitives are functions and modifiers that are built into the language.

Functions

diff --git a/docs/doc/shift.html b/docs/doc/shift.html index c9d84e1e..f96661d1 100644 --- a/docs/doc/shift.html +++ b/docs/doc/shift.html @@ -3,7 +3,7 @@ BQN: Shift functions - +

Shift functions

The shift functions « and » are two new primitives added to BQN based on a pattern used heavily in the compiler and a reasonable amount everywhere else. Shifts resemble but are more general than the bit-based shift operations used in low-level languages. They replace the APL pattern of a 2-wise reduction after appending or prepending an element (APL's 2≠/0,v translates to »v), one of the more common uses of 2-wise reduction.

The result of a shift function always has the same shape as its right argument. The function adds major cells to the beginning (») or end («) of 𝕩, moving the cells already in 𝕩 to accomodate them. Some cells on the opposite side from those added will "fall off" and not be included in the result.

diff --git a/docs/doc/syntax.html b/docs/doc/syntax.html index 5fc5ff3a..427f05c9 100644 --- a/docs/doc/syntax.html +++ b/docs/doc/syntax.html @@ -3,7 +3,7 @@ BQN: Syntax overview - +

Syntax overview

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.

Special glyphs

diff --git a/docs/doc/transpose.html b/docs/doc/transpose.html index 96371227..b7ecac6d 100644 --- a/docs/doc/transpose.html +++ b/docs/doc/transpose.html @@ -3,7 +3,7 @@ BQN: Transpose - +

Transpose

As in APL, Transpose () 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.

Monadic Transpose

diff --git a/docs/doc/types.html b/docs/doc/types.html index bf9a9c9e..258f026f 100644 --- a/docs/doc/types.html +++ b/docs/doc/types.html @@ -3,7 +3,7 @@ BQN: Types - +

Types

BQN supports the following fundamental types:

    diff --git a/docs/doc/windows.html b/docs/doc/windows.html index 7a446b90..f2310333 100644 --- a/docs/doc/windows.html +++ b/docs/doc/windows.html @@ -3,7 +3,7 @@ BQN: Windows - +

    Windows

    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.

    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.

    -- cgit v1.2.3