@ngn Arthur replied to my email about the "!length" error with k /tmp/in. He said: "a script has to be *.k otherwise it is trying to map data." Makes sense.
Does anyone know of a command to make k exit? I want to run k /tmp/in.k and have it exit after doing a calculation.