From 79bcb4dcb4cbb2c2ce5fe09db1f7a523b1f3451b Mon Sep 17 00:00:00 2001 From: - <@> Date: Wed, 5 Aug 2020 23:36:45 +0300 Subject: Vim status line --- editors/vim/autoload/bqn.txt | 40 ++++++++++++++++++++++++++++++++++++++++ editors/vim/autoload/bqn.vim | 11 +++++++++++ editors/vim/ftplugin/bqn.vim | 2 ++ 3 files changed, 53 insertions(+) create mode 100644 editors/vim/autoload/bqn.txt create mode 100644 editors/vim/autoload/bqn.vim diff --git a/editors/vim/autoload/bqn.txt b/editors/vim/autoload/bqn.txt new file mode 100644 index 00000000..258a81ae --- /dev/null +++ b/editors/vim/autoload/bqn.txt @@ -0,0 +1,40 @@ ++ Conjugate ; Add +- Negate ; Subtract +× Sign ; Multiply +÷ Reciprocal ; Divide +⋆ Exponential ; Power +√ Square Root ; Root +⌊ Floor ; Minimum +⌈ Ceiling ; Maximum +∧ Sort Up ; And* +∨ Sort Down ; Or* +¬ Not* ; Span* +| Absolute Value ; Modulus +≤ ; Less Than or Equal to +< Enclose ; Less Than +> Merge ; Greater Than +≥ ; Greater Than or Equal to += Rank ; Equals +≠ Length ; Not Equals +≡ Depth* ; Match +≢ Shape ; Not Match +⊣ Identity ; Left +⊢ Identity ; Right +⥊ Deshape ; Reshape +∾ Join* ; Join to +≍ Solo* ; Couple* +↑ Prefixes* ; Take +↓ Suffixes* ; Drop +↕ Range ; Windows* +⌽ Reverse ; Rotate +⍉ Transpose* ; Reorder axes* +/ Indices ; Replicate +⍋ Grade Up ; Bins Up +⍒ Grade Down ; Bins Down +⊏ First Cell* ; Select* +⊑ First ; Pick* +⊐ ; Index of +⊒ Occurrence Count* ; Progressive Index of* +∊ Unique Mask ; Member of +⍷ Deduplicate ; Find +⊔ Group Indices* ; Group* diff --git a/editors/vim/autoload/bqn.vim b/editors/vim/autoload/bqn.vim new file mode 100644 index 00000000..b294d93c --- /dev/null +++ b/editors/vim/autoload/bqn.vim @@ -0,0 +1,11 @@ +let s:s=0|let s:f=expand(':p:r').'.txt' +fu bqn#t() "toggle status line + if s:s|let[s:s,s:a,&ls,&stl]=[0,[],s:ls,s:stl]|retu|en + try|let s:a=readfile(s:f)|let g:sa=s:a|cat|let s:a=[]|endt + let[s:s,s:ls,s:stl]=[1,&ls,&stl] + let&ls=2|let&stl='%{bqn#l()}' +endf +fu bqn#l() "render content of status line + let c=substitute(getline('.')[col('.')-1:],'\(\_.\)\_.*','\1','') + for x in s:a|if c=~#x[:len(c)-1]|retu x|en|endfo|retu c +endf diff --git a/editors/vim/ftplugin/bqn.vim b/editors/vim/ftplugin/bqn.vim index 41eb3912..fe4ca541 100644 --- a/editors/vim/ftplugin/bqn.vim +++ b/editors/vim/ftplugin/bqn.vim @@ -6,3 +6,5 @@ setlocal iskeyword=@,48-57,_,^×,^÷ setlocal ignorecase setlocal shiftwidth=2 tabstop=2 softtabstop=2 + +nn :cal bqn#t() -- cgit v1.2.3 From da75b4391dd6ffc13da949c2ee5e2c97000692d0 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 4 Aug 2020 20:30:36 -0400 Subject: More obvious implementation of First --- impl.bqn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl.bqn b/impl.bqn index df067c0f..d05ff710 100644 --- a/impl.bqn +++ b/impl.bqn @@ -407,7 +407,7 @@ OccurrenceCount ← ⊐˜(⊢-⊏)⍋∘⍋ ProgressiveIndexOf ← {𝕨⊐○(≍˘⟜OccurrenceCount𝕨⊸⊐)𝕩} ⊒ ← OccurrenceCount⊘ ProgressiveIndexOf -⊑ ↩ (0¨∘≢)⊸Pick ⊘ Pick +⊑ ↩ (0⊑⥊) ⊘ Pick ◶ ↩ {𝕨((𝕨𝔽𝕩)⊑𝕘){𝔽}𝕩} # Same definition, new Pick inverse ← {(⊑(0⊏𝕩)⊐<) ⊑ ((1⊏𝕩)∾⟨!∘0⟩)˜} ⍉ (2∾˜2÷˜≠)⊸⥊ ⟨ -- cgit v1.2.3 From 746bd0b2c60ede32d600533fa64085ac1ba247b5 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 4 Aug 2020 20:52:39 -0400 Subject: Need to multiple cell comparison indices by cell length --- impl.bqn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl.bqn b/impl.bqn index d05ff710..bb15277c 100644 --- a/impl.bqn +++ b/impl.bqn @@ -378,7 +378,7 @@ _grade←{ l←≠𝕩 (↕l){ i←-d←𝕨 ⋄ j←ei←ej←0 - e←3 ⋄ c←⟨GT○(⊑⟜𝕩),0,1,2⟩ + e←3 ⋄ c←⟨GT○(⊑⟜(m×⍟(≠⟜1)𝕩)),0,1,2⟩ N←{i↩d+𝕨⋄ej↩l⌊d+ei↩l⌊j↩d+𝕩⋄e↩j≥l⋄i R j} R←{𝕨e◶c𝕩}◶{e+↩2×ei=i↩1+𝕨⋄𝕨}‿{e+↩ej=j↩1+𝕩⋄𝕩}‿N {𝕩⋄i R j}¨⊸⊏𝕩 -- cgit v1.2.3 From d2ec66f3dbb4d8b2bd9ab1fa370a5511a09f8e13 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 4 Aug 2020 21:08:50 -0400 Subject: Use arithmetic and not Membership to get character class containment --- bqn.js | 6 +++--- src/c.bqn | 25 +++++++++++++------------ 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bqn.js b/bqn.js index f782f5c9..298c9aaa 100644 --- a/bqn.js +++ b/bqn.js @@ -120,9 +120,9 @@ let runtime = run( // Compiler let compile = run( - new Uint8Array([0,70,22,0,0,11,14,0,71,22,0,1,11,14,0,72,22,0,2,11,14,0,73,22,0,3,11,14,0,74,22,0,4,11,14,0,75,22,0,5,11,0,76,0,77,0,78,0,20,21,0,1,17,0,79,0,80,0,81,0,82,0,83,21,0,2,0,84,0,85,0,20,21,0,3,17,0,20,21,0,4,17,21,0,0,0,20,0,86,17,3,13,22,0,6,11,0,20,16,22,0,7,11,14,21,0,6,0,38,0,13,7,16,0,26,16,0,35,16,22,0,8,22,0,9,22,0,10,22,0,11,22,0,12,22,0,13,22,0,14,22,0,15,22,0,16,22,0,17,22,0,18,22,0,19,22,0,20,4,13,11,14,21,0,6,0,22,0,50,17,0,38,0,13,7,16,0,41,0,0,7,16,22,0,21,11,14,0,51,0,20,0,54,0,24,16,0,25,16,0,26,0,53,17,17,0,20,21,0,6,0,22,0,52,17,0,38,0,13,7,16,0,20,0,51,17,0,26,16,0,22,21,0,16,0,13,16,0,1,21,0,21,17,17,17,22,0,22,11,14,0,52,0,51,3,2,0,39,0,1,7,0,52,0,53,0,55,3,3,17,0,19,16,22,0,23,11,14,15,1,22,0,24,11,14,15,2,22,0,25,11,14,0,30,0,45,0,57,8,0,23,0,45,0,57,8,21,0,25,3,3,0,48,0,29,0,31,0,89,0,20,0,91,17,19,0,30,9,8,22,0,26,11,14,15,3,22,0,27,11,14,15,4,22,0,28,11,14,15,5,22,0,29,11,14,21,0,29,25,0,87,0,14,21,0,1,17,22,0,3,11,14,0,88,0,14,21,0,1,17,0,9,0,45,0,23,0,45,0,54,8,0,22,0,13,19,8,16,0,26,16,22,0,4,11,14,0,89,0,14,21,0,1,17,0,26,16,22,0,5,11,14,21,0,4,21,0,5,0,23,0,56,17,21,0,3,0,26,16,3,3,0,20,16,22,0,6,11,0,27,16,22,0,7,11,14,21,0,6,0,29,21,0,7,17,22,0,6,12,14,21,0,4,0,0,0,54,17,21,0,5,0,23,0,57,17,0,57,0,20,21,1,1,0,14,21,0,1,17,17,0,26,16,0,26,0,45,21,0,3,0,42,0,0,7,16,0,20,0,51,17,0,46,0,29,0,43,0,18,0,20,0,51,19,0,23,0,56,19,0,1,0,18,19,8,8,8,16,3,3,0,20,16,0,29,21,0,7,17,22,0,8,11,14,15,6,0,49,15,7,8,22,0,9,11,14,21,0,8,0,27,21,0,6,17,0,13,0,46,0,20,8,16,0,13,0,36,0,22,7,0,57,19,0,46,21,0,9,8,16,0,23,0,56,17,22,0,10,11,14,21,0,8,0,37,0,20,7,21,0,6,17,0,26,21,0,10,17,22,0,11,11,14,0,19,0,36,0,20,7,21,0,1,0,13,16,19,0,40,0,26,7,9,0,23,0,56,19,22,0,12,11,14,21,0,11,21,0,12,16,0,42,0,13,7,16,0,8,16,22,0,13,11,14,21,0,11,0,26,21,0,3,0,29,21,0,6,0,26,21,0,10,17,17,0,8,16,17,22,0,14,11,14,21,0,14,21,0,12,16,0,42,0,13,7,16,0,2,21,0,14,0,37,0,30,7,16,21,0,12,16,0,42,0,0,7,16,17,0,36,0,1,7,0,57,17,0,36,0,35,7,21,0,1,17,22,0,15,11,0,34,16,22,0,16,11,14,21,0,14,0,37,0,25,0,43,0,30,8,7,16,21,0,12,16,0,26,21,0,13,17,22,0,17,11,14,21,0,1,0,26,21,0,13,17,0,31,21,1,7,17,22,0,18,11,14,21,1,17,21,1,18,21,1,19,3,3,0,20,16,0,33,21,0,18,17,22,0,19,11,0,11,0,45,0,18,0,20,0,51,19,0,22,0,13,19,8,16,22,0,20,11,14,21,0,18,0,35,21,0,20,0,42,0,0,7,16,0,2,21,0,19,17,0,36,0,1,7,0,57,17,17,22,0,21,11,14,21,1,3,0,13,16,22,0,22,11,14,21,1,19,0,30,0,56,17,22,0,23,11,14,21,0,21,0,38,0,26,0,45,0,13,0,45,21,0,23,8,8,7,16,0,15,0,45,21,1,19,0,30,16,0,46,0,0,8,8,0,2,0,17,19,0,1,0,18,19,21,0,22,17,22,0,24,11,14,21,0,24,0,29,0,45,0,28,8,21,0,18,0,26,21,0,20,17,0,36,0,33,7,21,1,19,17,17,0,34,16,22,0,25,11,14,21,0,25,0,38,0,30,7,16,0,36,0,33,7,21,1,19,17,0,41,0,0,7,16,22,0,26,11,14,21,0,18,0,26,0,45,21,0,17,8,0,47,21,0,15,0,31,21,0,16,17,0,0,21,0,25,0,13,16,17,0,0,21,1,21,17,8,16,0,26,0,45,21,0,20,8,0,47,21,0,24,0,31,21,0,25,17,0,0,21,1,21,17,8,16,0,26,21,1,20,0,33,21,0,18,17,0,10,21,0,19,17,0,8,16,0,10,21,0,20,17,17,22,0,18,12,14,21,1,11,0,33,21,0,18,17,0,9,0,45,0,18,0,10,21,1,13,0,29,0,54,0,58,3,2,17,0,33,21,0,18,17,19,0,20,0,57,19,0,22,0,13,19,8,16,0,8,16,0,36,0,26,7,22,0,18,13,14,21,1,11,0,33,21,0,18,17,0,9,21,1,13,0,29,0,52,0,53,3,2,17,0,33,21,0,18,17,0,36,0,20,7,0,57,17,0,23,0,57,17,17,0,8,16,0,36,0,26,7,22,0,18,13,14,21,0,21,0,38,0,30,7,16,0,36,0,1,7,21,1,19,0,30,16,17,0,36,0,3,0,43,0,5,8,7,21,0,22,17,0,6,0,51,17,0,14,0,45,0,54,8,0,46,0,9,8,0,0,0,18,19,21,0,21,0,38,0,30,0,45,0,56,8,7,16,0,14,21,0,23,17,17,22,0,27,11,14,21,1,21,0,1,21,0,18,17,21,0,25,0,13,16,0,46,0,11,8,0,9,0,15,0,45,0,51,8,19,16,22,0,28,11,14,21,1,22,0,29,21,0,18,0,5,21,1,21,17,17,0,26,0,45,21,0,28,8,0,47,21,0,27,8,16,22,0,29,11,14,21,1,16,0,22,0,53,17,0,33,21,0,18,17,0,2,0,53,17,0,0,22,0,18,13,14,21,0,18,21,0,29,21,0,26,21,0,16,0,20,21,0,25,0,23,21,0,26,17,17,3,4,25,21,1,18,22,0,3,22,0,4,22,0,5,22,0,6,4,4,11,14,21,1,17,0,30,16,0,46,0,1,8,0,25,0,43,0,41,0,2,0,45,0,59,8,0,46,0,0,8,7,8,9,22,0,7,11,14,21,0,7,0,23,0,45,0,57,8,21,0,7,9,0,1,9,3,2,0,48,0,30,0,14,21,0,3,19,8,22,0,8,11,14,0,23,0,45,0,57,0,46,0,0,8,8,0,51,0,13,0,4,0,59,19,0,3,21,0,7,19,3,2,0,48,0,13,0,11,0,51,19,8,9,0,0,0,22,0,43,21,0,7,8,19,0,45,21,0,4,0,11,16,0,46,0,31,8,8,22,0,9,11,14,0,60,0,61,21,0,9,3,3,0,48,0,29,0,31,21,0,5,21,0,6,3,2,19,0,30,9,8,22,0,10,11,14,0,90,0,11,16,0,31,21,1,7,17,0,31,21,0,1,17,0,30,16,22,0,11,11,14,21,0,1,0,22,21,0,11,17,21,0,10,0,23,0,45,0,57,8,21,0,10,9,0,1,9,3,2,0,48,0,30,0,14,21,0,3,19,8,16,22,0,12,11,14,21,0,12,21,0,1,0,13,16,0,11,21,0,11,17,0,49,0,36,0,17,0,23,0,57,0,0,21,0,11,17,19,21,0,8,9,0,4,0,59,19,0,46,0,2,8,7,8,21,0,1,17,25,0,62,22,0,3,11,14,21,0,1,0,6,0,57,17,0,40,0,4,7,21,0,3,17,0,5,16,22,0,4,11,14,21,0,4,0,0,0,57,17,0,26,16,0,32,16,0,27,16,0,27,16,22,0,5,11,14,21,0,1,15,8,21,0,4,17,0,29,21,0,5,17,25,21,0,2,22,0,3,22,0,4,4,2,11,14,21,0,1,0,31,0,18,0,7,0,54,19,0,4,0,56,19,0,2,0,12,0,45,0,13,8,19,0,17,19,21,1,13,17,22,0,5,11,0,42,0,0,7,16,0,27,16,22,0,6,11,14,21,1,13,0,29,0,54,0,52,3,2,17,0,33,21,0,1,17,0,2,21,0,5,17,22,0,7,11,14,21,1,14,0,33,21,0,1,17,0,10,0,45,0,25,0,45,0,57,8,8,16,22,0,8,11,14,21,0,8,0,29,0,45,21,0,6,8,0,47,0,25,0,45,0,56,8,8,16,22,0,9,11,14,21,0,9,0,10,21,0,8,17,22,0,10,11,14,21,0,8,0,29,21,0,6,17,0,27,16,0,36,0,29,7,22,0,6,13,14,21,0,10,0,8,16,0,2,22,0,4,13,14,0,51,0,12,21,0,5,17,22,0,11,11,14,21,0,4,0,15,0,57,17,0,10,21,0,4,0,14,0,52,17,0,29,0,45,21,0,6,8,0,47,0,25,0,45,0,56,8,8,16,17,0,18,0,2,0,45,0,13,0,43,0,24,8,0,0,0,57,19,8,0,42,0,6,7,9,0,44,0,14,8,0,10,0,45,0,8,8,19,0,9,0,17,19,21,1,13,0,30,0,57,17,0,14,21,0,1,17,0,11,21,0,10,17,17,0,0,22,0,4,13,14,21,1,11,0,33,21,0,1,17,0,10,21,0,8,17,0,10,21,0,11,17,0,29,0,36,0,20,7,0,1,0,20,0,43,0,42,0,0,7,8,19,0,57,19,0,27,0,46,0,27,0,46,0,36,0,29,7,8,0,1,0,36,0,29,7,19,0,29,0,45,0,27,8,0,17,19,8,0,17,0,20,0,56,19,19,21,0,6,17,0,23,0,56,17,0,0,0,57,17,0,42,0,0,7,16,0,27,16,22,0,12,11,14,21,0,7,0,29,21,0,12,17,0,42,0,0,7,16,22,0,13,11,0,27,16,22,0,14,11,14,21,0,14,0,36,0,29,7,22,0,12,13,14,21,0,14,0,36,0,29,7,22,0,13,13,14,21,0,12,0,36,0,29,7,22,0,1,13,14,21,0,7,0,29,21,0,12,17,22,0,15,11,14,0,51,0,11,21,0,15,17,0,26,16,22,0,16,11,14,0,51,0,12,21,0,15,17,22,0,17,11,0,42,0,0,7,16,22,0,18,11,14,0,51,0,46,0,20,8,0,42,0,0,7,9,0,26,0,57,0,20,21,0,17,17,19,0,18,0,20,0,51,19,0,22,0,13,19,0,46,0,1,8,9,22,0,19,11,14,0,18,0,0,21,1,16,0,30,0,53,17,19,0,33,21,0,1,19,21,0,19,9,0,23,0,57,19,0,11,0,51,19,22,0,20,11,14,0,58,0,19,16,21,0,20,16,0,2,0,54,17,0,6,0,52,0,19,16,21,0,20,16,17,0,2,0,54,17,0,0,0,52,0,24,16,21,0,20,16,17,0,20,0,51,17,22,0,21,11,14,21,0,4,0,29,21,0,12,17,0,29,0,45,21,0,16,8,0,47,0,58,0,24,16,0,26,0,45,0,15,0,45,0,54,8,0,0,0,57,19,8,16,0,29,21,0,21,0,23,0,57,17,17,8,16,22,0,4,12,14,21,1,21,0,1,21,0,1,17,22,0,22,11,21,0,3,0,46,0,11,8,0,9,0,15,0,45,0,51,8,19,16,22,0,23,11,0,26,16,22,0,24,11,14,21,0,1,0,29,21,0,24,17,22,0,25,11,14,21,1,16,0,33,21,0,1,17,0,26,16,22,0,26,11,14,21,1,12,0,30,16,0,14,21,0,1,17,0,29,21,1,12,0,33,21,0,1,17,0,2,0,45,0,13,0,43,0,24,8,8,16,0,42,0,6,7,16,17,22,0,27,11,14,21,0,7,0,1,21,0,5,17,0,29,21,0,12,17,0,42,0,0,7,16,0,27,16,22,0,6,12,14,21,0,12,0,29,21,0,6,17,22,0,28,11,14,21,0,8,0,1,21,0,9,17,0,29,21,0,28,17,0,12,0,26,0,44,0,1,8,0,11,19,0,51,17,0,36,0,3,7,0,54,17,0,0,0,57,17,22,0,29,11,14,21,1,13,0,30,0,53,17,0,14,21,0,1,17,0,29,21,0,6,17,0,26,16,22,0,30,11,14,21,0,8,0,29,21,0,28,17,0,27,16,22,0,31,11,0,36,0,29,7,22,0,6,13,14,21,0,12,0,29,21,0,6,17,22,0,28,12,14,21,0,6,0,36,0,29,7,22,0,1,13,14,21,0,6,0,36,0,29,7,22,0,4,13,14,21,0,28,0,36,0,29,7,22,0,11,13,14,21,0,8,0,12,21,0,9,17,0,29,21,0,28,17,0,26,16,22,0,32,11,14,21,0,6,0,27,16,22,0,33,11,14,21,0,31,0,27,16,0,29,22,0,30,13,14,21,1,11,0,33,21,0,1,17,22,0,34,11,14,21,0,8,0,29,21,0,28,17,0,10,21,0,11,17,0,10,21,0,34,17,22,0,35,11,14,21,1,12,0,22,0,54,17,0,33,21,0,1,17,22,0,36,11,14,21,0,36,0,10,21,0,35,17,0,1,22,0,4,13,14,0,54,0,16,21,0,4,17,22,0,37,11,14,0,52,0,14,21,0,4,17,0,25,0,57,17,0,10,0,57,0,16,21,0,4,17,17,22,0,38,11,14,21,0,38,0,29,21,0,35,0,25,0,56,17,0,2,0,45,0,13,0,43,0,24,8,8,16,0,42,0,6,7,16,17,22,0,39,11,14,21,0,38,0,25,0,57,17,0,9,21,1,12,0,30,0,57,17,0,14,21,0,1,17,17,0,11,21,0,39,17,22,0,40,11,14,0,52,0,14,21,0,4,17,0,25,0,57,17,0,11,21,0,36,17,0,10,21,0,37,17,22,0,41,11,14,21,0,40,0,10,21,0,41,17,0,8,16,0,25,16,0,2,0,43,0,42,0,6,7,8,0,1,0,17,19,0,45,0,13,0,43,0,24,8,8,16,0,25,16,22,0,42,11,14,21,0,36,0,26,16,21,0,42,0,46,0,29,8,0,0,0,57,19,0,0,0,18,19,16,22,0,43,11,14,0,57,0,1,21,0,43,17,0,33,21,0,1,0,13,16,0,24,16,17,0,18,0,20,0,51,19,0,22,0,13,19,0,46,0,1,8,16,0,29,21,0,33,17,0,42,0,0,7,16,0,25,0,56,17,22,0,44,11,0,29,21,0,6,17,22,0,45,11,14,21,0,4,0,26,0,45,21,0,45,8,0,47,0,38,0,56,7,8,16,22,0,4,12,14,21,0,41,0,8,16,0,42,0,0,7,0,2,0,43,0,42,0,6,7,8,0,1,0,18,19,21,0,35,19,0,15,0,11,0,7,19,0,54,19,0,9,0,18,19,16,0,9,21,0,35,0,2,0,45,0,13,0,43,0,24,8,0,0,0,57,19,8,0,42,0,6,7,9,0,44,0,15,8,21,0,36,17,17,22,0,46,11,14,21,0,36,0,10,21,0,35,17,0,36,0,20,7,0,51,17,0,23,0,57,17,0,12,21,0,37,17,22,0,47,11,14,21,0,47,0,26,16,0,25,16,22,0,48,11,14,21,0,47,0,25,0,56,17,0,11,21,0,37,17,0,10,0,57,0,14,21,0,4,17,17,0,11,21,0,47,0,25,0,57,17,0,9,21,0,41,17,17,0,9,21,0,39,0,8,16,0,10,21,0,46,17,17,0,11,21,0,45,0,25,0,57,17,17,0,26,16,22,0,49,11,14,0,51,0,14,21,0,4,17,0,11,21,0,41,17,0,10,0,51,0,16,21,0,4,17,0,9,21,0,39,17,17,0,9,21,1,15,0,30,16,0,13,21,0,1,17,17,0,36,0,20,7,0,51,17,0,23,0,57,17,0,29,21,0,49,17,22,0,50,11,14,21,0,3,0,0,21,1,21,17,0,16,21,0,1,17,22,0,51,11,14,21,1,10,0,30,0,56,17,0,15,21,0,1,17,0,10,21,0,51,17,0,26,16,22,0,52,11,14,21,0,1,0,29,21,0,52,17,22,0,53,11,0,34,16,0,9,16,22,0,54,11,14,21,1,13,0,30,0,58,17,0,14,21,0,1,0,26,21,0,11,17,17,22,0,55,11,14,0,57,0,20,21,0,35,17,0,9,21,0,11,0,20,0,57,17,17,0,1,0,51,0,20,21,0,34,17,17,0,42,0,0,7,16,0,26,0,57,0,20,21,0,11,17,17,0,23,0,45,0,1,8,0,1,0,23,19,0,57,17,0,26,21,0,55,17,0,0,0,57,17,22,0,56,11,14,21,0,55,0,20,0,51,17,0,29,0,45,0,42,0,0,7,8,21,0,11,17,0,12,21,0,34,17,0,26,16,22,0,57,11,14,21,1,13,0,30,0,54,17,0,14,21,0,1,17,0,26,16,22,0,58,11,14,21,0,44,0,9,21,0,27,17,0,9,21,0,23,17,22,0,59,11,0,29,21,0,24,17,22,0,60,11,14,21,0,59,21,0,19,16,22,0,61,11,14,21,0,18,0,29,21,0,24,17,0,36,21,0,14,0,29,21,0,16,17,0,20,21,0,1,0,13,16,17,7,0,29,0,26,0,45,21,0,60,8,19,0,20,21,0,14,0,26,21,0,17,17,0,20,0,56,17,0,46,0,29,8,19,16,0,27,16,22,0,62,11,14,21,0,62,0,29,0,45,21,0,25,0,26,0,45,21,0,60,8,0,46,0,20,8,16,0,46,0,29,8,0,27,9,8,16,0,29,0,45,21,0,60,0,36,0,26,7,16,0,1,16,0,20,21,0,60,17,0,46,0,29,0,43,0,42,0,0,7,8,8,0,27,9,8,16,0,26,0,45,21,0,24,0,13,16,0,46,0,11,8,8,16,22,0,62,12,14,21,0,24,0,29,0,45,21,0,62,8,0,47,0,29,0,45,0,2,0,45,0,13,0,43,0,24,8,8,0,42,0,6,7,9,8,8,21,0,60,17,22,0,63,11,14,21,0,22,0,29,21,0,26,17,0,0,0,54,17,0,15,0,45,0,51,8,0,46,0,0,8,16,0,0,21,0,21,0,7,0,54,17,0,2,0,52,17,0,29,21,0,18,0,29,21,0,26,17,17,17,0,20,21,0,59,0,42,0,0,7,16,0,8,0,45,0,2,0,45,21,0,17,8,0,42,0,6,7,9,8,16,0,1,21,1,23,0,29,21,0,21,17,0,29,21,0,18,17,17,0,29,21,0,63,17,17,22,0,64,11,14,21,0,26,0,20,21,0,24,17,22,0,65,11,0,11,16,0,19,0,52,17,0,20,16,22,0,66,11,14,21,0,44,0,29,21,0,65,17,0,0,0,63,17,21,0,26,0,38,0,51,7,16,0,20,21,0,63,21,0,13,0,46,0,29,8,0,44,0,1,8,21,0,24,17,17,21,0,64,3,3,22,0,67,11,14,21,0,33,0,29,22,0,16,13,14,21,0,52,21,0,52,21,0,16,21,0,16,21,0,58,21,0,57,21,0,30,21,0,30,21,0,32,21,0,32,21,0,43,21,0,42,0,29,21,0,48,17,0,6,0,57,17,0,0,21,0,48,17,21,0,50,0,0,21,0,49,17,0,0,0,45,21,0,42,0,46,0,29,8,0,2,21,0,50,19,8,16,3,13,0,20,16,0,36,0,29,7,21,0,6,17,0,20,21,0,66,17,0,27,16,22,0,68,11,14,21,0,52,0,38,0,51,7,16,21,0,53,0,31,21,0,54,17,21,0,16,0,38,0,64,7,16,21,0,16,0,13,16,0,24,16,0,0,0,57,17,3,4,0,20,21,0,67,17,0,20,16,22,0,69,11,14,21,0,58,0,38,0,65,7,16,21,0,57,0,38,0,66,7,16,21,0,45,0,29,21,0,30,17,0,0,0,52,17,21,0,56,21,0,45,0,29,21,0,32,17,0,0,0,52,17,21,0,29,21,0,1,0,0,21,0,40,17,0,26,21,0,36,17,0,0,21,1,12,0,30,16,0,1,0,67,17,17,21,0,4,0,29,21,0,48,17,0,0,0,53,17,21,0,39,0,29,21,0,49,17,0,2,0,69,17,0,1,21,0,50,17,0,0,0,68,17,0,14,0,45,0,59,8,0,2,0,50,19,0,0,0,18,19,16,3,9,0,20,16,0,20,21,0,69,17,0,29,21,0,68,17,22,0,70,11,14,21,1,23,0,29,21,0,21,17,0,0,21,0,61,17,0,38,0,11,0,44,0,21,8,7,21,0,58,0,13,0,44,0,24,0,46,0,0,8,8,21,0,69,17,0,33,21,0,68,17,0,20,0,57,17,0,26,16,0,36,0,29,7,21,0,70,0,6,0,57,17,0,40,0,4,7,0,62,17,0,5,16,0,0,0,57,17,0,20,0,51,17,0,42,0,0,7,16,17,17,0,38,0,20,7,0,54,0,24,0,44,0,25,0,46,0,39,0,21,7,8,8,0,52,17,0,19,16,0,29,21,0,21,17,17,22,0,71,11,14,0,65,0,20,21,0,70,17,21,1,27,16,21,0,54,21,0,71,3,3,25,21,0,1,21,1,24,16,22,0,3,22,0,4,22,0,5,22,0,6,4,4,11,14,21,0,3,21,1,28,21,0,5,21,0,4,3,2,17,22,0,7,22,0,8,22,0,9,4,3,11,14,21,0,6,0,38,21,1,26,7,16,0,20,21,0,2,17,0,29,21,1,21,0,16,21,0,8,17,0,2,21,0,2,0,13,16,0,1,21,0,5,17,0,0,21,1,21,17,17,0,1,21,0,8,17,17,22,0,10,11,14,21,0,7,21,0,10,21,0,9,3,3,25,21,0,1,0,25,16,0,30,16,0,14,0,51,17,25,21,0,1,0,29,0,45,21,0,2,0,26,21,0,1,17,8,0,47,0,38,0,57,7,8,16,21,1,9,21,0,2,0,36,0,29,7,16,17,25,21,0,2,0,2,16,22,0,3,11,14,21,0,1,21,0,3,0,41,0,10,7,16,0,49,0,26,0,45,21,0,3,8,0,44,21,1,3,0,46,0,3,8,0,5,9,0,46,21,0,0,8,8,0,20,0,7,0,0,21,0,3,0,46,0,2,8,19,0,45,21,1,3,8,19,8,0,57,0,1,21,0,2,17,17,25]) - ,[runtime[0],runtime[1],runtime[2],runtime[3],runtime[4],runtime[6],runtime[7],runtime[8],runtime[9],runtime[10],runtime[11],runtime[12],runtime[13],runtime[14],runtime[15],runtime[16],runtime[17],runtime[20],runtime[21],runtime[22],runtime[23],runtime[24],runtime[25],runtime[26],runtime[27],runtime[28],runtime[30],runtime[31],runtime[32],runtime[33],runtime[34],runtime[35],runtime[36],runtime[37],runtime[38],runtime[39],runtime[41],runtime[42],runtime[43],runtime[44],runtime[45],runtime[46],runtime[48],runtime[49],runtime[50],runtime[51],runtime[52],runtime[53],runtime[55],runtime[58],9,0,3,5,2,6,-1,1,4,10,3.14159265358979,Infinity,128,21,15,25,14,11,16,7,'\t','\n',str("0123456789"),str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),str("abcdefghijklmnopqrstuvwxyz"),str("+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!"),str("˜˘¨⌜⁼´˝`"),str("∘○⊸⟜⌾⊘◶⎉⚇⍟"),str("⋄,"),str("←↩→"),str("(){}⟨⟩"),str("‿"),str("·"),str("𝕊𝕏𝕎𝔽𝔾𝕤𝕩𝕨𝕗𝕘"),str("¯.π∞"),str("_"),str(" "),'#','\'','"','e',str("'")] - ,[[0,1,0,30],[0,0,359,30],[0,0,1484,13],[0,0,1801,6],[0,0,1874,72],[0,0,4856,11],[0,0,4979,3],[0,0,4994,3],[0,0,5034,4]] + new Uint8Array([0,70,22,0,0,11,14,0,71,22,0,1,11,14,0,72,22,0,2,11,14,0,73,22,0,3,11,14,0,74,22,0,4,11,14,0,75,22,0,5,11,0,76,0,77,0,78,0,20,21,0,1,17,0,79,0,80,0,81,0,82,0,83,21,0,2,0,84,0,85,0,20,21,0,3,17,0,20,21,0,4,17,21,0,0,0,20,0,86,17,3,13,22,0,6,11,0,20,16,22,0,7,11,14,21,0,6,0,38,0,13,7,16,0,26,16,0,35,16,22,0,8,22,0,9,22,0,10,22,0,11,22,0,12,22,0,13,22,0,14,22,0,15,22,0,16,22,0,17,22,0,18,22,0,19,22,0,20,4,13,11,14,0,30,0,46,0,1,8,0,12,0,45,0,13,8,0,9,0,15,0,45,0,50,8,19,0,18,19,22,0,21,11,14,21,0,6,0,22,0,51,17,0,38,0,13,7,16,0,41,0,0,7,16,22,0,22,11,14,0,50,0,20,0,54,0,24,16,0,25,16,0,26,0,53,17,17,0,20,21,0,6,0,22,0,52,17,0,38,0,13,7,16,0,20,0,50,17,0,26,16,0,22,21,0,16,0,13,16,0,1,21,0,22,17,17,17,22,0,23,11,14,0,52,0,50,3,2,0,39,0,1,7,0,52,0,53,0,55,3,3,17,0,19,16,22,0,24,11,14,15,1,22,0,25,11,14,15,2,22,0,26,11,14,0,30,0,45,0,57,8,0,23,0,45,0,57,8,21,0,26,3,3,0,48,0,29,0,31,0,89,0,20,0,91,17,19,0,30,9,8,22,0,27,11,14,15,3,22,0,28,11,14,15,4,22,0,29,11,14,15,5,22,0,30,11,14,21,0,30,25,0,87,0,14,21,0,1,17,22,0,3,11,14,0,88,0,14,21,0,1,17,0,9,0,45,0,23,0,45,0,54,8,0,22,0,13,19,8,16,0,26,16,22,0,4,11,14,0,89,0,14,21,0,1,17,0,26,16,22,0,5,11,14,21,0,4,21,0,5,0,23,0,56,17,21,0,3,0,26,16,3,3,0,20,16,22,0,6,11,0,27,16,22,0,7,11,14,21,0,6,0,29,21,0,7,17,22,0,6,12,14,21,0,4,0,0,0,54,17,21,0,5,0,23,0,57,17,0,57,0,20,21,1,1,0,14,21,0,1,17,17,0,26,16,0,26,0,45,21,0,3,0,42,0,0,7,16,0,20,0,50,17,0,46,0,29,0,43,0,18,0,20,0,50,19,0,23,0,56,19,0,1,0,18,19,8,8,8,16,3,3,0,20,16,0,29,21,0,7,17,22,0,8,11,14,15,6,0,49,15,7,8,22,0,9,11,14,21,0,8,0,27,21,0,6,17,0,13,0,46,0,20,8,16,0,13,0,36,0,22,7,0,57,19,0,46,21,0,9,8,16,0,23,0,56,17,22,0,10,11,14,21,0,8,0,37,0,20,7,21,0,6,17,0,26,21,0,10,17,22,0,11,11,14,0,19,0,36,0,20,7,21,0,1,0,13,16,19,0,40,0,26,7,9,0,23,0,56,19,22,0,12,11,14,21,0,11,21,0,12,16,0,42,0,13,7,16,0,8,16,22,0,13,11,14,21,0,11,0,26,21,0,3,0,29,21,0,6,0,26,21,0,10,17,17,0,8,16,17,22,0,14,11,14,21,0,14,21,0,12,16,0,42,0,13,7,16,0,2,21,0,14,0,37,0,30,7,16,21,0,12,16,0,42,0,0,7,16,17,0,36,0,1,7,0,57,17,0,36,0,35,7,21,0,1,17,22,0,15,11,0,34,16,22,0,16,11,14,21,0,14,0,37,0,25,0,43,0,30,8,7,16,21,0,12,16,0,26,21,0,13,17,22,0,17,11,14,21,0,1,0,26,21,0,13,17,0,31,21,1,7,17,22,0,18,11,14,21,1,17,21,1,18,21,1,19,3,3,0,20,16,21,1,21,21,0,18,17,22,0,19,11,0,11,0,45,0,18,0,20,0,50,19,0,22,0,13,19,8,16,22,0,20,11,14,21,0,18,0,35,21,0,20,0,42,0,0,7,16,0,2,21,0,19,17,0,36,0,1,7,0,57,17,17,22,0,21,11,14,21,1,3,0,13,16,22,0,22,11,14,21,1,19,0,30,0,56,17,22,0,23,11,14,21,0,21,0,38,0,26,0,45,0,13,0,45,21,0,23,8,8,7,16,0,15,0,45,21,1,19,0,30,16,0,46,0,0,8,8,0,2,0,17,19,0,1,0,18,19,21,0,22,17,22,0,24,11,14,21,0,24,0,29,0,45,0,28,8,21,0,18,0,26,21,0,20,17,0,36,21,1,21,7,21,1,19,17,17,0,34,16,22,0,25,11,14,21,0,25,0,38,0,30,7,16,0,36,21,1,21,7,21,1,19,17,0,41,0,0,7,16,22,0,26,11,14,21,0,18,0,26,0,45,21,0,17,8,0,47,21,0,15,0,31,21,0,16,17,0,0,21,0,25,0,13,16,17,0,0,21,1,22,17,8,16,0,26,0,45,21,0,20,8,0,47,21,0,24,0,31,21,0,25,17,0,0,21,1,22,17,8,16,0,26,21,1,20,21,1,21,21,0,18,17,0,10,21,0,19,17,0,8,16,0,10,21,0,20,17,17,22,0,18,12,14,21,1,11,21,1,21,21,0,18,17,0,9,0,45,0,18,0,10,21,1,13,0,29,0,54,0,58,3,2,17,0,33,21,0,18,17,19,0,20,0,57,19,0,22,0,13,19,8,16,0,8,16,0,36,0,26,7,22,0,18,13,14,21,1,11,21,1,21,21,0,18,17,0,9,21,1,13,0,29,0,52,0,53,3,2,17,0,33,21,0,18,17,0,36,0,20,7,0,57,17,0,23,0,57,17,17,0,8,16,0,36,0,26,7,22,0,18,13,14,21,0,21,0,38,0,30,7,16,0,36,0,1,7,21,1,19,0,30,16,17,0,36,0,3,0,43,0,5,8,7,21,0,22,17,0,6,0,50,17,0,14,0,45,0,54,8,0,46,0,9,8,0,0,0,18,19,21,0,21,0,38,0,30,0,45,0,56,8,7,16,0,14,21,0,23,17,17,22,0,27,11,14,21,1,22,0,1,21,0,18,17,21,0,25,0,13,16,0,46,0,11,8,0,9,0,15,0,45,0,50,8,19,16,22,0,28,11,14,21,1,23,0,29,21,0,18,0,5,21,1,22,17,17,0,26,0,45,21,0,28,8,0,47,21,0,27,8,16,22,0,29,11,14,21,1,16,0,22,0,53,17,21,1,21,21,0,18,17,0,2,0,53,17,0,0,22,0,18,13,14,21,0,18,21,0,29,21,0,26,21,0,16,0,20,21,0,25,0,23,21,0,26,17,17,3,4,25,21,1,18,22,0,3,22,0,4,22,0,5,22,0,6,4,4,11,14,21,1,17,0,30,16,0,46,0,1,8,0,25,0,43,0,41,0,2,0,45,0,59,8,0,46,0,0,8,7,8,9,22,0,7,11,14,21,0,7,0,23,0,45,0,57,8,21,0,7,9,0,1,9,3,2,0,48,0,30,0,14,21,0,3,19,8,22,0,8,11,14,0,23,0,45,0,57,0,46,0,0,8,8,0,50,0,13,0,4,0,59,19,0,3,21,0,7,19,3,2,0,48,0,13,0,11,0,50,19,8,9,0,0,0,22,0,43,21,0,7,8,19,0,45,21,0,4,0,11,16,0,46,0,31,8,8,22,0,9,11,14,0,60,0,61,21,0,9,3,3,0,48,0,29,0,31,21,0,5,21,0,6,3,2,19,0,30,9,8,22,0,10,11,14,0,90,0,11,16,0,31,21,1,7,17,0,31,21,0,1,17,0,30,16,22,0,11,11,14,21,0,1,0,22,21,0,11,17,21,0,10,0,23,0,45,0,57,8,21,0,10,9,0,1,9,3,2,0,48,0,30,0,14,21,0,3,19,8,16,22,0,12,11,14,21,0,12,21,0,1,0,13,16,0,11,21,0,11,17,0,49,0,36,0,17,0,23,0,57,0,0,21,0,11,17,19,21,0,8,9,0,4,0,59,19,0,46,0,2,8,7,8,21,0,1,17,25,0,62,22,0,3,11,14,21,0,1,0,6,0,57,17,0,40,0,4,7,21,0,3,17,0,5,16,22,0,4,11,14,21,0,4,0,0,0,57,17,0,26,16,0,32,16,0,27,16,0,27,16,22,0,5,11,14,21,0,1,15,8,21,0,4,17,0,29,21,0,5,17,25,21,0,2,22,0,3,22,0,4,4,2,11,14,21,0,1,0,31,0,18,0,7,0,54,19,0,4,0,56,19,0,2,0,12,0,45,0,13,8,19,0,17,19,21,1,13,17,22,0,5,11,0,42,0,0,7,16,0,27,16,22,0,6,11,14,21,1,13,0,29,0,54,0,52,3,2,17,21,1,21,21,0,1,17,0,2,21,0,5,17,22,0,7,11,14,21,1,14,21,1,21,21,0,1,17,0,10,0,45,0,25,0,45,0,57,8,8,16,22,0,8,11,14,21,0,8,0,29,0,45,21,0,6,8,0,47,0,25,0,45,0,56,8,8,16,22,0,9,11,14,21,0,9,0,10,21,0,8,17,22,0,10,11,14,21,0,8,0,29,21,0,6,17,0,27,16,0,36,0,29,7,22,0,6,13,14,21,0,10,0,8,16,0,2,22,0,4,13,14,0,50,0,12,21,0,5,17,22,0,11,11,14,21,0,4,0,15,0,57,17,0,10,21,0,4,0,14,0,52,17,0,29,0,45,21,0,6,8,0,47,0,25,0,45,0,56,8,8,16,17,0,18,0,2,0,45,0,13,0,43,0,24,8,0,0,0,57,19,8,0,42,0,6,7,9,0,44,0,14,8,0,10,0,45,0,8,8,19,0,9,0,17,19,21,1,13,0,30,0,57,17,0,14,21,0,1,17,0,11,21,0,10,17,17,0,0,22,0,4,13,14,21,1,11,21,1,21,21,0,1,17,0,10,21,0,8,17,0,10,21,0,11,17,0,29,0,36,0,20,7,0,1,0,20,0,43,0,42,0,0,7,8,19,0,57,19,0,27,0,46,0,27,0,46,0,36,0,29,7,8,0,1,0,36,0,29,7,19,0,29,0,45,0,27,8,0,17,19,8,0,17,0,20,0,56,19,19,21,0,6,17,0,23,0,56,17,0,0,0,57,17,0,42,0,0,7,16,0,27,16,22,0,12,11,14,21,0,7,0,29,21,0,12,17,0,42,0,0,7,16,22,0,13,11,0,27,16,22,0,14,11,14,21,0,14,0,36,0,29,7,22,0,12,13,14,21,0,14,0,36,0,29,7,22,0,13,13,14,21,0,12,0,36,0,29,7,22,0,1,13,14,21,0,7,0,29,21,0,12,17,22,0,15,11,14,0,50,0,11,21,0,15,17,0,26,16,22,0,16,11,14,0,50,0,12,21,0,15,17,22,0,17,11,0,42,0,0,7,16,22,0,18,11,14,0,50,0,46,0,20,8,0,42,0,0,7,9,0,26,0,57,0,20,21,0,17,17,19,0,18,0,20,0,50,19,0,22,0,13,19,0,46,0,1,8,9,22,0,19,11,14,0,18,0,0,21,1,16,0,30,0,53,17,19,21,1,21,21,0,1,19,21,0,19,9,0,23,0,57,19,0,11,0,50,19,22,0,20,11,14,0,58,0,19,16,21,0,20,16,0,2,0,54,17,0,6,0,52,0,19,16,21,0,20,16,17,0,2,0,54,17,0,0,0,52,0,24,16,21,0,20,16,17,0,20,0,50,17,22,0,21,11,14,21,0,4,0,29,21,0,12,17,0,29,0,45,21,0,16,8,0,47,0,58,0,24,16,0,26,0,45,0,15,0,45,0,54,8,0,0,0,57,19,8,16,0,29,21,0,21,0,23,0,57,17,17,8,16,22,0,4,12,14,21,1,22,0,1,21,0,1,17,22,0,22,11,21,0,3,0,46,0,11,8,0,9,0,15,0,45,0,50,8,19,16,22,0,23,11,0,26,16,22,0,24,11,14,21,0,1,0,29,21,0,24,17,22,0,25,11,14,21,1,16,21,1,21,21,0,1,17,0,26,16,22,0,26,11,14,21,1,12,0,30,16,0,14,21,0,1,17,0,29,21,1,12,21,1,21,21,0,1,17,0,2,0,45,0,13,0,43,0,24,8,8,16,0,42,0,6,7,16,17,22,0,27,11,14,21,0,7,0,1,21,0,5,17,0,29,21,0,12,17,0,42,0,0,7,16,0,27,16,22,0,6,12,14,21,0,12,0,29,21,0,6,17,22,0,28,11,14,21,0,8,0,1,21,0,9,17,0,29,21,0,28,17,0,12,0,26,0,44,0,1,8,0,11,19,0,50,17,0,36,0,3,7,0,54,17,0,0,0,57,17,22,0,29,11,14,21,1,13,0,30,0,53,17,0,14,21,0,1,17,0,29,21,0,6,17,0,26,16,22,0,30,11,14,21,0,8,0,29,21,0,28,17,0,27,16,22,0,31,11,0,36,0,29,7,22,0,6,13,14,21,0,12,0,29,21,0,6,17,22,0,28,12,14,21,0,6,0,36,0,29,7,22,0,1,13,14,21,0,6,0,36,0,29,7,22,0,4,13,14,21,0,28,0,36,0,29,7,22,0,11,13,14,21,0,8,0,12,21,0,9,17,0,29,21,0,28,17,0,26,16,22,0,32,11,14,21,0,6,0,27,16,22,0,33,11,14,21,0,31,0,27,16,0,29,22,0,30,13,14,21,1,11,21,1,21,21,0,1,17,22,0,34,11,14,21,0,8,0,29,21,0,28,17,0,10,21,0,11,17,0,10,21,0,34,17,22,0,35,11,14,21,1,12,0,22,0,54,17,21,1,21,21,0,1,17,22,0,36,11,14,21,0,36,0,10,21,0,35,17,0,1,22,0,4,13,14,0,54,0,16,21,0,4,17,22,0,37,11,14,0,52,0,14,21,0,4,17,0,25,0,57,17,0,10,0,57,0,16,21,0,4,17,17,22,0,38,11,14,21,0,38,0,29,21,0,35,0,25,0,56,17,0,2,0,45,0,13,0,43,0,24,8,8,16,0,42,0,6,7,16,17,22,0,39,11,14,21,0,38,0,25,0,57,17,0,9,21,1,12,0,30,0,57,17,0,14,21,0,1,17,17,0,11,21,0,39,17,22,0,40,11,14,0,52,0,14,21,0,4,17,0,25,0,57,17,0,11,21,0,36,17,0,10,21,0,37,17,22,0,41,11,14,21,0,40,0,10,21,0,41,17,0,8,16,0,25,16,0,2,0,43,0,42,0,6,7,8,0,1,0,17,19,0,45,0,13,0,43,0,24,8,8,16,0,25,16,22,0,42,11,14,21,0,36,0,26,16,21,0,42,0,46,0,29,8,0,0,0,57,19,0,0,0,18,19,16,22,0,43,11,14,0,57,0,1,21,0,43,17,0,33,21,0,1,0,13,16,0,24,16,17,0,18,0,20,0,50,19,0,22,0,13,19,0,46,0,1,8,16,0,29,21,0,33,17,0,42,0,0,7,16,0,25,0,56,17,22,0,44,11,0,29,21,0,6,17,22,0,45,11,14,21,0,4,0,26,0,45,21,0,45,8,0,47,0,38,0,56,7,8,16,22,0,4,12,14,21,0,41,0,8,16,0,42,0,0,7,0,2,0,43,0,42,0,6,7,8,0,1,0,18,19,21,0,35,19,0,15,0,11,0,7,19,0,54,19,0,9,0,18,19,16,0,9,21,0,35,0,2,0,45,0,13,0,43,0,24,8,0,0,0,57,19,8,0,42,0,6,7,9,0,44,0,15,8,21,0,36,17,17,22,0,46,11,14,21,0,36,0,10,21,0,35,17,0,36,0,20,7,0,50,17,0,23,0,57,17,0,12,21,0,37,17,22,0,47,11,14,21,0,47,0,26,16,0,25,16,22,0,48,11,14,21,0,47,0,25,0,56,17,0,11,21,0,37,17,0,10,0,57,0,14,21,0,4,17,17,0,11,21,0,47,0,25,0,57,17,0,9,21,0,41,17,17,0,9,21,0,39,0,8,16,0,10,21,0,46,17,17,0,11,21,0,45,0,25,0,57,17,17,0,26,16,22,0,49,11,14,0,50,0,14,21,0,4,17,0,11,21,0,41,17,0,10,0,50,0,16,21,0,4,17,0,9,21,0,39,17,17,0,9,21,1,15,0,30,16,0,13,21,0,1,17,17,0,36,0,20,7,0,50,17,0,23,0,57,17,0,29,21,0,49,17,22,0,50,11,14,21,0,3,0,0,21,1,22,17,0,16,21,0,1,17,22,0,51,11,14,21,1,10,0,30,0,56,17,0,15,21,0,1,17,0,10,21,0,51,17,0,26,16,22,0,52,11,14,21,0,1,0,29,21,0,52,17,22,0,53,11,0,34,16,0,9,16,22,0,54,11,14,21,1,13,0,30,0,58,17,0,14,21,0,1,0,26,21,0,11,17,17,22,0,55,11,14,0,57,0,20,21,0,35,17,0,9,21,0,11,0,20,0,57,17,17,0,1,0,50,0,20,21,0,34,17,17,0,42,0,0,7,16,0,26,0,57,0,20,21,0,11,17,17,0,23,0,45,0,1,8,0,1,0,23,19,0,57,17,0,26,21,0,55,17,0,0,0,57,17,22,0,56,11,14,21,0,55,0,20,0,50,17,0,29,0,45,0,42,0,0,7,8,21,0,11,17,0,12,21,0,34,17,0,26,16,22,0,57,11,14,21,1,13,0,30,0,54,17,0,14,21,0,1,17,0,26,16,22,0,58,11,14,21,0,44,0,9,21,0,27,17,0,9,21,0,23,17,22,0,59,11,0,29,21,0,24,17,22,0,60,11,14,21,0,59,21,0,19,16,22,0,61,11,14,21,0,18,0,29,21,0,24,17,0,36,21,0,14,0,29,21,0,16,17,0,20,21,0,1,0,13,16,17,7,0,29,0,26,0,45,21,0,60,8,19,0,20,21,0,14,0,26,21,0,17,17,0,20,0,56,17,0,46,0,29,8,19,16,0,27,16,22,0,62,11,14,21,0,62,0,29,0,45,21,0,25,0,26,0,45,21,0,60,8,0,46,0,20,8,16,0,46,0,29,8,0,27,9,8,16,0,29,0,45,21,0,60,0,36,0,26,7,16,0,1,16,0,20,21,0,60,17,0,46,0,29,0,43,0,42,0,0,7,8,8,0,27,9,8,16,0,26,0,45,21,0,24,0,13,16,0,46,0,11,8,8,16,22,0,62,12,14,21,0,24,0,29,0,45,21,0,62,8,0,47,0,29,0,45,0,2,0,45,0,13,0,43,0,24,8,8,0,42,0,6,7,9,8,8,21,0,60,17,22,0,63,11,14,21,0,22,0,29,21,0,26,17,0,0,0,54,17,0,15,0,45,0,50,8,0,46,0,0,8,16,0,0,21,0,21,0,7,0,54,17,0,2,0,52,17,0,29,21,0,18,0,29,21,0,26,17,17,17,0,20,21,0,59,0,42,0,0,7,16,0,8,0,45,0,2,0,45,21,0,17,8,0,42,0,6,7,9,8,16,0,1,21,1,24,0,29,21,0,21,17,0,29,21,0,18,17,17,0,29,21,0,63,17,17,22,0,64,11,14,21,0,26,0,20,21,0,24,17,22,0,65,11,0,11,16,0,19,0,52,17,0,20,16,22,0,66,11,14,21,0,44,0,29,21,0,65,17,0,0,0,63,17,21,0,26,0,38,0,50,7,16,0,20,21,0,63,21,0,13,0,46,0,29,8,0,44,0,1,8,21,0,24,17,17,21,0,64,3,3,22,0,67,11,14,21,0,33,0,29,22,0,16,13,14,21,0,52,21,0,52,21,0,16,21,0,16,21,0,58,21,0,57,21,0,30,21,0,30,21,0,32,21,0,32,21,0,43,21,0,42,0,29,21,0,48,17,0,6,0,57,17,0,0,21,0,48,17,21,0,50,0,0,21,0,49,17,0,0,0,45,21,0,42,0,46,0,29,8,0,2,21,0,50,19,8,16,3,13,0,20,16,0,36,0,29,7,21,0,6,17,0,20,21,0,66,17,0,27,16,22,0,68,11,14,21,0,52,0,38,0,50,7,16,21,0,53,0,31,21,0,54,17,21,0,16,0,38,0,64,7,16,21,0,16,0,13,16,0,24,16,0,0,0,57,17,3,4,0,20,21,0,67,17,0,20,16,22,0,69,11,14,21,0,58,0,38,0,65,7,16,21,0,57,0,38,0,66,7,16,21,0,45,0,29,21,0,30,17,0,0,0,52,17,21,0,56,21,0,45,0,29,21,0,32,17,0,0,0,52,17,21,0,29,21,0,1,0,0,21,0,40,17,0,26,21,0,36,17,0,0,21,1,12,0,30,16,0,1,0,67,17,17,21,0,4,0,29,21,0,48,17,0,0,0,53,17,21,0,39,0,29,21,0,49,17,0,2,0,69,17,0,1,21,0,50,17,0,0,0,68,17,0,14,0,45,0,59,8,0,2,0,51,19,0,0,0,18,19,16,3,9,0,20,16,0,20,21,0,69,17,0,29,21,0,68,17,22,0,70,11,14,21,1,24,0,29,21,0,21,17,0,0,21,0,61,17,0,38,0,11,0,44,0,21,8,7,21,0,58,0,13,0,44,0,24,0,46,0,0,8,8,21,0,69,17,0,33,21,0,68,17,0,20,0,57,17,0,26,16,0,36,0,29,7,21,0,70,0,6,0,57,17,0,40,0,4,7,0,62,17,0,5,16,0,0,0,57,17,0,20,0,50,17,0,42,0,0,7,16,17,17,0,38,0,20,7,0,54,0,24,0,44,0,25,0,46,0,39,0,21,7,8,8,0,52,17,0,19,16,0,29,21,0,21,17,17,22,0,71,11,14,0,65,0,20,21,0,70,17,21,1,28,16,21,0,54,21,0,71,3,3,25,21,0,1,21,1,25,16,22,0,3,22,0,4,22,0,5,22,0,6,4,4,11,14,21,0,3,21,1,29,21,0,5,21,0,4,3,2,17,22,0,7,22,0,8,22,0,9,4,3,11,14,21,0,6,0,38,21,1,27,7,16,0,20,21,0,2,17,0,29,21,1,22,0,16,21,0,8,17,0,2,21,0,2,0,13,16,0,1,21,0,5,17,0,0,21,1,22,17,17,0,1,21,0,8,17,17,22,0,10,11,14,21,0,7,21,0,10,21,0,9,3,3,25,21,0,1,0,25,16,0,30,16,0,14,0,50,17,25,21,0,1,0,29,0,45,21,0,2,0,26,21,0,1,17,8,0,47,0,38,0,57,7,8,16,21,1,9,21,0,2,0,36,0,29,7,16,17,25,21,0,2,0,2,16,22,0,3,11,14,21,0,1,21,0,3,0,41,0,10,7,16,0,49,0,26,0,45,21,0,3,8,0,44,21,1,3,0,46,0,3,8,0,5,9,0,46,21,0,0,8,8,0,20,0,7,0,0,21,0,3,0,46,0,2,8,19,0,45,21,1,3,8,19,8,0,57,0,1,21,0,2,17,17,25]) + ,[runtime[0],runtime[1],runtime[2],runtime[3],runtime[4],runtime[6],runtime[7],runtime[8],runtime[9],runtime[10],runtime[11],runtime[12],runtime[13],runtime[14],runtime[15],runtime[16],runtime[17],runtime[20],runtime[21],runtime[22],runtime[23],runtime[24],runtime[25],runtime[26],runtime[27],runtime[28],runtime[30],runtime[31],runtime[32],runtime[33],runtime[34],runtime[35],runtime[36],runtime[37],runtime[38],runtime[39],runtime[41],runtime[42],runtime[43],runtime[44],runtime[45],runtime[46],runtime[48],runtime[49],runtime[50],runtime[51],runtime[52],runtime[53],runtime[55],runtime[58],0,9,3,5,2,6,-1,1,4,10,3.14159265358979,Infinity,128,21,15,25,14,11,16,7,'\t','\n',str("0123456789"),str("ABCDEFGHIJKLMNOPQRSTUVWXYZ"),str("abcdefghijklmnopqrstuvwxyz"),str("+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!"),str("˜˘¨⌜⁼´˝`"),str("∘○⊸⟜⌾⊘◶⎉⚇⍟"),str("⋄,"),str("←↩→"),str("(){}⟨⟩"),str("‿"),str("·"),str("𝕊𝕏𝕎𝔽𝔾𝕤𝕩𝕨𝕗𝕘"),str("¯.π∞"),str("_"),str(" "),'#','\'','"','e',str("'")] + ,[[0,1,0,31],[0,0,391,30],[0,0,1523,13],[0,0,1840,6],[0,0,1913,72],[0,0,4903,11],[0,0,5026,3],[0,0,5041,3],[0,0,5081,4]] ) let bqn = src => run.apply(null,compile(str(src),runtime)); diff --git a/src/c.bqn b/src/c.bqn index eed5f843..4c9a9831 100644 --- a/src/c.bqn +++ b/src/c.bqn @@ -22,6 +22,7 @@ charSet←∾charGroups←⟨ # #'" eliminated during tokenization ⟩ bF‿bM‿bC‿bS‿bG‿bB‿bL‿bO‿bI‿bD‿bN‿bA‿bW←⊔/≠¨charGroups +M←⊢(0⊸≤∧≠⊸>)-⟜⊑ vi←+´≠¨9↑charGroups charRole←((vi-≠bI)↑/0∾≠¨3↑charGroups)∾(5/⌽↕2)∾0 spc←⥊3‿5‿6-⌜3‿0 @@ -38,17 +39,17 @@ Tokenize←{ cl←f/ToI⊑∘⌽˘cb c←charSet⊐f/𝕩 - w←(≠↑0∾⊢)⊸ׯ1⋆2|⊢)⊐)𝕩⋄br←p×𝕩∊2‿3⊏bB - sl←1⊸⌽⊸∨𝕩∊bL⋄sr←¯1⊸⌽⌾(g⊸⊏)sl⋄sa←sl∨sr + g←⍋+`p←bB(⊣(≠⊸>ׯ1⋆2|⊢)⊐)𝕩⋄br←p×𝕩 M 2‿3⊏bB + sl←1⊸⌽⊸∨𝕩 M bL⋄sr←¯1⊸⌽⌾(g⊸⊏)sl⋄sa←sl∨sr g⊏˜↩⍋g⊏sl⋄r×↩¬sa⋄o←p>0 r+↩(sa<𝕩=1⊑bB)(⊣∧¬⊸∨=○(⌈`(1+↕∘≠)⊸×)⊢)(¯1⊸⌽⌾(g⊸⊏)3=r)∨1≤r - rev←⍋+`1+¯1↓g((¯1∾⊣)(⊣⍋⊸⊏⊏˜-⊏˜⟜⍋)⟜⍋1(+`∘∾-∾˜)⊏)o∨sl∨𝕩∊bS + rev←⍋+`1+¯1↓g((¯1∾⊣)(⊣⍋⊸⊏⊏˜-⊏˜⟜⍋)⟜⍋1(+`∘∾-∾˜)⊏)o∨sl∨𝕩 M bS gf←⍋fd←+`rev⊏br rev⊏˜↩gf⋄fd⊏˜↩gf 𝕩⊏˜↩rev⋄bv←rev⊏br⋄b←/bv<0⋄fi←+`c←bv>0 FC←-⟜(≠↑0∾⊢)(c∾1)/·+`∾⟜0 - H←0<1↓·FC𝕩∊(5⊑bI)+⊢ + H←0<1↓·FC𝕩 M (5⊑bI)+⊢ ft←0∾(H↕3)+2×(H⥊3)⌈2×H⥊4 r↩((1↓ft)⊏(1+2⊸≤)⊸/↕4)⌾(b⊸⊏)rev⊏r - id←/idm←(0⊸≤∧<⟜nv)xv←𝕩-vi⋄idx←id⊏𝕩⋄sp←/𝕩∊bI - ad←(⌈`↕∘≠⊸×𝕩∊bG)⊏𝕩=⊑bG + id←/idm←(0⊸≤∧<⟜nv)xv←𝕩-vi⋄idx←id⊏𝕩⋄sp←/𝕩 M bI + ad←(⌈`↕∘≠⊸×𝕩 M bG)⊏𝕩=⊑bG g↩⍋+`rev⊏p-br⋄gr←g⊏rev⋄sll←1+2÷˜0(<-○/>)gr⊏sr-sl⋄l←/g⊏𝕩=5⊑bB g⊏˜↩gs←⍋gr⊏sl⋄gr↩g⊏rev⋄𝕩⊏˜↩g⋄r⊏˜↩g⋄o⊏˜↩gr⋄si←/gr⊏sr>sl gi←⍋g⋄l⊏↩⍋gs - s←𝕩∊bS⋄ps←s∨o∨gr⊏sl⋄a←𝕩∊2↑bG + s←𝕩 M bS⋄ps←s∨o∨gr⊏sl⋄a←𝕩 M 2↑bG r-↩ps∨a⋄op←r≥2⋄fe←(r≥1)∨1⌽r=3 tr←(⌈`↕∘≠⊸ׯ1⌽ps)⊏fe ma←tr<(𝕩=1⊑bG)∧1⌽fe -- cgit v1.2.3 From 67cdbb1270c911f9d37dfdee9f1a99e2eeaaf71d Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 5 Aug 2020 13:59:21 -0400 Subject: Precompute character code for letter e --- src/c.bqn | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/c.bqn b/src/c.bqn index 4c9a9831..e6fdedfe 100644 --- a/src/c.bqn +++ b/src/c.bqn @@ -22,6 +22,7 @@ charSet←∾charGroups←⟨ # #'" eliminated during tokenization ⟩ bF‿bM‿bC‿bS‿bG‿bB‿bL‿bO‿bI‿bD‿bN‿bA‿bW←⊔/≠¨charGroups +bA_e←4⊑bA M←⊢(0⊸≤∧≠⊸>)-⟜⊑ vi←+´≠¨9↑charGroups charRole←((vi-≠bI)↑/0∾≠¨3↑charGroups)∾(5/⌽↕2)∾0 @@ -59,7 +60,7 @@ ReadNum←{ Int←(n=⊑)◶⟨Nat,-·Nat 1⊸↓⟩ Dec←⊐⟜( Date: Wed, 5 Aug 2020 15:56:53 -0400 Subject: Add comparison to Co-dfns --- docs/implementation/codfns.html | 21 +++++++++++++++++++++ implementation/codfns.md | 26 ++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/implementation/codfns.html create mode 100644 implementation/codfns.md diff --git a/docs/implementation/codfns.html b/docs/implementation/codfns.html new file mode 100644 index 00000000..275a33c5 --- /dev/null +++ b/docs/implementation/codfns.html @@ -0,0 +1,21 @@ + + +

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.

