iKe: a browser-based sandbox for K
johnearnest.github.io
johnearnest.github.io
And here's another demo, showing the creation of a voronoi diagram from points. This might better illustrate how one can use iKe to iteratively develop programs: https://i.imgur.com/7JNU2r3.gif
"A Sandbox for [language]" → text box, run button, "Choose an Example..." button
Yes it has.
https://github.com/JohnEarnest/ok/blob/gh-pages/docs/Manual.... for OK (the K interpreter in iKe)
The Wikipedia page, multiple pages related to the language, etc. all show up.
There's a few unrelated items, but those should all be apparent after a second of reading.
Someone who doesn't know either wouldn't be helped by searching for just "K".
I just wish there was a free and open source K engine written in C that would work on Windows or Linux. I've tried J, but I think I like K much better. Ok and Kona don't seem to be production worthy (performance or correctness I would guess). I like the concept of a tiny interpreter though with no install (kinda what Kona has for Windows, but better supported).
To people here who know APL/J/K rather well, does it become second-nature and easy to find mistakes?
The code ends up reading a lot like an algebraic sentence after a while:
x (1/u + 1/v) = x/(uv) (u - v).
Spot the error?Once you are familiar enough with the orthography that the symbols dissapear and you see the concepts, once you have some familiarity with the common ways these concepts interact, then J/APL tend to feel refreshingly clear in their expressiveness.
This is similar to how an algebraic equation feels a lot clearer than its rendition into "more readable" prose. Take the above equation and contrast it with this:
The sum of two inverses, when scaled by some factor, equals the difference between the two reverted numbers, scaled by the quotient of the original factor with the product of the reversions.
https://raw.githubusercontent.com/JohnEarnest/ok/gh-pages/ik... ("dissolve" effect)
https://raw.githubusercontent.com/JohnEarnest/ok/gh-pages/ik... (UPC generator)
https://raw.githubusercontent.com/JohnEarnest/ok/gh-pages/ik... (random island coasts)