You know that feeling where you feel like you have a good handle on things- maybe it's foundational mathematics, or the fundamentals of computer software.
And you start reading something so incomprehensible that you start to wonder if there's just this universe hiding in plain sight directly under the universe you've always known.
That is the precise feeling I get when I trying to understand this post.
Don't get me wrong, I appreciate the exposure, but damn if I'm not sweating trying to understand why this all matters.
I know exactly how you feel. Looks like it was 10 (?!) years ago [0]
> Ah, APL/J/K. Time for my annual crisis of thinking everything I've ever learned about programming is wrong...
Still, though, I'm always happy when it comes up on HN for a little discussion. As I recall there were a couple people working on a new OS or something based on K, I think. I wonder whatever happened to that.
As for this particular post, I get how `x^x*/:x:2_!100` works now (it's cute!), but it seems pretty wasteful. It's generating 10,000 products to filter out of the list of 100 integers. But 99 x 99 isn't anywhere near a number in the original 2..100 list! You only need to go up to 2 x 49, 3 x 33, etc. I wonder if there's more of a "triangular" shape you could generate instead of the full table.
Also, how could any sane person ever go into the ngn/k source and find the mentioned implementation? https://codeberg.org/ngn/k/src/commit/ddcc17511ff05e1915f59b...
I don't even want to learn k, I want to learn how to handle such C.
> Range is just shallow odometer: ![3]~*!,3.
Ah of course, of course. Trivially, even. Who are we to question the shallow odometers, really?
Yeah, array language syntax just breaks my brain. I'm sure given enough time I could get the hang of it, but I'm also pretty sure I'll never put in the time
the first few paragraphs lay out the precise extent to which this matters. there's a snippet of code (`x^x*/:x:2_!100`) in a language (k7) using a feature ("rank-sensitive" set difference) not present in previous langs (before 2019); the prev langs' workaround (razing `,/` the table into a list) is bothersome (to chrispsn) so his article examines some alternatives.
chrispsn is sharing the map he drew of the rabbit hole he explored. it involves a lot of haggling with "depth", which is when you nest a list in another list: good for organizing your data, but bad for producing long vectors over which your programs could vectorize. so if you want this to matter more broadly, you can consider it a meditation on some of the mechanics of that, i.e. how to flatten some deep constructions in algorithms, and how to generalize shallow operations to apply at depth