12 ms·
As a brief summary, K is what's called a "vector-oriented" language; functional, very concise, naturally parallel. The canonical implementation(s) of K are comm
by RodgerTheGreat 9y ago
As a brief summary, K is what's called a "vector-oriented" language; functional, very concise, naturally parallel. The canonical implementation(s) of K are commercial products sold by Kx Systems, and offer extremely high performance. I personally maintain an open-source clone implemented in JavaScript which is comparatively quite slow but is suitable for tinkering and prototyping.
The above program was implemented in iKe, a browser-based livecoding environment I built on top of my interpreter:
https://github.com/JohnEarnest/ok/tree/gh-pages/ike https://github.com/JohnEarnest/ok/tree/gh-pages/ike
The concision and flexibility of K is a huge boon for this kind of interactive development. I wrote my simulation in a few minutes, and most of that time was spent deciding how I wanted to draw my histograms.
If you have any more specific questions I'd be happy to try to answer them.