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

K/Q is famous for extremely short code, but that is partly due to a misunderstanding of K/Q's nature. Sure, some things are expressed more concisely because you are operating on arrays rather than doing loops, but most of the conciseness comes from two other factors. First, there are syntacitc tricks to use fewer characters, e.g. single-character names and $[c;t;f] instead of IF-THEN-ELSE. But the big thing that most people ignore is that K/Q is a DSL. It is designed connect to a server, acquire tick data, and do time series analysis on clean numeric arrays. Stick to those operations and your code is amazingly short. If you expand the notation to something more readable and try doing more general programming tasks, the verbosity becomes about like Lua.


IMHO, I would respectfully disagree. K/Q canbe used for all manner of software systems.

PageRank can be done in a few lines of code - with clarity approaching the mathematical description.

The solutions to the Advent of Code (http://adventofcode.com/ and http://kparc.com/advent/ad.k) are readily expressed/solved in k/Q.

That said, it excels above other languages/systems at systems like real-time trading.




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

Search: