Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

K is an interesting little language; it is used pretty heavily in some circles on Wall Street. Most use k in the context of kdb, an in-memory vector-/column-oriented database.

Arthur has designed several similar languages, and from what I can tell 'q' (his newest) has superseded 'k'. Much like k was used to program applications in kdb, q is used to program applications in kdb+.

You can download a trial version of kdb+ to play with q... I don't believe you can get kdb/k anymore.

Here is their publicly accessible sample code, which is useful for getting a feel for what k and q are like:

http://code.kx.com/

Worth checking out if you need to do timeseries analysis of large tick databases or the like... I know of at least one vendor (to remain nameless) that used it as the datastore behind their webapp with mixed results. It's very easy to develop with and great for certain applications -- but it's a little bit lacking in documentation (to be generous) and there's not a large developer community.

Just my 2 cents...



From the q) console, type backslash-enter, and you'll be at the k console.

q is just a very simple syntactic sugar layer on top of k4.


did not know that... so k code is executable within q? is k4 significantly different from k3?


Yes, you can easily switch between K and Q (and call functions defined in either language from the other [side of the same coin]).

K4 is a significantly more powerful language (tables are a first-class data type). Stevan Apter summarized the differences here:

http://groups.google.com/group/personal-kdbplus/msg/f18fb3a8...


Same ideas, very different implementation: * ksql was folded into the language; that means ksql datatypes become native (time, date, ...), and tables become first class citizen. This actually simplifies the whole thing considerably -- from a philosophical point of view, k4 has exactly 3 data types: atoms, lists, and dicts. Everything else is a trivial-in-retrospect application of these 3. * "electric" gui is gone; dependencies are still there in pretty much the same way, but triggers take a wholly different form. So, 2-line spreadsheet implementation is gone :( * The _verb form is gone

The language is essentially the same, even though your scripts will need porting due to these changes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: