This is an IPython notebook, backed by a ruby kernel.

I wrote a kernel in Ruby that adheres to the IPython messaging protocol. Then I modified IPython, with the help of minrk from #ipython, to instantiate my Ruby Kernel instead of its own Python kernel.

The IPython KernelManager start the RubyKernel as a subprocess, and from that point communication occurs over ZeroMQ, exactly as if it were IPython's own kernel.

Once that is done, it's easy to execute ruby against that kernel right in the browser.

This kernel was started with:

ipython kernel --KernelManager.kernel_cmd="['ruby', './lib/kernel.rb', '{connection_file}']" --Session.key=''

That's all the configuration necessary to get the Ruby kernel running

(requires minrk's branch of iruby kernel, and gems ffi-rzmq and uuid)

InĀ [9]:
class Neat
  def eh?
    puts "hell yes it is."
hell yes it is.

Similar Notebooks