Successfully reported this slideshow.

Mad Science: Polyglot Bridges

0

Share

Loading in …3
×
1 of 26
1 of 26

More Related Content

Related Books

Free with a 14 day trial from Scribd

See all

Related Audiobooks

Free with a 14 day trial from Scribd

See all

Mad Science: Polyglot Bridges

  1. 1. Mad Science: Polyglot Bridges RubyNation 2015 Brock Wilcox awwaiid@thelackthereof.org
  2. 2. "or using" ... hmmm
  3. 3. JVM Java JRuby Scala Clojure
  4. 4. Javascript Opal CoffeeScript ClojureScript
  5. 5. C
  6. 6. Libraries
  7. 7. Languages!
  8. 8. Use case: graph some stuff from Perl6/Rakudo
  9. 9. > sudo apt-get install matplotlib # Python import matplotlib.pyplot as plt
  10. 10. panda install Inline::Python Perl6 (Rakudo) → Python
  11. 11. Ruby?
  12. 12. gem install rubypython # !!! (small patch to fix lib) Ruby (YARV) → Python
  13. 13. FFI... so sweet!
  14. 14. Ruby (JVM) → Python
  15. 15. Also works!
  16. 16. Exercise for the reader: Pick a model. Visualize it!
  17. 17. require 'rubypython' RubyPython.start plt = RubyPython.import('matplotlib.pyplot') # The 'left' slices it down to year-month order_counts = Order .group("left(created_at, 7)") .count .values plt.plot(order_counts) plt.show
  18. 18. THE END

×