Maybe, although the only benefit is performance, and if you're actively thinking about performance you're probably good enough to come up with the solution yourself
It seems nice, although going with the C style way of having characters just be ints, seems like it might only be slightly more complicated but add a lot more options
@rak1507 The magic of affine characters is that it automatically knows the result type. Characters as ints is untyped programming: you have to specify at each step whether you want to treat a value as a character or integer. I'm not always against untyped programming but for characters it seems like BQN's model is just always right, and saves you a lot of casts.
And you can do explicit casts by adding or subtracting the null character, for example c-@ to convert characters to code point values. So it's just as capable as C with a tiny bit of extra code at worst.
topanswers.xyz/apl is now live. This community is for APL, mainly Dyalog APL, and APL-like languages (e.g. J, K and Q). However, array programming in any language (e.g. NumPy, Julia, and MatLab) is on topic, especially if in comparison to APLs.
@rak1507 That will be a library function, once there's a library. Depending on what characters you expect to be in the input string and how you want to handle them, it might be feasible to write it out.
@rak1507 It loses all sorts of arithmetic properties that ⌈ has. I'd like to keep things more consistent than that.
@rak1507 Here's an ASCII uppercasing function in BQN. Not too bad, although you have to know { comes after z. Could also replace 'A'-'a' with ¯32, of course.
Iterated monadic / in BQN (⍸ in Dyalog) is fairly interesting as well. Some patterns die out to give the empty list, while others grow very quickly (superexponentially?). I don't yet know a criterion to tell which is which.
enumeration of possible answers; ⍸⍸⍸⍸⍸⍸1 0 1 is the longest chain of ⍸s that ends in ⍬ https://dzaima.github.io/paste/#0XVG7TsMwFN3zFUddaCWGJDwG5yOQ@AO3vQGLYBfbUYCJiS0LOxMSExJrZ/gTfwm@JUqc2pKHc67Pw15TbSxhEV7fFlAOO@OcWjcEpXetryBrTxbSWtMx7W9pGrHk2sbD1JAa9Eib1tM2y0ZeateRdTywDP0@9B/Ln@@71Qqh/xKZisLSK6ORC0YSoBDIhx1ePhOiFAwMVDGNIMafMaF/hzbwVqpG6Rs8kzXkIP8bmNbHcpwrxuJasunkk4MzlhtMfmcCmtWiOqteXcejSPhzwcBRjmLwr62552sV6KGVDbxBohzNQHqbYVxRPUd5JMbIKDY3vxAH62I2/7tPvcsKTulN/E1/4uKD@KHiKT@DpQOWhLr8Aw#APL
@dzaima (first line of paste should have an ⍸ at the end) of course ⍸⍸⍸⍸⍸⍸1 0 1 0 0 0 0 … also works
@rak1507 ah! I hadn't thought of that, but it's obvious when you point it out! I guess I was stuck thinking in range-y terms of start point and endpoint