ran test error message updater
This commit is contained in:
parent
3362d46854
commit
308f93368e
@ -22,55 +22,55 @@
|
||||
!"⎉: Result rank too large" % (1⥊˜ 0∾204⥊2)⎉50 1⥊˜ 0∾100⥊2
|
||||
!"⎉: Result rank too large (204 ≡ =𝕩, 200 ≡ =𝔽v)" % {𝕊:(200⥊1)⥊1}⎉1 (205⥊1)⥊1
|
||||
|
||||
!"⎉: Argument frames don't agree (⟨3⟩ ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩, common frame of 1 axes)" % "abc" ⊢⎉0 "ab"
|
||||
!"˘: Argument frames don't agree (⟨3⟩ ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩, common frame of 1 axes)" % "abc" ⊢˘ "ab"
|
||||
!"𝕨⎉𝕩: Argument frames don't agree (⟨3⟩ ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩, common frame of 1 axes)" % "abc" ⊢⎉0 "ab"
|
||||
!"𝕨˘𝕩: Argument frames don't agree (⟨3⟩ ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩, common frame of 1 axes)" % "abc" ⊢˘ "ab"
|
||||
! ∧´{𝕊: ! (∾≡{𝕨∾𝕩}´) (<•rand.Range∘≠⊸⊑ ⟨"ab",1‿2,⟨⟩,↕0,""⟩) ∾˜ (4•rand.Range≠)⊸⊏ ⟨1, {⇐}, 'a', <'a', <{⇐}, "ab", ↕0, ""⟩}¨↕10000
|
||||
|
||||
# error cases that could be affected by special code
|
||||
!"∧: Argument cannot have rank 0" % ∧˘↕2
|
||||
!"∨: Argument cannot have rank 0" % ∨˘"a"
|
||||
!"∧𝕩: 𝕩 cannot have rank 0" % ∧˘↕2
|
||||
!"∨𝕩: 𝕩 cannot have rank 0" % ∨˘"a"
|
||||
!"Expected non-negative integer, got ¯3" % 2‿¯3/⎉1 6‿2⥊0
|
||||
!"/: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 4)" % 1‿2‿3⊸/˘≍4‿5‿6‿7
|
||||
!"/: Simple 𝕨 must have rank 0 or 1 (2≡=𝕨)" % (2‿3‿1⥊↕4) /˘ ↕2
|
||||
!"𝕨/𝕩: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 4)" % 1‿2‿3⊸/˘≍4‿5‿6‿7
|
||||
!"𝕨/𝕩: Simple 𝕨 must have rank 0 or 1 (2≡=𝕨)" % (2‿3‿1⥊↕4) /˘ ↕2
|
||||
!"𝕨/𝕩: Length of compound 𝕨 must be at most rank of 𝕩" % (<↕0)/˘○(5⊸⥊)<"ab"
|
||||
!"⊏: Indexing out-of-bounds (24∊𝕨, 4≡≠𝕩)" % 1‿24⊏⎉1↕4‿4
|
||||
!"⊏: Indexing out-of-bounds (4∊𝕨, 4≡≠𝕩)" % ⊏⎉1˜6‿4⥊↕24
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (24∊𝕨, 4≡≠𝕩)" % 1‿24⊏⎉1↕4‿4
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (4∊𝕨, 4≡≠𝕩)" % ⊏⎉1˜6‿4⥊↕24
|
||||
!"𝕨⊏𝕩: 𝕨 must be an array of numbers or list of such arrays" % 0‿@‿¯1⊏⎉1 5‿2⥊0.5
|
||||
!"Expected integer, got ¯5.25" % ¯5.25⊏˘∘‿4⥊↕24
|
||||
!"⊏: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % 0‿0‿1 ⊏˘○(≍˘) 10000×↕3
|
||||
!"⊏: 𝕩 cannot be a unit" % 0⊏˘5⥊<"a"
|
||||
!"⊏: 𝕩 cannot be a unit" % (3‿0⥊⟨⟩)⊏˘↕3
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % 0‿0‿1 ⊏˘○(≍˘) 10000×↕3
|
||||
!"𝕨⊏𝕩: 𝕩 cannot be a unit" % 0⊏˘5⥊<"a"
|
||||
!"𝕨⊏𝕩: 𝕩 cannot be a unit" % (3‿0⥊⟨⟩)⊏˘↕3
|
||||
!"Expected integer, got 0.1" % 0.1⊑˘3‿5⥊↕15
|
||||
!"⊑: 𝕩 must be a list when 𝕨 is a number (3‿4 ≡ ≢𝕩)" % 5⊑˘↕2‿3‿4
|
||||
!"𝕨⊑𝕩: 𝕩 must be a list when 𝕨 is a number (3‿4 ≡ ≢𝕩)" % 5⊑˘↕2‿3‿4
|
||||
!">: Result rank too large (80 ≡ =𝕩, 205 ≡ =⊑𝕩)" % >⎉80 (200⥊1)⥊<(205⥊1)⥊1
|
||||
!"⎉: Result rank too large (195 ≡ =𝕩, 210 ≡ =𝔽v)" % >⎉5 (200⥊1)⥊<(205⥊1)⥊1
|
||||
!"∾: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc"∾"def")∾˘○(3/≍)≍"a"
|
||||
!"∾: Argument ranks must differ by 1 or less (0≡=𝕨, 2≡=𝕩)" % 1∾˘↕3‿3‿3
|
||||
!"∾: Lengths not matchable (4‿2 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (3‿4‿2⥊4)∾˘3‿3‿3⥊5
|
||||
!"≍: 𝕨 and 𝕩 must have equal shapes (3‿4 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (↕3‿4)≍⎉2 2‿3‿3⥊↕18
|
||||
!"≍: Result rank too large (255≡=𝕩)" % ≍⎉∞ 0⥊˜255⥊1
|
||||
!"𝕨∾𝕩: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc"∾"def")∾˘○(3/≍)≍"a"
|
||||
!"𝕨∾𝕩: Argument ranks must differ by 1 or less (0≡=𝕨, 2≡=𝕩)" % 1∾˘↕3‿3‿3
|
||||
!"𝕨∾𝕩: Lengths not matchable (4‿2 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (3‿4‿2⥊4)∾˘3‿3‿3⥊5
|
||||
!"𝕨≍𝕩: 𝕨 and 𝕩 must have equal shapes (3‿4 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (↕3‿4)≍⎉2 2‿3‿3⥊↕18
|
||||
!"≍𝕩: Result rank too large (255≡=𝕩)" % ≍⎉∞ 0⥊˜255⥊1
|
||||
!"shift: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc"∾"def")«˘○(3/≍)≍"a"
|
||||
!"shift: =𝕨 must be =𝕩 or ¯1+=𝕩 (0≡=𝕨, 2≡=𝕩)" % 1«˘↕2‿2‿2
|
||||
!"»: Argument cannot be a scalar" % »⎉0 2‿3‿1⥊↕6
|
||||
!"⌽: Argument cannot be a unit" % ⌽˘↕10
|
||||
!"»𝕩: 𝕩 cannot be a scalar" % »⎉0 2‿3‿1⥊↕6
|
||||
!"⌽𝕩: 𝕩 cannot be a unit" % ⌽˘↕10
|
||||
!"Expected integer, got 1.5" % 1.5↑˘↕2‿3‿2
|
||||
!"↑: 𝕨 must have rank at most 1 (1‿2 ≡ ≢𝕨)" % (≍1‿2)⊸↑˘↕2‿3‿2
|
||||
!"↓: 𝕨 must have rank at most 1 (4‿2 ≡ ≢𝕨)" % (4‿2⥊↕8)↓˘○≍@
|
||||
!"𝕨↑𝕩: 𝕨 must have rank at most 1 (1‿2 ≡ ≢𝕨)" % (≍1‿2)⊸↑˘↕2‿3‿2
|
||||
!"𝕨↓𝕩: 𝕨 must have rank at most 1 (4‿2 ≡ ≢𝕨)" % (4‿2⥊↕8)↓˘○≍@
|
||||
!"Integer out of range: 1e20" % 1e20⌽˘3‿10⥊10
|
||||
!"Expected number" % 3‿4‿@⌽˘↕3‿4
|
||||
!"Expected integer, got 0.5" % 0.5⊸⌽˘4‿3⥊↕12
|
||||
!"↑: Argument must have rank at least 1" % ↑˘↕2
|
||||
!"↓: Argument must have rank at least 1" % ↓⎉0 2‿1⥊0
|
||||
!"⊐: 𝕩 cannot have rank 0" % ⊐˘"abcd"
|
||||
!"⊒: Argument cannot have rank 0" % ⊒˘"abcd"
|
||||
!"∊: Argument cannot have rank 0" % ∊˘"abcd"
|
||||
!"⍋: 𝕨 must be sorted" % 0‿2‿1⊸⍋˘ 3‿4⥊↕12
|
||||
!"`: Shape of 𝕨 must match the cell of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿3 ≡ ≢𝕩)" % (2‿2⥊1)+`˘2‿2‿3⥊0.4
|
||||
!"`: Shape of 𝕨 must match the cell of 𝕩 (⟨⟩ ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % 2+`˘↕3‿3‿3
|
||||
!"´: Argument must be a list (3‿3 ≡ ≢𝕩)" % +´˘2‿3‿3⥊↕18
|
||||
!"´: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % 1+´˘2‿3‿3⥊↕18
|
||||
!"˝: 𝕩 must have rank at least 1" % +˝˘˘10‿10⥊↕100
|
||||
!"˝: 𝕩 must have rank at least 1" % ∾˝⎉¯2 2‿3⥊9
|
||||
!"↑𝕩: 𝕩 must have rank at least 1" % ↑˘↕2
|
||||
!"↓𝕩: 𝕩 must have rank at least 1" % ↓⎉0 2‿1⥊0
|
||||
!"⊐𝕩: 𝕩 cannot have rank 0" % ⊐˘"abcd"
|
||||
!"⊒𝕩: 𝕩 cannot have rank 0" % ⊒˘"abcd"
|
||||
!"∊𝕩: 𝕩 cannot have rank 0" % ∊˘"abcd"
|
||||
!"𝕨⍋𝕩: 𝕨 must be sorted" % 0‿2‿1⊸⍋˘ 3‿4⥊↕12
|
||||
!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿3 ≡ ≢𝕩)" % (2‿2⥊1)+`˘2‿2‿3⥊0.4
|
||||
!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (⟨⟩ ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % 2+`˘↕3‿3‿3
|
||||
!"´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % +´˘2‿3‿3⥊↕18
|
||||
!"𝕨´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % 1+´˘2‿3‿3⥊↕18
|
||||
!"˝𝕩: 𝕩 must have rank at least 1" % +˝˘˘10‿10⥊↕100
|
||||
!"˝𝕩: 𝕩 must have rank at least 1" % ∾˝⎉¯2 2‿3⥊9
|
||||
|
||||
{∾˝˘ ⥊⟜(↕×´) 2+↕𝕩}¨ 2‿3‿4‿5 %% ⥊⟜(↕×´)¨ ⟨2‿3,2‿12,2‿12‿5,2‿12‿5‿6⟩
|
||||
{∾˝˘ (2+↕𝕩)⥊<"hi"}¨ 2‿3‿4‿5 %% ⥊⟜(<"hi")¨ ⟨2‿3,2‿12,2‿12‿5,2‿12‿5‿6⟩
|
||||
@ -89,15 +89,15 @@
|
||||
%USE eqvar ⋄ ¯1‿¯2‿¯3 {𝕨⊸⊏˘𝕩}_eqvar 8‿80⥊↕557 %% 8‿3⥊79‿78‿77‿159‿158‿157‿239‿238‿237‿319‿318‿317‿399‿398‿397‿479‿478‿477‿2‿1‿0‿82‿81‿80
|
||||
1‿2‿0‿1‿¯1⊸⊏⎉1 2‿3‿4⥊↕24 %% 2‿3‿5⥊1‿2‿0‿1‿3‿5‿6‿4‿5‿7‿9‿10‿8‿9‿11‿13‿14‿12‿13‿15‿17‿18‿16‿17‿19‿21‿22‿20‿21‿23
|
||||
1‿2‿0‿1‿¯1⊸⊏⎉2 2‿3‿4⥊↕24 %% 2‿5‿4⥊4‿5‿6‿7‿8‿9‿10‿11‿0‿1‿2‿3‿4‿5‿6‿7‿8‿9‿10‿11‿16‿17‿18‿19‿20‿21‿22‿23‿12‿13‿14‿15‿16‿17‿18‿19‿20‿21‿22‿23
|
||||
!"⊏: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar ⋄ 0‿¯1‿1‿¯1 {𝕨⊸⊏˘𝕩}_evar ≍˘↕5
|
||||
!"⊏: Indexing out-of-bounds (¯2∊𝕨, 1≡≠𝕩)" % %USE evar ⋄ 0‿¯1‿¯2‿¯1 {𝕨⊸⊏˘𝕩}_evar ≍˘↕5
|
||||
!"⊏: Indexing out-of-bounds (¯129∊𝕨, 128≡≠𝕩)" % %USE evar ⋄ 10‿¯129 {𝕨⊸⊏˘𝕩}_evar 10‿128⥊1
|
||||
!"⊏: Indexing out-of-bounds (128∊𝕨, 128≡≠𝕩)" % %USE evar ⋄ 10‿128 {𝕨⊸⊏˘𝕩}_evar 10‿128⥊1
|
||||
!"⊏: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar ⋄ 1‿0‿0‿1 {𝕨⊸⊏˘𝕩}_evar 10‿1⥊1
|
||||
!"⊏: Indexing out-of-bounds (1000∊𝕨, 3≡≠𝕩)" % %USE evar ⋄ (3⥊1000) {𝕨⊸⊏˘𝕩}_evar 100‿3⥊1
|
||||
!"⊏: Indexing out-of-bounds (1000∊𝕨, 4≡≠𝕩)" % %USE evar ⋄ (4⥊1000) {𝕨⊸⊏˘𝕩}_evar 100‿4⥊1
|
||||
!"⊏: Indexing out-of-bounds (1000∊𝕨, 8≡≠𝕩)" % %USE evar ⋄ (8⥊1000) {𝕨⊸⊏˘𝕩}_evar 100‿8⥊1
|
||||
!"⊏: Indexing out-of-bounds (100∊𝕨, 8≡≠𝕩)" % %USE evar ⋄ (<100) {𝕨⊸⊏˘𝕩}_evar 100‿8⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar ⋄ 0‿¯1‿1‿¯1 {𝕨⊸⊏˘𝕩}_evar ≍˘↕5
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (¯2∊𝕨, 1≡≠𝕩)" % %USE evar ⋄ 0‿¯1‿¯2‿¯1 {𝕨⊸⊏˘𝕩}_evar ≍˘↕5
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (¯129∊𝕨, 128≡≠𝕩)" % %USE evar ⋄ 10‿¯129 {𝕨⊸⊏˘𝕩}_evar 10‿128⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (128∊𝕨, 128≡≠𝕩)" % %USE evar ⋄ 10‿128 {𝕨⊸⊏˘𝕩}_evar 10‿128⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar ⋄ 1‿0‿0‿1 {𝕨⊸⊏˘𝕩}_evar 10‿1⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1000∊𝕨, 3≡≠𝕩)" % %USE evar ⋄ (3⥊1000) {𝕨⊸⊏˘𝕩}_evar 100‿3⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1000∊𝕨, 4≡≠𝕩)" % %USE evar ⋄ (4⥊1000) {𝕨⊸⊏˘𝕩}_evar 100‿4⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (1000∊𝕨, 8≡≠𝕩)" % %USE evar ⋄ (8⥊1000) {𝕨⊸⊏˘𝕩}_evar 100‿8⥊1
|
||||
!"𝕨⊏𝕩: Indexing out-of-bounds (100∊𝕨, 8≡≠𝕩)" % %USE evar ⋄ (<100) {𝕨⊸⊏˘𝕩}_evar 100‿8⥊1
|
||||
!"Integer out of range: 9e99" % %USE evar ⋄ (<9e99) {𝕨⊸⊏˘𝕩}_evar 100‿8⥊1
|
||||
⟨1‿2⟩⊸⊏˘ 10‿8⥊↕100 %% (8×↕10) +⌜ 1‿2
|
||||
⟨1‿2⟩⊸⊏˘ 10‿4‿2⥊↕100 %% (8×↕10) +⌜ [2‿3,4‿5]
|
||||
@ -131,15 +131,15 @@
|
||||
%USE eqvar ⋄ ≍˘⟜'!' _eqvar 100⥊7↑1 %% ∾⟜'!'○•internal.Keep˘ 0=7|↕100
|
||||
%USE eqvar ⋄ ≍˘_eqvar˜ 3‿3⥊↕9 %% 3‿2‿3⥊0‿1‿2‿0‿1‿2‿3‿4‿5‿3‿4‿5‿6‿7‿8‿6‿7‿8
|
||||
%USE eqvar ⋄ (2‿3‿4‿5‿1⥊↕11) ≍⎉2 _eqvar 2‿3‿4‿5‿1⥊↕7 %% (2‿3‿4‿5‿1⥊↕11) ≍○•internal.PureKeep⎉2 2‿3‿4‿5‿1⥊↕7
|
||||
!"˘: Argument frames don't agree (3‿4 ≡ ≢𝕨, 5‿4 ≡ ≢𝕩, common frame of 1 axes)" % (3‿4⥊2) ≍˘ 5‿4⥊2
|
||||
!"≍: 𝕨 and 𝕩 must have equal shapes (⟨4⟩ ≡ ≢𝕨, ⟨5⟩ ≡ ≢𝕩)" % (3‿4⥊2) ≍˘ 3‿5⥊2
|
||||
!"≍: 𝕨 and 𝕩 must have equal shapes (2‿2‿2 ≡ ≢𝕨, 2‿3‿2 ≡ ≢𝕩)" % (3‿2‿2‿2⥊2) ≍˘ 3‿2‿3‿2⥊2
|
||||
!"≍: 𝕨 and 𝕩 must have equal shapes (4‿1 ≡ ≢𝕨, ⟨4⟩ ≡ ≢𝕩)" % (3‿4‿1⥊0) ≍˘ 3‿4⥊0
|
||||
!"𝕨˘𝕩: Argument frames don't agree (3‿4 ≡ ≢𝕨, 5‿4 ≡ ≢𝕩, common frame of 1 axes)" % (3‿4⥊2) ≍˘ 5‿4⥊2
|
||||
!"𝕨≍𝕩: 𝕨 and 𝕩 must have equal shapes (⟨4⟩ ≡ ≢𝕨, ⟨5⟩ ≡ ≢𝕩)" % (3‿4⥊2) ≍˘ 3‿5⥊2
|
||||
!"𝕨≍𝕩: 𝕨 and 𝕩 must have equal shapes (2‿2‿2 ≡ ≢𝕨, 2‿3‿2 ≡ ≢𝕩)" % (3‿2‿2‿2⥊2) ≍˘ 3‿2‿3‿2⥊2
|
||||
!"𝕨≍𝕩: 𝕨 and 𝕩 must have equal shapes (4‿1 ≡ ≢𝕨, ⟨4⟩ ≡ ≢𝕩)" % (3‿4‿1⥊0) ≍˘ 3‿4⥊0
|
||||
(<"ab") ≍˘ 2⥊"cd" %% 2‿2⥊⟨"ab", 'c', "ab", 'd'⟩
|
||||
(<"ab") ≍˘˜ 2⥊"cd" %% 2‿2⥊⟨'c', "ab", 'd', "ab"⟩
|
||||
"ab" ≍⎉1 4‿2⥊"cd" %% 4‿2‿2⥊"abcdabcdabcdabcd"
|
||||
!"≍: 𝕨 and 𝕩 must have equal shapes (⟨⟩ ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % ≍⟜"ab"˘ "cd"
|
||||
!"≍: 𝕨 and 𝕩 must have equal shapes (⟨2⟩ ≡ ≢𝕨, ⟨⟩ ≡ ≢𝕩)" % "ab"⊸≍˘ "cd"
|
||||
!"𝕨≍𝕩: 𝕨 and 𝕩 must have equal shapes (⟨⟩ ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % ≍⟜"ab"˘ "cd"
|
||||
!"𝕨≍𝕩: 𝕨 and 𝕩 must have equal shapes (⟨2⟩ ≡ ≢𝕨, ⟨⟩ ≡ ≢𝕩)" % "ab"⊸≍˘ "cd"
|
||||
|
||||
(
|
||||
%USE IS_HEAPVERIFY
|
||||
|
||||
@ -8,9 +8,9 @@
|
||||
!"•FFI: 𝕩 must be a list" % @•FFI @
|
||||
!"•FFI: 𝕩 must be a list" % @•FFI 2‿2⥊<"a"
|
||||
!"•FFI: Path must be a list of characters" % 1‿2 •FFI ""‿"bqn_init"
|
||||
!"This function can't be called monadically" % •FFI ""‿"bqn_init"
|
||||
!"Fn𝕩: This function can't be called monadically" % •FFI ""‿"bqn_init"
|
||||
@ •FFI⎊{𝕊: 28↑•CurrentError@} ""‿"bqn_this symbol doesn't exist" %% "FFI: Failed to find symbol: "
|
||||
!"FFI: Type must be a string" % @•FFI "hello"
|
||||
!"FFI𝕩: Type must be a string" % @•FFI "hello"
|
||||
!"FFI: Too many arguments" % @•FFI""‿"bqn_init"∾70000⥊<"i32"
|
||||
!"Type parser: Unexpected character '?'" % @•FFI""‿"bqn_init"‿"?"
|
||||
!"Type parser: expected number" % @•FFI""‿"bqn_init"‿"["
|
||||
@ -223,7 +223,7 @@
|
||||
!"Expected integer, got character" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Add '!'}}
|
||||
!"(pointer).Sub: Unexpected argument type: character" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Sub '!'}}
|
||||
!"Expected non-negative integer, got character" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Field '!'}}
|
||||
!"Type parser: Pointer type must be a string" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Cast '!'}}
|
||||
!"Type parser𝕩: Pointer type must be a string" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Cast '!'}}
|
||||
!"Expected integer, got character" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Read '!'}}
|
||||
!"FFI: improper value for i8" % %USE WallocE {{𝕊al: p←"i8" Al 1 ⋄ p.Write '!'}}
|
||||
|
||||
|
||||
@ -38,12 +38,12 @@ a←(•ParseFloat¨ "1.2"‿"-0"‿"0")∾-⊸⋈0÷0 ⋄ ! (0‿3‿3‿3⊏a)
|
||||
{b←•internal.Unshare a←"Ai8"•internal.Variation ∾⟨16⥊0‿0‿0‿0‿0‿0‿0‿¯128, 8⥊0, 8↑2⟩ ⋄ c←8‿64•bit._cast a ⋄ ! 1‿0‿0‿1≡∊c ⋄ •internal.Keep •Hash c ⋄ ! a≡b} # make sure sign bit doesn't mutate away
|
||||
|
||||
# error messages
|
||||
!"∊: 𝕩 cannot have rank 0" % 1‿2‿3∊0
|
||||
!"⊐: 𝕨 cannot have rank 0" % 0⊐1‿2‿3
|
||||
!"⊒: 𝕨 cannot have rank 0" % 0⊒1‿2‿3
|
||||
!"∊: Rank of 𝕨 must be at least the cell rank of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿2‿2 ≡ ≢𝕩)" % 1‿2∊2‿2‿2⥊1‿2
|
||||
!"⊐: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (2‿2‿2⥊1‿2)⊐1‿2
|
||||
!"⊒: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (2‿2‿2⥊1‿2)⊒1‿2
|
||||
!"𝕨∊𝕩: 𝕩 cannot have rank 0" % 1‿2‿3∊0
|
||||
!"𝕨⊐𝕩: 𝕨 cannot have rank 0" % 0⊐1‿2‿3
|
||||
!"𝕨⊒𝕩: 𝕨 cannot have rank 0" % 0⊒1‿2‿3
|
||||
!"𝕨∊𝕩: Rank of 𝕨 must be at least the cell rank of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿2‿2 ≡ ≢𝕩)" % 1‿2∊2‿2‿2⥊1‿2
|
||||
!"𝕨⊐𝕩: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (2‿2‿2⥊1‿2)⊐1‿2
|
||||
!"𝕨⊒𝕩: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (2‿2‿2⥊1‿2)⊒1‿2
|
||||
|
||||
# hashmap
|
||||
("abc"‿"de"‿"fgh" •HashMap ⥊¨↕3).Get "fgh" %% ⟨2⟩
|
||||
@ -54,8 +54,8 @@ a←(•ParseFloat¨ "1.2"‿"-0"‿"0")∾-⊸⋈0÷0 ⋄ ! (0‿3‿3‿3⊏a)
|
||||
(((•HashMap˜↕4).Delete 1).Set´ 1‿"one").Keys@ %% 0‿2‿3‿1
|
||||
(((•HashMap˜↕4).Delete 1).Set´ 1‿"one").Values@ %% 0‿2‿3‿"one"
|
||||
({𝕩.Set´"xy"}⍟4•HashMap˜↕0).Count@ %% 1
|
||||
!"•HashMap: Arguments must be lists (⟨⟩≡≢𝕨, ⟨3⟩≡≢𝕩)" % 'a' •HashMap "str"
|
||||
!"•HashMap: 𝕨 and 𝕩 must have the same length (4≡≠𝕨, 3≡≠𝕩)" % "stri" •HashMap "str"
|
||||
!"𝕨•HashMap𝕩: Arguments must be lists (⟨⟩≡≢𝕨, ⟨3⟩≡≢𝕩)" % 'a' •HashMap "str"
|
||||
!"𝕨•HashMap𝕩: 𝕨 and 𝕩 must have the same length (4≡≠𝕨, 3≡≠𝕩)" % "stri" •HashMap "str"
|
||||
!"•HashMap: 𝕨 contained duplicate keys" % "strs" •HashMap "stri"
|
||||
!"(hashmap).Get: key not found" % ("abc"‿"de"‿"fgh" •HashMap ⥊¨↕3).Get "fg"
|
||||
!"(hashmap).Delete: key not found" % ("abc"‿"de"‿"fgh" •HashMap ⥊¨↕3).Delete 'a'
|
||||
|
||||
@ -17,11 +17,11 @@
|
||||
! (⊑¨r1‿r3) ≡ ⍷⊑¨r1‿r2‿r3‿r4
|
||||
)
|
||||
|
||||
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic.bqn"
|
||||
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic.bqn"
|
||||
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic.bqn"
|
||||
!"•Import: cyclic import of "".../cyclic_A.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic_A.bqn"
|
||||
!"•Import: cyclic import of "".../cyclic_B.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic_B.bqn"
|
||||
!"•Import: cyclic import of "".../cyclic_A.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic_B.bqn"
|
||||
!"•Import: cyclic import of "".../cyclic_B.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic_A.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic_A.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic_A.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic_B.bqn""" % %USE file ⋄ •Import⎊CleanPath File "cyclic_B.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic_A.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic_B.bqn"
|
||||
!"•Import𝕩: cyclic import of "".../cyclic_B.bqn""" % %USE file ⋄ ⟨⟩•Import⎊CleanPath File "cyclic_A.bqn"
|
||||
%USE file ⋄ 3 •Import File "notCyclic.bqn" %% 30
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
!"Calling a modifier" % 4 {˜}˝↕1
|
||||
!"Calling a modifier" % 4 {∘}`↕1
|
||||
!"Calling a modifier" % {∘}¨↕1
|
||||
!"Cannot call a modifier" % {˜}¨˜↕1
|
||||
!"𝕨_Mod_𝕩: Cannot call a modifier" % {˜}¨˜↕1
|
||||
4 {˜}˙´↕1 %% ˜
|
||||
4 {˜}˙˝↕1 %% ˜
|
||||
4 {∘}˙`↕1 %% ⟨∘⟩
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -12,8 +12,8 @@
|
||||
! ≡´ t←⟨•path,"custom-name" ⟩•BQN"⟨•path‿•name‿•args ⋄ •state⟩" ⋄ ! ⟨•path, "custom-name", ⟨⟩⟩ ≡ ⊑t
|
||||
! ≡´ t←⟨•path ⟩•BQN"⟨•path‿•name‿•args ⋄ •state⟩" ⋄ ! ⟨•path, "", ⟨⟩⟩ ≡ ⊑t
|
||||
! ≡´ t←⟨ ⟩•BQN"⟨•path‿•name‿•args ⋄ •state⟩" ⋄ ! ⟨"", ⟨⟩⟩ ≡ 1↓⊑t
|
||||
!"•BQN: Path must be a string" % ⟨1‿2⟩ •BQN "2+2"
|
||||
!"•BQN: Filename must be a string" % ⟨•path, 1‿2⟩ •BQN "2+2"
|
||||
!"•BQN𝕩: Path must be a string" % ⟨1‿2⟩ •BQN "2+2"
|
||||
!"•BQN𝕩: Filename must be a string" % ⟨•path, 1‿2⟩ •BQN "2+2"
|
||||
⟨•path, "abc/def"⟩ •BQN "•name" %% "abc/def"
|
||||
!"No path present for •path" % •BQN"•path"
|
||||
!"No arguments present for •args" % •BQN"•args"
|
||||
@ -28,8 +28,8 @@
|
||||
!"•file.Chars: Using relative path with no absolute base path known" % f←•BQN"•FChars" ⋄ F "a"
|
||||
|
||||
# •ReBQN
|
||||
!"REPL: Filename must be a string" % f←•ReBQN{⇐} ⋄ ⟨•path, 1‿2⟩ F "2+2"
|
||||
!"REPL: Path must be a string" % f←•ReBQN{⇐} ⋄ ⟨1‿2⟩ F "2+2"
|
||||
!"REPL𝕩: Filename must be a string" % f←•ReBQN{⇐} ⋄ ⟨•path, 1‿2⟩ F "2+2"
|
||||
!"REPL𝕩: Path must be a string" % f←•ReBQN{⇐} ⋄ ⟨1‿2⟩ F "2+2"
|
||||
f←•ReBQN{⇐} ⋄ ! ⟨•path, "custom-name", "arg"⟩ ≡ ⟨•path,"custom-name", "arg"⟩ F "•state"
|
||||
|
||||
f←•ReBQN {system⇐"all"} ⋄ F "•internal.Type ↕10" %% "i8arr"
|
||||
@ -89,10 +89,10 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
!"Field named ""abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþabcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ𝕨𝕨⍉!0123456789"" not found" % {abc⇐1 ⋄ dÊF⇐2}⊸•ns.Get "ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞabcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ𝕨𝕨⍉!0123456789_"
|
||||
{abc⇐1 ⋄ dÊF⇐2 ⋄ n10⇐3}•ns.Has¨ ⟨"abc", "ABC", "abC", "abc___", "DêF", "__D__Ê__F__", "àbc", "def", "", ↕0, "𝕨", "012", "n10", "n1_0"⟩ %% 1‿1‿1‿1‿1‿1‿0‿0‿0‿0‿0‿0‿1‿1
|
||||
∨´{⇐}•ns.Has¨↑"abc123AEWQE___àÀ𝕨𝕩" %% 0
|
||||
!"•ns.Has: 𝕩 must be a string" % {⇐}•ns.Has ≍""
|
||||
!"•ns.Has: 𝕩 must be a string" % {⇐}•ns.Has 1‿2
|
||||
!"•ns.Get: 𝕩 must be a string" % {⇐}•ns.Get ≍""
|
||||
!"•ns.Get: 𝕩 must be a string" % {⇐}•ns.Get 1‿2
|
||||
!"•ns.Has𝕩: 𝕩 must be a string" % {⇐}•ns.Has ≍""
|
||||
!"•ns.Has𝕩: 𝕩 must be a string" % {⇐}•ns.Has 1‿2
|
||||
!"•ns.Get𝕩: 𝕩 must be a string" % {⇐}•ns.Get ≍""
|
||||
!"•ns.Get𝕩: 𝕩 must be a string" % {⇐}•ns.Get 1‿2
|
||||
{m←𝕩 ⋄ ⟨{𝕩 ⋈ m•ns.Get 𝕩}¨ •ns.Keys m ⋄ {m•ns.Has⋈𝕩}¨ "abcABC"⟩}¨ ⟨{a⇐1⋄b⇐↕10} ⋄ {a⇐'a'⋄b←2‿3⋄cde⇐𝕩}"abc"⟩ %% ⟨⟨⟨⟨"a",1⟩,⟨"b",0‿1‿2‿3‿4‿5‿6‿7‿8‿9⟩⟩,1‿1‿0‿1‿1‿0⟩,⟨⟨⟨"a",'a'⟩,⟨"cde","abc"⟩⟩,1‿0‿0‿1‿0‿0⟩⟩
|
||||
|
||||
|
||||
@ -113,18 +113,18 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
!"•file.Parent: Path must be non-empty" % •file.Parent ""
|
||||
!"•file.Name: Path must be non-empty" % •file.Name ""
|
||||
|
||||
!"•file.Lines: 𝕩 must be a list" % "testfile.bqn" •FLines 2‿2⥊<"abcd"
|
||||
!"•file.Lines: 𝕩 must be a list" % "testfile.bqn" •file.Lines <"abcd"
|
||||
!"•file.Lines: Elements of 𝕩 must be lists of characters" % "testfile.bqn" •FLines "abcd"
|
||||
!"𝕨•file.Lines𝕩: 𝕩 must be a list" % "testfile.bqn" •FLines 2‿2⥊<"abcd"
|
||||
!"𝕨•file.Lines𝕩: 𝕩 must be a list" % "testfile.bqn" •file.Lines <"abcd"
|
||||
!"𝕨•file.Lines𝕩: Elements of 𝕩 must be lists of characters" % "testfile.bqn" •FLines "abcd"
|
||||
!"Expected character" % "testfile.bqn" •FLines ⋈"ab"‿"cd"
|
||||
!"Expected character" % "testfile.bqn" •FLines ⋈1‿2
|
||||
!"Expected character" % "testfile.bqn" •FChars ⋈"abcd"
|
||||
!"•file.Chars: 𝕩 must be a list of characters" % "testfile.bqn" •FChars <'a'
|
||||
!"𝕨•file.Chars𝕩: 𝕩 must be a list of characters" % "testfile.bqn" •FChars <'a'
|
||||
!"Expected character" % "testfile.bqn" •FBytes ⋈"abcd"
|
||||
!"•file.Bytes: 𝕩 must be a list" % "testfile.bqn" •file.Bytes <'a'
|
||||
!"𝕨•file.Bytes𝕩: 𝕩 must be a list" % "testfile.bqn" •file.Bytes <'a'
|
||||
!"Expected character" % "badwrite"•FChars ""‿""
|
||||
!"Expected character" % "badwrite"•FLines ⟨⟨"foo"⟩⟩
|
||||
!"•file.Chars: 𝕩 must be a list of characters" % "badwrite"•FChars @
|
||||
!"𝕨•file.Chars𝕩: 𝕩 must be a list of characters" % "badwrite"•FChars @
|
||||
|
||||
! {𝕩≡•file.Name 𝕩 •FChars "abc"∾(@+10)∾"def𝕩"}"testfile.bqn"
|
||||
! {𝕩≡•file.Name 𝕩 •FBytes •ToUTF8 "abc"∾(@+10)∾"def𝕩"}"testfile2.bqn"
|
||||
@ -141,11 +141,11 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
! 97‿98‿99‿10‿100‿101‿102‿240‿157‿149‿169 ≡ @-˜ •file.MapBytes "testfile.bqn"
|
||||
|
||||
•file.Name "testfile3B.bqn" •file.Rename "testfile3.bqn" %% "testfile3B.bqn"
|
||||
!"•file.Rename: Failed to rename file" % "testfile3B.bqn" •file.Rename "testfile.bqn"
|
||||
!"𝕨•file.Rename𝕩: Failed to rename file" % "testfile3B.bqn" •file.Rename "testfile.bqn"
|
||||
•file.Exists¨ "testfile.bqn"‿"nontestfile.bqn"‿"testfile3.bqn"‿"testfile3B.bqn" %% 1‿0‿0‿1
|
||||
¯22↑•file.Createdir "testdirNested" %% "/testDir/testdirNested"
|
||||
¯8↑•file.RealPath "testdirNested/.././" %% "/testDir"
|
||||
!"•file.CreateDir: Failed to create directory" % •file.Createdir "testdirNested"
|
||||
!"•file.CreateDir𝕩: Failed to create directory" % •file.Createdir "testdirNested"
|
||||
"testfile.bqn"‿"testfile2.bqn"‿"testfile3.bqn"‿"testfile3B.bqn"‿"testdirNested" ∊ •file.List "." %% 1‿1‿0‿1‿1
|
||||
"testfile.bqn"‿"testfile2.bqn"‿"testfile3.bqn"‿"testfile3B.bqn"‿"testdirNested" ∊ •file.List •file.path %% 1‿1‿0‿1‿1
|
||||
|
||||
@ -161,7 +161,7 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
!"•file.At: Path must be a list of characters" % •file.At 1‿2
|
||||
!"•file.At: Path must be a list of characters" % •file.At 1‿2
|
||||
!"•file.At: Path must be a list of characters" % "foo" •file.At 1‿2
|
||||
!"•file.At: 𝕨 must be a string" % 1‿2 •file.At "foo"
|
||||
!"•file.At𝕩: 𝕨 must be a string" % 1‿2 •file.At "foo"
|
||||
!"•file.List: Path must be a list of characters" % •file.List 1‿2
|
||||
!"•file.Bytes: Path must be a list of characters" % •file.Bytes 1‿2
|
||||
!"•file.Chars: Path must be a list of characters" % •file.Chars 1‿2
|
||||
@ -171,8 +171,8 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
!"•file.Lines: Path must be a list of characters" % 1‿2 •FLines "abc"‿"def"
|
||||
!"•file.Type: Path must be a list of characters" % •file.Type 1‿2
|
||||
!"•file.Exists: Path must be a list of characters" % •file.Exists 1‿2
|
||||
!"•file.Name: Argument must be a string" % •file.Name 1‿2
|
||||
!"•file.Parent: Argument must be a string" % •file.Parent 1‿2
|
||||
!"•file.Name𝕩: Argument must be a string" % •file.Name 1‿2
|
||||
!"•file.Parent𝕩: Argument must be a string" % •file.Parent 1‿2
|
||||
!"•file.MapBytes: Path must be a list of characters" % •file.MapBytes 1‿2
|
||||
!"•file.CreateDir: Path must be a list of characters" % •file.CreateDir 1‿2
|
||||
!"•file.RealPath: Path must be a list of characters" % •file.RealPath 1‿2
|
||||
@ -189,7 +189,7 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
|
||||
|
||||
# some of •term
|
||||
!"Expected character" % •term.OutRaw 2⥊{⇐}
|
||||
!"•term.ErrRaw: 𝕩 must be a list" % •term.ErrRaw 2‿2⥊0
|
||||
!"•term.ErrRaw𝕩: 𝕩 must be a list" % •term.ErrRaw 2‿2⥊0
|
||||
|
||||
|
||||
|
||||
@ -239,9 +239,9 @@ t0←•MonoTime@ ⋄ ! 0.1≤•Delay 0.1 ⋄ ! 0.1≤(•MonoTime@)-t0
|
||||
|
||||
# •math
|
||||
! ∧´0=⌊|1e10×{(+´𝕩)-•math.Sum 𝕩}¨ ↑1000•rand.Range 0
|
||||
!"•math.Sum: Argument must be a list (⟨⟩ ≡ ≢𝕩)" % •math.Sum 2
|
||||
!"•math.Sum: Argument must be a list (2‿2 ≡ ≢𝕩)" % •math.Sum 2‿2⥊1
|
||||
!"•math.Sum: Argument elements must be numbers" % •math.Sum 1‿'a'
|
||||
!"•math.Sum𝕩: 𝕩 must be a list (⟨⟩ ≡ ≢𝕩)" % •math.Sum 2
|
||||
!"•math.Sum𝕩: 𝕩 must be a list (2‿2 ≡ ≢𝕩)" % •math.Sum 2‿2⥊1
|
||||
!"•math.Sum𝕩: 𝕩 elements must be numbers" % •math.Sum 1‿'a'
|
||||
|
||||
|
||||
|
||||
@ -261,15 +261,15 @@ E←•internal.EEqual ⋄ {! (𝕏 4⥊0) E 𝕏 1↓¯1×π∾4⥊0}¨ (⊢∾
|
||||
⌊1e5×{0.1 𝕏 0.2}¨ ⟨•math.Atan2,•math.Comb,•math.Hypot,•math.Atan2⁼,•math.Atan2˜⁼⟩ %% 110714‿96959‿22360‿2027‿49331
|
||||
⌊1e5×{=˜◶99‿⊢¨ 𝕏 0.1‿3}¨ ⟨•math.Acos,•math.Acosh,•math.Asin,•math.Asinh,•math.Atan,•math.Atanh,•math.Cbrt,•math.Cos,•math.Cosh,•math.Erf,•math.ErfC,•math.Expm1,•math.Fact,•math.Log10,•math.Log1p,•math.Log2,•math.LogFact,•math.Sin,•math.Sinh,•math.Tan,•math.Tanh⟩ %% ⟨147062‿9900000,9900000‿176274,10016‿9900000,9983‿181844,9966‿124904,10033‿9900000,46415‿144224,99500‿¯99000,100500‿1006766,11246‿99997,88753‿2,10517‿1908553,95135‿600000,¯100000‿47712,9531‿138629,¯332193‿158496,¯4988‿179175,9983‿14112,10016‿1001787,10033‿¯14255,9966‿99505⟩
|
||||
{𝕩 ! 1‿2 (𝕏 ≡ 𝕏¨) 3‿4}¨ ⟨•math.Atan2,•math.Comb,•math.Hypot,•math.Atan2⁼,•math.Atan2˜⁼,•math.GCD,•math.LCM⟩
|
||||
!"•math.GCD: Inputs other than natural numbers not yet supported" % 1.5 •math.GCD 3
|
||||
!"•math.LCM: Inputs other than natural numbers not yet supported" % 3 •math.LCM 1.5
|
||||
!"•math.LCM: Unexpected argument types" % "foo" •math.LCM 3
|
||||
!"•math.GCD: Unexpected argument types" % 3 •math.GCD {+}
|
||||
!"•math.Sin: Argument contained non-number" % •math.Sin "foo"
|
||||
!"•math.Log10: Argument contained non-number" % •math.Log10 "foo"
|
||||
!"•math.Atan2: Unexpected argument types" % 1 •math.Atan2 'a'
|
||||
!"•math.Atan2⁼: Unexpected argument types" % 1 •math.Atan2⁼ {⇐}
|
||||
!"•math.Atan2˜⁼: Unexpected argument types" % {⇐} •math.Atan2˜⁼ 'b'
|
||||
!"𝕨•math.GCD𝕩: Inputs other than natural numbers not yet supported" % 1.5 •math.GCD 3
|
||||
!"𝕨•math.LCM𝕩: Inputs other than natural numbers not yet supported" % 3 •math.LCM 1.5
|
||||
!"𝕨•math.LCM𝕩: Unexpected argument types" % "foo" •math.LCM 3
|
||||
!"𝕨•math.GCD𝕩: Unexpected argument types" % 3 •math.GCD {+}
|
||||
!"•math.Sin𝕩: 𝕩 contained non-number" % •math.Sin "foo"
|
||||
!"•math.Log10𝕩: 𝕩 contained non-number" % •math.Log10 "foo"
|
||||
!"𝕨•math𝕩.Atan2: Unexpected argument types" % 1 •math.Atan2 'a'
|
||||
!"𝕨•math𝕩.Atan2⁼: Unexpected argument types" % 1 •math.Atan2⁼ {⇐}
|
||||
!"𝕨•math𝕩.Atan2˜⁼: Unexpected argument types" % {⇐} •math.Atan2˜⁼ 'b'
|
||||
|
||||
# •rand / •MakeRand
|
||||
0 (•MakeRand 0).Range¨↕2 %% ⟨⟩‿⟨⟩
|
||||
@ -277,7 +277,7 @@ E←•internal.EEqual ⋄ {! (𝕏 4⥊0) E 𝕏 1↓¯1×π∾4⥊0}¨ (⊢∾
|
||||
(•MakeRand 0).Deal 0 %% ⟨⟩
|
||||
0 (•MakeRand 0).Subset 0 %% ⟨⟩
|
||||
{!(∧•rand.Deal 𝕩)≡↕𝕩}¨ ⥊ ¯1‿0‿1+⌜2⋆↕22 # %SLOW
|
||||
!"(rand).Range: Result rank too large (256≡≢𝕨)" % (256⥊1) •rand.Range 0
|
||||
!"𝕨(rand).Range𝕩: Result rank too large (256≡≢𝕨)" % (256⥊1) •rand.Range 0
|
||||
! ≡˝ a←{r←•MakeRand 𝕩 ⋄ ⟨r.Range 1e9, 100 r.Range 1e9, r.Deal 100, 100 r.Deal 200, 100 r.Deal 200, 100 r.Subset 200⟩}¨ 2‿2⥊↕2 ⋄ !∘≢¨´ ⊏a
|
||||
r←•MakeRand 1 ⋄ ! 1¨⊸≡ ∊{𝕊: 800 r.Subset 1000}¨ ↕4
|
||||
r←•MakeRand 1 ⋄ ! 1¨⊸≡ ∊{𝕊: 50 r.Subset 10000}¨ ↕4
|
||||
@ -287,35 +287,35 @@ r←•MakeRand 1 ⋄ ! 1¨⊸≡ ∊{𝕊: r.Deal 1000}¨ ↕4
|
||||
r←•MakeRand 1 ⋄ ! 1¨⊸≡ ∊{𝕊: 500 r.Deal 1000}¨ ↕4
|
||||
|
||||
# •bit
|
||||
!"•bit._cast: 𝕩 must have rank at least 1" % 8‿1 •bit._cast 123
|
||||
!"•bit._cast𝕩: 𝕩 must have rank at least 1" % 8‿1 •bit._cast 123
|
||||
(↕10) {! (𝕨⥊¯1) ≡ 1‿𝕩•bit._cast (𝕨×𝕩)⥊1}⌜ 8‿16‿32
|
||||
%USE var ⋄ {t←𝕩⊏1‿8‿16‿32‿64 ⋄ 1≠⊑t? !∘≡¨⟜⊏ r←{t•bit._cast 𝕩 V a}¨ LV a← ↕128 ⋄ ⊑⊑r; @}¨ ↕4‿4
|
||||
%USE var ⋄ {t←𝕩⊏1‿8‿16‿32‿64 ⋄ !∘≡¨⟜⊏ r←{t•bit._cast 𝕩 V a}¨ LV a←4=↕128 ⋄ ⊑⊑r}¨ ↕4‿4
|
||||
! 10‿1 ≡ ≢8‿16•bit._cast c←0↓2↕'a'+11 •rand.Range 26 ⋄ ! 10‿2 ≡ ≢c
|
||||
! 10‿1 ≡ ≢8‿16•bit._cast c← 2↕'a'+11 •rand.Range 26 ⋄ ! 10‿2 ≡ ≢c
|
||||
⊑ 8‿32•bit._cast 3↓↕7 %% 100992003
|
||||
!"•bit._cast: incompatible lengths" % 1‿8•bit._cast 1⥊0
|
||||
!"•bit._cast: incompatible lengths" % 8‿32•bit._cast 2⥊0
|
||||
!"•bit._cast: incompatible lengths" % 8‿32•bit._cast 10⥊0
|
||||
!"•bit._cast𝕩: incompatible lengths" % 1‿8•bit._cast 1⥊0
|
||||
!"•bit._cast𝕩: incompatible lengths" % 8‿32•bit._cast 2⥊0
|
||||
!"•bit._cast𝕩: incompatible lengths" % 8‿32•bit._cast 10⥊0
|
||||
|
||||
!"•bit._cast: unsupported width 1073741824" % (2⥊2⋆30)•bit._cast ⋈0
|
||||
!"•bit._cast: unsupported width 1125899906842624" % (2⥊2⋆50)•bit._cast ⋈0 %USZ64
|
||||
!"•bit._cast𝕩: unsupported width 1073741824" % (2⥊2⋆30)•bit._cast ⋈0
|
||||
!"•bit._cast𝕩: unsupported width 1125899906842624" % (2⥊2⋆50)•bit._cast ⋈0 %USZ64
|
||||
!"Integer out of range: 1125899906842624" % (2⥊2⋆50)•bit._cast ⋈0 %USZ32
|
||||
!"Integer out of range: 1.180591620717411e21" % (2⥊2⋆70)•bit._cast ⋈0
|
||||
!"Integer out of range: ∞" % (2⥊∞)•bit._cast ⋈0
|
||||
|
||||
!"•bit._cast: unsupported width 12" % 1‿12•bit._cast 11⥊0
|
||||
!"•bit._cast: unsupported width 12" % 12‿32•bit._cast (12×32)⥊0
|
||||
!"•bit._cast: unsupported width 12" % 8‿12•bit._cast (8×12)⥊0
|
||||
!"•bit._cast: unsupported width 0" % 0‿32•bit._cast 128⥊0
|
||||
!"•bit._cast: unsupported width 0" % 8‿0•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 12" % 1‿12•bit._cast 11⥊0
|
||||
!"•bit._cast𝕩: unsupported width 12" % 12‿32•bit._cast (12×32)⥊0
|
||||
!"•bit._cast𝕩: unsupported width 12" % 8‿12•bit._cast (8×12)⥊0
|
||||
!"•bit._cast𝕩: unsupported width 0" % 0‿32•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 0" % 8‿0•bit._cast 128⥊0
|
||||
|
||||
!"•bit._cast: unsupported width 16 for type 'f'" % ⟨16‿'f',32⟩•bit._cast 128⥊0
|
||||
!"•bit._cast: unsupported width 32 for type 'f'" % ⟨32,32‿'f'⟩•bit._cast 128⥊0
|
||||
!"•bit._cast: unsupported width 0 for type 'u'" % ⟨0‿'u',32⟩•bit._cast 128⥊0
|
||||
!"•bit._cast: unsupported width 8 for type 'u'" % ⟨8‿'u',32⟩•bit._cast 128⥊0
|
||||
!"•bit._cast: unsupported width 32 for type 'u'" % ⟨8,32‿'u'⟩•bit._cast 128⥊0
|
||||
!"•bit._cast: unsupported width 1 for type 'i'" % ⟨8, 1‿'i'⟩•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 16 for type 'f'" % ⟨16‿'f',32⟩•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 32 for type 'f'" % ⟨32,32‿'f'⟩•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 0 for type 'u'" % ⟨0‿'u',32⟩•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 8 for type 'u'" % ⟨8‿'u',32⟩•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 32 for type 'u'" % ⟨8,32‿'u'⟩•bit._cast 128⥊0
|
||||
!"•bit._cast𝕩: unsupported width 1 for type 'i'" % ⟨8, 1‿'i'⟩•bit._cast 128⥊0
|
||||
|
||||
# •platform
|
||||
Str ← {!=𝕩 ⋄ !×≠𝕩 ⋄ ! ∧´2=•Type¨𝕩} ⋄ Str •platform.os ⋄ Str •platform.cpu.arch ⋄ Str •platform.bqn.impl_version ⋄ Str •platform.environment
|
||||
@ -362,7 +362,7 @@ Str ← {!=𝕩 ⋄ !×≠𝕩 ⋄ ! ∧´2=•Type¨𝕩} ⋄ Str •platform.o
|
||||
|
||||
# •internal.Keep
|
||||
•internal.Keep ↕10 %% ↕10
|
||||
!"This function can't be called dyadically" % 1 •internal.Keep 1
|
||||
!"𝕨Fn𝕩: This function can't be called dyadically" % 1 •internal.Keep 1
|
||||
# •internal.Refc
|
||||
•internal.Refc •internal.Unshare ↕10 %% 1
|
||||
a←•internal.Unshare ↕10 ⋄ b←10⥊<a ⋄ ! 11 ≡ •internal.Refc a ⋄ •internal.Keep b
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
(↕10)⊸+⌾((2÷˜≠)⊸⌽) 10×↕10 %% 5‿16‿27‿38‿49‿50‿61‿72‿83‿94
|
||||
⌽⌾((¯1+=)⊸⍉) 3‿3⥊↕9 %% 3‿3⥊2‿1‿0‿5‿4‿3‿8‿7‿6
|
||||
!"Expected integer, got function" % 1⊸+⌾((¯1+≠)˙⊑⊢)"ab"
|
||||
!"⊑: 𝕨 must be a numeric array" % ⊢⌾((≠⊑⟨@,@,¯1+≠⟩˙)⊸⊑)"ab"
|
||||
!"◶: 𝕘 must have rank 1 when index is a number" % ⊢⌾(≠◶⟨@,@,¯1+≠⟩⊸⊑)"ab"
|
||||
!"𝕨⊑𝕩: 𝕨 must be a numeric array" % ⊢⌾((≠⊑⟨@,@,¯1+≠⟩˙)⊸⊑)"ab"
|
||||
!"◶𝕩: 𝕘 must have rank 1 when index is a number" % ⊢⌾(≠◶⟨@,@,¯1+≠⟩⊸⊑)"ab"
|
||||
|
||||
|
||||
|
||||
@ -27,11 +27,11 @@
|
||||
!"𝔽⌾(a⊸⊑)𝕩: 𝔽 must return an array with the same shape as its input (expected ⟨2⟩, got ⟨3⟩)" % 10‿20‿30⌾(⟨1‿2,2‿1⟩⊸⊑) 4‿4⥊↕16
|
||||
!"𝔽⌾(a⊸⊑)𝕩: 𝔽 must return an array with the same shape as its input (expected ⟨2⟩, got ⟨3⟩)" % 1⊸∾⌾(⟨1‿2,2‿1⟩⊸⊑) 4‿4⥊↕16
|
||||
!"𝔽⌾(n⊸⊑)𝕩: reading out-of-bounds (n≡¯10, 3≡≠𝕩)" % 1⊸+⌾(¯10⊸⊑) ↕3
|
||||
!"⊑: 𝕨 contained list with mixed-type elements" % 'a'⌾(1‿'a'⊸⊑) 4‿5⥊↕9
|
||||
!"⊑: Indexing out-of-bounds (index 1‿5 in array of shape 4‿5)" % 'a'⌾(1‿5⊸⊑) 4‿5⥊↕9
|
||||
!"𝕨⊑𝕩: 𝕨 contained list with mixed-type elements" % 'a'⌾(1‿'a'⊸⊑) 4‿5⥊↕9
|
||||
!"𝕨⊑𝕩: Indexing out-of-bounds (index 1‿5 in array of shape 4‿5)" % 'a'⌾(1‿5⊸⊑) 4‿5⥊↕9
|
||||
⟨10,20‿30⟩⌾(⟨1‿2,⟨1‿3,2‿1⟩⟩⊸⊑) 4‿5⥊↕9 %% 4‿5⥊0‿1‿2‿3‿4‿5‿6‿10‿20‿0‿1‿30‿3‿4‿5‿6‿7‿8‿0‿1
|
||||
!"⊑: Picking item at wrong rank (index 1‿1‿1 in array of shape 10‿10)" % 1¨⌾(1‿1‿1⊸⊑) 10‿10⥊1
|
||||
!"⊑: Picking item at wrong rank (index ⟨1⟩ in array of shape 10‿10)" % 1¨⌾(⟨1⟩⊸⊑) 10‿10⥊1
|
||||
!"𝕨⊑𝕩: Picking item at wrong rank (index 1‿1‿1 in array of shape 10‿10)" % 1¨⌾(1‿1‿1⊸⊑) 10‿10⥊1
|
||||
!"𝕨⊑𝕩: Picking item at wrong rank (index ⟨1⟩ in array of shape 10‿10)" % 1¨⌾(⟨1⟩⊸⊑) 10‿10⥊1
|
||||
a←10‿10‿10⥊↕1000 ⋄ ! a ≡ a⌾((↕≢a)⊸⊑) a
|
||||
≠{𝕊: a←(1+•rand.Range 200)•rand.Range 2 ⋄ i←•rand.Range≠a ⋄ ! a ≡ (i⊑a)⌾(i⊸⊑) 2⌾(i⊸⊑) a}¨↕10000
|
||||
100⊸+⌾(5⊸⊑) ⥊↕4‿4 %% (100×5=↕16) + ⥊↕4‿4
|
||||
@ -44,8 +44,8 @@ a←10‿10‿10⥊↕1000 ⋄ ! a ≡ a⌾((↕≢a)⊸⊑) a
|
||||
|
||||
# ⊏
|
||||
n←500 ⋄ a←↕n ⋄ i←(-n)+↕2×n ⋄ r←⌽(2×n)⥊a ⋄ ! (⌽a) ≡ r⌾(i⊸⊏) a
|
||||
!"⊏: 𝕩 cannot be a unit" % 0‿0⌾(0‿0⊸⊏) <0
|
||||
!"⊏: 𝕩 cannot be a unit" % %USE evar ⋄ (↕0) {⊢⌾(𝕨⊸⊏)𝕩}_evar <0
|
||||
!"𝕨⊏𝕩: 𝕩 cannot be a unit" % 0‿0⌾(0‿0⊸⊏) <0
|
||||
!"𝕨⊏𝕩: 𝕩 cannot be a unit" % %USE evar ⋄ (↕0) {⊢⌾(𝕨⊸⊏)𝕩}_evar <0
|
||||
!"𝔽⌾(a⊸⊏)𝕩: Indexing out-of-bounds (¯11∊a, ⟨10⟩≡≢𝕩)" % %USE evar ⋄ 5‿¯11 {0‿1⌾(𝕨⊸⊏)𝕩}_evar 10⥊1‿0‿1
|
||||
!"𝔽⌾(a⊸⊏)𝕩: Indexing out-of-bounds (10∊a, ⟨10⟩≡≢𝕩)" % %USE evar ⋄ 9‿10 {0‿1⌾(𝕨⊸⊏)𝕩}_evar 10⥊1‿0‿1
|
||||
!"𝔽⌾(a⊸⊏)𝕩: Indexing out-of-bounds (10∊a, ⟨10⟩≡≢𝕩)" % %USE evar ⋄ "ab" {𝕨⌾(9‿10⊸⊏)𝕩}_evar 10⥊"foo"
|
||||
@ -120,7 +120,7 @@ n←500 ⋄ a←↕n ⋄ i←(-n)+↕2×n ⋄ r←⌽(2×n)⥊a ⋄ ! (⌽a) ≡
|
||||
|
||||
|
||||
# /
|
||||
!"/: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 10)" % 1⊸∾⌾(1‿0‿1⊸/) ↕10
|
||||
!"𝕨/𝕩: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 10)" % 1⊸∾⌾(1‿0‿1⊸/) ↕10
|
||||
10⊸+⌾(⟨1,0‿1⟩⊸/)↕2‿2 %% 2‿2⥊⟨0‿0,10‿11,1‿0,11‿11⟩
|
||||
!"𝔽⌾(a⊸/): Incompatible result elements" % 1‿2⌾(2‿0⊸/)↕2
|
||||
1⊸+⌾((↕10)⊸/) ↕10 %% ×⊸+ ↕10
|
||||
@ -146,7 +146,7 @@ n←500 ⋄ a←↕n ⋄ i←(-n)+↕2×n ⋄ r←⌽(2×n)⥊a ⋄ ! (⌽a) ≡
|
||||
%USE eqvar ⋄ 1‿0‿0‿0‿1‿1 { ≥˙¨⌾(𝕨⊸/)𝕩}_eqvar 0‿1‿0‿1‿0‿1 %% ≥‿1‿0‿1‿≥‿≥
|
||||
%USE eqvar ⋄ 1‿0‿0‿0‿1‿1 { 3¨⌾(𝕨⊸/)𝕩}_eqvar "hellow" %% 3‿'e'‿'l'‿'l'‿3‿3
|
||||
%USE eqvar ⋄ 1‿0‿0‿0‿1‿1 { +˙¨⌾(𝕨⊸/)𝕩}_eqvar -‿÷‿×‿=‿<‿> %% +‿÷‿×‿=‿+‿+
|
||||
!"/: Lengths of components of 𝕨 must match 𝕩 (6 ≠ 7)" % 0¨⌾(1‿0‿0‿0‿1‿1⊸/) 0‿1‿0‿1‿0‿1‿0
|
||||
!"𝕨/𝕩: Lengths of components of 𝕨 must match 𝕩 (6 ≠ 7)" % 0¨⌾(1‿0‿0‿0‿1‿1⊸/) 0‿1‿0‿1‿0‿1‿0
|
||||
4↑ (⋈⋈3)⌾(0‿1‿0⊸/) ↕⋈3 %!PROPER_FILLS %% ⟨⋈0,⋈3,⋈2,0⟩
|
||||
4↑ ⊢⌾(0‿1‿0⊸/) ↕⋈3 %!PROPER_FILLS %% ⟨⋈0,⋈1,⋈2,0⟩
|
||||
4↑ ⊢⌾(0‿0‿0⊸/) ↕⋈3 %!PROPER_FILLS %% ⟨⋈0,⋈1,⋈2,0⟩
|
||||
|
||||
Loading…
Reference in New Issue
Block a user