<story><title>Thinking in an array language</title><url>https://github.com/razetime/ngn-k-tutorial/blob/main/c-thinking-in-k.md</url></story><parent_chain></parent_chain><comment><author>unnouinceput</author><text>Any performance benchmarks between a simple C implementation of matrix multiplication like explained in the article and K one?&lt;p&gt;Story time: 2 years ago, right before 1st lockdown, I landed a client. A data scientist who had already implemented an algorithm which dealt with matrices, implemented by a previous programmer he hired. Said implementation was in Python, no more than 10 line altogether, which performed well when matrix size where small, like 10x10. But the problem was, his real work need it to have matrices of size 10^6 x 10^6. Not only the Python implementation had to be ran on a beast of server with 4TB of memory, it also took 3 days to finish. And while the algorithm was small in size in Python, its explaining paper was 4 pages in total, which took me 1 week to understand. And then an entire month to implement in C. But in the end, when all was said and done, the run time when used with real data was only 20 minutes and consumed only 8 GB of memory, though it did required at least 16 virtual processors.&lt;p&gt;Hence my question, in the end performance is what it matters, not number of lines.</text></comment>
<story><title>Thinking in an array language</title><url>https://github.com/razetime/ngn-k-tutorial/blob/main/c-thinking-in-k.md</url></story><parent_chain></parent_chain><comment><author>carapace</author><text>I was just playing with Nils M Holm&amp;#x27;s Klong this morning: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;t3x.org&amp;#x2F;klong&amp;#x2F;index.html&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;t3x.org&amp;#x2F;klong&amp;#x2F;index.html&lt;/a&gt;  (Klong rather than the others mostly because the C implementation looks like C so I have a ghost of a chance of actually grokking it.)&lt;p&gt;These folks are really onto something, but I think they get sidetracked in the (admittedly very very fun) minutia of the languages and lose sight of the crucial insight in re: mathematical notation, to wit: it&amp;#x27;s a means of human communication.&lt;p&gt;For APL or K to get out of their niches would require, I am convinced, something like a tome of documentation of a ratio of about 1.5 paragraphs per line of code.  That would give us mere mortals a fighting chance at grokking these tools.&lt;p&gt;A similar problem plagues the higher-order stuff they&amp;#x27;re pursuing over in Haskell land.  I &lt;i&gt;know&lt;/i&gt; e.g. &amp;quot;Functional programming with bananas, lenses, envelopes and barbed wire&amp;quot; and &amp;quot;Compiling to Categories&amp;quot; are really important and useful, but I can&amp;#x27;t actually use them unless some brave Prometheus scales Olympus and returns with the fire.&lt;p&gt;Stuff dribbles out eventually.  Type inference and checking have finally made it into the mainstream after how many decades?</text></comment>