Tags: Polyglot, Ruby, Perl6, Python
The most important bit:
# Shell sudo apt-get install matplotlib gem install rubypython # pending a small patch for debian/ubuntu 64bit # Ruby; even works in the REPL! require 'rubypython' RubyPython.start plt = RubyPython.import('matplotlib.pyplot') plt.plot([1,2,4,6,28,50,234]) plt.ylabel('some numbers'); plt.show
Or in other words: pull in this rubypython gem, magically get all the python libs callable from Ruby. In this case, you get all the nice charts and graphs from pyplot. I originally played with this in Perl6/Rakudo Inline::Python, where it also works fantastically.
I love the idea of one community NOT completely re-writing a library in their language when it can just be used "directly" instead.