This is a rough adaptation of https://github.com/brendan-rius/jupyter-c-kernel . It's mostly functional, there are probably bugs lurking around.
There's a nim based version, which I will be focusing work on, here : Inim
Look at example-notebook for some examples.
NOTE: Context is NOT shared between blocks!! I'll try working on it when I have time.
Currently implemented magics are:
#>loadblock <num>
: load blocknum
in the current block, automatically disablesecho
calls in loaded block.
Partial workaround for sharing context.#>passflag <someflag>
: pass a flag to the compiler, eg--verbosity:3
,--d:openblas
etc.
Currently one flag per line
- a working
nim
installation ( download ) - a working
jupyter
(and python 3^) installation ( I recomend miniconda3 and adding jupyter withconda install jupyter
)
pip install jupyter_nim_kernel
git clone https://github.com/stisa/jupyter-nim-kernel.git
cd jupyter-nim-kernel
jupyter-kernelspec install nim_spec/
- Done, now run
jupyter-notebook
and selectnew->Nim
git clone https://github.com/stisa/jupyter-nim-kernel.git
cd jupyter-nim-kernel
pip install -e .
jupyter-kernelspec install nim_spec/
- Done, now run
jupyter-notebook
and selectnew->Nim
Forked from https://github.com/brendan-rius/jupyter-c-kernel and adapted to work with nim.
This a simple proof of concept. It's not intended to be used in production in its current shape.
- The output is littered with
Hint: [Processing]...
statements - Every block is treated as a separate file ( not really a bug, it's just not yet implemented )
- Others?
- have a look at implementing nimsuggest
- share context between blocks ( or at least procs, maybe an internal file that adds all procs and then is included before compilation? )
snippetsbasic completion