wouldn't it be better for cut to behave more like split, e.g. having an implicit leading 0? What's more common, needing to write (0,x)_y or otherwise 1_x_y?
Also k9 cuts on sets: "ab"^x cuts on "a" or "b". but you cannot use it as split because the head is missing.
there are also converters from wasm to asm.js. e.g. binaryen/wasm2js. @ngn hasn't been your k.wasm much smaller? it's 728k now, converted to js it's 3M. you could also try to load wasm and if that fails fall back to js.
also the cutlist is ints and the result e.g. pointers which may not have the same size. i don't think cut to be a natural extension to drop. it's more of a forced one, combining two things: cut, then drop the first element. it does not drop multiple things.
@ngn the size increase happens at these commits (in your bitbucket repo):
d8e7b5e1abf3d35bdfe0e6ea64760aac7d828e19 728 k/k.wasm
4ae5029cf4d0b880c001b16f625a67bade24170b 140 k/k.wasm
ea0f8ee97add9cdd20c38dcfebb477a986463dd4 116 k/k.wasm
apr22
@ngn due to change to llvm-10? release notes say "the wasm-opt tool will now be run if it is found in the PATH". if i run it manually (e.g. with -O3) the size decreases to 117k.
i'm thinking about flags for general lists, if all members are unitype, e.g. list of chars and if they have the same size (e.g. a matrix). @ngn do you have anything like that?