my interest is in k

Content-Disposition: inlinehi guys,i’m new, my interest is mainly in k. is this the forum?is there a k wiki or faq or something that would have eg. example ofquicksort in k?ta, jack

As far as I can tell, k is no longer a product that is offered by Kx Systems.  The current incarnation “k4” appears to be the implementation language for q, but I have not found any good publicly available documentation on k4 as a standalone language. 

Difference between k and q is very small :mostly lack of ambivalencein q which is considered a very good thing by most (except a handful apeople maybe). As said earlier most q functions are written in k, butapart from that everybody seems to use q, because it is consideredmore readable. k4 can be learnt/deduced easily if one knows q anddares to look at q.kRegards, AttilaOn Fri, Jun 6, 2008 at 8:38 PM, Tom Szczesny wrote:> As far as I can tell, k is no longer a product that is offered by Kx> Systems. The current incarnation “k4” appears to be the implementation> language for q, but I have not found any good publicly available> documentation on k4 as a standalone language.>> On Fri, Jun 6, 2008 at 6:53 AM, Jack Andrews wrote:>>>> hi guys,>>>> i’m new, my interest is mainly in k. is this the forum?>> is there a k wiki or faq or something that would have eg. example of>> quicksort in k?>>>> ta, jack>> >>>

X-Mailer: Apple Mail (2.919.2)X-HELO-Warning: Remote host 213.182.238.93 incorrectly presented itself as [90.0.0.65]X-Scan-Signature: fab96bbcd4323c8dfa4e025fe68b20a8On 06.06.2008, at 21:38, Tom Szczesny wrote:> As far as I can tell, k is no longer a product that is offered by Kx > Systems.K4 is not all that different from K2, so you can certainly start out by studying all the K2 material you can find. Some primitives have changed or vanished; often you can find a replacement in the .q namespace, e.g. .q.rotate. Many new things have been added (dicts, tables &c.); for those, it’s best to learn from Q material.Attila is too modest to point out his great collection here: http://vrabi.web.elte.hu/k/See especially [K|Q|K4] by example. Other founts of K wizardry: http://nsl.com/k/ http://www.kx.com/a/k/A good curriculum of exercises to try your hand at is the (in)famous list of “99 problems”: https://prof.ti.bfh.ch/hew1/informatik3/prolog/p-99/ http://www.ic.unicamp.br/~meidanis/courses/mc336/2006s2/funcional/L-99\_Ninety-Nine\_Lisp\_Problems.html\> i’m new, my interest is mainly in k. is this the forum?> is there a k wiki or faq or something that would have eg. example of> quicksort in k?Quicksort w/ random pivot (and questionable use of ?):s:{$[2>#?x;x;,/s’x@&:'~:\x<*1?x]}The K philosophy, however, is composing programs out of carefully chosen primitives; thankfully the ranks (<:;>:) are among them, and so a sort you’d actually use looks like {x@

> dares to look at q.kwhere can i find q.k?ta, jack

$QHOME (or wherever you installed kdb+)Regards, AttilaOn Sun, Jun 8, 2008 at 9:01 AM, Jack Andrews wrote:>>> dares to look at q.k>> where can i find q.k?>> ta, jack>> >>

Are you saying that q.exe is a k4 interpreter,

and that the q language is defined by the q.k script

which is read when q.exe is executed?

Yes you are close.The q interpreter is 2-in-1 (or maybe 3 if we count sql). The k4language is still there but it is not thew default one and a moresimple parser that converts q into k4 parse trees and executes themthough the k4 interpreter.FelixOn 6/8/08, Tom Szczesny wrote:> Are you saying that q.exe is a k4 interpreter,> and that the q language is defined by the q.k script> which is read when q.exe is executed?>> On Sun, Jun 8, 2008 at 5:41 AM, Attila Vrabecz <attila.vrabecz>> wrote:>>>>> $QHOME (or wherever you installed kdb+)>>>> Regards,>> Attila>>>> On Sun, Jun 8, 2008 at 9:01 AM, Jack Andrews wrote:>> >>> >> dares to look at q.k>> >>> > where can i find q.k?>> >>> > ta, jack>> >>> > >>> >>>>> >>>>> >></attila.vrabecz>

If the q parser is already in q.exe, why is q.k needed?

q.exe aborts if q.k is not present.

At least the first part of q.k appears to be setting up cover functions to eliminate the ambivalence of functions that exist in k4.

Because there is just the parser and not the language implementation.q.k contains a lot of content that is needed to support the languageBtw, you can implement you own language if you want and have itexecuted in q. The sql support is an example of language implementedon top k4/q and is implemented in s.k.FelixOn 6/8/08, Tom Szczesny wrote:> If the q parser is already in q.exe, why is q.k needed?> q.exe aborts if q.k is not present.> At least the first part of q.k appears to be setting up cover functions to> eliminate the ambivalence of functions that exist in k4.> On Sun, Jun 8, 2008 at 5:36 PM, Felix LUNGU <felix.lungu> wrote:>>>>> Yes you are close.>>>> The q interpreter is 2-in-1 (or maybe 3 if we count sql). The k4>> language is still there but it is not thew default one and a more>> simple parser that converts q into k4 parse trees and executes them>> though the k4 interpreter.>>>> Felix>>>> On 6/8/08, Tom Szczesny wrote:>> > Are you saying that q.exe is a k4 interpreter,>> > and that the q language is defined by the q.k script>> > which is read when q.exe is executed?>> >>> > On Sun, Jun 8, 2008 at 5:41 AM, Attila Vrabecz <attila.vrabecz>> >>> > wrote:>> >>> >>>> >> $QHOME (or wherever you installed kdb+)>> >>>> >> Regards,>> >> Attila>> >>>> >> On Sun, Jun 8, 2008 at 9:01 AM, Jack Andrews wrote:>> >> >>> >> >> dares to look at q.k>> >> >>> >> > where can i find q.k?>> >> >>> >> > ta, jack>> >> >>> >> > >>> >> >>> >>>> >> >>> >>>> >>> > >>> >>>>> >>>>> >></attila.vrabecz></felix.lungu>

Thanks.