IPython is a tool that is catching on like wildfire. Jupyter (http://jupyter.org/) is a project that is attempting to split apart the Python-specific parts from the generic infrastructure.
I had no idea how the project was architected, but I decided to see if there was a way that one could embed “any” interpretter into IPython simply. Documentation is a little sparse, and I got a clue on how it might be possible at the page “IPython kernels for other languages”: https://github.com/ipython/ipython/wiki/IPython-kernels-for-other-languages
One of the the projects looked particularly useful: “Simple example kernel”: https://github.com/dsblank/simple_kernel
I copied his project, and added some functionality that would actually attach to an arbitrary interpretter. With fairly minimal hacking, I produced ‘moonio’: https://github.com/blippy/moonio
The idea is that you can get an interpretter to work with basically only two things: * the name of the interpretter (easy!)
* a regex that enables you to identify whtn the interpretter is expecting input.
That’s it! I have no bells or whistles, of course, but it was a fun afternoon hack. The project comes with an example config file that sets up the configuration for gforth. Basically, two lines of json should get you on your way.
I called the project ‘moonio’ because Io is a moon of Jupiter, and it intermediates the IO between IPython (and hopefully Jupyter at some stage) and an interpretter.
I hope you like my little project.