diff --git a/src/builtins/arithd.c b/src/builtins/arithd.c index d8eccdbf..36bcd3fc 100644 --- a/src/builtins/arithd.c +++ b/src/builtins/arithd.c @@ -168,7 +168,7 @@ static B modint_AS(B w, B xv) { return modint_AA(w, C2(shape, C1(fne, incG(w)) } \ P2(NAME) \ } \ - thrM("𝕨" SYMB "𝕩: Unexpected argument types"); \ + thrM("𝕨" SYMB "𝕩: Unexpected argument types"); \ } GC2f("÷", div , w.f/(x.f+0), , /*INT_SA*/ @@ -407,7 +407,7 @@ static B modint_AS(B w, B xv) { return modint_AA(w, C2(shape, C1(fne, incG(w)) #define AR_I_SCALAR(CHR, NAME, EXPR, MORE) B NAME##_c2(B t, B w, B x) { \ if (isF64(w) & isF64(x)) return m_f64(EXPR); \ MORE; AR_I_TO_ARR(NAME) \ - thrM("𝕨"CHR "𝕩: Unexpected argument types"); \ + thrM("𝕨"CHR "𝕩: Unexpected argument types"); \ } AR_I_SCALAR("+", add, w.f+x.f, { @@ -431,7 +431,7 @@ B not_c2(B t, B w, B x) { #define AR_F_SCALAR(CHR, NAME, EXPR) B NAME##_c2(B t, B w, B x) { \ if (isF64(w) & isF64(x)) return m_f64(EXPR); \ AR_F_TO_ARR(NAME) \ - thrM("𝕨"CHR "𝕩: Unexpected argument types"); \ + thrM("𝕨"CHR "𝕩: Unexpected argument types"); \ } AR_F_SCALAR("÷", div , w.f/(x.f+0)) AR_F_SCALAR("⋆", pow , pow(w.f+0, x.f)) @@ -478,7 +478,7 @@ static f64 bqn_atan2iw(f64 x, f64 w) { return w / (tan(x)+0); } #define MATH(n,N,I) B n##_c2(B t, B w, B x) { \ if (isNum(w) && isNum(x)) return m_f64(I(x.f, w.f)); \ P2(n) \ - thrM("𝕨•math𝕩." N ": Unexpected argument types"); \ + thrM("𝕨•math." N "𝕩: Unexpected argument types"); \ } MATH(atan2,"Atan2",bqn_atan2) MATH(atan2ix,"Atan2⁼",bqn_atan2ix) diff --git a/src/builtins/cells.c b/src/builtins/cells.c index 58c153ca..cf7934a6 100644 --- a/src/builtins/cells.c +++ b/src/builtins/cells.c @@ -340,7 +340,7 @@ static NOINLINE B to_fill_cell(B x, ur k, u32 chr) { // consumes x ur cr = RNK(x)-k; usz* sh = SH(x)+k; usz csz = 1; - for (usz i=0; ia, xsh, k); rsh->a[k] = 1; diff --git a/src/builtins/fold.c b/src/builtins/fold.c index 9d820177..b67ed888 100644 --- a/src/builtins/fold.c +++ b/src/builtins/fold.c @@ -180,7 +180,7 @@ static f64 (*const min_fns[])(void*, usz) = { min_i8, min_i16, min_i32, min_f64 static f64 (*const max_fns[])(void*, usz) = { max_i8, max_i16, max_i32, max_f64 }; B fold_c1(Md1D* d, B x) { B f = d->f; - if (isAtm(x) || RNK(x)!=1) thrF("´𝕩: 𝕩 must be a list (%H ≡ ≢𝕩)", x); + if (isAtm(x) || RNK(x)!=1) thrF("𝔽´𝕩: 𝕩 must be a list (%H ≡ ≢𝕩)", x); usz ia = IA(x); if (ia<=2) { if (ia==2) { @@ -197,7 +197,7 @@ B fold_c1(Md1D* d, B x) { B f = d->f; B r = TI(f,identity)(f); if (!q_N(r)) return r; } - thrM("´𝕩: Identity not found"); + thrM("𝔽´𝕩: Identity not found"); } } if (RARE(!isFun(f))) { decG(x); if (isMd(f)) thrM("Calling a modifier"); return inc(f); } @@ -268,7 +268,7 @@ B fold_c1(Md1D* d, B x) { B f = d->f; } B fold_c2(Md1D* d, B w, B x) { B f = d->f; - if (isAtm(x) || RNK(x)!=1) thrF("𝕨´𝕩: 𝕩 must be a list (%H ≡ ≢𝕩)", x); + if (isAtm(x) || RNK(x)!=1) thrF("𝕨𝔽´𝕩: 𝕩 must be a list (%H ≡ ≢𝕩)", x); usz ia = IA(x); if (RARE(ia==0)) { decG(x); return w; } if (RARE(!isFun(f))) { dec(w); decG(x); if (isMd(f)) thrM("Calling a modifier"); return inc(f); } @@ -385,7 +385,7 @@ extern B insert_base(B f, B x, bool has_w, B w); // from cells.c B insert_c1(Md1D* d, B x) { B f = d->f; ur xr; - if (isAtm(x) || (xr=RNK(x))==0) thrM("˝𝕩: 𝕩 must have rank at least 1"); + if (isAtm(x) || (xr=RNK(x))==0) thrM("𝔽˝𝕩: 𝕩 must have rank at least 1"); usz len = *SH(x); if (len==0) { if (isFun(f)) { @@ -400,11 +400,11 @@ B insert_c1(Md1D* d, B x) { B f = d->f; } decG(x); return taga(r); } else if (RTID(f) == n_join) { - if (xr <= 1) thrM("˝𝕩: Identity does not exist"); + if (xr <= 1) thrM("𝔽˝𝕩: Identity does not exist"); goto join; } } - thrM("˝𝕩: Identity not found"); + thrM("𝔽˝𝕩: Identity not found"); } if (len==1) return C1(select, x); if (RARE(!isFun(f))) { decG(x); if (isMd(f)) thrM("Calling a modifier"); return inc(f); } diff --git a/src/builtins/md1.c b/src/builtins/md1.c index e470b810..d1dafeb8 100644 --- a/src/builtins/md1.c +++ b/src/builtins/md1.c @@ -70,7 +70,7 @@ B tbl_c2(Md1D* d, B w, B x) { B f = d->f; ur wr = RNK(w); usz wia = IA(w); ur xr = RNK(x); usz xia = IA(x); ur rr = wr+xr; usz ria = uszMul(wia, xia); - if (rrf, x , w); } B timed_c2(Md1D* d, B w, B x) { B f = d->f; i64 am = o2i64(w); - if (am<=0) thrM("𝕨•_timed𝕩: 𝕨 must be an integer greater than 1"); + if (am<=0) thrM("𝕨𝔽•_timed𝕩: 𝕨 must be an integer greater than 0"); incBy(x, am-1); FC1 fc1 = c1fn(f); u64 sns = nsTime(); diff --git a/src/builtins/md2.c b/src/builtins/md2.c index 385152a7..919bc8ba 100644 --- a/src/builtins/md2.c +++ b/src/builtins/md2.c @@ -144,8 +144,8 @@ B pick_c2(B t, B w, B x); B cond_c1(Md2D* d, B x) { B f=d->f; B g=d->g; B fr = c1iX(f, x); if (isNum(fr)) { - if (isAtm(g)||RNK(g)!=1) thrM("◶𝕩: 𝕘 must have rank 1 when index is a number"); - usz fri = WRAP(o2i64(fr), IA(g), thrM("◶𝕩: Index out of bounds of 𝕘")); + if (isAtm(g)||RNK(g)!=1) thrM("𝔽◶𝕘𝕩: 𝕘 must have rank 1 when index is a number"); + usz fri = WRAP(o2i64(fr), IA(g), thrM("𝔽◶𝕘𝕩: Index out of bounds of 𝕘")); return c1(IGetU(g, fri), x); } else { B fn = C2(pick, fr, inc(g)); @@ -157,8 +157,8 @@ B cond_c1(Md2D* d, B x) { B f=d->f; B g=d->g; B cond_c2(Md2D* d, B w, B x) { B g=d->g; B fr = c2iWX(d->f, w, x); if (isNum(fr)) { - if (isAtm(g)||RNK(g)!=1) thrM("𝕨◶𝕩: 𝕘 must have rank 1 when index is a number"); - usz fri = WRAP(o2i64(fr), IA(g), thrM("𝕨◶𝕩: Index out of bounds of 𝕘")); + if (isAtm(g)||RNK(g)!=1) thrM("𝕨𝔽◶𝕘𝕩: 𝕘 must have rank 1 when index is a number"); + usz fri = WRAP(o2i64(fr), IA(g), thrM("𝕨𝔽◶𝕘𝕩: Index out of bounds of 𝕘")); return c2(IGetU(g, fri), w, x); } else { B fn = C2(pick, fr, inc(g)); diff --git a/src/builtins/scan.c b/src/builtins/scan.c index 84930895..8b8402f6 100644 --- a/src/builtins/scan.c +++ b/src/builtins/scan.c @@ -229,7 +229,7 @@ static B scan_plus(f64 r0, B x, u8 xe, usz ia) { extern B scan_arith(B f, B w, B x, usz* xsh); // from cells.c B scan_c1(Md1D* d, B x) { B f = d->f; - if (isAtm(x) || RNK(x)==0) thrM("`𝕩: 𝕩 cannot have rank 0"); + if (isAtm(x) || RNK(x)==0) thrM("𝔽`𝕩: 𝕩 cannot have rank 0"); ur xr = RNK(x); usz ia = IA(x); if (*SH(x)<=1 || ia==0) return x; @@ -306,9 +306,9 @@ B scan_c1(Md1D* d, B x) { B f = d->f; } B scan_c2(Md1D* d, B w, B x) { B f = d->f; - if (isAtm(x) || RNK(x)==0) thrM("𝕨`𝕩: 𝕩 cannot have rank 0"); + if (isAtm(x) || RNK(x)==0) thrM("𝕨𝔽`𝕩: 𝕩 cannot have rank 0"); ur xr = RNK(x); usz* xsh = SH(x); usz ia = IA(x); - if (isArr(w)? !ptr_eqShape(SH(w), RNK(w), xsh+1, xr-1) : xr!=1) thrF("𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (%H ≡ ≢𝕨, %H ≡ ≢𝕩)", w, x); + if (isArr(w)? !ptr_eqShape(SH(w), RNK(w), xsh+1, xr-1) : xr!=1) thrF("𝕨𝔽`𝕩: Shape of 𝕨 must match the cell of 𝕩 (%H ≡ ≢𝕨, %H ≡ ≢𝕩)", w, x); if (ia==0) { dec(w); return x; } if (RARE(!isFun(f))) { if (isMd(f)) thrM("Calling a modifier"); diff --git a/src/builtins/sysfn.c b/src/builtins/sysfn.c index e2f258a2..de25a396 100644 --- a/src/builtins/sysfn.c +++ b/src/builtins/sysfn.c @@ -277,7 +277,7 @@ B show_c1(B t, B x) { } NOINLINE B vfyStr(B x, char* name, char* arg) { - if (!isStr(x)) thrF("%U𝕩: %U must be a string", name, arg); + if (!isStr(x)) thrF("%U: %U must be a string", name, arg); return x; } @@ -1038,7 +1038,7 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er SGetU(x) for (u64 i = 0; i < xia; i++) { B c = GetU(x, i); - if (isAtm(c) || RNK(c)!=1) thrM("•SH𝕩: 𝕩 must be a list of strings"); + if (isAtm(c) || RNK(c)!=1) thrM("•SH: 𝕩 must be a list of strings"); u64 len = utf8lenB(c); TALLOC(char, cstr, len+1); toUTF8(c, cstr); @@ -1051,7 +1051,7 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er int p_in[2]; int p_out[2]; int p_err[2]; - if (pipe(p_in) || pipe(p_out) || pipe(p_err)) thrM("•SH𝕩: Failed to create process: Couldn't create pipes"); // TODO these pipes will easily leak + if (pipe(p_in) || pipe(p_out) || pipe(p_err)) thrM("•SH: Failed to create process: Couldn't create pipes"); // TODO these pipes will easily leak shDbg("pipes: %d %d %d %d %d %d\n", p_in[0], p_in[1], p_out[0], p_out[1], p_err[0], p_err[1]); fcntl(p_in[1], F_SETFL, O_NONBLOCK); // make our side of pipes never block because we're working on multiple fcntl(p_out[0], F_SETFL, O_NONBLOCK); @@ -1065,7 +1065,7 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er // spawn the actual process pid_t pid; - if(posix_spawnp(&pid, argv[0], &a, NULL, argv, environ) != 0) thrF("•SH𝕩: Failed to create process: %S", strerror(errno)); + if(posix_spawnp(&pid, argv[0], &a, NULL, argv, environ) != 0) thrF("•SH: Failed to create process: %S", strerror(errno)); posix_spawn_file_actions_destroy(&a); // used now shClose(p_in[0]); // close the useless pipes on this side shClose(p_out[1]); @@ -1163,7 +1163,7 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er SGetU(x) for (u64 i = 0; i < xia; i++) { B c = GetU(x, i); - if (isAtm(c) || RNK(c)!=1) thrM("•SH𝕩: 𝕩 must be a list of strings"); + if (isAtm(c) || RNK(c)!=1) thrM("•SH: 𝕩 must be a list of strings"); u64 len = utf16lenB(c); TALLOC(WCHAR, wstr, len); toUTF16(c, wstr); @@ -1214,7 +1214,7 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er if (iLen>0) { if (raw) free_chars(iBufRaw); else TFREE(iBuf); } // FREE_INPUT TSFREE(arg); if (dwResult != ERROR_SUCCESS) { - thrF("•SH𝕩: Failed to run command: %S", winErrorEx(dwResult)); + thrF("•SH: Failed to run command: %S", winErrorEx(dwResult)); } // prepare output @@ -1242,17 +1242,17 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er B inObj = bi_N; bool raw = false; if (!q_N(w)) { - if (!isNsp(w)) thrM("𝕨•SH𝕩: 𝕨 must be a namespace"); + if (!isNsp(w)) thrM("•SH: 𝕨 must be a namespace"); inObj = ns_getC(w, "stdin"); - if (!q_N(inObj) && !isArr(inObj)) thrM("𝕨•SH𝕩: Invalid stdin value"); + if (!q_N(inObj) && !isArr(inObj)) thrM("•SH: Invalid stdin value"); B rawObj = ns_getC(w, "raw"); if (!q_N(rawObj)) raw = o2b(rawObj); } u64 iLen = q_N(inObj)? 0 : (raw? IA(inObj) : utf8lenB(inObj)); - if (isAtm(x) || RNK(x)>1) thrM("𝕨•SH𝕩: 𝕩 must be a list of strings"); + if (isAtm(x) || RNK(x)>1) thrM("•SH: 𝕩 must be a list of strings"); usz xia = IA(x); - if (xia==0) thrM("𝕨•SH𝕩: 𝕩 must have at least one item"); + if (xia==0) thrM("•SH: 𝕩 must have at least one item"); B s_out, s_err; i32 code = sh_core(raw, x, xia, inObj, iLen, &s_out, &s_err); @@ -1270,7 +1270,7 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er return m_hvec3(m_i32(code), s_outObj, s_errObj); } #else - B sh_c2(B t, B w, B x) { thrM("𝕨•SH𝕩: CBQN was compiled without "); } + B sh_c2(B t, B w, B x) { thrM("•SH: CBQN was compiled without "); } #endif B sh_c1(B t, B x) { return sh_c2(t, bi_N, x); } @@ -1426,19 +1426,19 @@ static CastType getCastType(B e, bool hasVal, B val) { // returns a valid type ( usz s; bool c; if (isNum(e)) { s = o2s(e); - if (s!=1 && s!=8 && s!=16 && s!=32 && s!=64) thrF("•bit._cast𝕩: unsupported width %s", s); + if (s!=1 && s!=8 && s!=16 && s!=32 && s!=64) thrF("•bit._cast: unsupported width %s", s); c = hasVal? isCharArr(val) : 0; } else { - if (!isArr(e) || RNK(e)!=1 || IA(e)!=2) thrM("•bit._cast𝕩: 𝕗 elements must be numbers or two-element lists"); + if (!isArr(e) || RNK(e)!=1 || IA(e)!=2) thrM("•bit._cast: 𝕗 elements must be numbers or two-element lists"); SGetU(e) s = o2s(GetU(e,0)); u32 t = o2c(GetU(e,1)); c = t=='c'; - if (c ) { if (s!=8 && s!=16 && s!=32) { badWidth: thrF("•bit._cast𝕩: unsupported width %s for type '%c'", s, (char)t); } } + if (c ) { if (s!=8 && s!=16 && s!=32) { badWidth: thrF("•bit._cast: unsupported width %s for type '%c'", s, (char)t); } } else if (t=='i') { if (s!=8 && s!=16 && s!=32) goto badWidth; } else if (t=='u') { if (s!=1) goto badWidth; } else if (t=='f') { if (s!=64) goto badWidth; } - else thrM("•bit._cast𝕩: type descriptor in 𝕗 must be one of \"iufnc\""); + else thrM("•bit._cast: type descriptor in 𝕗 must be one of \"iufnc\""); } return (CastType) { s, c }; @@ -1495,14 +1495,14 @@ static B set_bit_result(B r, u8 rt, ur rr, usz rl, usz *sh) { B bitcast_impl(B el0, B el1, B x) { ur xr; - if (!isArr(x) || (xr=RNK(x))<1) thrM("•bit._cast𝕩: 𝕩 must have rank at least 1"); + if (!isArr(x) || (xr=RNK(x))<1) thrM("•bit._cast: 𝕩 must have rank at least 1"); CastType xct = getCastType(el0, true, x); CastType rct = getCastType(el1, false, m_f64(0)); usz* sh = SH(x); u64 s=xct.s*(u64)sh[xr-1], rl=s/rct.s; - if (rl*rct.s != s) thrM("•bit._cast𝕩: incompatible lengths"); - if (rl>=USZ_MAX) thrM("•bit._cast𝕩: output too large"); + if (rl*rct.s != s) thrM("•bit._cast: incompatible lengths"); + if (rl>=USZ_MAX) thrM("•bit._cast: output too large"); B r = convert(xct, x); u8 rt = typeOfCast(rct); if (rt==t_bitarr && (v(r)->refc!=1 || IS_SLICE(TY(r)))) { @@ -1522,12 +1522,12 @@ B bitcast_impl(B el0, B el1, B x) { } B bitcast_c1(Md1D* d, B x) { B f = d->f; - if (!isArr(f) || RNK(f)!=1 || IA(f)!=2) thrM("•bit._cast𝕩: 𝕗 must be a 2-element list (from‿to)"); + if (!isArr(f) || RNK(f)!=1 || IA(f)!=2) thrM("•bit._cast: 𝕗 must be a 2-element list (from‿to)"); SGetU(f) return bitcast_impl(GetU(f,0), GetU(f,1), x); } B bitcast_im(Md1D* d, B x) { B f = d->f; - if (!isArr(f) || RNK(f)!=1 || IA(f)!=2) thrM("•bit._cast𝕩: 𝕗 must be a 2-element list (from‿to)"); + if (!isArr(f) || RNK(f)!=1 || IA(f)!=2) thrM("•bit._cast: 𝕗 must be a 2-element list (from‿to)"); SGetU(f) return bitcast_impl(GetU(f,1), GetU(f,0), x); } @@ -1787,12 +1787,12 @@ B indexOf_c2(B t, B w, B x); GLOBAL bool fileInit; -B invalidFn_c1 (B t, B x) { thrM("Fn𝕩: Using an invalid function"); } -B invalidFn_c2 (B t, B w, B x) { thrM("𝕨Fn𝕩: Using an invalid function"); } -B invalidMd1_c1(Md1D* d, B x) { thrM("_Mod𝕩: Using an invalid 1-modifier"); } -B invalidMd1_c2(Md1D* d, B w, B x) { thrM("𝕨_Mod𝕩: Using an invalid 1-modifier"); } -B invalidMd2_c1(Md2D* d, B x) { thrM("_Mod_𝕩: Using an invalid 2-modifier"); } -B invalidMd2_c2(Md2D* d, B w, B x) { thrM("𝕨_Mod_𝕩: Using an invalid 2-modifier"); } +B invalidFn_c1 (B t, B x) { thrM("Using an invalid function"); } +B invalidFn_c2 (B t, B w, B x) { thrM("Using an invalid function"); } +B invalidMd1_c1(Md1D* d, B x) { thrM("Using an invalid 1-modifier"); } +B invalidMd1_c2(Md1D* d, B w, B x) { thrM("Using an invalid 1-modifier"); } +B invalidMd2_c1(Md2D* d, B x) { thrM("Using an invalid 2-modifier"); } +B invalidMd2_c2(Md2D* d, B w, B x) { thrM("Using an invalid 2-modifier"); } static NOINLINE void initSysDesc() { if (fileInit) return; diff --git a/src/core/stuff.c b/src/core/stuff.c index 5bd4fdca..3f7ac1e6 100644 --- a/src/core/stuff.c +++ b/src/core/stuff.c @@ -41,11 +41,11 @@ NORETURN NOINLINE void fatal(char* s) { } NOINLINE B c1F(B f, B x) { dec(x); - if (isMd(f)) thrM("_Mod𝕩: Calling a modifier"); + if (isMd(f)) thrM("Calling a modifier"); return inc(VALIDATE(f)); } NOINLINE B c2F(B f, B w, B x) { dec(w); dec(x); - if (isMd(f)) thrM("𝕨_Mod_𝕩: Calling a modifier"); + if (isMd(f)) thrM("Calling a modifier"); return inc(VALIDATE(f)); } NOINLINE void value_freeF(Value* x) { value_free(x); } @@ -54,15 +54,15 @@ void noop_visit(Value* x) { } #if HEAP_VERIFY void arr_visit(Value* x) { VISIT_SHAPE(x); } #endif -NOINLINE B c1_bad(B f, B x) { thrM("Fn𝕩: This function can't be called monadically"); } -NOINLINE B c2_bad(B f, B w, B x) { thrM("𝕨Fn𝕩: This function can't be called dyadically"); } -NOINLINE B m1c1_bad(Md1D* d, B x) { thrM("_Mod𝕩: This 1-modifier can't be called monadically"); } -NOINLINE B m1c2_bad(Md1D* d, B w, B x) { thrM("𝕨_Mod𝕩: This 1-modifier can't be called dyadically"); } -NOINLINE B m2c1_bad(Md2D* d, B x) { thrM("_Mod_𝕩: This 2-modifier can't be called monadically"); } -NOINLINE B m2c2_bad(Md2D* d, B w, B x) { thrM("𝕨_Mod_𝕩: This 2-modifier can't be called dyadically"); } +NOINLINE B c1_bad(B f, B x) { thrM("This function can't be called monadically"); } +NOINLINE B c2_bad(B f, B w, B x) { thrM("This function can't be called dyadically"); } +NOINLINE B m1c1_bad(Md1D* d, B x) { thrM("This 1-modifier can't be called monadically"); } +NOINLINE B m1c2_bad(Md1D* d, B w, B x) { thrM("This 1-modifier can't be called dyadically"); } +NOINLINE B m2c1_bad(Md2D* d, B x) { thrM("This 2-modifier can't be called monadically"); } +NOINLINE B m2c2_bad(Md2D* d, B w, B x) { thrM("This 2-modifier can't be called dyadically"); } -NOINLINE B md_c1(B t, B x) { thrM("_Mod𝕩: Cannot call a modifier"); } -NOINLINE B md_c2(B t, B w, B x) { thrM("𝕨_Mod_𝕩: Cannot call a modifier"); } +NOINLINE B md_c1(B t, B x) { thrM("Cannot call a modifier"); } +NOINLINE B md_c2(B t, B w, B x) { thrM("Cannot call a modifier"); } NOINLINE B arr_c1(B t, B x) { dec(x); return inc(t); } NOINLINE B arr_c2(B t, B w, B x) { dec(w); dec(x); return inc(t); } diff --git a/src/utils/mut.c b/src/utils/mut.c index 5cf36d58..3e32f984 100644 --- a/src/utils/mut.c +++ b/src/utils/mut.c @@ -557,7 +557,7 @@ static B m_getU_B (void* a, usz ms) { return ((B*) a)[ms]; } void apd_fail_apd(ApdMut* m, B x) { } NOINLINE char* apd_ty_base(u32 ty) { - return ty==1? ">" : ty==2? "[…]" : ty==U'˘'? "˘" : ty==U'⎉'? "⎉" : "??"; + return ty==1? ">𝕩" : ty==2? "[…]" : ty==U'˘'? "𝔽˘" : ty==U'⎉'? "𝔽⎉𝕘" : "??"; } Arr* apd_sh_err(ApdMut* m, u32 ty) { B msg = make_fmt("%U: Incompatible %S shapes (encountered shapes %2H and %H)", apd_ty_base(ty), ty>2? "result" : "element", m->cr, m->csh, m->failEl); diff --git a/test/cases/cells.bqn b/test/cases/cells.bqn index 84914626..be864843 100644 --- a/test/cases/cells.bqn +++ b/test/cases/cells.bqn @@ -20,7 +20,7 @@ !"˘: Result rank too large" % (0∾254⥊2)⊸⥊∘1˘ 0‿2⥊1 !"⎉: Result rank too large" % (0∾254⥊2)⊸⥊∘1⎉¯1 0‿2⥊1 !"⎉: 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 +!"𝔽⎉𝕘: 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" @@ -42,8 +42,8 @@ !"𝕨⊏𝕩: 𝕩 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 -!">: 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 +!">𝕩: 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 @@ -65,12 +65,12 @@ !"⊒𝕩: 𝕩 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 +!"𝕨𝔽`𝕩: 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⟩ diff --git a/test/cases/ffi.bqn b/test/cases/ffi.bqn index fb0837bc..543d02a1 100644 --- a/test/cases/ffi.bqn +++ b/test/cases/ffi.bqn @@ -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" -!"Fn𝕩: This function can't be called monadically" % •FFI ""‿"bqn_init" +!"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 '!'}} diff --git a/test/cases/patterns.bqn b/test/cases/patterns.bqn index 24849776..df6d57eb 100644 --- a/test/cases/patterns.bqn +++ b/test/cases/patterns.bqn @@ -16,7 +16,7 @@ !"Calling a modifier" % 4 {˜}˝↕1 !"Calling a modifier" % 4 {∘}`↕1 !"Calling a modifier" % {∘}¨↕1 -!"𝕨_Mod_𝕩: Cannot call a modifier" % {˜}¨˜↕1 +!"Cannot call a modifier" % {˜}¨˜↕1 4 {˜}˙´↕1 %% ˜ 4 {˜}˙˝↕1 %% ˜ 4 {∘}˙`↕1 %% ⟨∘⟩ diff --git a/test/cases/prims.bqn b/test/cases/prims.bqn index f35613b8..9d951b4d 100644 --- a/test/cases/prims.bqn +++ b/test/cases/prims.bqn @@ -28,10 +28,10 @@ ! {𝕩 ≡ ⍷2/𝕩} ⟨(0÷0)⊸+, (0÷0)⊸+⟩ # comparison -w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -w←1‿1⥊1 ⋄ x←2⥊1 ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ -w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ {! (∾⟨"𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←1‿2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨"𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, 1‿2 ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←2⥊1 ⋄ {! (∾⟨"𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ +w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨"𝕨",•Repr𝕩,"𝕩: Expected equal shape prefix (1‿1 ≡ ≢𝕨, ⟨2⟩ ≡ ≢𝕩)"⟩) ≡ w 𝕏⎊(•CurrentError∘@) x}¨ =‿≠‿<‿>‿≤‿≥ !"Invalid comparison" % <˜{⇐} !"Invalid comparison" % ≤˜{⇐} !"Invalid comparison" % >˜{⇐} @@ -61,28 +61,28 @@ w←1‿1⥊1 ⋄ x←2⥊1 ⋄ w‿x <¨↩ ⋄ {! (∾⟨•Repr𝕩,": Expe (<1)+<1 %% <2 @-@ %% 0 !"𝕨-𝕩: Invalid character" % @-1 -{r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} @}¨ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -{r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ 0 0∘𝕏⎊{𝕊: •CurrentError@} @}¨ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -{r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} 0}¨ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +{r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} @}¨ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +{r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ 0 0∘𝕏⎊{𝕊: •CurrentError@} @}¨ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +{r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} 0}¨ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨 V a}⌜ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ 0 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨 V a}⌜ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊0 ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨 V a}⌜ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨 V a}⌜ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ 0 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨 V a}⌜ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊0 ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ @ 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨 V a}⌜ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ (𝕨 V a) 0∘𝕏⎊{𝕊: •CurrentError@} @}⌜ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊0 ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ (𝕨 V a) 0∘𝕏⎊{𝕊: •CurrentError@} @}⌜ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) (r∾": Unexpected argument types") ⋈ (𝕨 V a) 0∘𝕏⎊{𝕊: •CurrentError@} 0}⌜ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ (𝕨 V a) 0∘𝕏⎊{𝕊: •CurrentError@} @}⌜ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊0 ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ (𝕨 V a) 0∘𝕏⎊{𝕊: •CurrentError@} @}⌜ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊@ ⋄ (LV a) {r←•Repr𝕩 ⋄ (⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ (𝕨 V a) 0∘𝕏⎊{𝕊: •CurrentError@} 0}⌜ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊@ ⋄ b←4⥊@ ⋄ {r←•Repr f←𝕩 ⋄ {(⊢!≡´) (r∾": Unexpected argument types") ⋈ (𝕨 V a) 0∘F⎊{𝕊: •CurrentError@} 𝕩 V b}⌜○LV´ a‿b}⌜ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊0 ⋄ b←4⥊@ ⋄ {r←•Repr f←𝕩 ⋄ {(⊢!≡´) (r∾": Unexpected argument types") ⋈ (𝕨 V a) 0∘F⎊{𝕊: •CurrentError@} 𝕩 V b}⌜○LV´ a‿b}⌜ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ -%USE var ⋄ a←4⥊@ ⋄ b←4⥊0 ⋄ {r←•Repr f←𝕩 ⋄ {(⊢!≡´) (r∾": Unexpected argument types") ⋈ (𝕨 V a) 0∘F⎊{𝕊: •CurrentError@} 𝕩 V b}⌜○LV´ a‿b}⌜ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊@ ⋄ b←4⥊@ ⋄ {r←•Repr f←𝕩 ⋄ {(⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ (𝕨 V a) 0∘F⎊{𝕊: •CurrentError@} 𝕩 V b}⌜○LV´ a‿b}⌜ ⟨+, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊0 ⋄ b←4⥊@ ⋄ {r←•Repr f←𝕩 ⋄ {(⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ (𝕨 V a) 0∘F⎊{𝕊: •CurrentError@} 𝕩 V b}⌜○LV´ a‿b}⌜ ⟨ -, ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ +%USE var ⋄ a←4⥊@ ⋄ b←4⥊0 ⋄ {r←•Repr f←𝕩 ⋄ {(⊢!≡´) ("𝕨"∾r∾"𝕩: Unexpected argument types") ⋈ (𝕨 V a) 0∘F⎊{𝕊: •CurrentError@} 𝕩 V b}⌜○LV´ a‿b}⌜ ⟨ ×, ÷, ⋆, √, ⌊, ⌈, |, ∧, ∨, ÷⟩ !"𝕨-𝕩: Unexpected argument types" % 0-@ !"𝕨÷𝕩: Unexpected argument types" % 0÷@ !"+𝕩: Argument must consist of numbers" % +@ -⟨@, "abc", ⟨1,2,+⟩, {⇐}⟩ {(⊢!≡´) (": Argument contained non-number"∾˜•Repr 𝕩) ⋈ 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨}⌜ -‿×‿÷‿⋆‿√‿⌊‿⌈‿|‿¬ -!"Fn𝕩: This function can't be called monadically" % ≤@ -!"Fn𝕩: This function can't be called monadically" % ≥@ +⟨@, "abc", ⟨1,2,+⟩, {⇐}⟩ {(⊢!≡´) ("𝕩: 𝕩 contained non-number"∾˜•Repr 𝕩) ⋈ 0∘𝕏⎊{𝕊: •CurrentError@} 𝕨}⌜ -‿×‿÷‿⋆‿√‿⌊‿⌈‿|‿¬ +!"This function can't be called monadically" % ≤@ +!"This function can't be called monadically" % ≥@ # 𝕨/𝕩 2‿3‿0‿1/4‿3⥊↕⋈12 %% ⋈¨6‿3⥊0‿1‿2‿0‿1‿2‿3‿4‿5‿3‿4‿5‿3‿4‿5‿9‿10‿11 @@ -170,15 +170,15 @@ a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄ %USE eqvar ⋄ 1‿2 ⊑_eqvar ↕5‿5 %% 1‿2 # >𝕩 -!">: Result rank too large (200 ≡ =𝕩, 205 ≡ =⊑𝕩)" % > (200⥊1)⥊<(205⥊1)⥊1 -!">: Incompatible element shapes (encountered shapes ⟨2⟩ and 4‿5)" % > ↕¨⟨2, 4‿5⟩ -!">: Incompatible element shapes (encountered shapes 2‿3 and ⟨4⟩)" % > ↕¨⟨2‿3, 4⟩ -!">: Incompatible element shapes (encountered shapes 2‿3 and 4‿5)" % > ↕¨⟨2‿3, 4‿5⟩ -!">: Incompatible element shapes (encountered shapes 2‿0 and 4‿5)" % > ↕¨⟨2‿0, 4‿5⟩ -!">: Incompatible element shapes (encountered shapes ⟨0⟩ and 4‿5)" % > ↕¨⟨0, 4‿5⟩ -!">: Incompatible element shapes (encountered shapes ⟨0⟩ and ⟨⟩)" % > ↕¨⟨0, ⟨⟩⟩ -!">: Incompatible element shapes (encountered shapes 2‿3 and ⟨⟩)" % > ↕¨⟨2‿3, ⟨⟩⟩ -!">: Incompatible element shapes (encountered shapes 4‿5 and 4‿6)" % ≢>2‿3⥊⟨4‿5⥊↕20,4‿6⥊↕1⟩ +!">𝕩: Result rank too large (200 ≡ =𝕩, 205 ≡ =⊑𝕩)" % > (200⥊1)⥊<(205⥊1)⥊1 +!">𝕩: Incompatible element shapes (encountered shapes ⟨2⟩ and 4‿5)" % > ↕¨⟨2, 4‿5⟩ +!">𝕩: Incompatible element shapes (encountered shapes 2‿3 and ⟨4⟩)" % > ↕¨⟨2‿3, 4⟩ +!">𝕩: Incompatible element shapes (encountered shapes 2‿3 and 4‿5)" % > ↕¨⟨2‿3, 4‿5⟩ +!">𝕩: Incompatible element shapes (encountered shapes 2‿0 and 4‿5)" % > ↕¨⟨2‿0, 4‿5⟩ +!">𝕩: Incompatible element shapes (encountered shapes ⟨0⟩ and 4‿5)" % > ↕¨⟨0, 4‿5⟩ +!">𝕩: Incompatible element shapes (encountered shapes ⟨0⟩ and ⟨⟩)" % > ↕¨⟨0, ⟨⟩⟩ +!">𝕩: Incompatible element shapes (encountered shapes 2‿3 and ⟨⟩)" % > ↕¨⟨2‿3, ⟨⟩⟩ +!">𝕩: Incompatible element shapes (encountered shapes 4‿5 and 4‿6)" % ≢>2‿3⥊⟨4‿5⥊↕20,4‿6⥊↕1⟩ !"∾𝕩: Item trailing shapes must be equal (contained arrays with shapes ⟨2⟩ and ⟨3⟩ and later higher-rank array)" % ∾⟨1‿1, 1‿1‿1, ⟨1⟩, 2‿2⥊1⟩ !"∾𝕩: Item trailing shapes must be equal (contained arrays with shapes 1‿4 and ⟨0⟩)" % ∾⟨1‿4⥊"abcd",⟨⟩⟩ >⟨<'a',1⟩ %% 'a'‿1 @@ -445,7 +445,7 @@ a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄ %USE eqvar ⋄ a←¯5+↕10 ⋄ {1+⍟𝕩 ⋈10}_eqvar a %% ⋈¨ 5+↕10 %USE eqvar ⋄ a←¯5+↕10 ⋄ {1+⍟(𝕩{!𝕩≡⋈10 ⋄ 𝕗}) ⋈10}_eqvar a %% ⋈¨ 5+↕10 !∘0⍟⟨↕0, ⟨⟩, ""⟩ 0 %% ⟨⟨⟩,⟨⟩,⟨⟩⟩ -!"_Mod𝕩: Calling a modifier" % 1⊸+⍟{∘} 0 +!"Calling a modifier" % 1⊸+⍟{∘} 0 !"⍟: 𝔾 contained non-number" % 1⊸+⍟⟨1,∘,3⟩ 0 !"Expected integer, got 1.5" % 1⊸+⍟1.5 0 !"Integer out of range: 1e20" % 1⊸+⍟1e20 0 @@ -455,8 +455,10 @@ a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄ !"⍟: 𝔾 contained non-integer (or integer was out of range)" % %USE evar ⋄ {1⊸+⍟𝕩 0}_evar ⟨1.5, 9⟩ # ◶ -!"◶𝕩: 𝕘 must have rank 1 when index is a number" % 1◶[1‿2,3‿4] 3 -!"𝕨◶𝕩: 𝕘 must have rank 1 when index is a number" % "ab" ⊢◶[1‿2,3‿4] 3 +!"𝔽◶𝕘𝕩: 𝕘 must have rank 1 when index is a number" % 1◶[1‿2,3‿4] 3 +!"𝕨𝔽◶𝕘𝕩: 𝕘 must have rank 1 when index is a number" % "ab" ⊢◶[1‿2,3‿4] 3 +!"𝕨𝔽◶𝕘𝕩: Index out of bounds of 𝕘" % 1 2◶⊢‿- 3 +!"𝔽◶𝕘𝕩: Index out of bounds of 𝕘" % 2◶⊢‿- 3 !"𝕨⊑𝕩: Picking item at wrong rank (index 0‿0 in array of shape ⟨2⟩)" % ⊢◶+‿- 0‿0 # shouldn't reference ⊑ but whatever !"𝕨⊑𝕩: Picking item at wrong rank (index 1‿2 in array of shape ⟨3⟩)" % 1 +◶+‿-‿⊢ 0‿1 10 +◶"ab"‿"cd" ¯9 %% "cd" @@ -467,22 +469,39 @@ a←↕2 ⋄ ! "e" ≡ (↕10){b←a‿a‿a‿a‿a‿a‿a‿a‿a‿a ⋄ ≢ (1⥊˜ 0∾203⥊2)⎉50 1⥊˜ 0∾100⥊2 %% 1‿50‿1‿203/0‿2‿0‿2 !"⎉: Result rank too large" % (1⥊˜ 0∾203⥊2)⎉49 1⥊˜ 0∾100⥊2 !"˘: Result rank too large" % ((255⥊1)⥊1)˘ 1‿2 +!"˘: Empty argument too large (0‿1000000000‿1000000000‿1000000000 ≡ ≢𝕩)" % 2 •internal.PureKeep˘ 0‿1e9‿1e9‿1e9⥊0 +!"˘: Empty argument too large (0‿1000000000‿1000000000‿1000000000 ≡ ≢𝕩)" % •internal.PureKeep˘ 0‿1e9‿1e9‿1e9⥊0 +!"⎉: Empty argument too large (0‿0‿1000000000‿1000000000‿1000000000 ≡ ≢𝕩)" % 2 •internal.PureKeep⎉3 0‿0‿1e9‿1e9‿1e9⥊0 +!"⎉: Empty argument too large (0‿0‿1000000000‿1000000000‿1000000000 ≡ ≢𝕩)" % •internal.PureKeep⎉3 0‿0‿1e9‿1e9‿1e9⥊0 +!"≍˘ 𝕩: Result rank too large (255≡=𝕩)" % ≍˘ (255⥊1)⥊1 +!"≍⎉𝕘 𝕩: Result rank too large (255≡=𝕩)" % ≍⎉100 (255⥊1)⥊1 +!"𝔽˘: Incompatible result shapes (encountered shapes ⟨0⟩ and ⟨10⟩)" % {↕⊑𝕩}˘ 4‿10⥊↕100 +!"𝔽˘: Incompatible result shapes (encountered shapes ⟨0⟩ and ⟨10⟩)" % 3 {↕⊑𝕩}˘ 4‿10⥊↕100 +!"𝔽⎉𝕘: Incompatible result shapes (encountered shapes ⟨0⟩ and ⟨10⟩)" % {↕⊑𝕩}⎉1 4‿10⥊↕100 +!"𝔽⎉𝕘: Incompatible result shapes (encountered shapes ⟨0⟩ and ⟨10⟩)" % 3 {↕⊑𝕩}⎉1 4‿10⥊↕100 # ` -!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (2‿2 ≡ ≢𝕨, 3‿2‿3 ≡ ≢𝕩)" % (2‿2⥊1)+`↕3‿2‿3 -!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (2‿2 ≡ ≢𝕨, 3‿3‿2 ≡ ≢𝕩)" % (2‿2⥊1)+`↕3‿3‿2 -!"𝕨`𝕩: Shape of 𝕨 must match the cell of 𝕩 (⟨⟩ ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % 2+`↕3‿3 +!"𝔽`𝕩: 𝕩 cannot have rank 0" % ⊢`0 +!"𝕨𝔽`𝕩: Shape of 𝕨 must match the cell of 𝕩 (2‿2 ≡ ≢𝕨, 3‿2‿3 ≡ ≢𝕩)" % (2‿2⥊1)+`↕3‿2‿3 +!"𝕨𝔽`𝕩: Shape of 𝕨 must match the cell of 𝕩 (2‿2 ≡ ≢𝕨, 3‿3‿2 ≡ ≢𝕩)" % (2‿2⥊1)+`↕3‿3‿2 +!"𝕨𝔽`𝕩: Shape of 𝕨 must match the cell of 𝕩 (⟨⟩ ≡ ≢𝕨, 3‿3 ≡ ≢𝕩)" % 2+`↕3‿3 # ´ -!"´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % +´↕3‿3 -!"𝕨´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % 2+´↕3‿3 +!"𝔽´𝕩: 𝕩 must be a list (⟨⟩ ≡ ≢𝕩)" % +´0 +!"𝔽´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % +´↕3‿3 +!"𝕨𝔽´𝕩: 𝕩 must be a list (3‿3 ≡ ≢𝕩)" % 2+´↕3‿3 +!"𝔽´𝕩: Identity not found" % •internal.Keep´⟨⟩ +⌜´↕0 %% <0 ×⌜´↕0 %% <1 +⌜⌜⌜´↕0 %% <<<0 ×⌜⌜⌜´↕0 %% <<<1 +# ˝ +!"𝔽˝𝕩: 𝕩 must have rank at least 1" % ⊢˝0 +!"𝔽˝𝕩: Identity not found" % •internal.Keep˝⟨⟩ + # ⌜ -!"𝕨⌜𝕩: Result rank too large (200≡=𝕨, 200≡=𝕩)" % +⌜˜(200⥊1)⥊1 +!"𝕨𝔽⌜𝕩: Result rank too large (200≡=𝕨, 200≡=𝕩)" % +⌜˜(200⥊1)⥊1 # ˜ 5˜˝ "ab" %% 5 diff --git a/test/cases/system.bqn b/test/cases/system.bqn index 5de71109..51a3494b 100644 --- a/test/cases/system.bqn +++ b/test/cases/system.bqn @@ -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⟩⟩ @@ -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 @@ -235,7 +235,11 @@ v←1 ⋄ ! •BQN∘•Repr⊸≡ ⟨+,1‿2,+¨,(+V)(V+V),2‿2⥊↕4⟩ # •Delay t0←•MonoTime@ ⋄ ! 0.1≤•Delay 0.1 ⋄ ! 0.1≤(•MonoTime@)-t0 -# •_timed tested at perf.bqn +# •_timed tested more at perf.bqn +!"𝕨𝔽•_timed𝕩: 𝕨 must be an integer greater than 0" % 0 ⊢•_timed 2 +!"Expected integer, got character" % @ ⊢•_timed 2 +a←1 ⋄ a ⊣ {𝕊: a+↩𝕩}•_timed 10 %% 11 +a←3 ⋄ 12 {𝕊: a+↩𝕩}•_timed 10 ⋄ a %% 123 # •math ! ∧´0=⌊|1e10×{(+´𝕩)-•math.Sum 𝕩}¨ ↑1000•rand.Range 0 @@ -267,9 +271,9 @@ E←•internal.EEqual ⋄ {! (𝕏 4⥊0) E 𝕏 1↓¯1×π∾4⥊0}¨ (⊢∾ !"𝕨•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' +!"𝕨•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 %% ⟨⟩‿⟨⟩ @@ -287,35 +291,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 +366,7 @@ Str ← {!=𝕩 ⋄ !×≠𝕩 ⋄ ! ∧´2=•Type¨𝕩} ⋄ Str •platform.o # •internal.Keep •internal.Keep ↕10 %% ↕10 -!"𝕨Fn𝕩: This function can't be called dyadically" % 1 •internal.Keep 1 +!"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⥊