4 ms·
Performance, KDB+, simplicity. I've heard it said that J is for people with brains too big for K. J can be difficult with its hooks, forks, trains, and other c
by jnordwick 7y ago
Performance, KDB+, simplicity.
I've heard it said that J is for people with brains too big for K. J can be difficult with its hooks, forks, trains, and other complex function application constructs.
Job prospects too. K is heavily used in the financial sector (even YC has postings for K jobs in its monthly listings) and pays extremely well for what is basically a database developer.
- jim-jim-jim 7y agoThanks for the info. I think J's implicit combinators have made me a better tacit programmer, but over reliance on them can make things frustratingly ambiguous. The monadic/dyadic overloading in all these langs doesn't always help either. I recall somebody here recently writing a K implementation where there was explicit syntax for the uh... adicity(?) of operators, but I forgot to bookmark it. Anybody know what I'm talking about?
- uryga 7y agok (well, some version of it) has something along those lines: > [the] `:` in `|:` is used to force the verb `|` to be interpreted as a monad, as by default ambiguities are resolved in favour of dyads. http://www.math.bas.bg/bantchev/place/k.html http://www.math.bas.bg/bantchev/place/k.html
- jnordwick 7y ago> adicity(?) of operators You will often hear it referred to as the valence of the operator or function from APL people (don't forget niladic too). Other CS people will call it the arity.
- tosh 7y agohttps://t3x.org/klong/ https://t3x.org/klong/ > Klong is an array language, like K, but without the ambiguity. If you know K or APL, you may be disappointed by Klong. If you don't know any array languages, it might explode your brain. Use at your own risk! ?
- kick 7y agoTo expand on this a little: J was what Iverson did after APL. ('arcfide has called it a "stopgap," but I don't think that's right: it does a lot of things better than even Dyalog does.) In that way, it's a bit more pure of an experience [compared to Dyalog APL], and in a way brings the notation a lot further, as long as you can ignore the ASCIIfication of it. k was made explicitly as a stripped-down version of (primitive-)APL. This has many trade-offs. It does make performance optimizations a lot easier (which is partially why practically every non-toy k implementation is faster than Dyalog, which is fast in its own right, even if J is usually faster). It's also mildly easier to keep in one's head in most cases. It's a lot more mainstream in comparison to J, both because of the performance optimizations and because it's a lot less of a leap from Lisp to k than it is from Lisp to J. If I remember correctly, Arthur is a bit more of a normal person on this: he prefers/preferred writing Lisp to APL, and k is definitely a lot easier to compare to conventional languages than J or APL. J was designed as a way to spread notation to the masses, k was designed as a way to get incredibly small amounts of code to do very big things. Both are good at both, I think, though to varying degrees. k, though, appeals to a core aspect of the programmer by design: small. And it's small in a way that can't be called code golfing, either, which is like cocaine to your average programmer. It's primitive, very shiny, and its bite-sizedness appeals to your average cascade of attention-deficit (mostly grown-up now) teenagers that make up these sort of spaces. It's basically bait, and in a really good way. Another reason is because J doesn't have all of the cool little snippets that k people love posting; there's no "ray-tracer in 7 lines of J" text dump despite something similar being possible, just because of the community that's formed around k. In k you have a bunch of people like Stevan Apter who just live for cool programming languages. They devour that stuff and try and make the coolest things they can to show everyone.
- jnordwick 7y agoThe ray tracer in 7 lines of k: http://nsl.com/k/ray/ray.k http://nsl.com/k/ray/ray.k The whole site http://nsl.com http://nsl.com have some amazing code samples. nsl stands for No Stinkin Loops - a reference to apl/k's implicit looping constructs. (I miss using K)
- 7y ago