News for hackers. Stuff that matters.
Re:ngn/k, an AGPL K interpreter by DagAgren on Friday January 10, 2020 @04:28AM (#22009651)
You have a massive selection bias going on here - you're not going to use APL if you do not already tolerate this kind of code.
Re:ngn/k, an AGPL K interpreter by beagle3 on Friday January 10, 2020 @06:03AM (#22010118)
I didn’t tolerate it before I started using APL and K. And now my C, while not entirely ArthurWhitnious, is closer to this kind of code.

When I first saw examples of how terse K and APL code gets, my thought was “obviously, the language was designed to solve this specific example or it wouldn’t be this terse”. But after the 100th or so significantly different example, one can’t NOT admit that the problems are simple, and common practices are just incredibly bloated..... which leads some (me for example) to adopt a much terser style.

Re:ngn/k, an AGPL K interpreter by RodgerTheGreat on Friday January 10, 2020 @09:50AM (#22011277)
Indeed. It is rather common to see K criticized as a "domain-specific language", but empirically it seems that K's domain is rather large.

One of the reasons I wrote iKe was to demonstrate that the same primitives which are well-suited to constructing databases and financial models can be applied to computer graphics. With little more than bindings that supply appropriate IO capabilities, you can even write games in K:

https://github.com/JohnEarnest/ok/blob/gh-pages/ike/examples...

https://github.com/JohnEarnest/ok/blob/gh-pages/ike/examples...

Re:ngn/k, an AGPL K interpreter by smabie on Friday January 10, 2020 @08:20AM (#22010718)
Learning q has changed almost everything I believe about what good programming practice should be. Functional Haskell or Scala code that I used to consider to be highly elegant, I now think unnecessarily verbose. And don’t even get me started on Java or Python...
Re:ngn/k, an AGPL K interpreter by tluyben2 on Friday January 10, 2020 @09:46AM (#22011241)
And I find q verbose :)

However my poor statically typed brain is keeps struggling on how to mix Haskell (...) with APL/k. Video on that topic is here[0].

[0] https://www.youtube.com/watch?v=z8MVKianh54