Can we get k code from q codenfile which is lets say 100 lines big in an EASY way ?
There may be an easy way to get k code from a q file. Some warnings:
til is ! in k:
q)til 3
0 1 2
k)!3
0 1 2
but q specializes ! with a type check (in q/q.k) :
q)til
k){$[0>@x;!x;'`type]}
so the parse tree of “til 1”
q)0N!parse “til 1”;
(k){$[0>@x;!x;'`type]};1)
which is going to make for a pretty messy ouput from a “q2k” converter.
further, q’s parse will not parse a file, only a string (containing no newlines), so you’re going to have problems parsing comments
i’m sure if there were a q2k program, someone would have got back to us.
best,
jack.
i just fixed the minor typo and it’s even smart enough to translate til to !
bravo