LOL, seriously that was just a joke. But touche for pointing that out! Just when I thought I had it with a simple ⊤, edge cases started popping up. I'll have to think about neater ways to handle the edge cases (52 is a good example number to test, and so is 1 or 26 for that matter)
@JoshD That was exactly a question on a previous Dyalog competition, and the exact intended answer :D
@JoshD Usually it would be a map (finding index in the alphabet, or subtracting 64 from byte value if the alphabet is fixed) followed by a fold (26 times accum plus next). Only slightly less elegant than APL.
@Bubbler Wow, yeah I just looked into it, it was on last year's competition. The presentation winner had it up on the slide for a second with all his Phase 1 solutions. Maybe that's how it was in my subconscious lol. But it really is the most natural solution to arrive at in APL
It was one of those expressions where everything in the language just "clicked" right and I had to share with other APLers. I'll be holding on to it to show to other programmers who are interested in the language.
Obviously there are many expressions like that, it would be interesting to see everyone's favorite "go to" APL expression when showcasing the language to non-APLers
This is my favorite collection of them (far more cooler than excel column names to number) jsoftware.com/papers/50
@EliasMårtenson The first one is a modified version of (⊣⊂⊢) (which is equal to just dyadic ⊂), by also doing a +\ on the left argument. The second one is an expanded version of the 3rd, and the 3rd is just by definition applying +\ (typo'd :/) to the left arg before invoking ⊂
@EliasMårtenson f⍤g post-processes the result of g by f. So here it first computes ⍺⊣⍵, and then gets +\ of it
@dzaima I feel that using {...} feels much more natural to me. But I'm still willing to accept that it may be just a lack of experience with the trains.
i actually started by writing the wrong (+\⊂⊢) (looks quite obvious - you want +\ on the left, and the right argument on the right), then just added ⍤⊣ to fix it
As I mentioned before, after I changed to not allow enclosed numbers anymore, I could clean up a lot of ugly hacks, and once I compiled it all the testcases just passed beautifully. The web version isn't updated since I can't ssh to the server from the office. I have to wait until I get home.