Live data from Hacker News

Arthur Whitney releases an open-source subset of K with MIT license

shakti.com

11–20 of 234 posts

Re: Arthur Whitney releases an open-source subset of K with MIT license

#12
post #5

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...

You may not believe it, but that's how K/Q/J people write C code.

Bonus: Go visit and do "View Source" on that website. Even HTML has fragrance of K.

Re: Arthur Whitney releases an open-source subset of K with MIT license

#15
post #5

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.

Re: Arthur Whitney releases an open-source subset of K with MIT license

#17
He 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

#18
post #9
post #5

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...

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 like they really do), my guess would be that it's used for write-only code, similar to regexes.

Like, using a regex you can't deny that you get a lot of power from not many keystrokes, and that's really awesome for stuff you're never going to read again, like searching code in your editor, one throwaway shell commands.

But they also tend to be completely unreadable and error prone and are best avoided in production code.

Re: Arthur Whitney releases an open-source subset of K with MIT license

#19

That's ... er ... cryptic.

Just as Inform 7 works because people who write adventure games are the least likely to mind having to play "guess the verb", K source works because people who write vector languages are the least likely to mind expressing algorithms with, not display: block, but display: inline.
Post reply on HN