Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: bc2a1c3bc1
Fetching contributors…

Cannot retrieve contributors at this time

66 lines (48 sloc) 1.519 kB

Becoming a polyglot

Tatsuhiko Miyagawa

Miyagawa now works for

Thaings I like in Ruby

  • Everything is an object
  • More Perlish than Python
  • Diversity matters = TIMTOTWTDI
  • Meta programming built in and encouraged
  • Use of ! and ? in method names

Small things I like

  • Omit self all around
  • Everythign is expression
  • No need to type ";" (unlike Python)
  • Implicit better than explicit
  • block, iterators and yield
  • No semicolons, 2-space indent

Ruby mixins

! and ? make it clear that a method is an imperative or query

Ruby ecosystem

  • Embrace changes
  • Try something new, adopt it if it's good

Ruby embracing changes

  • RAA -> RubyForge -> Rubygems
  • Rails 2 + Merb = Rails 3
  • HAML, CoffeeScript, Sass/SCSS

Creating Ruby gems is easy.

gem build yapc.gemspec
gem push yapc-0.0.1.gem

Stealing from Ruby

  • Web::Scraper was inspired by ScrAPI in Ruby
  • Learned how to write DSL in Perl
  • Married with HTML::TreeBuilder

Little issues: DSL for Perl

  • I thought it is a good idea
  • Difficult to mix with classes / OO code
  • text and hash keys are weak to typos

Stealing ideas

  • Don't just borrow the idea. Copy it
  • Copy the ecosystem too.

Cross-language pollination

  • Mechanize, Mime-Types, ack, etc

Publish your code on github

Naming differences

  • Perl naming: Description, boring, ::Simple
  • Python: Descriptive, confusing, py*, *py
  • Ruby: Fancy, creative, chaotic
  • except for frameworks: Django, nbottle, Catalyst, Dancer, Mojolicious

Ruby is not the enemy. They're neighbors.

Jump to Line
Something went wrong with that request. Please try again.