+

The shared goals of BQN and Co-dfns are to implement a compiler for an array language with whole-array operations. This provides the theoretical benefit of a short critical path, which in practice means that both compilers can make good use of a GPU or a CPU's vector instructions simply by providing an appropriate runtime (however, only Co-dfns has such a runtime—an ArrayFire program on the GPU and Dyalog APL on the CPU). The two implementations also share a preference for working "close to the metal" by passing around arrays of numbers rather than creating abstract types to work with data. Objects are right out. These choices lead to a compact source code implementation, and may have some benefits in terms of how easy it is to write and understand the compiler.

+

Current differences

+

Co-dfns development has primarily been focused on the core compiler, and not parsing, code generation, or the runtime. The associated Ph.D. thesis and famous 17 lines figure refer to this section, which transforms the abstract syntax tree (AST) of a program to a lower-level form, and resolves lexical scoping by linking variables to their definitions. While all of Co-dfns is written in APL, other sections aren't necessarily designed to be data-parallel and don't have the same performance guarantees. For example, the parser appears to be written with some sort of parser combinator. In contrast, BQN is almost entirely written in a data-parallel style (identifier processing and literal evaluation are currently the only exceptions). It does not maintain the same clean separation between compiler sections: token formation is separated into its own function, but parsing, AST manipulation, and code generation overlap.

