News for hackers. Stuff that matters.
Re:K: We need to talk about group by qsort on Friday March 31, 2023 @04:00PM (#35392700)
I... just can't. I work a lot with data, so it sounds like it should be a good fit for what I do, but I find that writing the damn code in a normal language is much more productive. Maybe it's my brain that's wired wrong, but I fail to see how the entire construction is supposed to help.
Re:K: We need to talk about group by mandevil on Friday March 31, 2023 @05:41PM (#35394053)
A friend worked on a project in 2005 that had lots of K code in production. They had a contract with Kx Systems and Arthur Whitney in particular because, in my friend's opinion, only Whitney could really understand K code well enough to debug it. Friend's description was it took my friend two days just to comment the code into something grokkable by a normal developer, whereas AW didn't need to do that. Of course, it took Whitney those same two days of staring at the code before he said "Oh, of course, how silly of me." and found the bug and all resolved.

Part of those two days of commenting was that since K is interpreted all of the developers would hand-obfuscate all of the code so that the variables were a, b, c, etc. so that they would be slightly faster to parse than a multi-character string. This sort of thing is done all the time now, with JS to make it load faster, but his team at least didn't have any scripts to automatically turn developer-friendly code into interpreter-friendly code, they worked with the interpreter-friendly code version.

Re:K: We need to talk about group by twoodfin on Friday March 31, 2023 @09:56PM (#35396247)
In my experience this practice isn’t obfuscation or for performance. The whole point of array processing languages is to amortize any fixed operation cost over the span of the array.

The notation-as-a-tool-of-thought camp prefers short identifiers on the principle that the more concise the expression, the easier it is to comprehend in total. This is not at all dissimilar from the general practices of mathematics.

Re:K: We need to talk about group by tluyben2 on Saturday April 01, 2023 @04:35AM (#35398456)
Once you get used to it, it's just faster and stop noticing the 'oh line noise' thing. But like learning a natural language, you need to get to the point where you stop translating in your head and you think in the operators. Once you reach that, it is very hard to go back.
Re:K: We need to talk about group by therein on Saturday April 01, 2023 @05:17AM (#35398646)
And Whitney is into being able to see the whole code at a single glance as far as I know.
Re:K: We need to talk about group by chongli on Friday March 31, 2023 @07:07PM (#35394992)
I think the main use for K and the other APL family languages is programmer lock-in. If you can get your employer to buy in and write the entire codebase in one of these languages, you can establish yourself as essentially irreplaceable and then demand large raises to retain you.
Re:K: We need to talk about group by Avshalom on Friday March 31, 2023 @08:13PM (#35395541)
what was your first programming language?

mine was matlab. thinking of everything as an array, especially things that aren't arrays, was the first pattern I ever learned. I've never used APL in anger but for the most part it comes very easily to me. Maybe not the code golfing and/or idiomatic APL style that people like to post but, like, using the primitives to create increasingly elaborate arrays before discarding anything I don't want, that part has always felt very straight forward.

Re:K: We need to talk about group by userbinator on Friday March 31, 2023 @10:07PM (#35396320)
Chinese is a "normal language" to over a billion people.
Re:K: We need to talk about group by tluyben2 on Saturday April 01, 2023 @03:59AM (#35398227)
How long did you try? And what languages do you use?