Getting Your Ruby EGOT
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Getting Your Ruby EGOT

  • 319 views
Uploaded on

Slides from the presentation that I gave in Berlin at EuRuCamp 2013.

Slides from the presentation that I gave in Berlin at EuRuCamp 2013.

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
319
On Slideshare
319
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
1
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. GettingYour Ruby EGOT ChannelYour Inner Tracy Jordan
  • 2. EGOT? Emmy Grammy Oscar Tony
  • 3. Ruby EGOT? MRI JRuby Rubinius MacRuby MagLev Topaz ...
  • 4. Ruby EGOT?
  • 5. But...why? Because!
  • 6. A Side Note on Reading Code Read Code
  • 7. A Side Note on Reading Code Read Code!
  • 8. A Side Note on Reading Code Read A Lot of Code
  • 9. A Side Note on Reading Code Read Twice as Much Code asYou Write
  • 10. A Side Note on Reading Code Read Ten Times as Much Code asYou Write
  • 11. A Side Note on Reading Code Read Code
  • 12. What’s in a Ruby? Objects!
  • 13. What’s in an Object? Class InstanceVariables Methods Data Actions
  • 14. What’s in an Object? Class InstanceVariables Methods Data Data
  • 15. Data StructureData Structure How Do I Build An Object? Class InstanceVariables Methods
  • 16. How Do I Build An Object?
  • 17. How Do I Build An Object?
  • 18. Uhh...Josh? RBasic? Glad you asked!
  • 19. Dirty, dirty tricks!
  • 20. Dirty, dirty tricks!
  • 21. Dirty, dirty tricks!
  • 22. Dirty, dirty tricks!
  • 23. Dirty, dirty tricks!
  • 24. How Do I Build An Object? • Data Structure for Object Data - Class - InstanceVariables • Data Structure for Methods
  • 25. How Do I Build An Object? With Objects!
  • 26. C Doesn’t Have Objects! Java Objective-C SmallTalk Python Ruby C++ C++ C++! C++!!!
  • 27. In a perfect world... • Blocks as arguments • Crazy Names • Metaclasses Singleton Classes • Modules
  • 28. I want my EGOT!
  • 29. The Bug
  • 30. Matz’s Ruby Interpreter! string.c
  • 31. Find the method... Hint: grep is your friend!
  • 32. Oh, MRI...
  • 33. Break it down... If “other” is a string, do a string comparison (in the else clause...yay)
  • 34. Break it down... If “other” can not be converted into a string, return nil
  • 35. Break it down... If “other” also doesn’t have its own comparison operator, return nil
  • 36. Break it down... If “other” does have its own comparison operator, call it and return the negation of the result
  • 37. The Fix
  • 38. JRuby! core/src/main/java/org/jruby/RubyString.java
  • 39. Find the method...
  • 40. Well, if MRI does it...
  • 41. The Fix
  • 42. The Fix
  • 43. The Fix
  • 44. Rubinius! kernel/common/string19.rb
  • 45. Find the method...
  • 46. The Fix
  • 47. The Fix
  • 48. The Fix in: kernel/common/string20.rb
  • 49. If you program in Ruby, you can contribute to Rubinius
  • 50. MacRuby! string.c
  • 51. Find the method...
  • 52. I feel like I’ve seen this somewhere before...
  • 53. The Fix
  • 54. Topaz! topaz/topaz/objects/stringobject.py
  • 55. Find the method...
  • 56. The Fix
  • 57. The Fix
  • 58. MagLev! src/kernel/bootstrap/String.rb
  • 59. Find the method...
  • 60. Hmm...primitive_env?
  • 61. ...uh, maybe next time
  • 62. But...why? Brain Exercise
  • 63. But...why? If you are a programmer... Ruby is just another program
  • 64. But...why? If you are a Ruby programmer... Ruby is a program you use every day
  • 65. If you get to know Ruby better... You will be a better Ruby programmer
  • 66. KNOW ALL THE RUBIES!!! Questions? @manhattanmetric https://github.com/jballanc