3 ms·
From https://en.wikipedia.org/wiki/K_%28programming_language%29 https://en.wikipedia.org/wiki/K_%28programming_language%29 Here's their example: The following
by dlsa 4y ago
From https://en.wikipedia.org/wiki/K_%28programming_language%29 https://en.wikipedia.org/wiki/K_%28programming_language%29
Here's their example:
The following expression sorts a list of strings by their lengths:
x@>#:'x
Ooooooookay. Personally, I recommend a lot of alcohol. This will be a very wild and geeky ride. Bring extra pizza.
- yakubin 4y agoSounds like a recipe for alcohol addiction and obesity. Otherwise maybe I'd try that. ;)
- beagle3 4y agoPersonally, I recommend less alcohol. Pronounced, this would be "x at grade-down of count of each x" - and indeed, in "q" (a syntactic sugar for K that uses words instead of symbols), this is almost how you would write it (rather: "x at downgrade count each x". It's basically algorithmic math notation: In math you say "b^2-4ac" rather than "b squared minus 4 times a times c". In K you say "x@>#:'x". It's not just a matter of symbol/syntax familiarity - there's also idioms, etc. But the "scariness" is similar to the "scariness" of a language like Japanese or Arabic, which uses different graphic elements, syntax, vocabulary, and idioms. You might not like it, but it's not because there's something weird or wrong about it -- it's just foreign.