From ae513293cca5fb30dd59874e4e00c0eecab596f6 Mon Sep 17 00:00:00 2001 From: razetime Date: Thu, 20 Jan 2022 08:31:40 +0530 Subject: fix more h2 errors, generate index for repl help --- help/after_bind.md | 2 +- help/before_bind.md | 2 +- help/fold.md | 4 ++- help/genhelp.bqn | 19 ++++++++++++ help/groupindices_group.md | 2 +- help/identity_left.md | 2 +- help/identity_right.md | 2 +- help/index.md | 70 +++++++++++++++++++++++++++++++++++++++++++ help/insert.md | 32 ++++++++++++++++++++ help/scan.md | 2 +- help/transpose_reorderaxes.md | 2 +- help/valences.md | 2 +- 12 files changed, 132 insertions(+), 9 deletions(-) create mode 100755 help/genhelp.bqn create mode 100644 help/index.md create mode 100644 help/insert.md (limited to 'help') diff --git a/help/after_bind.md b/help/after_bind.md index 5163d4f9..a0c15279 100644 --- a/help/after_bind.md +++ b/help/after_bind.md @@ -6,7 +6,7 @@ Supply `π•˜` as a right argument to `𝔽` (`𝕩 𝔽 π•˜`). -## `π•˜` must be a value, `F` must be dyadic. +`π•˜` must be a value, `F` must be dyadic. -⟜3 9 diff --git a/help/before_bind.md b/help/before_bind.md index 290e8fe9..c2d0acd5 100644 --- a/help/before_bind.md +++ b/help/before_bind.md @@ -6,7 +6,7 @@ Supply `𝕗` as a left argument to `𝔾` (`𝕗 𝔾 𝕩`). -## `𝕗` must be a value, `𝔾` must be dyadic. +`𝕗` must be a value, `𝔾` must be dyadic. 3⊸- 9 diff --git a/help/fold.md b/help/fold.md index 3684d96c..33b2e0f5 100644 --- a/help/fold.md +++ b/help/fold.md @@ -5,7 +5,9 @@ ## `𝔽´ 𝕩`: Fold Fold over `𝕩` with `𝔽` from right to left i.e. Insert `𝔽` between the elements of `𝕩`. - + +`𝕩` must be a simple list (`1 = =𝕩`). + +Β΄ 1β€Ώ2β€Ώ3 1+2+3 diff --git a/help/genhelp.bqn b/help/genhelp.bqn new file mode 100755 index 00000000..cf50c939 --- /dev/null +++ b/help/genhelp.bqn @@ -0,0 +1,19 @@ +#!/usr/bin/env cbqn + +thing ← { + data ← β€’FLines 𝕩 + names ← (⊣∾", "∾⊒)Β΄{(¬·∧`' '⊸=)⊸/⌾⌽(2+βŠ‘/':'=𝕩)↓𝕩}Β¨("## "≑3βŠΈβ†‘)¨⊸/data + tβ€Ώd ← ∾/Β¨(⊏data)=Β¨"()" + sym ← "`"∾˜"`"∾{'`':"` ` `"; '|':"\"βˆΎπ•© ; 𝕩}Β―3βŠ‘2βŠ‘data + β€’Show "| " ∾ sym ∾ " | [" ∾ names ∾ "]("∾((t+1)↓dβ†‘βŠ‘data)∾ ") |" +}Β¨β€’args + +head ← ⟨ +"*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).*" +⟨⟩ +"# REPL Help" +⟨⟩ +"| Symbol | Link |" +"|--------|------|" +⟩ +"index.md.tmp" β€’FLines head ∾ thing #rename once you have a proper file. \ No newline at end of file diff --git a/help/groupindices_group.md b/help/groupindices_group.md index ee0e9762..5afa162b 100644 --- a/help/groupindices_group.md +++ b/help/groupindices_group.md @@ -6,7 +6,7 @@ Group the indices of the major cells of `𝕩` by their respective values. -## `𝕩` must consist of integers. Groups start from 0. +`𝕩` must consist of integers. Groups start from 0. βŠ” 4β€Ώ5β€Ώ6β€Ώ6β€Ώ4β€Ώ7β€Ώ5 diff --git a/help/identity_left.md b/help/identity_left.md index dabe6cc7..3a61225b 100644 --- a/help/identity_left.md +++ b/help/identity_left.md @@ -2,7 +2,7 @@ # Left Tack (`⊣`) -## `⊣ 𝕩`: +## `⊣ 𝕩`: Identity Return `𝕩`. diff --git a/help/identity_right.md b/help/identity_right.md index a0844a8f..da81bf11 100644 --- a/help/identity_right.md +++ b/help/identity_right.md @@ -2,7 +2,7 @@ # Right Tack (`⊒`) -## `⊒ 𝕩`: +## `⊒ 𝕩`: Identity Return `𝕩`. diff --git a/help/index.md b/help/index.md new file mode 100644 index 00000000..8a0f2c1b --- /dev/null +++ b/help/index.md @@ -0,0 +1,70 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/index.html).* + +# REPL Help + +| Symbol | Link | +|--------|------| +| `\|` | [Absolute Value, Modulus](https://mlochbaum.github.io/BQN/help/absolutevalue_modulus.html) | +| `⟜` | [Bind, After, Dyadic After](https://mlochbaum.github.io/BQN/help/after_bind.html) | +| `!` | [Assert, Dyad](https://mlochbaum.github.io/BQN/help/assert_assertwithmessage.html) | +| `∘` | [Atop, Dyadic Atop](https://mlochbaum.github.io/BQN/help/atop.html) | +| `⊸` | [Bind Left, Before, Dyadic Before](https://mlochbaum.github.io/BQN/help/before_bind.html) | +| `⎊` | [Catch](https://mlochbaum.github.io/BQN/help/catch.html) | +| `⌈` | [Ceiling, Maximum](https://mlochbaum.github.io/BQN/help/ceiling_maximum.html) | +| `˘` | [Cells](https://mlochbaum.github.io/BQN/help/cells.html) | +| `β—Ά` | [Choose](https://mlochbaum.github.io/BQN/help/choose.html) | +| `⊐` | [Classify, Index Of](https://mlochbaum.github.io/BQN/help/classify_indexof.html) | +| `+` | [Conjugate, Add](https://mlochbaum.github.io/BQN/help/conjugate_add.html) | +| `Λ™` | [Constant](https://mlochbaum.github.io/BQN/help/constant.html) | +| `⍷` | [Deduplicate, Find](https://mlochbaum.github.io/BQN/help/deduplicate_find.html) | +| `≑` | [Depth, Match](https://mlochbaum.github.io/BQN/help/depth_match.html) | +| `βš‡` | [Depth](https://mlochbaum.github.io/BQN/help/depth.html) | +| `β₯Š` | [Deshape, Reshape](https://mlochbaum.github.io/BQN/help/deshape_reshape.html) | +| `Β¨` | [Each](https://mlochbaum.github.io/BQN/help/each.html) | +| `<` | [Enclose, Lesser Than](https://mlochbaum.github.io/BQN/help/enclose_lessthan.html) | +| `β‹ˆ` | [Enlist, Pair](https://mlochbaum.github.io/BQN/help/enlist_pair.html) | +| `⋆` | [Exponential, Power](https://mlochbaum.github.io/BQN/help/exponential_power.html) | +| `⊏` | [First Cell, Select](https://mlochbaum.github.io/BQN/help/firstcell_select.html) | +| `βŠ‘` | [First, Pick](https://mlochbaum.github.io/BQN/help/first_pick.html) | +| `⌊` | [Floor, Minimum](https://mlochbaum.github.io/BQN/help/floor_minimum.html) | +| `Β΄` | [Fold, Fold With initial](https://mlochbaum.github.io/BQN/help/fold.html) | +| `⍒` | [Grade Down, Bins Down](https://mlochbaum.github.io/BQN/help/gradedown_binsdown.html) | +| `⍋` | [Grade Up, Bins Up](https://mlochbaum.github.io/BQN/help/gradeup_binsup.html) | +| `β‰₯` | [Greater Than or Equal To](https://mlochbaum.github.io/BQN/help/greaterthanorequalto.html) | +| `βŠ”` | [Group Indices, Group](https://mlochbaum.github.io/BQN/help/groupindices_group.html) | +| `⊣` | [Identity, Left](https://mlochbaum.github.io/BQN/help/identity_left.html) | +| `⊒` | [Identity, Right](https://mlochbaum.github.io/BQN/help/identity_right.html) | +| `/` | [Indices, Replicate](https://mlochbaum.github.io/BQN/help/indices_replicate.html) | +| `˝` | [Insert, Insert With initial](https://mlochbaum.github.io/BQN/help/insert.html) | +| `∾` | [Join, Join](https://mlochbaum.github.io/BQN/help/join_jointo.html) | +| `β‰ ` | [Length, Not Equal To](https://mlochbaum.github.io/BQN/help/length_notequals.html) | +| `≀` | [Lesser Than or Equal To](https://mlochbaum.github.io/BQN/help/lessthanorequalto.html) | +| `∊` | [Unique Mask, Member Of](https://mlochbaum.github.io/BQN/help/markfirst_memberof.html) | +| `>` | [Merge, Greater Than](https://mlochbaum.github.io/BQN/help/merge_greaterthan.html) | +| `-` | [Negate, Subtract](https://mlochbaum.github.io/BQN/help/negate_subtract.html) | +| `Β¬` | [Logical Not, Span](https://mlochbaum.github.io/BQN/help/not_span.html) | +| `βŠ’` | [Occurrence Count, Progressive Index Of](https://mlochbaum.github.io/BQN/help/occurrencecount_progressiveindexof.html) | +| `β—‹` | [Atop, Over](https://mlochbaum.github.io/BQN/help/over.html) | +| `↑` | [Prefixes, Take](https://mlochbaum.github.io/BQN/help/prefixes_take.html) | +| `↕` | [Range, Windows](https://mlochbaum.github.io/BQN/help/range_windows.html) | +| `=` | [Rank, Equal To](https://mlochbaum.github.io/BQN/help/rank_equals.html) | +| `βŽ‰` | [Rank](https://mlochbaum.github.io/BQN/help/rank.html) | +| `Γ·` | [Reciprocal, Divide](https://mlochbaum.github.io/BQN/help/reciprocal_divide.html) | +| `⍟` | [Repeat](https://mlochbaum.github.io/BQN/help/repeat.html) | +| `⌽` | [Reverse, Dyad](https://mlochbaum.github.io/BQN/help/reverse_rotate.html) | +| `` ` `` | [Scan, Scan With initial](https://mlochbaum.github.io/BQN/help/scan.html) | +| `˜` | [Self, Swap](https://mlochbaum.github.io/BQN/help/self_swap.html) | +| `β‰’` | [Shape, Not Match](https://mlochbaum.github.io/BQN/help/shape_notmatch.html) | +| `Β»` | [Shift After, Shift After](https://mlochbaum.github.io/BQN/help/shiftafter.html) | +| `Β«` | [Shift Before, Shift Before](https://mlochbaum.github.io/BQN/help/shiftbefore.html) | +| `Γ—` | [Sign, Multiply](https://mlochbaum.github.io/BQN/help/sign_multiply.html) | +| `≍` | [Solo, Couple](https://mlochbaum.github.io/BQN/help/solo_couple.html) | +| `∨` | [Sort Down, Logical Or](https://mlochbaum.github.io/BQN/help/sortdown_or.html) | +| `∧` | [Sort Up, Logical And](https://mlochbaum.github.io/BQN/help/sortup_and.html) | +| `√` | [Square root, Root](https://mlochbaum.github.io/BQN/help/squareroot_root.html) | +| `↓` | [Suffixes, Drop](https://mlochbaum.github.io/BQN/help/suffixes_drop.html) | +| `⌜` | [Each](https://mlochbaum.github.io/BQN/help/table.html) | +| `⍉` | [Transpose, Reorder Axes](https://mlochbaum.github.io/BQN/help/transpose_reorderaxes.html) | +| `⌾` | [Under](https://mlochbaum.github.io/BQN/help/under.html) | +| `⁼` | [Undo](https://mlochbaum.github.io/BQN/help/undo.html) | +| `⊘` | [Valences, Dyadic Valences](https://mlochbaum.github.io/BQN/help/valences.html) | diff --git a/help/insert.md b/help/insert.md new file mode 100644 index 00000000..79642d39 --- /dev/null +++ b/help/insert.md @@ -0,0 +1,32 @@ +*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/help/insert.html).* + +# Acute Accent (`˝`) + +## `𝔽˝ 𝕩`: Insert + +Fold over `𝕩` with `𝔽` from right to left i.e. Insert `𝔽` between the major cells of `𝕩`. + + a ← 3β€Ώ3 β₯Š ↕9 + + +˝ a + + 0β€Ώ1β€Ώ2 + 3β€Ώ4β€Ώ5 + 6β€Ώ7β€Ώ8 + + +## `𝕨 𝔽˝ 𝕩`: Insert With initial + +Monadic insert, but use `𝕨` as initial right argument. + +If + + a ← 3β€Ώ3 β₯Š ↕9 + + 1β€Ώ1β€Ώ1 +˝ a + + 1 +˝ a + + 0β€Ώ1β€Ώ2 + 3β€Ώ4β€Ώ5 + 6β€Ώ7β€Ώ8 + 1β€Ώ1β€Ώ1 + + + + diff --git a/help/scan.md b/help/scan.md index c2e92f67..1847de86 100644 --- a/help/scan.md +++ b/help/scan.md @@ -2,7 +2,7 @@ # Grave (`` ` ``) -## ``𝔽` 𝕩``: Fold +## ``𝔽` 𝕩``: Scan Scan over `𝕩` with `𝔽` from left to right, producing intermediate values. diff --git a/help/transpose_reorderaxes.md b/help/transpose_reorderaxes.md index 244fc444..72060ce2 100644 --- a/help/transpose_reorderaxes.md +++ b/help/transpose_reorderaxes.md @@ -16,7 +16,7 @@ Move the first axis of `𝕩` to the end. -## `𝕨 ⍉ 𝕩`: Dyad +## `𝕨 ⍉ 𝕩`: Reorder Axes Rearrange the axes of `𝕩` as per the axis indices in `𝕨`. diff --git a/help/valences.md b/help/valences.md index d7ef83b8..e9ac866e 100644 --- a/help/valences.md +++ b/help/valences.md @@ -12,7 +12,7 @@ Apply `𝔽` to `𝕩`. -## `𝕨 π”½βŠ˜π”Ύ 𝕩`: Valences +## `𝕨 π”½βŠ˜π”Ύ 𝕩`: Dyadic Valences Apply `𝔾` to `𝕨` and `𝕩`. -- cgit v1.2.3