+

The core Co-dfns compiler is based on manipulating the syntax tree, which is mostly stored as parent and sibling vectors—that is, lists of indices of other nodes in the tree. BQN is less methodical, but generally treats the source tokens as a simple list. This list is reordered in various ways, allowing operations that behave like tree traversals to be performed with scans under the right ordering. This strategy allows BQN to be much stricter in the kinds of operations it uses. Co-dfns regularly uses (repeat until convergence) for iteration and creates nested arrays with (Key, like Group), but BQN has only a single instance of iteration to resolve quotes and comments, and only uses Group to extract identifiers and literals. This means that most primitives, if we count simple reductions and scans as single primitives, are executed a fixed number of times during execution, making complexity analysis even easier than in Co-dfns.

+

A goal for BQN was to not only write the compiler in BQN but to use BQN for the runtime as much as possible, while Co-dfns uses conventional runtimes written without mainly in C/C++. This goal has largely been achieved and the current BQN runtime uses a very small number of basic array operations currently provided by Javascript, but more basic operations may be added in the future for performance reasons.

+

Future differences

+

BQN shares several design decisions with Co-dfns that are not intended to be permanent. This is primarily because I wanted to quickly have a working BQN implementation and reach parity with the Co-dfns compiler (not the runtime!). I think these goals have been achieved and will shift BQN's style to support other goals:

