Live data from Hacker News

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

shakti.com

31–40 of 234 posts

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

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

I don't understand how. How do you debug something this? How do you go about fixing a bug? There are no docs nor tests. It seems like one would spend hours just trying to understand what's going on. Is there a good source on their methodology? Because my mind is blown.

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

#33
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)?

I've heard it said that it becomes easy to spot common patterns and structures in this style. Without knowing the idioms it's difficult to read but apparently once you know the idioms, you can scan it and understand it well.

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

#34

Earlier quoted context omitted.

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…

I suppose in our new world of LLMs, using as few tokens as possible means you can cram more in a small context window, which could be helpful in various ways.

Maybe someone could produce an LLM which takes a line of vector language code and expands it into the dozen(s) of lines of equivalent pseudo-algol?

(I mean, you could skip the whole hallucination thing and write an exact converter, but that'd be a lot of effort for code that'd probably get used about as much as M-expression to S-expression converters do in the lisp world?)

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

#36
post #32

Earlier quoted context omitted.

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.

I don't understand how. How do you debug something this? How do you go about fixing a bug? There are no docs nor tests. It seems like one would spend hours just trying to understand what's going on. Is there a good source on their methodology? Because my mind is blown.

I recommend checking out more of the APL family language family and the history of the notation, highly interesting. Almost like a parallel universe of computing, when you look past the syntax.

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

#37

This language is very popular among quant finance people associated with Morgan Stanley. I don’t see the appeal myself. Maybe it helps prevent people stealing the code since it’s so awful looking to work with! At one point I had to learn it and I think I’ve totally forgotten it now— it’s like my brain repressed it. Not my cup of tea, that’s for sure.

[deleted]

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

#39

OMG, 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!

How those two compare?

K is pragmatically business-oriented, J is what you get after you've been thinking about computing for half a century?
Post reply on HN