From afa17dfda2fb4fcc74e58236b2bf86f9ba6c50a4 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Sat, 22 Aug 2020 14:15:28 -0400 Subject: Add favicon --- docs/doc/context.html | 5 ++++- docs/doc/couple.html | 5 ++++- docs/doc/depth.html | 5 ++++- docs/doc/extensions.html | 5 ++++- docs/doc/fromDyalog.html | 5 ++++- docs/doc/functional.html | 5 ++++- docs/doc/group.html | 5 ++++- docs/doc/index.html | 5 ++++- docs/doc/indices.html | 5 ++++- docs/doc/join.html | 5 ++++- docs/doc/leading.html | 5 ++++- docs/doc/logic.html | 5 ++++- docs/doc/prefixes.html | 5 ++++- docs/doc/primitive.html | 5 ++++- docs/doc/syntax.html | 5 ++++- docs/doc/transpose.html | 5 ++++- docs/doc/types.html | 5 ++++- docs/doc/windows.html | 5 ++++- docs/favicon.ico | Bin 0 -> 32038 bytes docs/implementation/codfns.html | 5 ++++- docs/index.html | 5 ++++- docs/problems.html | 5 ++++- docs/running.html | 5 ++++- docs/spec/evaluate.html | 5 ++++- docs/spec/grammar.html | 5 ++++- docs/spec/index.html | 5 ++++- docs/spec/literal.html | 5 ++++- docs/spec/scope.html | 5 ++++- docs/spec/token.html | 5 ++++- docs/spec/types.html | 5 ++++- md.bqn | 12 +++++++++--- 31 files changed, 125 insertions(+), 32 deletions(-) create mode 100644 docs/favicon.ico 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 @@ - + + + +

