Extending Q with C

Hi,I am trying to add some custom features to the Q process via Clibraries. Its clear how to execute a C function from Q, but I ratherlooking to execute Q function from C. I am not trying to embed Q intomy process but give the Q process ability to execute back and forthwith C extension.Years back this feature was available in K in the form:ksk(“”, 0);ksk(“qFunc”, args);By the will of Q gods, the ksk disappeared completely, its not even inthe binary q anymore. The Q khp seems to be a dead end.I tried to get this by passing the function to C, and it worked wellfor the unary complied functions and their pointers (unary) but failsto execute when I pass Q function (lambda) which now is pretty obviousto me.Could someone advise on this please,Thanks,Alex

k(..)
? Attila

see

https://code.kx.com/trac/wiki/Cookbook/InterfacingWithC

https://code.kx.com/trac/wiki/Cookbook/ExtendingWithC

http://kx.com/q/c/c/readme.txt

http://kx.com/q/c/c/a.c

http://kx.com/q/c/c/a.q

function

K k(I,S,K,…,(K)0)

e.g.

K r=k(0,“{x+y}”,ki(2),ki(3),(K)0);

So, the KX desided to split the ksk into khp() and k(). Why I didntthink of?Atilla, Charles,Thanks a lot!On Apr 15, 1:57?pm, Charles Skelton <char…> wrote:> see>> https://code.kx.com/trac/wiki/Cookbook/InterfacingWithChttps://code.kx.com/trac/wiki/Cookbook/ExtendingWithC&gt;&gt; http://kx.com/q/c/c/readme.txthttp://kx.com/q/c/c/a.chttp://kx.com/q/c/c/a.q&gt;&gt; function>> K k(I,S,K,…,(K)0)>> e.g.> K r=k(0,“{x+y}”,ki(2),ki(3),(K)0);>>>> On Fri, Apr 15, 2011 at 7:30 PM, Alex Demin <alex…> wrote:> > Hi,>> > I am trying to add some custom features to the Q process via C> > libraries. Its clear how to execute a C function from Q, but I rather> > looking to execute Q function from C. I am not trying to embed Q into> > my process but give the Q process ability to execute back and forth> > with C extension.>> > Years back this feature was available in K in the form:> > ksk(“”, 0);> > ksk(“qFunc”, args);> > By the will of Q gods, the ksk disappeared completely, its not even in> > the binary q anymore. The Q khp seems to be a dead end.>> > I tried to get this by passing the function to C, and it worked well> > for the unary complied functions and their pointers (unary) but fails> > to execute when I pass Q function (lambda) which now is pretty obvious> > to me.>> > Could someone advise on this please,>> > Thanks,> > Alex>> > –> >

Submitted via Google Groups</alex…></char…>