Hacker News new | ask | show | jobs
by geocar 4256 days ago
I wanted to be able to type K and press a button and get the result, so the first bit of k code I wrote was the following:

    np::*((l$[=/k;(*i),0;i]),j)_a;ci:{{J y;x:3:. x;J y;kx x;K(y,j)}[np;j]}
When you type !10 and press control-I it prints the result where the cursor is and selects it. This way you can press backspace to delete the output and change the code easily.

How much code should that take? Probably less than that (I didn't know about bin yet), but I think that's part of the learning process.

I think a minimal logo would only take a couple lines.

1 comments

that's awesome. It's a one line REPL.