The code looks heavily obfuscated. It's more like "source available" than open source. E.g. g(_M,W-=1 i?_M(i,M_(i+1))+(2*n0 Edit: Looking at it a bit more, I can't tell if the code is obfuscated or if the author really wrote it like this...
That's the "Whitney style". See: https://code.jsoftware.com/wiki/Essays/Incunabulum It's writing C in array-language style rather than intentional obfuscation.
Arthur Whitney releases an open-source subset of K with MIT license
21–30 of 234 posts
Re: Arthur Whitney releases an open-source subset of K with MIT license
#22Earlier quoted context omitted.
Does writing in this way has any advantage in practical terms (not aesthetically reasons)?
The only possible advantage I can think of is that you can fit more code on one screen so I guess in theory you can see your context more easily. But that seems pretty minor compared to... well, look at it! I read a couple of other threads and some people try to claim less code = fewer bugs, but that's pretty clearly nonsense otherwise minifiers would magically fix bugs. As for why people actually use this (it seems…
Re: Arthur Whitney releases an open-source subset of K with MIT license
#23He showed K @ Royal Society & bunch of apl & aplus guys were there. Someone asked , where are the comments? AW said comments get out of date with all the changes, if you can’t read the code you Shldnt be working on it. We then all looked at each other..
[0] https://scholarworks.iu.edu/dspace/bitstreams/dcbd5240-8454-...
[1] https://www.bonfire.com/co-dfns-thesis-edition/
(a) come to think of it, theses are one and done
(b) thanks to Kragen for pointing out this 02019 work!
Re: Arthur Whitney releases an open-source subset of K with MIT license
#24He showed K @ Royal Society & bunch of apl & aplus guys were there. Someone asked , where are the comments? AW said comments get out of date with all the changes, if you can’t read the code you Shldnt be working on it. We then all looked at each other..
Re: Arthur Whitney releases an open-source subset of K with MIT license
#25Earlier quoted context omitted.
Does writing in this way has any advantage in practical terms (not aesthetically reasons)?
The only possible advantage I can think of is that you can fit more code on one screen so I guess in theory you can see your context more easily. But that seems pretty minor compared to... well, look at it! I read a couple of other threads and some people try to claim less code = fewer bugs, but that's pretty clearly nonsense otherwise minifiers would magically fix bugs. As for why people actually use this (it seems…
Regular expressions can be constructed using various syntaxes. Some are optimized for writing them out quickly, and some are not. Choose the latter when going to production, and you'll be fine.
As for K/J/APL - it's similar. You can write incredibly terse code which works wonderfully in a REPL (console). Working in an interactive manner is the default mode of operation for those languages. If you ever worked with Numpy/Pandas or similar, in a REPL, you likely concocted similarly terse monstrosities. Check your %hist the next time you have a chance. Going to production, you naturally rewrite the code instead of just committing the first one-liner that produces the desired results.
Re: Arthur Whitney releases an open-source subset of K with MIT license
#26Re: Arthur Whitney releases an open-source subset of K with MIT license
#27vector the journal of the British APL Association
Re: Arthur Whitney releases an open-source subset of K with MIT license
#28Re: Arthur Whitney releases an open-source subset of K with MIT license
#29 //k(c)2024 arthur whitney(l)MITRe: Arthur Whitney releases an open-source subset of K with MIT license
#30OMG, just yesterday I wrote a comment saying that I regret not learning K (I instead chose J) due to being too hung up on the notion of free software at the time... What a coincidence! Now I have no excuses anymore, time to learn K!