Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEV.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Rank tries `whole` before `each_pair`. `whole`, in order:
4. `pervasive_cells`: a pervasive primitive under nested Rank;
5. monadic operand: `cell_rule`, which also takes folds, atops and a bound left argument.

- `primitive_cells` runs a primitive on the whole argument along the cells' axes. A form that `extends` runs whole at a cell rank at least its own. Other forms follow the `cells` fact (`CellRule`) in their `Primitive::info()` row: `⊖ , ↑ ↓ ⌷ #` and rotate-first call their axis forms; `⍉` sends each cell's axes after the frame's; `≢`, `ρ` give constants; a reshape keeping a cell's items in order is a view; `⊂` encloses each cell of rank 1 or more via its axis form, whose cells are views of the argument's items. Any other form with a left argument every cell shares takes `paired_cells`.
- `primitive_cells` runs a primitive on the whole argument along the cells' axes. A form that `extends` runs whole at a cell rank at least its own. Other forms follow the `cells` fact (`CellRule`) in their `Primitive::info()` row: `, ↑ ↓ ⌷ #` call their axis forms; `⍉` sends each cell's axes after the frame's; `≢`, `ρ` give constants; a reshape keeping a cell's items in order is a view; `⊂` encloses each cell of rank 1 or more via its axis form, whose cells are views of the argument's items. Any other form with a left argument every cell shares takes `paired_cells`. `⌽₀` selects each cell's first axis through the shared Axis route.
- `paired_cells`: joins each pair of cells for `,` and `⍪`; calls a form that extends once where both cells are at least its ranks; first repeats an argument every cell shares over the frame (`agreement::spread`).
- `padded_call`, `paired_cells` leave an argument with a named frame axis to the per-cell path, which pairs frames by name (`named_frame`). Names on cell axes pair in whole calls as per-cell calls pair them.
- A pervasive primitive folds or scans a simple array along the cell's axis (`folded_cells`); `f/∘,` folds all cell axes at once. An atop applies its inner function's rule, then Rank for its outer function.
Expand Down
4 changes: 2 additions & 2 deletions editors/jetbrains/BPL.tmbundle/Syntaxes/bpl.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"name": "string.quoted.single.bpl"
},
{
"match": "(?:_\\d+|_\\S|_|[^\\s\\p{Cc}0-9←⎕•αω⍶⍹∇⍢⍝◇⁝\\?¯∞⍬\\+\\-×÷⌈⌊\\|\\*⊛○π√!∧∨⊼⊽\\~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⊖⍉⊤⊥⍎⍕⌷⌹\\#↕⍭⨸⌻⍸⍷⊢⊣¿¨ᵇ⍨↣⍤∘⍠⍥↢\\.⊗⌸⍣⇄⊘@∂⍚⌺/⌿\\\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\\(\\)\\[\\]\\{\\}'\";\\$_ₑⱼᵣ])+",
"match": "(?:_\\d+|_\\S|_|[^\\s\\p{Cc}0-9←⎕•αω⍶⍹∇⍢⍝◇⁝\\?¯∞⍬\\+\\-×÷⌈⌊\\|\\*⊛○π√!∧∨⊼⊽\\~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⍉⊤⊥⍎⍕⌷⌹\\#↕⍭⨸⌻⍸⍷⊢⊣¿¨ᵇ⍨↣⍤∘⍠⍥↢\\.⊗⌸⍣⇄⊘@∂⍚⌺/⌿\\\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\\(\\)\\[\\]\\{\\}'\";\\$_ₑⱼᵣ])+",
"name": "variable.other.bpl"
},
{
Expand Down Expand Up @@ -86,7 +86,7 @@
}
},
{
"match": "[\\+\\-×÷⌈⌊\\|\\*⊛○π√!∧∨⊼⊽\\~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⊖⍉⊤⊥⍎⍕⌷⌹\\#↕⍭⨸⌻⍸⍷⊢⊣¿]",
"match": "[\\+\\-×÷⌈⌊\\|\\*⊛○π√!∧∨⊼⊽\\~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⍉⊤⊥⍎⍕⌷⌹\\#↕⍭⨸⌻⍸⍷⊢⊣¿]",
"name": "support.function.bpl"
},
{
Expand Down
4 changes: 2 additions & 2 deletions editors/jetbrains/BPL.tmbundle/Syntaxes/hpl.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"applyEndPatternLast": true
},
{
"match": "(?:_\\d+|_\\S|_|[^\\s\\p{Cc}0-9←是⎕出入•系α甲ω乙⍶丙⍹丁∇递遞⍢循⍝注◇句⁝隔\\?若¯负負∞永⍬空\\+加\\-减減×乘号號÷除⌈上⌊下\\|绝余絕餘\\*幂冪⊛对對○圆圓π周√根!阶拣階揀∧极且極∨析或⊼方否⊽双莫雙\\~非无無=等≠别初別<小≤限退>大≥达进達進ι位↦至:键卸鍵ρ形≢数异數異≡同深,连連⍪接矩⊂包⊃选合選⊆巢段∊属展屬∪并独併獨∩交重⍋升⍒降↑取↓去拆⌽转轉⊖纵縱⍉翻⊤编編⊥译譯⍎行⍕文⌷索⌹解逆\\#复複↕窗⍭素⨸因⌻零值⍸处间處間⍷寻群尋⊢右⊣左¿掷抽擲¨遍ᵇ按⍨己换換↣先⍤秩∘承⍠轴軸⍥经經↢后後\\.内內⊗表⌸组組⍣次止⇄优優⊘兼@于於∂导梯導⍚择擇⌺邻鄰/总總⌿汇匯\\\\累⍀续續⁻反⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\\(\\)\\[\\]\\{\\}'\";\\$_ₑⱼᵣ])+",
"match": "(?:_\\d+|_\\S|_|[^\\s\\p{Cc}0-9←是⎕出入•系α甲ω乙⍶丙⍹丁∇递遞⍢循⍝注◇句⁝隔\\?若¯负負∞永⍬空\\+加\\-减減×乘号號÷除⌈上⌊下\\|绝余絕餘\\*幂冪⊛对對○圆圓π周√根!阶拣階揀∧极且極∨析或⊼方否⊽双莫雙\\~非无無=等≠别初別<小≤限退>大≥达进達進ι位↦至:键卸鍵ρ形≢数异數異≡同深,连連⍪接矩⊂包⊃选合選⊆巢段∊属展屬∪并独併獨∩交重⍋升⍒降↑取↓去拆⌽转轉⍉翻⊤编編⊥译譯⍎行⍕文⌷索⌹解逆\\#复複↕窗⍭素⨸因⌻零值⍸处间處間⍷寻群尋⊢右⊣左¿掷抽擲¨遍ᵇ按⍨己换換↣先⍤秩∘承⍠轴軸⍥经經↢后後\\.内內⊗表⌸组組⍣次止⇄优優⊘兼@于於∂导梯導⍚择擇⌺邻鄰/总總⌿汇匯\\\\累⍀续續⁻反⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\\(\\)\\[\\]\\{\\}'\";\\$_ₑⱼᵣ])+",
"name": "variable.other.bpl"
},
{
Expand All @@ -35,7 +35,7 @@
"name": "constant.numeric.bpl"
},
{
"match": "[加减減乘号號除上下绝余絕餘幂冪对對圆圓周根阶拣階揀极且極析或方否双莫雙非无無等别初別小限退大达进達進位至键卸鍵形数异數異同深连連接矩包选合選巢段属展屬并独併獨交重升降取去拆转轉纵縱翻编編译譯行文索解逆复複窗素因零值处间處間寻群尋右左掷抽擲]",
"match": "[加减減乘号號除上下绝余絕餘幂冪对對圆圓周根阶拣階揀极且極析或方否双莫雙非无無等别初別小限退大达进達進位至键卸鍵形数异數異同深连連接矩包选合選巢段属展屬并独併獨交重升降取去拆转轉翻编編译譯行文索解逆复複窗素因零值处间處間寻群尋右左掷抽擲]",
"name": "support.function.bpl"
},
{
Expand Down
15 changes: 0 additions & 15 deletions editors/jetbrains/BPL.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,6 @@
<option name="OTHER" value="true" />
</context>
</template>
<template name="circle-bar" value="⊖" description="⊖" shortcut="TAB">
<context>
<option name="OTHER" value="true" />
</context>
</template>
<template name="circle-diaeresis" value="⍥" description="⍥" shortcut="TAB">
<context>
<option name="OTHER" value="true" />
Expand Down Expand Up @@ -964,11 +959,6 @@
<option name="OTHER" value="true" />
</context>
</template>
<template name="reverse-first" value="⊖" description="⊖" shortcut="TAB">
<context>
<option name="OTHER" value="true" />
</context>
</template>
<template name="rho" value="ρ" description="ρ" shortcut="TAB">
<context>
<option name="OTHER" value="true" />
Expand Down Expand Up @@ -1034,11 +1024,6 @@
<option name="OTHER" value="true" />
</context>
</template>
<template name="rotate-first" value="⊖" description="⊖" shortcut="TAB">
<context>
<option name="OTHER" value="true" />
</context>
</template>
<template name="runs" value="#" description="#" shortcut="TAB">
<context>
<option name="OTHER" value="true" />
Expand Down
4 changes: 2 additions & 2 deletions editors/vim/syntax/bpl.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ if exists('b:current_syntax')
finish
endif

syntax match bplName /\v%(_\d+|_\S|_|[^\s\x00-\x1f\x7f-\x9f0-9←⎕•αω⍶⍹∇⍢⍝◇⁝\?¯∞⍬\+\-×÷⌈⌊\|\*⊛○π√!∧∨⊼⊽\~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⊖⍉⊤⊥⍎⍕⌷⌹\#↕⍭⨸⌻⍸⍷⊢⊣¿¨ᵇ⍨↣⍤∘⍠⍥↢\.⊗⌸⍣⇄⊘@∂⍚⌺\/⌿\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\(\)\[\]\{\}'";\$_ₑⱼᵣ])+/
syntax match bplName /\v%(_\d+|_\S|_|[^\s\x00-\x1f\x7f-\x9f0-9←⎕•αω⍶⍹∇⍢⍝◇⁝\?¯∞⍬\+\-×÷⌈⌊\|\*⊛○π√!∧∨⊼⊽\~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⍉⊤⊥⍎⍕⌷⌹\#↕⍭⨸⌻⍸⍷⊢⊣¿¨ᵇ⍨↣⍤∘⍠⍥↢\.⊗⌸⍣⇄⊘@∂⍚⌺\/⌿\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\(\)\[\]\{\}'";\$_ₑⱼᵣ])+/
syntax match bplSystem /\v[•][A-Za-z_∆⍙][A-Za-z0-9_∆⍙]*/
syntax match bplString /\v\$[ad]/
syntax match bplFunction /[+×÷⌈⌊|*⊛○π√!∧∨⊼⊽~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⊖⍉⊤⊥⍎⍕⌷⌹#↕⍭⨸⌻⍸⍷⊢⊣¿-]/
syntax match bplFunction /[+×÷⌈⌊|*⊛○π√!∧∨⊼⊽~=≠<≤>≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⍉⊤⊥⍎⍕⌷⌹#↕⍭⨸⌻⍸⍷⊢⊣¿-]/
syntax match bplMonadicOperator #\v%(ₓ₁|ₓ₂|ₓ₄|ₓ₈|ₓ|ₕ|ₛ|ₚ|ₐ|ᵣ)|[¨ᵇ⍨⊗⌸⇄∂/⌿\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ]#
syntax match bplDyadicOperator /[↣⍤∘⍠⍥↢.⍣⊘@⍚⌺]/
syntax match bplArgument /[αω⍶⍹∇⍢]/
Expand Down
2 changes: 0 additions & 2 deletions editors/windows/layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ static DEADKEY deadkeys[] = {
DEADTRANS(0x22a3, 0x2395, 0x2360, 0),
DEADTRANS(0x205d, 0x2395, 0x2360, 0),
DEADTRANS(0x006f, 0x25cb, 0x25cb, 0),
DEADTRANS(0x002d, 0x25cb, 0x2296, 0),
DEADTRANS(0x005c, 0x25cb, 0x2349, 0),
DEADTRANS(0x002f, 0x25cb, 0x2298, 0),
DEADTRANS(0x002a, 0x25cb, 0x229b, 0),
Expand All @@ -260,7 +259,6 @@ static DEADKEY deadkeys[] = {
DEADTRANS(0x25cb, 0x25cb, 0x25cb, 0),
DEADTRANS(0x221e, 0x25cb, 0x229b, 0),
DEADTRANS(0x2078, 0x25cb, 0x229b, 0),
DEADTRANS(0x00af, 0x25cb, 0x2296, 0),
DEADTRANS(0x00f7, 0x25cb, 0x2a38, 0),
DEADTRANS(0x236d, 0x25cb, 0x2349, 0),
DEADTRANS(0x2229, 0x25cb, 0x235d, 0),
Expand Down
2 changes: 1 addition & 1 deletion lib/array.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ disp ← { α←⍬ ⍝ Boxed sketch of nested array.
sizes←⌈/rows ,⊗ ⌈⌿cols
ctd=0?sizes↑¨ω; ⍝ top-left alignment.
[v h]←sepr⌈0.5×⊃(ρ¨ω)-sizes
v⊖¨h⌽¨sizes↑¨ω ⍝ centred aligned subarrays.
v⌽₀¨h⌽¨sizes↑¨ω ⍝ centred aligned subarrays.
}
gaps←{ ⍝ Gap-separated sub-planes.
α≤2ₓ?ω; ⍝ lowish rank: done.
Expand Down
4 changes: 2 additions & 2 deletions lib/dyalog.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ segs←{~ω∊α ⊆ ω} ⍝ Separator-delimited segments.
m_91←{ω>100ₓ?ω-10ₓ;∇ ∇ ω+11ₓ} ⍝ McCarthy's M91 function.

⍝ From https://dfns.dyalog.com/c_life.htm
life←{[$t ω]∨.∧3ₓ 4ₓ=¨⊂+/,¯1 0 1⊖⊗¯1 0 1⌽⊗⊂ω}
life←{[$t ω]∨.∧3ₓ 4ₓ=¨⊂+/,¯1 0 1⌽₀⊗¯1 0 1⌽⊗⊂ω}

⍝ From https://dfns.dyalog.com/c_rmcm.htm
rmcm←{ ⍝ Replace comments with blanks.
Expand Down Expand Up @@ -864,7 +864,7 @@ packH←{ ⍝ Huffman packing.
0ₓ=⍹?α(⍶ ci⌷⊢)ω;
1ₓ=⍹?⊃α(⍶¨⊂₀)ω;
¯1ₓ=⍹?⊃ α ⍶∘(1↣↓)¨⊂₀ ω;
2ₓ=⍹?α (⍶∘⊖⍢1)Under⊖ ω;
2ₓ=⍹?α (⍶∘(⌽₀)⍢1)Under(⌽₀) ω;
¯2ₓ=⍹?α ⍶∘(¯1↣↓)⍢2 ω;
3ₓ=⍹?αtiω (⍶⍢0)⍤2 ∞ ω;
¯3ₓ=⍹?αtjω (⍶⍢0)⍤2 ∞ ω
Expand Down
2 changes: 1 addition & 1 deletion lib/graph.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ queensX ← { ⍝ Exact cover N-Queens.
dm←-/¨ι2#ω ⍝ diagonals.
du←<∪,dm ⍝ unique diagonals.
x←dm =⊗ du
y←⊖dm =⊗ du
y←⌽₀dm =⊗ du
m←,₀ ₁x,y,r,f ⍝ constraints matrix.
d←~ ι1↓ρm ∊ ι⊽ρdu ⍝ mask of required cols.
[ω ω]ρ d X m ⍝ exact cover - matrix of queens.
Expand Down
2 changes: 1 addition & 1 deletion lib/numeric.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ det ← { ⍝ Determinant of square matrix.
gauss_jordan ← { ⍝ Gauss-Jordan elimination.
elim←{ ⍝ elimination of row/col α
p←α+↑⍒|α↓[: α]⌷ω
swap←⊖@[α p] ω ⍝ αth and pth rows exchanged
swap←⌽₀@[α p] ω ⍝ αth and pth rows exchanged
mat←swap.[α α]÷⍨@α swap ⍝ col diagonal reduced to 1
mat - mat.[: α]×α≠ι≢ω ×⊗ α⌷mat
}
Expand Down
4 changes: 2 additions & 2 deletions lib/tree.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
hang ← { ⍝ node label α with formatted subtrees ω hung below it.
key_val←α
null←0 0ρ"" ⍝ format of null tree.
fmts←{⊖ω}\"┌└"{ ⍝ hang subtrees by ┌─ ─┐ branches.
fmts←{⌽₀ω}\"┌└"{ ⍝ hang subtrees by ┌─ ─┐ branches.
[0 0]ₓ≡ρω?ω; ⍝ null: done.
mask←∧\' '=↑↓⌽ωᵀ
⍉⌽⊃[⌽α,mask#'│'],↓⌽ωᵀ
}¨{⊖ω}\ω ⍝ formatted subtrees.
}¨{⌽₀ω}\ω ⍝ formatted subtrees.
case←~[null null]≡¨fmts ⍝ non-null subtree cases.
join←⊥case ⊃ "∘┐┘┤"
join≡'∘'?⊃,↓key_val;
Expand Down
4 changes: 2 additions & 2 deletions nbs/bpl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
<AnyChar String="⍝" attribute="Comment" context="Comment" />
<DetectChar char="&quot;" attribute="String" context="String" />
<RegExpr String="'.?'" attribute="Char" />
<RegExpr String="(?:_\d+|_\S|_|[^\s\p{Cc}0-9←⎕•αω⍶⍹∇⍢⍝◇⁝\?¯∞⍬\+\-×÷⌈⌊\|\*⊛○π√!∧∨⊼⊽\~=≠&lt;≤&gt;≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⊖⍉⊤⊥⍎⍕⌷⌹\#↕⍭⨸⌻⍸⍷⊢⊣¿¨ᵇ⍨↣⍤∘⍠⍥↢\.⊗⌸⍣⇄⊘@∂⍚⌺/⌿\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\(\)\[\]\{\}'&quot;;\$_ₑⱼᵣ])+" attribute="Name" />
<RegExpr String="(?:_\d+|_\S|_|[^\s\p{Cc}0-9←⎕•αω⍶⍹∇⍢⍝◇⁝\?¯∞⍬\+\-×÷⌈⌊\|\*⊛○π√!∧∨⊼⊽\~=≠&lt;≤&gt;≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⍉⊤⊥⍎⍕⌷⌹\#↕⍭⨸⌻⍸⍷⊢⊣¿¨ᵇ⍨↣⍤∘⍠⍥↢\.⊗⌸⍣⇄⊘@∂⍚⌺/⌿\\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ₀₁₂₃₄₅₆₇₈₉₋ₓ₁ₓ₂ₓ₄ₓ₈ₓₕₛₚₐᵣ\(\)\[\]\{\}'&quot;;\$_ₑⱼᵣ])+" attribute="Name" />
<RegExpr String="[•][A-Za-z_∆⍙][A-Za-z0-9_∆⍙]*" attribute="Function" />
<RegExpr String="(?:[¯]?[∞]|[¯]?(\d+([.]\d+)?|[.]\d+)([eEₑ][¯]?\d+)?([jJⱼ][¯]?(\d+([.]\d+)?|[.]\d+)([eEₑ][¯]?\d+)?|[rᵣ][¯]?\d+)?)(?:ₓ₁|ₓ₂|ₓ₄|ₓ₈|ₓ|ₕ|ₛ|ₚ|ₐ|ᵣ)?|[ₑⱼᵣ]" attribute="Number" />
<RegExpr String="[⍬](?:ₓ₁|ₓ₂|ₓ₄|ₓ₈|ₓ|ₕ|ₛ|ₚ|ₐ|ᵣ)?" attribute="Number" />
<RegExpr String="\$[tfn]" attribute="Number" />
<RegExpr String="\$[ad]" attribute="String" />
<RegExpr String="[\])](?=(?:ₓ₁|ₓ₂|ₓ₄|ₓ₈|ₓ|ₕ|ₛ|ₚ|ₐ|ᵣ))" attribute="Normal Text" context="Mark" />
<AnyChar String="+-×÷⌈⌊|*⊛○π√!∧∨⊼⊽~=≠&lt;≤&gt;≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⊖⍉⊤⊥⍎⍕⌷⌹#↕⍭⨸⌻⍸⍷⊢⊣¿" attribute="Function" />
<AnyChar String="+-×÷⌈⌊|*⊛○π√!∧∨⊼⊽~=≠&lt;≤&gt;≥ι↦:ρ≢≡,⍪⊂⊃⊆∊∪∩⍋⍒↑↓⌽⍉⊤⊥⍎⍕⌷⌹#↕⍭⨸⌻⍸⍷⊢⊣¿" attribute="Function" />
<RegExpr attribute="MonadicOperator" String="(?:ₓ₁|ₓ₂|ₓ₄|ₓ₈|ₓ|ₕ|ₛ|ₚ|ₐ|ᵣ)" />
<AnyChar String="¨ᵇ⍨⊗⌸⇄∂/⌿\⍀⁻⁰¹²³⁴⁵⁶⁷⁸⁹⁻ᵀᵘₓ" attribute="MonadicOperator" />
<AnyChar String="↣⍤∘⍠⍥↢.⍣⊘@⍚⌺" attribute="DyadicOperator" />
Expand Down
2 changes: 1 addition & 1 deletion nbs/evaluation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ m←[1 2 3◇4 5 6] ◇ [: 1]⌷m ⍝ 2 5
Some functions have a default axis:

- `/ \ ⌽ ,` work along the last axis.
- `⌿ ⍀ ⊖ ⍪` work along the first axis.
- `⌿ ⍀ ⍪` work along the first axis; `⌽₀` reverses or rotates it.
- Replicate `N#Y` and the partitions `N⊂Y` and `N⊆Y` work along the first axis.
- Encode `⊤` puts its digits on the last axis. Decode `⊥` reads them from the last axis.

Expand Down
2 changes: 1 addition & 1 deletion nbs/gallery/reaction.bpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
n←250
⎕←"centres←",⍎⁻ centres←40+¿[≥¿4 2]ρ170
seed←∨⌿{8>|ω₀-ιn ∧⊗ 8>|ω₁-ιn}¹ centres
lap←{1⌽ω + ¯1⌽ω + 1⊖ω + ¯1⊖ω - 4×ω}
lap←{1⌽ω + ¯1⌽ω + 1⌽₀ω + ¯1⌽₀ω - 4×ω}
[feed kill]←0.0545 0.062
step←{
[a b]←ω
Expand Down
2 changes: 1 addition & 1 deletion nbs/glyphs.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ The names in these tables are the ones you type. In the REPL, a backtick and any
| `,` [comma](glyphs/comma.qmd) | | ravel | catenate | |
| `⍪` [comma-bar](glyphs/comma-bar.qmd) | Alt-Minus , | table | catenate-first | |
| `⌽` [circle-stile](glyphs/circle-stile.qmd) | Alt-2 | reverse | rotate | |
| `⊖` [circle-bar](glyphs/circle-bar.qmd) | Alt-o Minus | reverse-first | rotate-first | |
| `⍉` [circle-backslash](glyphs/circle-backslash.qmd) | Alt-o Backslash | transpose | reorder-axes | |
| `↑` [up-arrow](glyphs/up-arrow.qmd) | Alt-k | first | take | Monad takes first major cell |
| `↓` [down-arrow](glyphs/down-arrow.qmd) | Alt-j | split | drop | |
Expand Down Expand Up @@ -158,6 +157,7 @@ System names start with `•`. [System functions](system-functions.qmd) lists th
- [Numbers](numbers.qmd): bare numbers are approximate. `ₓ` marks an exact integer, and `r` or `ᵣ` an exact rational, as in J: `1ᵣ÷3ᵣ` is `1ᵣ3`, while `1ₓ÷3ₓ` floors to `0ₓ`. Predicates, positions, tally and shape are exact. See [Mathish mode](numbers.qmd#mathish-mode) for comparison and zero-division conventions.
- [Agreement](evaluation.qmd#agreement-and-pervasion): pervasive functions, Each and Rank align leading axes. An axis of length 1 expands to match: `2 3ρι6 + 10 20` is `[10 11 12◇23 24 25]`.
- [Major cells](principles.ipynb#functions-act-on-major-cells): `∊ ~ ∪ ∩` compare major cells, `N#Y` replicates them, `N⊂Y` and `N⊆Y` split along the first axis. `⊤` and `⊥` put digits on the last axis, as J.
- [Reverse and rotate](glyphs/circle-stile.qmd): `⌽₀` selects the first axis, replacing `⊖`; plain `⌽` selects the last. [Axis](glyphs/quad-colon.qmd) also extends data with trailing length-1 axes when a nonnegative axis does not yet exist.
- [System names](system-functions.qmd): written `•name`, as BQN, not `⎕NAME`. Most Dyalog system functions and variables are not included.
- [Axis keys](keyed.ipynb) name data. `K:Y` evaluates its keys. `T.a` is `"a"⊃T`. `T.(expr)` and `T⍎Y` evaluate with the keys of `T` as names.
- [Dfns](dfns.ipynb): BPL has dfns, with no tradfns and no colon control structures such as `:If`.
Expand Down
18 changes: 0 additions & 18 deletions nbs/glyphs/circle-bar.qmd

This file was deleted.

9 changes: 7 additions & 2 deletions nbs/glyphs/circle-stile.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Function. Keys: `Alt-2`. Hanzi: `转` (`轉`). Ranks: `1` monadic, `0 1` dyadic

`⌽Y` reverses the last axis. `⌽⍠K` selects the axis.
`⌽Y` reverses the last axis. [Axis](quad-colon.qmd) selects another: `⌽₀` reverses the first axis, and `⌽₋₁` selects the last. `⌽₀` replaces Dyalog's `⊖`.

```bpl
⌽1 2 3 ⍝ 3 2 1
Expand All @@ -16,7 +16,12 @@ Function. Keys: `Alt-2`. Hanzi: `转` (`轉`). Ranks: `1` monadic, `0 1` dyadic
¯1⌽"abcd" ⍝ "dabc"
```

A count array supplies counts for the unrotated axes. See [`⊖`](circle-bar.qmd).
A count array supplies counts for the unrotated axes: one count per column when rotating a matrix's first axis.

```bpl
1⌽₀3 2ρι6ₓ ⍝ [2 3◇4 5◇0 1]ₓ
0 1 2⌽₀[1 2 3◇4 5 6◇7 8 9] ⍝ [1 5 9◇4 8 3◇7 2 6]
```

## Inverse

Expand Down
Loading