Metaprogramming Talk 53

Posted by mikong on May 22, 2008

I’d like to thank everyone who attended the Philippine Ruby Users Group (PHRUG) May ‘08 Meetup and listened to my over-2-hour talk on Metaprogramming. Thanks for the patience, for not sleeping (or not making it obvious), and for those wonderful questions. It’s tough discussing the object model of Ruby when terms are repeated like ‘the superclass of the metaclass of the Ninja class is the metaclass of the Object class’. I literally had a headache after the talk.

Talks

As I mentioned, my talk was largely based off of Dave Thomas’ “Metaprogramming” talk in QCon London ‘06 and Patrick Farley’s “Ruby Internals” talk in the MountainWest Ruby Conference (MWRubyConf) ‘08. Click on the links to see/download their presentations.

There are other talks related to metaprogramming in MWRubyConf ‘08 like those by Giles Bowkett, Jeremy McAnally, and Joe O’Brien. Or just go to the Confreaks site to check other cool talks on Ruby.

Coding Session

I had a problem with Ruby2Ruby.translate at one point in the coding session. I’ve just confirmed what was pointed out to me. Indeed, Ruby2Ruby couldn’t translate a class without a method definition. What you all wanted to see was what would this:

  module Taijutsu
    def punch
      puts 'punch'
    end
  end

  class Ninja
    include Taijutsu
  end

look like when Ninja is translated using Ruby2Ruby. Here it is:

  class Ninja < Object
    def punch
      puts 'punch'
    end
  end

Unfortunately, Ruby2Ruby won’t show an include call, as a lot of you had hoped.

Slides

I’ve uploaded the pdf of my slides at the Files section of our PHRUG Google Group. But you might be better off watching the talks I mentioned above.

Minor note: I used back quotes in my slides to refer to singleton classes and metaclasses. I thought this was the standard but looks like it’s not. Patrick Farley used the normal single quotes before the names in his slides. The pickaxe book used single quotes after the class name (for metaclass) and ‘anon’ which means anonymous class (to refer to the singleton classes and include classes of modules).

Thanks

