Languages Features Creators CSV Resources Challenges Add Language
GitHub icon

Q

Q - Programming language

< >

Q is a programming language created in 2003 by Arthur Whitney.

#336on PLDB 20Years Old 765Users
1Books 2Papers 768Repos

Q is a proprietary array processing language developed by Arthur Whitney and commercialized by Kx Systems. The language serves as the query language for kdb+, a disk based and in-memory, column-based database. kdb+ is based upon K, a terse variant of APL. Read more on Wikipedia...


Example from hello-world:
"Hello World"
/* Hello world in Q */ hello = writes "Hello, world!\n";
Example from Linguist:
dst:`:tq src:`:tqsrc F:key src / trade fields (types;widths) trf after 200609 tf:`time`ex`sym`s`cond`size`price`stop`corr`seq`cts`trf tt:("TCSS*IFBIJCC ";9 1 6 10 4 9 11 1 2 16 1 1,1+20060930<"I"$-8#string first F) / quote fields (types;widths) qf:`time`ex`sym`s`bid`bsize`ask`asize`cond`mmid`bex`aex`seq`bbo`qbbo`corr`cqs qt:("TCSSFIFIC*CCJCCCC ";9 1 6 10 11 7 11 7 1 4 1 1 16 1 1 1 1 2) / sym[.s] "e"$pricebidask g:{[f;x]`sym`time xcols delete s from @[;`sym;{$[null y;x;` sv x,y]}';x`s]@[x;f;"e"$%;1e4]} foo:{[d;f;t;g;x]@[;`sym;`p#].Q.dsftg[(dst;"D"$-8#string x;d);(` sv src,x;sum t 1;0);f;t;g]} \t foo[`trade;tf;tt;g[`price] ]each F where F like"taqtrade*[0-9]"; \t foo[`quote;qf;qt;g[`bid`ask]]each F where F like"taqquote*[0-9]"; \ http://www.nyxdata.com/Data-Products/Daily-TAQ
Example from Wikipedia:
q)select from t where name like "ja*",age>50 name age -------- jack 60 q)select rows:count i by age from t age| rows ---| ---- 20 | 1 50 | 2 60 | 1

Language features

Feature Supported Token Example
Strings ✓ "
"Hello world"

Books about Q from ISBNdb

title authors year publisher
Q For Mortals: A Tutorial In Q Programming Borror, Jeffry A. 2008 CreateSpace Independent Publishing Platform

Publications about Q from Semantic Scholar

title authors year citations influentialCitations
Static Type Inference for the Q language using Constraint Logic Programming Zsolt Zombori and J. Csorba and P. Szeredi 2012 4 0
Programming quantum computers: a primer with IBM Q and D-Wave exercises F. Mueller and Greg Byrd and P. Dreher 2019 3 0
speedie.html · q.html · gambas.html

View source

- Build the next great programming language · Search · Day 213 · About · Blog · Acknowledgements · Traffic · Traffic Today · GitHub · feedback@pldb.com