31 Dec, 2008 in Ruby by khelll

Ruby and Metaprogramming

According to wikipedia, Metaprogramming:

is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at runtime that would otherwise be done at compile time.

Well, nice to hear cause Ruby is a lang that supports Metaprogramming effectively, and might be the best in that field. If you want to explore more on that topic, and how ruby can help you, then check this list of posts i wrote recently, i hope you will enjoy them:

If you have any question regarding this topic, please don’t hesitate to contact me, i would really be pleased to help you.

5 Responses so far | Have Your Say!

  1. Soleone - Gravatar

    Soleone  |  January 1st, 2009 at 10:03 am #

    First off, thanks for those interesting posts, consider yourself subscribed ;)

    I am not sure, but I read (one Why’s blog) that the language IO is even better for metaprogramming, as you can read and modify the source (e.g. as a String) during runtime.

  2. khelll - Gravatar

    khelll  |  January 1st, 2009 at 11:19 am #

    @Soleone, Thanks for your trust.
    I never had the chance to work with IO lang, but i wish you provide an example so that we check if we can do the same with Ruby.

  3. Chuck Bergeron - Gravatar

    Chuck Bergeron  |  January 1st, 2009 at 8:00 pm #

    This looks terrific! Exactly what I was hoping to stumble upon…

  4. Markus Jais - Gravatar

    Markus Jais  |  January 2nd, 2009 at 12:47 am #

    This is a terrific source of information. Thanks a lot for taking the time to write all this stuff about Ruby meta programming. I especially like the postings on DSLs and dynamic method calling.

  5. Soleone - Gravatar

    Soleone  |  January 25th, 2009 at 4:52 pm #

    I finally found the reference from _why on IO. The cool thing is that you can get the source of a method as a string. Check it out:
    http://hackety.org/2008/01/05/ioHasAVeryCleanMirror.html

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">