+
    +
  • Better error reporting
  • +
  • Teaching
  • +
  • Multiple backends (bytecode, Wasm, machine code)
  • +
  • Optimization
  • +
  • Testing and debugging the compiler
  • +
+

Aaron advocates the almost complete separation of code from comments (thesis) in addition to his very terse style as a general programming methodology. I think these choices are good for rapid development but not for maintainance and explaining the code to other developers. I will write separate long-form material on implementation, but will start expanding the source code and adding comments, mainly to explain the meaning of variables whose definitions are not instantly obvious.

+

Co-dfns does not check for compilation errors. BQN should have complete error checking, and good error messages. Maybe it can even give better error diagnosis than sequential compilers in some cases by examining the input as a whole to find the most likely cause of the mistake. Particularly for web distribution it may still make sense to have a version of the compiler that doesn't check for errors; this should be possible simply by setting a configuration parameter when compiling the compiler.

+ diff --git a/implementation/codfns.md b/implementation/codfns.md new file mode 100644 index 00000000..f80733c2 --- /dev/null +++ b/implementation/codfns.md @@ -0,0 +1,26 @@ +# Co-dfns versus BQN's implementation + +The BQN self-hosted compiler is directly inspired by the [Co-dfns](https://github.com/Co-dfns/Co-dfns) project, a compiler for a subset of [Dyalog APL](../doc/fromDyalog.md). 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. + +The shared goals of BQN and Co-dfns are to implement a compiler for an array language with whole-array operations. This provides the theoretical benefit of a short *critical path*, which in practice means that both compilers can make good use of a GPU or a CPU's vector instructions simply by providing an appropriate runtime (however, only Co-dfns has such a runtime—an ArrayFire program on the GPU and Dyalog APL on the CPU). The two implementations also share a preference for working "close to the metal" by passing around arrays of numbers rather than creating abstract types to work with data. Objects are right out. These choices lead to a compact source code implementation, and may have some benefits in terms of how easy it is to write and understand the compiler. + +## Current differences + +Co-dfns development has primarily been focused on the core compiler, and not parsing, code generation, or the runtime. The associated Ph.D. thesis and famous 17 lines figure refer to this section, which transforms the abstract syntax tree (AST) of a program to a lower-level form, and resolves lexical scoping by linking variables to their definitions. While all of Co-dfns is written in APL, other sections aren't necessarily designed to be data-parallel and don't have the same performance guarantees. For example, the parser appears to be written with some sort of parser combinator. In contrast, BQN is almost entirely written in a data-parallel style (identifier processing and literal evaluation are currently the only exceptions). It does not maintain the same clean separation between compiler sections: [token formation](../spec/token.md) is separated into its own function, but parsing, AST manipulation, and code generation overlap. + +The core Co-dfns compiler is based on manipulating the syntax tree, which is mostly stored as parent and sibling vectors—that is, lists of indices of other nodes in the tree. BQN is less methodical, but generally treats the source tokens as a simple list. This list is reordered in various ways, allowing operations that behave like tree traversals to be performed with scans under the right ordering. This strategy allows BQN to be much stricter in the kinds of operations it uses. Co-dfns regularly uses `⍣≡` (repeat until convergence) for iteration and creates nested arrays with `⌸` (Key, like [Group](../doc/group.md)), but BQN has only a single instance of iteration to resolve quotes and comments, and only uses Group to extract identifiers and literals. This means that most primitives, if we count simple reductions and scans as single primitives, are executed a fixed number of times during execution, making complexity analysis even easier than in Co-dfns. + +A goal for BQN was to not only write the compiler in BQN but to use BQN for the runtime as much as possible, while Co-dfns uses conventional runtimes written without mainly in C/C++. This goal has largely been achieved and the current BQN runtime uses a very small number of basic array operations currently provided by Javascript, but more basic operations may be added in the future for performance reasons. + +## Future differences + +BQN shares several design decisions with Co-dfns that are not intended to be permanent. This is primarily because I wanted to quickly have a working BQN implementation and reach parity with the Co-dfns compiler (not the runtime!). I think these goals have been achieved and will shift BQN's style to support other goals: +- Better error reporting +- Teaching +- Multiple backends (bytecode, Wasm, machine code) +- Optimization +- Testing and debugging the compiler + +Aaron advocates the almost complete separation of code from comments (thesis) in addition to his very terse style as a general programming methodology. I think these choices are good for rapid development but not for maintainance and explaining the code to other developers. I will write separate long-form material on implementation, but will start expanding the source code and adding comments, mainly to explain the meaning of variables whose definitions are not instantly obvious. + +Co-dfns does not check for compilation errors. BQN should have complete error checking, and good error messages. Maybe it can even give better error diagnosis than sequential compilers in some cases by examining the input as a whole to find the most likely cause of the mistake. Particularly for web distribution it may still make sense to have a version of the compiler that doesn't check for errors; this should be possible simply by setting a configuration parameter when compiling the compiler. -- cgit v1.2.3 From 8ca1c4e5c12af96605f63389a0d988795ba40112 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 5 Aug 2020 17:52:56 -0400 Subject: Add help for non-function characters --- editors/vim/autoload/bqn.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/editors/vim/autoload/bqn.txt b/editors/vim/autoload/bqn.txt index 258a81ae..66d6cfce 100644 --- a/editors/vim/autoload/bqn.txt +++ b/editors/vim/autoload/bqn.txt @@ -1,3 +1,27 @@ +← Define +↩ Change +→ Return +⋄ Separator +, Separator +: Header separator +; Body separator +( Begin expression +) End expression +{ Begin function or modifier +} End function or modifier +⟨ Begin list +⟩ End list +‿ Strand +· Nothing +𝕨 Left argument +𝕎 Left argument (function) +𝕩 Right argument +𝕏 Right argument (function) +𝕗 Modifier left operand (subject) +𝔽 Modifier left operand +𝕘 2-modifier right operand (subject) +𝔾 2-modifier right operand +# Comment + Conjugate ; Add - Negate ; Subtract × Sign ; Multiply @@ -38,3 +62,22 @@ ∊ Unique Mask ; Member of ⍷ Deduplicate ; Find ⊔ Group Indices* ; Group* +! Assert ; Assert with message +˜ Self/Swap {𝕩𝔽𝕨⊣𝕩} +∘ Atop {𝔽𝕨𝔾𝕩} +○ Over {(𝔾𝕨)𝔽𝔾𝕩} +⊸ Before/Bind {(𝔽𝕨⊣𝕩)𝔾𝕩} +⟜ After/Bind {(𝕨⊣𝕩)𝔽𝔾𝕩} +⌾ Under {𝔾⁼∘𝔽○𝔾} OR {(𝔾𝕩)↩𝕨𝔽○𝔾𝕩⋄𝕩} +⊘ Valences {𝔽𝕩;𝕨𝔾𝕩} +◶ Choose {f←(𝕨𝔽𝕩)⊑𝕘 ⋄ 𝕨F𝕩} +˘ Cells +⎉ Rank +¨ Each +⚇ Depth +⌜ Table +⁼ Undo +⍟ Repeat +´ Fold +˝ Insert +` Scan -- cgit v1.2.3