ran test error message updater

This commit is contained in:
tankorsmash 2025-02-05 20:05:03 -05:00
parent 3362d46854
commit 308f93368e
8 changed files with 211 additions and 211 deletions

View File

@ -22,55 +22,55 @@
!"⎉: Result rank too large" % (1˜ 02042)50 1˜ 01002
!"⎉: Result rank too large (204 ≡ =𝕩, 200 ≡ =𝔽v)" % {𝕊:(2001)1}1 (2051)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",12,,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 620
!"/: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 4)" % 123/˘4567
!"/: Simple 𝕨 must have rank 0 or 1 (2≡=𝕨)" % (2314) /˘ 2
!"𝕨/𝕩: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 4)" % 123/˘4567
!"𝕨/𝕩: Simple 𝕨 must have rank 0 or 1 (2≡=𝕨)" % (2314) /˘ 2
!"𝕨/𝕩: Length of compound 𝕨 must be at most rank of 𝕩" % (<0)/˘(5)<"ab"
!"⊏: Indexing out-of-bounds (24∊𝕨, 4≡≠𝕩)" % 124144
!"⊏: Indexing out-of-bounds (4∊𝕨, 4≡≠𝕩)" % 1˜6424
!"𝕨𝕩: Indexing out-of-bounds (24∊𝕨, 4≡≠𝕩)" % 124144
!"𝕨𝕩: Indexing out-of-bounds (4∊𝕨, 4≡≠𝕩)" % 1˜6424
!"𝕨⊏𝕩: 𝕨 must be an array of numbers or list of such arrays" % 0@¯11 520.5
!"Expected integer, got ¯5.25" % ¯5.25˘424
!"⊏: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % 001 ˘(˘) 10000×3
!"⊏: 𝕩 cannot be a unit" % 0˘5<"a"
!"⊏: 𝕩 cannot be a unit" % (30)˘3
!"𝕨𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % 001 ˘(˘) 10000×3
!"𝕨𝕩: 𝕩 cannot be a unit" % 0˘5<"a"
!"𝕨𝕩: 𝕩 cannot be a unit" % (30)˘3
!"Expected integer, got 0.1" % 0.1˘3515
!"⊑: 𝕩 must be a list when 𝕨 is a number (3‿4 ≡ ≢𝕩)" % 5˘234
!"𝕨𝕩: 𝕩 must be a list when 𝕨 is a number (3‿4 ≡ ≢𝕩)" % 5˘234
!">: Result rank too large (80 ≡ =𝕩, 205 ≡ =⊑𝕩)" % >80 (2001)<(2051)1
!"⎉: Result rank too large (195 ≡ =𝕩, 210 ≡ =𝔽v)" % >5 (2001)<(2051)1
!"∾: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc""def")˘(3/)"a"
!"∾: Argument ranks must differ by 1 or less (0≡=𝕨, 2≡=𝕩)" % 1˘333
!"∾: Lengths not matchable (4‿2 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (3424)˘3335
!"≍: 𝕨 and 𝕩 must have equal shapes (3‿4 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (34)2 23318
!"≍: Result rank too large (255≡=𝕩)" % 0˜2551
!"𝕨𝕩: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc""def")˘(3/)"a"
!"𝕨𝕩: Argument ranks must differ by 1 or less (0≡=𝕨, 2≡=𝕩)" % 1˘333
!"𝕨𝕩: Lengths not matchable (4‿2 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (3424)˘3335
!"𝕨𝕩: 𝕨 and 𝕩 must have equal shapes (3‿4 ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % (34)2 23318
!"≍𝕩: Result rank too large (255≡=𝕩)" % 0˜2551
!"shift: Lengths not matchable (⟨6⟩ ≡ ≢𝕨, 1‿1 ≡ ≢𝕩)" % ("abc""def")«˘(3/)"a"
!"shift: =𝕨 must be =𝕩 or ¯1+=𝕩 (0≡=𝕨, 2≡=𝕩)" % 1«˘222
!: Argument cannot be a scalar" % »0 2316
!"⌽: Argument cannot be a unit" % ˘10
!𝕩: 𝕩 cannot be a scalar" % »0 2316
!"⌽𝕩: 𝕩 cannot be a unit" % ˘10
!"Expected integer, got 1.5" % 1.5˘232
!"↑: 𝕨 must have rank at most 1 (1‿2 ≡ ≢𝕨)" % (12)˘232
!"↓: 𝕨 must have rank at most 1 (4‿2 ≡ ≢𝕨)" % (428)˘@
!"𝕨𝕩: 𝕨 must have rank at most 1 (1‿2 ≡ ≢𝕨)" % (12)˘232
!"𝕨𝕩: 𝕨 must have rank at most 1 (4‿2 ≡ ≢𝕨)" % (428)˘@
!"Integer out of range: 1e20" % 1e20˘31010
!"Expected number" % 34@˘34
!"Expected integer, got 0.5" % 0.5˘4312
!"↑: Argument must have rank at least 1" % ˘2
!"↓: Argument must have rank at least 1" % 0 210
!"⊐: 𝕩 cannot have rank 0" % ˘"abcd"
!"⊒: Argument cannot have rank 0" % ˘"abcd"
!"∊: Argument cannot have rank 0" % ˘"abcd"
!"⍋: 𝕨 must be sorted" % 021˘ 3412
!"`: Shape of 𝕨 must match the cell of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿3 ≡ ≢𝕩)" % (221)+`˘2230.4
!"`: Shape of 𝕨 must match the cell of 𝕩 (⟨⟩ ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % 2+`˘333
!"´: Argument must be a list (3‿3 ≡ ≢𝕩)" % +´˘23318
!"´: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % 1+´˘23318
!: 𝕩 must have rank at least 1" % +˝˘˘1010100
!: 𝕩 must have rank at least 1" % ˝¯2 239
!"↑𝕩: 𝕩 must have rank at least 1" % ˘2
!"↓𝕩: 𝕩 must have rank at least 1" % 0 210
!"⊐𝕩: 𝕩 cannot have rank 0" % ˘"abcd"
!"⊒𝕩: 𝕩 cannot have rank 0" % ˘"abcd"
!"∊𝕩: 𝕩 cannot have rank 0" % ˘"abcd"
!"𝕨𝕩: 𝕨 must be sorted" % 021˘ 3412
!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿3 ≡ ≢𝕩)" % (221)+`˘2230.4
!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (⟨⟩ ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % 2+`˘333
!"´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % +´˘23318
!"𝕨´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % 1+´˘23318
!𝕩: 𝕩 must have rank at least 1" % +˝˘˘1010100
!𝕩: 𝕩 must have rank at least 1" % ˝¯2 239
{˝˘ (×´) 2+𝕩}¨ 2345 %% (×´)¨ 23,212,2125,21256
{˝˘ (2+𝕩)<"hi"}¨ 2345 %% (<"hi")¨ 23,212,2125,21256
@ -89,15 +89,15 @@
%USE eqvar ¯1¯2¯3 {𝕨˘𝕩}_eqvar 880557 %% 83797877159158157239238237319318317399398397479478477210828180
1201¯11 23424 %% 23512013564579108911131412131517181617192122202123
1201¯12 23424 %% 2544567891011012345678910111617181920212223121314151617181920212223
!"⊏: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar 0¯11¯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 101281
!"⊏: Indexing out-of-bounds (128∊𝕨, 128≡≠𝕩)" % %USE evar 10128 {𝕨˘𝕩}_evar 101281
!"⊏: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar 1001 {𝕨˘𝕩}_evar 1011
!"⊏: Indexing out-of-bounds (1000∊𝕨, 3≡≠𝕩)" % %USE evar (31000) {𝕨˘𝕩}_evar 10031
!"⊏: Indexing out-of-bounds (1000∊𝕨, 4≡≠𝕩)" % %USE evar (41000) {𝕨˘𝕩}_evar 10041
!"⊏: Indexing out-of-bounds (1000∊𝕨, 8≡≠𝕩)" % %USE evar (81000) {𝕨˘𝕩}_evar 10081
!"⊏: Indexing out-of-bounds (100∊𝕨, 8≡≠𝕩)" % %USE evar (<100) {𝕨˘𝕩}_evar 10081
!"𝕨𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar 0¯11¯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 101281
!"𝕨𝕩: Indexing out-of-bounds (128∊𝕨, 128≡≠𝕩)" % %USE evar 10128 {𝕨˘𝕩}_evar 101281
!"𝕨𝕩: Indexing out-of-bounds (1∊𝕨, 1≡≠𝕩)" % %USE evar 1001 {𝕨˘𝕩}_evar 1011
!"𝕨𝕩: Indexing out-of-bounds (1000∊𝕨, 3≡≠𝕩)" % %USE evar (31000) {𝕨˘𝕩}_evar 10031
!"𝕨𝕩: Indexing out-of-bounds (1000∊𝕨, 4≡≠𝕩)" % %USE evar (41000) {𝕨˘𝕩}_evar 10041
!"𝕨𝕩: Indexing out-of-bounds (1000∊𝕨, 8≡≠𝕩)" % %USE evar (81000) {𝕨˘𝕩}_evar 10081
!"𝕨𝕩: Indexing out-of-bounds (100∊𝕨, 8≡≠𝕩)" % %USE evar (<100) {𝕨˘𝕩}_evar 10081
!"Integer out of range: 9e99" % %USE evar (<9e99) {𝕨˘𝕩}_evar 10081
12˘ 108100 %% (8×10) + 12
12˘ 1042100 %% (8×10) + [23,45]
@ -131,15 +131,15 @@
%USE eqvar ˘'!' _eqvar 10071 %% '!'•internal.Keep˘ 0=7|100
%USE eqvar ˘_eqvar˜ 339 %% 323012012345345678678
%USE eqvar (2345111) 2 _eqvar 234517 %% (2345111) •internal.PureKeep2 234517
!"˘: Argument frames don't agree (3‿4 ≡ ≢𝕨, 5‿4 ≡ ≢𝕩, common frame of 1 axes)" % (342) ˘ 542
!"≍: 𝕨 and 𝕩 must have equal shapes (⟨4⟩ ≡ ≢𝕨, ⟨5⟩ ≡ ≢𝕩)" % (342) ˘ 352
!"≍: 𝕨 and 𝕩 must have equal shapes (2‿2‿2 ≡ ≢𝕨, 2‿3‿2 ≡ ≢𝕩)" % (32222) ˘ 32322
!"≍: 𝕨 and 𝕩 must have equal shapes (4‿1 ≡ ≢𝕨, ⟨4⟩ ≡ ≢𝕩)" % (3410) ˘ 340
!"𝕨˘𝕩: Argument frames don't agree (3‿4 ≡ ≢𝕨, 5‿4 ≡ ≢𝕩, common frame of 1 axes)" % (342) ˘ 542
!"𝕨𝕩: 𝕨 and 𝕩 must have equal shapes (⟨4⟩ ≡ ≢𝕨, ⟨5⟩ ≡ ≢𝕩)" % (342) ˘ 352
!"𝕨𝕩: 𝕨 and 𝕩 must have equal shapes (2‿2‿2 ≡ ≢𝕨, 2‿3‿2 ≡ ≢𝕩)" % (32222) ˘ 32322
!"𝕨𝕩: 𝕨 and 𝕩 must have equal shapes (4‿1 ≡ ≢𝕨, ⟨4⟩ ≡ ≢𝕩)" % (3410) ˘ 340
(<"ab") ˘ 2"cd" %% 22"ab", 'c', "ab", 'd'
(<"ab") ˘˜ 2"cd" %% 22'c', "ab", 'd', "ab"
"ab" 1 42"cd" %% 422"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

View File

@ -8,9 +8,9 @@
!"•FFI: 𝕩 must be a list" % @•FFI @
!"•FFI: 𝕩 must be a list" % @•FFI 22<"a"
!"•FFI: Path must be a list of characters" % 12 •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 '!'}}

View File

@ -38,12 +38,12 @@ a←(•ParseFloat¨ "1.2"‿"-0"‿"0")∾-⊸⋈0÷0 ⋄ ! (0‿3‿3‿3⊏a)
{b•internal.Unshare a"Ai8"•internal.Variation 160000000¯128, 80, 82 c864•bit._cast a ! 1001c •internal.Keep •Hash c ! ab} # make sure sign bit doesn't mutate away
# error messages
!"∊: 𝕩 cannot have rank 0" % 1230
!"⊐: 𝕨 cannot have rank 0" % 0123
!"⊒: 𝕨 cannot have rank 0" % 0123
!"∊: Rank of 𝕨 must be at least the cell rank of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿2‿2 ≡ ≢𝕩)" % 1222212
!"⊐: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (22212)12
!"⊒: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (22212)12
!"𝕨𝕩: 𝕩 cannot have rank 0" % 1230
!"𝕨𝕩: 𝕨 cannot have rank 0" % 0123
!"𝕨𝕩: 𝕨 cannot have rank 0" % 0123
!"𝕨𝕩: Rank of 𝕨 must be at least the cell rank of 𝕩 (⟨2⟩ ≡ ≢𝕨, 2‿2‿2 ≡ ≢𝕩)" % 1222212
!"𝕨𝕩: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (22212)12
!"𝕨𝕩: Rank of 𝕩 must be at least the cell rank of 𝕨 (2‿2‿2 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)" % (22212)12
# 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@ %% 0231
(((•HashMap˜4).Delete 1).Set´ 1"one").Values@ %% 023"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'

View File

@ -17,11 +17,11 @@
! (¨r1r3) ¨r1r2r3r4
)
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file •ImportCleanPath File "cyclic.bqn"
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file •ImportCleanPath File "cyclic.bqn"
!"•Import: cyclic import of "".../cyclic.bqn""" % %USE file •ImportCleanPath File "cyclic.bqn"
!"•Import: cyclic import of "".../cyclic_A.bqn""" % %USE file •ImportCleanPath File "cyclic_A.bqn"
!"•Import: cyclic import of "".../cyclic_B.bqn""" % %USE file •ImportCleanPath File "cyclic_B.bqn"
!"•Import: cyclic import of "".../cyclic_A.bqn""" % %USE file •ImportCleanPath File "cyclic_B.bqn"
!"•Import: cyclic import of "".../cyclic_B.bqn""" % %USE file •ImportCleanPath File "cyclic_A.bqn"
!"•Import𝕩: cyclic import of "".../cyclic.bqn""" % %USE file •ImportCleanPath File "cyclic.bqn"
!"•Import𝕩: cyclic import of "".../cyclic.bqn""" % %USE file •ImportCleanPath File "cyclic.bqn"
!"•Import𝕩: cyclic import of "".../cyclic.bqn""" % %USE file •ImportCleanPath File "cyclic.bqn"
!"•Import𝕩: cyclic import of "".../cyclic_A.bqn""" % %USE file •ImportCleanPath File "cyclic_A.bqn"
!"•Import𝕩: cyclic import of "".../cyclic_B.bqn""" % %USE file •ImportCleanPath File "cyclic_B.bqn"
!"•Import𝕩: cyclic import of "".../cyclic_A.bqn""" % %USE file •ImportCleanPath File "cyclic_B.bqn"
!"•Import𝕩: cyclic import of "".../cyclic_B.bqn""" % %USE file •ImportCleanPath File "cyclic_A.bqn"
%USE file 3 •Import File "notCyclic.bqn" %% 30

View File

@ -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

View File

@ -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⟩" ! "", 1t
!"•BQN: Path must be a string" % 12 •BQN "2+2"
!"•BQN: Filename must be a string" % •path, 12 •BQN "2+2"
!"•BQN𝕩: Path must be a string" % 12 •BQN "2+2"
!"•BQN𝕩: Filename must be a string" % •path, 12 •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, 12 F "2+2"
!"REPL: Path must be a string" % f•ReBQN{} 12 F "2+2"
!"REPL𝕩: Filename must be a string" % f•ReBQN{} •path, 12 F "2+2"
!"REPL𝕩: Path must be a string" % f•ReBQN{} 12 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" % {abc1 dÊF2}•ns.Get "ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞabcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþ𝕨𝕨⍉!0123456789_"
{abc1 dÊF2 n103}•ns.Has¨ "abc", "ABC", "abC", "abc___", "DêF", "__D__Ê__F__", "àbc", "def", "", 0, "𝕨", "012", "n10", "n1_0" %% 11111100000011
´{}•ns.Has¨"abc123AEWQE___àÀ𝕨𝕩" %% 0
!"•ns.Has: 𝕩 must be a string" % {}•ns.Has ""
!"•ns.Has: 𝕩 must be a string" % {}•ns.Has 12
!"•ns.Get: 𝕩 must be a string" % {}•ns.Get ""
!"•ns.Get: 𝕩 must be a string" % {}•ns.Get 12
!"•ns.Has𝕩: 𝕩 must be a string" % {}•ns.Has ""
!"•ns.Has𝕩: 𝕩 must be a string" % {}•ns.Has 12
!"•ns.Get𝕩: 𝕩 must be a string" % {}•ns.Get ""
!"•ns.Get𝕩: 𝕩 must be a string" % {}•ns.Get 12
{m𝕩 {𝕩 m•ns.Get 𝕩}¨ •ns.Keys m {m•ns.Has𝕩}¨ "abcABC"}¨ {a1b10} {a'a'b23cde𝕩}"abc" %% "a",1,"b",0123456789,110110,"a",'a',"cde","abc",100100
@ -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 22<"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 22<"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 12
!"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"‿⋈,
! 97989910100101102240157149169 @-˜ •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" %% 1001
¯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 "." %% 11011
"testfile.bqn""testfile2.bqn""testfile3.bqn""testfile3B.bqn""testdirNested" •file.List •file.path %% 11011
@ -161,7 +161,7 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
!"•file.At: Path must be a list of characters" % •file.At 12
!"•file.At: Path must be a list of characters" % •file.At 12
!"•file.At: Path must be a list of characters" % "foo" •file.At 12
!"•file.At: 𝕨 must be a string" % 12 •file.At "foo"
!"•file.At𝕩: 𝕨 must be a string" % 12 •file.At "foo"
!"•file.List: Path must be a list of characters" % •file.List 12
!"•file.Bytes: Path must be a list of characters" % •file.Bytes 12
!"•file.Chars: Path must be a list of characters" % •file.Chars 12
@ -171,8 +171,8 @@ f←•ReBQN{primitives⇐⋈'÷'‿- ⋄ system⇐⟨"primitives", "foo"‿⋈,
!"•file.Lines: Path must be a list of characters" % 12 •FLines "abc""def"
!"•file.Type: Path must be a list of characters" % •file.Type 12
!"•file.Exists: Path must be a list of characters" % •file.Exists 12
!"•file.Name: Argument must be a string" % •file.Name 12
!"•file.Parent: Argument must be a string" % •file.Parent 12
!"•file.Name𝕩: Argument must be a string" % •file.Name 12
!"•file.Parent𝕩: Argument must be a string" % •file.Parent 12
!"•file.MapBytes: Path must be a list of characters" % •file.MapBytes 12
!"•file.CreateDir: Path must be a list of characters" % •file.CreateDir 12
!"•file.RealPath: Path must be a list of characters" % •file.RealPath 12
@ -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 220
!"•term.ErrRaw𝕩: 𝕩 must be a list" % •term.ErrRaw 220
@ -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 221
!"•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 221
!"•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˜ %% 1107149695922360202749331
1e5×{=˜99¨ 𝕏 0.13}¨ •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 %% 1470629900000,9900000176274,100169900000,9983181844,9966124904,100339900000,46415144224,99500¯99000,1005001006766,1124699997,887532,105171908553,95135600000,¯10000047712,9531138629,¯332193158496,¯4988179175,998314112,100161001787,10033¯14255,996699505
{𝕩 ! 12 (𝕏 𝕏¨) 34}¨ •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 𝕩)𝕩}¨ ¯101+222 # %SLOW
!"(rand).Range: Result rank too large (256≡≢𝕨)" % (2561) •rand.Range 0
!"𝕨(rand).Range𝕩: Result rank too large (256≡≢𝕨)" % (2561) •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}¨ 222 !¨´ 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" % 81 •bit._cast 123
!"•bit._cast𝕩: 𝕩 must have rank at least 1" % 81 •bit._cast 123
(10) {! (𝕨¯1) 1𝕩•bit._cast (𝕨×𝕩)1} 81632
%USE var {t𝕩18163264 1t? !¨ r{t•bit._cast 𝕩 V a}¨ LV a 128 r; @}¨ 44
%USE var {t𝕩18163264 !¨ r{t•bit._cast 𝕩 V a}¨ LV a4=128 r}¨ 44
! 101 816•bit._cast c02'a'+11 •rand.Range 26 ! 102 c
! 101 816•bit._cast c 2'a'+11 •rand.Range 26 ! 102 c
832•bit._cast 37 %% 100992003
!"•bit._cast: incompatible lengths" % 18•bit._cast 10
!"•bit._cast: incompatible lengths" % 832•bit._cast 20
!"•bit._cast: incompatible lengths" % 832•bit._cast 100
!"•bit._cast𝕩: incompatible lengths" % 18•bit._cast 10
!"•bit._cast𝕩: incompatible lengths" % 832•bit._cast 20
!"•bit._cast𝕩: incompatible lengths" % 832•bit._cast 100
!"•bit._cast: unsupported width 1073741824" % (2230)•bit._cast 0
!"•bit._cast: unsupported width 1125899906842624" % (2250)•bit._cast 0 %USZ64
!"•bit._cast𝕩: unsupported width 1073741824" % (2230)•bit._cast 0
!"•bit._cast𝕩: unsupported width 1125899906842624" % (2250)•bit._cast 0 %USZ64
!"Integer out of range: 1125899906842624" % (2250)•bit._cast 0 %USZ32
!"Integer out of range: 1.180591620717411e21" % (2270)•bit._cast 0
!"Integer out of range: ∞" % (2)•bit._cast 0
!"•bit._cast: unsupported width 12" % 112•bit._cast 110
!"•bit._cast: unsupported width 12" % 1232•bit._cast (12×32)0
!"•bit._cast: unsupported width 12" % 812•bit._cast (8×12)0
!"•bit._cast: unsupported width 0" % 032•bit._cast 1280
!"•bit._cast: unsupported width 0" % 80•bit._cast 1280
!"•bit._cast𝕩: unsupported width 12" % 112•bit._cast 110
!"•bit._cast𝕩: unsupported width 12" % 1232•bit._cast (12×32)0
!"•bit._cast𝕩: unsupported width 12" % 812•bit._cast (8×12)0
!"•bit._cast𝕩: unsupported width 0" % 032•bit._cast 1280
!"•bit._cast𝕩: unsupported width 0" % 80•bit._cast 1280
!"•bit._cast: unsupported width 16 for type 'f'" % 16'f',32•bit._cast 1280
!"•bit._cast: unsupported width 32 for type 'f'" % 32,32'f'•bit._cast 1280
!"•bit._cast: unsupported width 0 for type 'u'" % 0'u',32•bit._cast 1280
!"•bit._cast: unsupported width 8 for type 'u'" % 8'u',32•bit._cast 1280
!"•bit._cast: unsupported width 32 for type 'u'" % 8,32'u'•bit._cast 1280
!"•bit._cast: unsupported width 1 for type 'i'" % 8, 1'i'•bit._cast 1280
!"•bit._cast𝕩: unsupported width 16 for type 'f'" % 16'f',32•bit._cast 1280
!"•bit._cast𝕩: unsupported width 32 for type 'f'" % 32,32'f'•bit._cast 1280
!"•bit._cast𝕩: unsupported width 0 for type 'u'" % 0'u',32•bit._cast 1280
!"•bit._cast𝕩: unsupported width 8 for type 'u'" % 8'u',32•bit._cast 1280
!"•bit._cast𝕩: unsupported width 32 for type 'u'" % 8,32'u'•bit._cast 1280
!"•bit._cast𝕩: unsupported width 1 for type 'i'" % 8, 1'i'•bit._cast 1280
# •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 b10<a ! 11 •internal.Refc a •internal.Keep b

View File

@ -17,8 +17,8 @@
(10)+((2÷˜)) 10×10 %% 5162738495061728394
((¯1+=)) 339 %% 33210543876
!"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⟩)" % 102030(12,21) 4416
!"𝔽⌾(a⊸⊑)𝕩: 𝔽 must return an array with the same shape as its input (expected ⟨2⟩, got ⟨3⟩)" % 1(12,21) 4416
!"𝔽⌾(n⊸⊑)𝕩: reading out-of-bounds (n≡¯10, 3≡≠𝕩)" % 1+(¯10) 3
!"⊑: 𝕨 contained list with mixed-type elements" % 'a'(1'a') 459
!"⊑: Indexing out-of-bounds (index 1‿5 in array of shape 4‿5)" % 'a'(15) 459
!"𝕨𝕩: 𝕨 contained list with mixed-type elements" % 'a'(1'a') 459
!"𝕨𝕩: Indexing out-of-bounds (index 1‿5 in array of shape 4‿5)" % 'a'(15) 459
10,2030(12,13,21) 459 %% 4501234561020013034567801
!"⊑: Picking item at wrong rank (index 1‿1‿1 in array of shape 10‿10)" % 1¨(111) 10101
!"⊑: Picking item at wrong rank (index ⟨1⟩ in array of shape 10‿10)" % 1¨(1) 10101
!"𝕨𝕩: Picking item at wrong rank (index 1‿1‿1 in array of shape 10‿10)" % 1¨(111) 10101
!"𝕨𝕩: Picking item at wrong rank (index ⟨1⟩ in array of shape 10‿10)" % 1¨(1) 10101
a1010101000 ! a a((a)) a
{𝕊: a(1+•rand.Range 200)•rand.Range 2 i•rand.Rangea ! a (ia)(i) 2(i) a}¨10000
100+(5) 44 %% (100×5=16) + 44
@ -44,8 +44,8 @@ a←10‿10‿10⥊↕1000 ⋄ ! a ≡ a⌾((↕≢a)⊸⊑) a
# ⊏
n500 an i(-n)+2×n r(2×n)a ! (a) r(i) a
!"⊏: 𝕩 cannot be a unit" % 00(00) <0
!"⊏: 𝕩 cannot be a unit" % %USE evar (0) {(𝕨)𝕩}_evar <0
!"𝕨𝕩: 𝕩 cannot be a unit" % 00(00) <0
!"𝕨𝕩: 𝕩 cannot be a unit" % %USE evar (0) {(𝕨)𝕩}_evar <0
!"𝔽⌾(a⊸⊏)𝕩: Indexing out-of-bounds (¯11∊a, ⟨10⟩≡≢𝕩)" % %USE evar 5¯11 {01(𝕨)𝕩}_evar 10101
!"𝔽⌾(a⊸⊏)𝕩: Indexing out-of-bounds (10∊a, ⟨10⟩≡≢𝕩)" % %USE evar 910 {01(𝕨)𝕩}_evar 10101
!"𝔽⌾(a⊸⊏)𝕩: Indexing out-of-bounds (10∊a, ⟨10⟩≡≢𝕩)" % %USE evar "ab" {𝕨(910)𝕩}_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(101/) 10
!"𝕨/𝕩: Lengths of components of 𝕨 must match 𝕩 (3 ≠ 10)" % 1(101/) 10
10+(1,01/)22 %% 2200,1011,10,1111
!"𝔽⌾(a⊸/): Incompatible result elements" % 12(20/)2
1+((10)/) 10 %% ×+ 10
@ -146,7 +146,7 @@ n←500 ⋄ a←↕n ⋄ i←(-n)+↕2×n ⋄ r←⌽(2×n)⥊a ⋄ ! (⌽a) ≡
%USE eqvar 100011 { ˙¨(𝕨/)𝕩}_eqvar 010101 %% 101
%USE eqvar 100011 { 3¨(𝕨/)𝕩}_eqvar "hellow" %% 3'e''l''l'33
%USE eqvar 100011 { +˙¨(𝕨/)𝕩}_eqvar -÷×=<> %% +÷×=++
!"/: Lengths of components of 𝕨 must match 𝕩 (6 ≠ 7)" % 0¨(100011/) 0101010
!"𝕨/𝕩: Lengths of components of 𝕨 must match 𝕩 (6 ≠ 7)" % 0¨(100011/) 0101010
4 (3)(010/) 3 %!PROPER_FILLS %% 0,3,2,0
4 (010/) 3 %!PROPER_FILLS %% 0,1,2,0
4 (000/) 3 %!PROPER_FILLS %% 0,1,2,0