Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create language kernels for IPython for a language without ZeroMQ bindings

There are some interesting descriptions of writing language kernels to allow a language previously unsupported by IPython to be executed from IPython.

In all cases, the kernel creation step involves using the target language's ZeroMQ bindings (since ZeroMQ is a major architectural component of IPython's front-end to kernel communication protocol).

In my company, a proprietary language was created a few years ago and is maintained with compilers to bytecode (with a bytecode runner written in C++), Flash, and JavaScript ... it's still heavily used today but it has never had anything like a REPL.

This language is a functional language similar to Haskell or SML, and it has no ZeroMQ bindings with no plans for the language maintainers to add any.

Is there a way to still write a kernel that can communicate with IPython?

like image 763
ely Avatar asked Nov 10 '22 18:11

ely


1 Answers

If your language has Python bindings, or you can drive a REPL from Python using something like Pexpect, you can create a wrapper kernel, reusing the IPython communication machinery.

This is documented here: http://ipython.org/ipython-doc/dev/development/wrapperkernels.html

like image 197
Thomas K Avatar answered Dec 30 '22 03:12

Thomas K