Join the continuum.
Example scripts written in q, the query language for kdb+ databases.
- Clone this repo or use it as a template.
- Open a terminal and
cd
to this folder. - Start
q
and enter\l src/init.q
to load src/init.q.
Comments, lists, symbols, functions, show
, delete
, each
, 0N!
, ?
.
Functions, iterators, lambdas, projections, dot apply, etc.
Pseudorandom normal samples with a Box-Muller transform similar to qtips/stat.q.
System commmands, navigation, file handles, current time.
Example dictionaries, tables, and keys.
One script to run them all and to test/output
write them.
- q 3.4+ 64-bit or 32-bit version
Create an alias in a startup file to run q with rlwrap.
export QARCH='m32'
export QHOME="$HOME/q"
alias q='rlwrap --complete-filenames --remember "$QHOME/$QARCH/q"'
Run a q
script and interact with it.
q src/tables.q
Run a q
script and close the interpreter.
q src/tables.q < /dev/null
Run a q
script and save [STDOUT] to a file.
q src/init.q > test/output/init.txt
I never remember them, so I made a table of datatypes.