diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-17 07:18:22 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-07-17 07:18:22 -0400 |
| commit | 5c4a7106dc47e2e1849eddf4d87fb0e107461d74 (patch) | |
| tree | 89c21dffbaeee21ab1701b9c58bdb405b832dc14 | |
| parent | e8b8e378d3fb3da0c492759ac74803b2fa417651 (diff) | |
Now I remember why I named it doc/ instead of docs/
| -rw-r--r-- | README.md | 20 | ||||
| -rw-r--r-- | doc/context.md (renamed from docsrc/context.md) | 0 | ||||
| -rw-r--r-- | doc/depth.md (renamed from docsrc/depth.md) | 0 | ||||
| -rw-r--r-- | doc/functional.md (renamed from docsrc/functional.md) | 0 | ||||
| -rwxr-xr-x | doc/gen (renamed from docsrc/gen) | 0 | ||||
| -rw-r--r-- | doc/group.md (renamed from docsrc/group.md) | 0 | ||||
| -rw-r--r-- | doc/indices.md (renamed from docsrc/indices.md) | 0 | ||||
| -rw-r--r-- | doc/join.md (renamed from docsrc/join.md) | 0 | ||||
| -rw-r--r-- | doc/logic.md (renamed from docsrc/logic.md) | 0 | ||||
| -rw-r--r-- | doc/md.bqn (renamed from docsrc/md.bqn) | 0 | ||||
| -rw-r--r-- | doc/transpose.md (renamed from docsrc/transpose.md) | 0 | ||||
| -rw-r--r-- | doc/windows.md (renamed from docsrc/windows.md) | 0 | ||||
| -rw-r--r-- | problems.md | 8 | ||||
| -rw-r--r-- | running.md | 2 |
14 files changed, 15 insertions, 15 deletions
@@ -16,8 +16,8 @@ It incorporates concepts developed over years of APL practice: But BQN is redesigned from the ground up, with brand new ideas to make these paradigms easier to use and less likely to fail. * The **based array model** makes non-arrays a fundamental part of the language, and removes the surprise of floating arrays and the hassle of explicit boxes. New **array notation** eliminates the gotchas of [stranding](https://aplwiki.com/wiki/Strand_notation). -* A [**context-free grammar**](docsrc/context.md) where a value's syntactic role is determined by its spelling makes it easier for machines and humans to understand code. -* Oh, and it naturally leads to [**first-class functions**](docsrc/functional.md), a feature often missed in APL. +* A [**context-free grammar**](doc/context.md) where a value's syntactic role is determined by its spelling makes it easier for machines and humans to understand code. +* Oh, and it naturally leads to [**first-class functions**](doc/functional.md), a feature often missed in APL. * The **new symbols** for built-in functionality allow the syntactic role of a primitive to be distinguished at a glance, and aim to be more consistent and intuitive. ## What kind of name is "BQN"? @@ -98,9 +98,9 @@ Functions that have significant differences from APL functions are marked with a | `√` | [Square Root](https://aplwiki.com/wiki/Square_Root) | [Root](https://aplwiki.com/wiki/Root) | `⌊` | [Floor](https://aplwiki.com/wiki/Floor) | [Minimum](https://aplwiki.com/wiki/Minimum) | `⌈` | [Ceiling](https://aplwiki.com/wiki/Ceiling) | [Maximum](https://aplwiki.com/wiki/Maximum) -| `∧` | Sort Up | [And](docsrc/logic.md)* -| `∨` | Sort Down | [Or](docsrc/logic.md)* -| `¬` | [Not](docsrc/logic.md)* | [Span](docsrc/logic.md)* +| `∧` | Sort Up | [And](doc/logic.md)* +| `∨` | Sort Down | [Or](doc/logic.md)* +| `¬` | [Not](doc/logic.md)* | [Span](doc/logic.md)* | `\|` | [Absolute Value](https://aplwiki.com/wiki/Magnitude)| [Modulus](https://aplwiki.com/wiki/Residue) | `≤` | | [Less Than or Equal to](https://aplwiki.com/wiki/Less_than_or_Equal_to) | `<` | [Box](https://aplwiki.com/wiki/Enclose) | [Less Than](https://aplwiki.com/wiki/Less_than) @@ -108,18 +108,18 @@ Functions that have significant differences from APL functions are marked with a | `≥` | | [Greater Than or Equal to](https://aplwiki.com/wiki/Greater_than_or_Equal_to) | `=` | | [Equals](https://aplwiki.com/wiki/Equal_to) | `≠` | [Length](https://aplwiki.com/wiki/Tally) | [Not Equals](https://aplwiki.com/wiki/Not_Equal_to) -| `≡` | [Depth](docsrc/depth.md)* | [Match](https://aplwiki.com/wiki/Match) +| `≡` | [Depth](doc/depth.md)* | [Match](https://aplwiki.com/wiki/Match) | `≢` | [Shape](https://aplwiki.com/wiki/Shape) | [Not Match](https://aplwiki.com/wiki/Not_Match) | `⊣` | [Identity](https://aplwiki.com/wiki/Identity) | [Left](https://aplwiki.com/wiki/Identity) | `⊢` | [Identity](https://aplwiki.com/wiki/Identity) | [Right](https://aplwiki.com/wiki/Identity) | `⥊` | [Deshape](https://aplwiki.com/wiki/Ravel) | [Reshape](https://aplwiki.com/wiki/Reshape) -| `∾` | [Join](docsrc/join.md)* | [Join to](https://aplwiki.com/wiki/Catenate) +| `∾` | [Join](doc/join.md)* | [Join to](https://aplwiki.com/wiki/Catenate) | `≍` | Solo* | Couple* | `↑` | Prefixes* | [Take](https://aplwiki.com/wiki/Take) | `↓` | Suffixes* | [Drop](https://aplwiki.com/wiki/Drop) -| `↕` | [Range](https://aplwiki.com/wiki/Index_Generator) | [Windows](docsrc/windows.md)* +| `↕` | [Range](https://aplwiki.com/wiki/Index_Generator) | [Windows](doc/windows.md)* | `⌽` | [Reverse](https://aplwiki.com/wiki/Reverse) | [Rotate](https://aplwiki.com/wiki/Rotate) -| `⍉` | [Transpose](docsrc/transpose.md)* | [Reorder axes](docsrc/transpose.md)* +| `⍉` | [Transpose](doc/transpose.md)* | [Reorder axes](doc/transpose.md)* | `/` | [Indices](https://aplwiki.com/wiki/Indices) | [Replicate](https://aplwiki.com/wiki/Replicate) | `⍋` | [Grade Up](https://aplwiki.com/wiki/Grade) | [Bins Up](https://aplwiki.com/wiki/Interval_Index) | `⍒` | [Grade Down](https://aplwiki.com/wiki/Grade) | [Bins Down](https://aplwiki.com/wiki/Interval_Index) @@ -129,7 +129,7 @@ Functions that have significant differences from APL functions are marked with a | `⊒` | Occurrence Count* | Progressive Index of* | `∊` | [Unique Mask](https://aplwiki.com/wiki/Nub_Sieve) | [Member of](https://aplwiki.com/wiki/Membership) | `⍷` | [Deduplicate](https://aplwiki.com/wiki/Unique) | [Find](https://aplwiki.com/wiki/Find) -| `⊔` | [Group Indices](docsrc/group.md)* | [Group](docsrc/group.md)* +| `⊔` | [Group Indices](doc/group.md)* | [Group](doc/group.md)* ### Modifiers and compositions diff --git a/docsrc/context.md b/doc/context.md index fcd51bde..fcd51bde 100644 --- a/docsrc/context.md +++ b/doc/context.md diff --git a/docsrc/depth.md b/doc/depth.md index 2bb369ef..2bb369ef 100644 --- a/docsrc/depth.md +++ b/doc/depth.md diff --git a/docsrc/functional.md b/doc/functional.md index edc20c5f..edc20c5f 100644 --- a/docsrc/functional.md +++ b/doc/functional.md diff --git a/docsrc/group.md b/doc/group.md index b561cd7d..b561cd7d 100644 --- a/docsrc/group.md +++ b/doc/group.md diff --git a/docsrc/indices.md b/doc/indices.md index 382f7f80..382f7f80 100644 --- a/docsrc/indices.md +++ b/doc/indices.md diff --git a/docsrc/join.md b/doc/join.md index cb940699..cb940699 100644 --- a/docsrc/join.md +++ b/doc/join.md diff --git a/docsrc/logic.md b/doc/logic.md index 0e38fb1d..0e38fb1d 100644 --- a/docsrc/logic.md +++ b/doc/logic.md diff --git a/docsrc/md.bqn b/doc/md.bqn index acb264ba..acb264ba 100644 --- a/docsrc/md.bqn +++ b/doc/md.bqn diff --git a/docsrc/transpose.md b/doc/transpose.md index 006f0de6..006f0de6 100644 --- a/docsrc/transpose.md +++ b/doc/transpose.md diff --git a/docsrc/windows.md b/doc/windows.md index d4165d62..d4165d62 100644 --- a/docsrc/windows.md +++ b/doc/windows.md diff --git a/problems.md b/problems.md index ec14e93b..3722b4b9 100644 --- a/problems.md +++ b/problems.md @@ -99,7 +99,7 @@ You have to scan for headers or double-struck names (and so does a compiler). A This is a natural array operation to do, and results in an array with a joinable structure, but as Prefixes and Suffixes are monadic there's no way to specify the number of axes to use. ### And/Or/Max/Min are all tangled up -Boolean And (`∧`) and Or (`∨`) are identical to Min (`⌊`) and Max (`⌈`) when restricted to Boolean arguments, and this would fit nicely with their monadic role as sorting functions: for example `a∧b ←→ ⊑∧a‿b`. Furthermore the pairing of Min with Floor and Max with Ceiling is mnemonic only and not especially natural. The reason I have not used these glyphs for Min and Max, and have instead extended them to the somewhat superfluous [arithmetic logical functions](docsrc/logical.md) is that Min and Max have different [identity elements](https://aplwiki.com/wiki/Identity_element) of `∞` and `¯∞` rather than `1` and `0`. Having to code around empty arrays when using `∧´` would be a fairly big issue. +Boolean And (`∧`) and Or (`∨`) are identical to Min (`⌊`) and Max (`⌈`) when restricted to Boolean arguments, and this would fit nicely with their monadic role as sorting functions: for example `a∧b ←→ ⊑∧a‿b`. Furthermore the pairing of Min with Floor and Max with Ceiling is mnemonic only and not especially natural. The reason I have not used these glyphs for Min and Max, and have instead extended them to the somewhat superfluous [arithmetic logical functions](doc/logical.md) is that Min and Max have different [identity elements](https://aplwiki.com/wiki/Identity_element) of `∞` and `¯∞` rather than `1` and `0`. Having to code around empty arrays when using `∧´` would be a fairly big issue. The other drawback of Min (`∧`) and Max (`∨`) is that the symbols are counterintuitive, but I have found a way to remember them: consider the graph of variables `a←x` and `b←¬x` for x from 0 to 1: two crossed lines. Now the graph of `a∧b` is a caret shape and `a∨b` is a vee. @@ -107,7 +107,7 @@ The other drawback of Min (`∧`) and Max (`∨`) is that the symbols are counte When taking Windows along more than one axis, acting on the resulting array requires the Rank operator, duplicating either the right argument rank or (negated) left argument length. A nested Windows would only require Each. ### Group doesn't include trailing empty groups -But there are workarounds, described in [its documentation](docsrc/group.md). dzaima has suggested allowing a single extra element in the index argument to specify the result shape. Another possibility is for the result prototype to be specified to allow overtaking. +But there are workarounds, described in [its documentation](doc/group.md). dzaima has suggested allowing a single extra element in the index argument to specify the result shape. Another possibility is for the result prototype to be specified to allow overtaking. ### Scan ordering is weird Scan moves along the array so that it uses results as left arguments, which is opposite to the usual right-to-left order of evaluation. But I think this is still better than scanning the array in reverse. You can always use Swap on the operand, or recover the APL scan ordering by doing a Reduce-Each on Prefixes. @@ -146,10 +146,10 @@ This was an issue with using functions as control flow. For example, when loopin Fixed with multiple bodies: if there are two bodies with no headers such as `{2×𝕩;𝕨-𝕩}`, they are the monadic and dyadic case. ### How to choose a partitioning function? -Fixed with [Group](docsrc/group.md), which I found May 2020. Group serves as a much improved [Partition](https://aplwiki.com/wiki/Partition). However, it doesn't partition along multiple axes, so a dedicated partition function that does this could also be wanted. Or could Group be made to work with multiple axes as well as multidimensional indices? +Fixed with [Group](doc/group.md), which I found May 2020. Group serves as a much improved [Partition](https://aplwiki.com/wiki/Partition). However, it doesn't partition along multiple axes, so a dedicated partition function that does this could also be wanted. Or could Group be made to work with multiple axes as well as multidimensional indices? ### Key doesn't do what you want -Fixed with [Group](docsrc/group.md) to my satisfaction, except for the trailing-empty-group problem. There were various issues with Key operators in J and Dyalog, such as the fact that the ordering and presence of groups depends on where and whether the keys appear. Also, Dyalog's Key can return keys and values, but they are in a different format than the input: an array of pairs instead of two arrays. Monadic Group returns indices, which can be used how the programmer wants. +Fixed with [Group](doc/group.md) to my satisfaction, except for the trailing-empty-group problem. There were various issues with Key operators in J and Dyalog, such as the fact that the ordering and presence of groups depends on where and whether the keys appear. Also, Dyalog's Key can return keys and values, but they are in a different format than the input: an array of pairs instead of two arrays. Monadic Group returns indices, which can be used how the programmer wants. ### Greek letter issues Fixed by not using Greek letters. In particular, the idea of using fancy Latin letters as fixed names for function arguments was suggested in proto-BQN sessions, possibly by Nathan Rogers. @@ -4,7 +4,7 @@ BQN is in a very early stage of development, and there is currently no complete ### BQN2NGN -[BQN2NGN](https://github.com/mlochbaum/BQN2NGN) is a prototype implementation in Javascript build to experiment with the langauge, which is now abandoned. Because you can [use it online](https://mlochbaum.github.io/BQN2NGN/web/index.html), this is probably the quickest way to get started with BQN. It has good primitive support, with the main issues being that it uses a J-style insert instead of BQN-style vector reduction, that it has a different version of [Group](docsrc/group.md) (`⊔`), and that it is missing Choose (`◶`). There are also some spelling differences, with Deduplicate (`⍷`) spelled with `∪` and Valences (`⊘`) spelled with `⍠`. It is missing value blocks and function headers. +[BQN2NGN](https://github.com/mlochbaum/BQN2NGN) is a prototype implementation in Javascript build to experiment with the langauge, which is now abandoned. Because you can [use it online](https://mlochbaum.github.io/BQN2NGN/web/index.html), this is probably the quickest way to get started with BQN. It has good primitive support, with the main issues being that it uses a J-style insert instead of BQN-style vector reduction, that it has a different version of [Group](doc/group.md) (`⊔`), and that it is missing Choose (`◶`). There are also some spelling differences, with Deduplicate (`⍷`) spelled with `∪` and Valences (`⊘`) spelled with `⍠`. It is missing value blocks and function headers. For automated testing I run BQN2NGN using the `bqn` executable, which is just a symlink to `apl.js` in the BQN2NGN repository. It requires Node to run. |