BQN's context-free grammar

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

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 @@ - + + + +

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:

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 @@ - + + + +

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 a non-array. 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.

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 @@ - + + + +

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.

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 @@ - + + + +

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.

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 @@ - + + + +

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?

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 @@ - + + + +

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.

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 @@ - + + + +

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:

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 @@ - + + + +

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 (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 (), which can accept a list argument, and Pick (), which uses the depth-1 arrays in its left argument as index scalars or lists. Others use single-number indices to refer to cells.

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 @@ - + + + +

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.

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 @@ - + + + +

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.

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 @@ - + + + +

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

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 @@ - + + + +

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.

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 @@ - + + + +

BQN primitives

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

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 @@ - + + + +

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.

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 @@ - + + + +

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.

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 @@ - + + + +

Types

BQN supports the following fundamental types:

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 @@ - + + + +

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.

diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 00000000..50863834 Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/implementation/codfns.html b/docs/implementation/codfns.html index 275a33c5..ee92de65 100644 --- a/docs/implementation/codfns.html +++ b/docs/implementation/codfns.html @@ -1,4 +1,7 @@ - + + + +

Co-dfns versus BQN's implementation

The BQN self-hosted compiler is directly inspired by the Co-dfns project, a compiler for a subset of Dyalog APL. I'm very grateful to Aaron for showing that array-oriented compilation is even possible! In addition to the obvious difference of target language, BQN differs from Co-dfns both in goals and methods.

diff --git a/docs/index.html b/docs/index.html index f2cd1608..bfb8c1d4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,7 @@ - + + + +

BQN: finally, an APL for your flying saucer

Try it online below or here, and see running.md for more options.

diff --git a/docs/problems.html b/docs/problems.html index a15a0e17..fd00dc66 100644 --- a/docs/problems.html +++ b/docs/problems.html @@ -1,4 +1,7 @@ - + + + +

Problems with BQN

Every language has some issues that everyone can agree make programming harder. Sometimes there is a simple solution that has not yet been discovered; sometimes the problem is inherent to the language because it's caused by fundamental choices (or anywhere in between). Below are problems I have identified in BQN, ordered from what I consider the most severe to the least. This is independent of whether the issue can be solved—if it somehow went away, how much better would the language be?

diff --git a/docs/running.html b/docs/running.html index ca02f587..f96c6959 100644 --- a/docs/running.html +++ b/docs/running.html @@ -1,4 +1,7 @@ - + + + +

How to run BQN

BQN is in an early stage of development, and no implementation is complete yet. However, it's a relatively simple language to implement, and a few implementations come close. At the moment, dzaima/BQN is the most usable version, with good performance and error reporting.

diff --git a/docs/spec/evaluate.html b/docs/spec/evaluate.html index 38fecd93..132473e6 100644 --- a/docs/spec/evaluate.html +++ b/docs/spec/evaluate.html @@ -1,4 +1,7 @@ - + + + +

Specification: BQN evaluation

This page describes the semantics of the code constructs whose grammar is given in grammar.md. The formation rules there are not named, and here they are identified by either the name of the term or by copying the rule entirely if there are several alternative productions.

diff --git a/docs/spec/grammar.html b/docs/spec/grammar.html index f6bf3810..3042b762 100644 --- a/docs/spec/grammar.html +++ b/docs/spec/grammar.html @@ -1,4 +1,7 @@ - + + + +

Specification: BQN grammar

BQN's grammar is given below. Terms are defined in a BNF variant. However, handling special names properly is possible but difficult in BNF, so they are explained in text along with the braced block grammar.

diff --git a/docs/spec/index.html b/docs/spec/index.html index 44308925..46c71938 100644 --- a/docs/spec/index.html +++ b/docs/spec/index.html @@ -1,4 +1,7 @@ - + + + +

BQN specification

This directory gives a (currently incomplete) specification for BQN. The specification differs from the documentation in that its purpose is only to describe the exact details of BQN's operation in the most quickly accessible way, rather than to explain the core ideas of BQN functionality and how it might be used. Since it is easier to specify than to document, the specification is currently more complete than the documentation; for example, it includes nearly all primitives.

diff --git a/docs/spec/literal.html b/docs/spec/literal.html index 928e64fc..bef2a1ec 100644 --- a/docs/spec/literal.html +++ b/docs/spec/literal.html @@ -1,4 +1,7 @@ - + + + +

Specification: BQN literal notation

A literal is a single token that indicates a fixed character, number, or array. While literals indicate values of a data type, primitives indicate values of an operation type: function, 1-modifier, or 2-modifier.

diff --git a/docs/spec/scope.html b/docs/spec/scope.html index 22a05d0e..6e67de02 100644 --- a/docs/spec/scope.html +++ b/docs/spec/scope.html @@ -1,4 +1,7 @@ - + + + +

Specification: BQN variable scoping

BQN uses lexical scoping for variables, where scopes correspond roughly to blocks, or pairs of curly braces separated by semicolons. At the top level in a scope, new variables are visible only after they are defined, but in the scopes it contains, all variables defined in that scope are visible. This system is specified more precisely below.

diff --git a/docs/spec/token.html b/docs/spec/token.html index 3fcfbe6d..34ecbcd8 100644 --- a/docs/spec/token.html +++ b/docs/spec/token.html @@ -1,4 +1,7 @@ - + + + +

Specification: BQN token formation

This page describes BQN's token formation rules (token formation is also called scanning). Most tokens in BQN are a single character long, but quoted characters and strings, identifiers, and numbers can consist of multiple characters, and comments, spaces, and tabs are discarded during token formation.

diff --git a/docs/spec/types.html b/docs/spec/types.html index d3f71050..3a505fad 100644 --- a/docs/spec/types.html +++ b/docs/spec/types.html @@ -1,4 +1,7 @@ - + + + +

Specification: BQN types

BQN programs manipulate data of six types:

diff --git a/md.bqn b/md.bqn index 67e00d12..e5e28254 100644 --- a/md.bqn +++ b/md.bqn @@ -609,6 +609,12 @@ Fmt ← { ################################ # Creating HTML files -Head ← ""∾lf˜ -nav ← "
BQN
"∾lf -ConvertFile ← Head ∾ nav ∾ Markdown⟜(•LNS •path∾⊢) +RplcQuote ← {'"'¨⌾(('''=𝕩)⊸/)𝕩} +Head ← { + p ← (+´'/'=𝕩) ⥊∘/⟜≍ "../" + L ← {∾⟨""⟩} + links ← ⟨"shortcut icon' type='image/x-icon"L"favicon.ico","stylesheet"L"style.css"⟩ + "head"Html lf∾JoinLines " "⊸∾¨links +} +nav ← "div class=""nav"""Html"a href=""https://github.com/mlochbaum/BQN"""Html"BQN" +ConvertFile ← (RplcQuote Head ∾○(∾⟜lf) nav˜) ∾ Markdown⟜(•LNS •path∾⊢) -- cgit v1.2.3