When is dropping down to K necessary?

As I understand it, q is to some extent a subset of K4. Since resources for q are rather meager, I’m also drawing on stuff I can find related to K3 and J. When translating code from these languages to q, I’d like to know for what kinds of tasks I would need to make use of K4 directly.

Cheers

>q is to some extent a subset of K4

q sits on top of k4, i.e. most q functions are implemented in k4, some straight in c (e.g. avg)

i would stay with q for all tasks you want to translate your code to, as most people on this list will know q, all docs/resources on code.kx.com are q related etc.

I wrote this years ago: old k idioms and their q translations  – http://code.kx.com/wiki/Qidioms

HTH

-jay

On Thursday, September 3, 2015 at 2:59:09 PM UTC-7, wp wrote:

>q is to some extent a subset of K4

q sits on top of k4, i.e. most q functions are implemented in k4, some straight in c (e.g. avg)

 It seems the information I want is not officially documented. Still, since there is functionality accessible in k but not in q and vice versa, such documentation would be useful.

On Friday, September 4, 2015 at 7:31:28 AM UTC-7, jay...@gmail.com wrote:

I wrote this years ago: old k idioms and their q translations  – http://code.kx.com/wiki/Qidioms

There are more than 1000 examples now and several have missing bits because of probably one or more of these reasons:

  • forgetfulness (I didn’t do translations in strict linear order), and …

  • … I probably skipped a few, thinking I’ll figure them out later (but didn’t :-)

  • language changes/deprecation across k2, k3 and k4/q. See examples with “not quite the same”.

I wrote the most of the page originally, Simon Garland corrected/formatted it as the current wiki page, and other people have corrected/edited/added more examples to it over the last eight years.