IKdbQ is a simple kernel for Jupyter project that allows you to write KDB+/Q code with Jupyter console and notebook. It was initially translated from simple_kernel.
Currently it supports basic code execution and naive code completion. It's worth mentioning that multi-line input without trailing semicolons is supported in notebook, as supposed to most other Q IDE's.
More advanced features are to be done in the future.
Note: The code is only tested on Ubuntu 14.04.2 i386. For building the project in 64-bit machines for the free 32-bit of kdb+, -m32 flag is needed.
Install qzmq
This is a modified version of
jaeheum's qzmq
It requires ZeroMQ (2.2.0) and czmq.
Note: jaeheum upgraded his qzmq to version 3.0.1 recently.
Install qcrypt (Q interface for OpenSSL)
-
Install OpenSSL
Note: usesudo make install_sw
(instead ofmake install
) if you encounter errors like "POD document had syntax errors at /usr/bin/pod2man line 71." -
Compile qcrypt for Q
gcc -DKXVER=3 -shared -fPIC qcrypt.c -o qcrypt.so -Wall -Wextra -I../kx/kdb+3.0/ -L../kx/kdb+3.0/l32 -L/usr/local/openssl/lib -I/usr/local/openssl/include -lssl -lcrypto -ldl
cp qcrypt.so $HOME/q/l32
cp qcrypt.q $HOME/q/
On Ubuntu:
pip install ipython[all]
Create a folder called q
under ~/.ipython/kernels
, and copy
kernel.json
there.
`mkdir -p ~/.ipython/kernels/q && cp ./kernel.json ~/.ipython/kernels/q`
`ipython console --kernel q -f connection.json`
`ipython qtconsole --kernel q -f connection.json`
`ipython notebook` (then choose language KDB+/Q)