KX Systems (KDB/k/q) overhauls its website
kx.com
kx.com
Want to calculate the 180 day rolling VWAP only between noon and 2pm for every NYSE stock? Yeah, there's a function for that.
Also, it's a hilariously illegible language, and most anyone who's proficient at it is as nutty (and brilliant) as Arthur ( http://en.wikipedia.org/wiki/Arthur_Whitney_(computer_scient... ), the founder of the company.
The following expression sorts a list of strings by their lengths:
x@>#:'x
A function to determine if a number is prime can be written as:
{&/x!/:2_!x}
This looks like brainfuck's cousin, but I'll bet Perl users feel right at home. Edit: I'm not trying to make fun of Perl or anything, it's just that I've seen some really hard to read one liners come out of it as well.
For example, the Game of Life in APL is
life←{↑1 ⍵∨.∧3 4=+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
[0] http://en.wikipedia.org/wiki/APL_(programming_language) x@>#:'x
Read from right to left: :'x
means apply the function/operator to the left of the : to each item of x (the default first parameter to a function is called simply x - big time saver) #:'x
means the length of each item of x, and adding the sorting function: >
means sort the items and return the indices the items would have if they were in ascending order. Finally: @
is just the indexing operator (as you'd kind of expect when saying 'at'), so the whole line means: return the elements of x after sorting them by their length.Needless to say, I don't work there. However, that said, one of the graybeards that works there described his home MP3 collection which he wired up with a Q server, though.
If you happen to work on this sector, tell me smth: why don't you write your software in functional programming, and then use C++ bindings for the CPU intensive code?
Thanks
Great for prototyping though.
I am on the edge of deep-diving into statistical modeling and have been considering using J (instead of R) to both learn J deeply and build my mathematical/statistical foundations back up.
Q is derived from K (it's a thin wrapper that uses words instead of sigils for some verbs), which is derived from APL; J is a completely separate lineage, also based on APL.