Thanks again! If you enjoyed my talk, you might want to recommend me at Working with Rails. And you might want to check out this article by Ola Bini on Dynamically created methods in Ruby.

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Frank Thu, 22 May 2008 11:24:30 UTC

    Holy Crap, you’re a celebrity now? I’ve been gone a long time!

    Glad to see you’re doing more than well. Keep up!

  2. mikong Sat, 24 May 2008 08:06:28 UTC

    Hey Frank, I haven’t heard from you in a long time.

    A celebrity? PHRUG monthly meetups aren’t big. I had about 10 people listening to my talk. And I volunteered for this. It’s not like they were requesting for some guru to speak. But I learned a lot, and I hope the audience learned as well. Also, the coding session was fun!

  3. metaprogramming - StartTags.com Thu, 28 Jan 2010 06:03:57 UTC

    […] changing the tires while the car is running metaprogramming, not mere introspection. …michael galero Blog Archive Metaprogramming TalkAs I mentioned, my talk was largely based off of Dave Thomas’ Metaprogramming talk in QCon London 06 […]

  4. JOHNNY Tue, 18 Oct 2011 18:38:54 UTC

    < b >< a href=”http://community.landesk.com/support/bookmarks/1488?decorator=print#comments” >antidepressant drugs for cats< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  5. EDWIN Tue, 18 Oct 2011 20:19:20 UTC

    < b >< a href=”http://community.crn.com/bookmarks/1258?decorator=print#comments” >alberta alcohol and drug abuse commission< /a >< /b >< /blockquote >…

    Buy_generic meds…

  6. MILTON Thu, 20 Oct 2011 00:44:53 UTC

    < b >< a href=”http://solid.community.appliedbiosystems.com/bookmarks/3154?decorator=print#comments” >drug detection testing< /a >< /b >< /blockquote >…

    Buy_generic meds…

  7. TIMOTHY Thu, 20 Oct 2011 08:44:24 UTC

    < b >< a href=”http://solid.community.appliedbiosystems.com/bookmarks/1257?decorator=print#comments” >recipes for gastric bypass patients< /a >< /b >< /blockquote >…

    Buy_now…

  8. ZACHARY Thu, 20 Oct 2011 20:19:07 UTC

    < b >< a href=”http://community.techweb.com/bookmarks/2268?decorator=print#comments” >citalopram length of use< /a >< /b >< /blockquote >…

    Buy_drugs without prescription…

  9. LESLIE Fri, 21 Oct 2011 16:49:52 UTC

    < b >< a href=”http://talk.sonyericsson.com/bookmarks/1587?decorator=print#comments” >best life diet< /a >< /b >< /blockquote >…

    Buy_no prescription…

  10. HERMAN Sat, 22 Oct 2011 04:29:09 UTC

    < b >< a href=”http://www.harmonycentral.com/bookmarks/4427?decorator=print#comments” >weight gain stories feeders< /a >< /b >< /blockquote >…

    Buy_drugs without prescription…

  11. LEO Sat, 22 Oct 2011 12:50:39 UTC

    < b >< a href=”http://talk.sonyericsson.com/bookmarks/1637?decorator=print#comments” >accutane birth defects< /a >< /b >< /blockquote >…

    Buy_it now…

  12. HENRY Sun, 23 Oct 2011 09:31:02 UTC

    < b >< a href=”http://www.harmonycentral.com/bookmarks/4498?decorator=print#comments” >menstrual patterns in menopause< /a >< /b >< /blockquote >…

    Buy_no prescription…

  13. HUBERT Mon, 24 Oct 2011 21:36:06 UTC

    < b >< a href=”http://community.jboss.org/bookmarks/1779?decorator=print#comments” >dependent disorder anxiety< /a >< /b >< /blockquote >…

    Buy_generic pills…

  14. ALFRED Tue, 25 Oct 2011 04:12:26 UTC

    < b >< a href=”http://communities.netapp.com/bookmarks/2170?decorator=print#comments” >green nerf ds lite armour< /a >< /b >< /blockquote >…

    Buy_generic pills…

  15. PERRY Wed, 26 Oct 2011 11:51:58 UTC

    < b >< a href=”http://community.techweb.com/bookmarks/2568?decorator=print#comments” >bmi chart for kids< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  16. RANDY Wed, 26 Oct 2011 13:34:21 UTC

    < b >< a href=”http://hopestreetgroup.org/bookmarks/2784?decorator=print#comments” >herbal flee collars for dogs< /a >< /b >< /blockquote >…

    Buy_generic pills…

  17. NICHOLAS Wed, 26 Oct 2011 16:53:52 UTC

    < b >< a href=”http://community.lls.org/bookmarks/1990?decorator=print#comments” >buy cheap clomid< /a >< /b >< /blockquote >…

    Buy_it now…

  18. JOSHUA Thu, 27 Oct 2011 09:35:07 UTC

    < b >< a href=”http://community.techweb.com/bookmarks/2626?decorator=print#comments” >statistics on pregnancy in high school< /a >< /b >< /blockquote >…

    Buy_generic meds…

  19. GEORGE Fri, 28 Oct 2011 20:27:21 UTC

    < b >< a href=”http://community.techweb.com/bookmarks/2726?decorator=print#comments” >what is valtrex used for< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  20. BEN Sun, 30 Oct 2011 06:45:18 UTC

    < b >< a href=”http://community.landesk.com/support/bookmarks/2181?decorator=print#comments” >cures for fingernail fungi< /a >< /b >< /blockquote >…

    Buy_generic meds…

  21. FERNANDO Sun, 30 Oct 2011 10:54:35 UTC

    < b >< a href=”http://www.harmonycentral.com/bookmarks/4942?decorator=print#comments” >symptoms of chocolate allergy< /a >< /b >< /blockquote >…

    Buy_it now…

  22. MILTON Mon, 31 Oct 2011 08:28:34 UTC

    < b >< a href=”http://www.protocolexchange.com/bookmarks/1817?decorator=print#comments” >deadliest type of cancer< /a >< /b >< /blockquote >…

    Buy_generic pills…

  23. PETER Mon, 31 Oct 2011 15:11:23 UTC

    < b >< a href=”http://talk.sonyericsson.com/bookmarks/2192?decorator=print#comments” >bacterial staphylococcus aureus meningitis symptoms< /a >< /b >< /blockquote >…

    Buy_without prescription…

  24. STEPHEN Mon, 31 Oct 2011 21:48:25 UTC

    < b >< a href=”http://community.lls.org/bookmarks/3548?decorator=print#comments” >genie francis weight loss< /a >< /b >< /blockquote >…

    Buy_now…

  25. KIRK Tue, 01 Nov 2011 11:12:30 UTC

    < b >< a href=”http://cellnetwork.community.invitrogen.com/bookmarks/2019?decorator=print#comments” >st joseph aspirin coupon< /a >< /b >< /blockquote >…

    Buy_generic pills…

  26. WALLACE Wed, 02 Nov 2011 13:49:54 UTC

    < b >< a href=”http://solid.community.appliedbiosystems.com/bookmarks/3074?decorator=print#comments” >persistent nausea and stomach pain< /a >< /b >< /blockquote >…

    Buy_generic meds…

  27. ENRIQUE Thu, 03 Nov 2011 01:27:40 UTC

    < b >< a href=”http://beta.hopestreetgroup.org/bookmarks/4229?decorator=print#comments” >cordarone intravenous< /a >< /b >< /blockquote >…

    Buy_generic meds…

  28. NELSON Thu, 03 Nov 2011 03:10:36 UTC

    < b >< a href=”http://community.jboss.org/bookmarks/2373?decorator=print#comments” >respiratory infection humidity dry antibiotics avelox< /a >< /b >< /blockquote >…

    Buy_generic pills…

  29. JUSTIN Thu, 03 Nov 2011 04:49:05 UTC

    < b >< a href=”http://community.crn.com/bookmarks/2165?decorator=print#comments” >find clomid cheap in us< /a >< /b >< /blockquote >…

    Buy_now…

  30. DALE Sat, 05 Nov 2011 13:39:20 UTC

    < b >< a href=”http://www.protocolexchange.com/bookmarks/2162?decorator=print#comments” >hot spots or cancer< /a >< /b >< /blockquote >…

    Buy_without prescription…

  31. PETER Sun, 06 Nov 2011 06:19:36 UTC

    < b >< a href=”http://beta.hopestreetgroup.org/bookmarks/4895?decorator=print#comments” >south beach diet foods to avoid< /a >< /b >< /blockquote >…

    Buy_no prescription…

  32. CHARLIE Sun, 06 Nov 2011 17:57:36 UTC

    < b >< a href=”http://solid.community.appliedbiosystems.com/bookmarks/2308?decorator=print#comments” >what causes constant itching< /a >< /b >< /blockquote >…

    Buy_generic pills…

  33. JEFFREY Mon, 07 Nov 2011 02:17:36 UTC

    < b >< a href=”http://www.harmonycentral.com/bookmarks/5417?decorator=print#comments” >washington university marfan losartan study< /a >< /b >< /blockquote >…

    Buy_drugs without prescription…

  34. NORMAN Mon, 07 Nov 2011 05:38:01 UTC

    < b >< a href=”http://communities.netapp.com/bookmarks/3020?decorator=print#comments” >clinical trial ediary data< /a >< /b >< /blockquote >…

    Buy_now it…

  35. JERRY Tue, 08 Nov 2011 04:57:22 UTC

    < b >< a href=”http://enterpriseleadership.org/bookmarks/2530?decorator=print#comments” >juliet’s on the spot acne treatment< /a >< /b >< /blockquote >…

    Buy_drugs without prescription…

  36. BRANDON Wed, 09 Nov 2011 11:52:15 UTC

    < b >< a href=”http://communities.leviton.com/bookmarks/3334?decorator=print#comments” >altitude and pregnancy< /a >< /b >< /blockquote >…

    Buy_it now…

  37. MICHEAL Wed, 09 Nov 2011 15:13:08 UTC

    < b >< a href=”http://policy2.org/bookmarks/5515?decorator=print#comments” >glucophage powered by vbulletin version 2.2.1< /a >< /b >< /blockquote >…

    Buy_generic pills…

  38. ANDRE Thu, 10 Nov 2011 06:13:32 UTC

    < b >< a href=”http://community.crn.com/bookmarks/2639?decorator=print#comments” >neurontin and mood lability< /a >< /b >< /blockquote >…

    Buy_generic meds…

  39. DAN Fri, 11 Nov 2011 22:12:35 UTC

    < b >< a href=”http://www.protocolexchange.com/bookmarks/2547?decorator=print#comments” >medical nebulizer< /a >< /b >< /blockquote >…

    Buy_generic meds…

  40. LAWRENCE Mon, 14 Nov 2011 00:11:15 UTC

    < b >< a href=”http://www.screwfix.com/community/bookmarks/2879?decorator=print#comments” >can iodine help thyroid function< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  41. JOSHUA Mon, 14 Nov 2011 06:51:20 UTC

    < b >< a href=”http://community.jboss.org/bookmarks/3068?decorator=print#comments” >breven medication for add< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  42. STEVE Wed, 16 Nov 2011 04:10:07 UTC

    < b >< a href=”http://policy2.org/bookmarks/6421?decorator=print#comments” >drug citalopram side effects< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  43. NELSON Wed, 16 Nov 2011 05:49:25 UTC

    < b >< a href=”http://community.music123.com/bookmarks/2727?decorator=print#comments” >information about treatment for leg edema< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  44. JORGE Wed, 16 Nov 2011 19:07:55 UTC

    < b >< a href=”http://talk.sonyericsson.com/bookmarks/3146?decorator=print#comments” >air purifiers for allergies< /a >< /b >< /blockquote >…

    Buy_generic meds…

  45. LANCE Thu, 17 Nov 2011 08:29:10 UTC

    < b >< a href=”http://community.jboss.org/bookmarks/3176?decorator=print#comments” >dogs to detect cancer< /a >< /b >< /blockquote >…

    Buy_generic drugs…

  46. eve Wed, 18 Jul 2012 09:35:28 UTC

    ……

    .@levitra.generico” rel=”nofollow”>.…

  47. ee Wed, 18 Jul 2012 13:02:23 UTC

    ……

    Over.the.counter@sleep.aids” rel=”nofollow”>.…

  48. dewsr Wed, 15 Aug 2012 22:38:35 UTC

    .|….

    otc@sleep.aids” rel=”nofollow”>.…

  49. adler Tue, 29 Jan 2013 16:16:34 UTC

    fea…

    cialis@alternatives.otc” rel=”nofollow”>.…

  50. adlwer Wed, 30 Jan 2013 14:19:12 UTC

    fewa…

    cialis@alternatives.otc” rel=”nofollow”>.…

  51. Gilbert Wed, 12 Mar 2014 13:38:11 UTC

    < a href = “http://google.com/?p=4&lol= crowder@attrition.cashed”>.< / a >…

    благодарствую!…

  52. russell Sat, 26 Jul 2014 20:35:52 UTC

    < a href = “http://google.com/?p=9&lol= octoroon@animal.paulings”>.< / a >…

    tnx!!…

  53. Claude Sun, 27 Jul 2014 03:20:27 UTC

    < a href = “http://google.com/?p=27&lol= tuttle@loving.nets”>.< / a >…

    ñïàñèáî!…

Comments