Ruby Metaprogramming

Are there any suggested resources on learning the art of Ruby
metaprogramming?

yea, it’s a short message… But a good one nonetheless
~ Ari
Google has been visited.

On Aug 3, 2007, at 5:18 PM, Ari B. wrote:

Are there any suggested resources on learning the art of Ruby
metaprogramming?

I think this old quiz is a great first step:

http://www.rubyquiz.com/quiz67.html

James Edward G. II

Ari B. wrote:

Are there any suggested resources on learning the art of Ruby
metaprogramming?

Ruby for Rails, by David Black.


James B.

“Take eloquence and wring its neck.”

  • Paul Verlaine

On Aug 3, 2007, at 7:03 PM, James B. wrote:

Ari B. wrote:

Are there any suggested resources on learning the art of Ruby
metaprogramming?

Ruby for Rails, by David Black.

I can buy Ruby for Rails at my local bookstore, but it costs a bunch.
Is it really so good for me to spend $50? I don’t exactly have a job
(too young), so take that into account…

Thanks,
~ Ari
English is like a pseudo-random number generator - there are a
bajillion rules to it, but nobody cares.

Ari B. wrote:

I can buy Ruby for Rails at my local bookstore, but it costs a bunch.
Is it really so good for me to spend $50? I don’t exactly have a job
(too young), so take that into account…

Thanks,
~ Ari
English is like a pseudo-random number generator - there are a
bajillion rules to it, but nobody cares.
I don’t know if this is enough of a difference, but it’s only $30 at
Amazon, with free shipping:
http://www.amazon.com/Ruby-Rails-Techniques-Developers/dp/1932394699/ref=pd_bbs_sr_1/102-8816908-0652149?ie=UTF8&s=books&qid=1186184282&sr=8-1

-Brett

I can buy Ruby for Rails at my local bookstore, but it costs a bunch.
Is it really so good for me to spend $50? I don’t exactly have a job
(too young), so take that into account…

I can’t really answer the question about whether R4R is worth $50, it
depends what $50 is worth to you. I have a copy of it here on my
shelf, I thought it was worth it. :slight_smile:

In terms of cheap alternatives, use the Ruby Q., and Google, and
blogs.

Ola B. has a good overview on metaprogramming:

Glenn Vanderburg has a good set of presentation slides:

http://www.vanderburg.org/Speaking/Stuff/oscon05.pdf

I found this stuff just by googling “ruby metaprogramming.” There’s
plenty of good stuff out there.


Giles B.

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org

On 8/3/07, James Edward G. II [email protected] wrote:

On Aug 3, 2007, at 5:18 PM, Ari B. wrote:

Are there any suggested resources on learning the art of Ruby
metaprogramming?

I think this old quiz is a great first step:

Ruby Quiz - metakoans.rb (#67)
metakoans right? Yes and the work of Ara in general, look at Prototype
e.g.
and then there is Eigenclass of Mauricio and Why’s site (google Why
the Lucky Stiff) and sorry if I forgot some ressources.

HTH
Robert

On Sat, Aug 04, 2007 at 08:58:29AM +0900, Giles B. wrote:

http://www.vanderburg.org/Speaking/Stuff/oscon05.pdf
Another resource that I haven’t noticed mentioned yet is _why’s
Dwemthy’s
Array stuff:
http://whytheluckystiff.net/articles/seeingMetaclassesClearly.html
and
http://poignantguide.net/dwemthy/

Also Jamis wrote about it indirectly in his post on DSLs:
http://weblog.jamisbuck.org/2006/4/20/writing-domain-specific-languages

marcel

Brett S. wrote:

I don’t know if this is enough of a difference, but it’s only $30 at
Amazon, with free shipping:
http://www.amazon.com/Ruby-Rails-Techniques-Developers/dp/1932394699/ref=pd_bbs_sr_1/102-8816908-0652149?ie=UTF8&s=books&qid=1186184282&sr=8-1

And I think a PDF versions is also available from the Manning site.


James B.

www.risingtidesoftware.com - Wicked Cool Coding
www.jamesbritt.com - Playing with Better Toys

On Aug 3, 2007, at 7:58 PM, Giles B. wrote:

plenty of good stuff out there.
Thanks! I’m going to start a little page of MetaProgramming links
(either generic languages or ruby-specific),

so if anyone has any link or book they’d like to share, I’d be glad
to put it up.

Thanks,
-------------------------------------------------------|
~ Ari
crap my sig won’t fit

James B. wrote:

bajillion rules to it, but nobody cares.
I don’t know if this is enough of a difference, but it’s only $30 at
Amazon, with free shipping:
http://www.amazon.com/Ruby-Rails-Techniques-Developers/dp/1932394699/ref=pd_bbs_sr_1/102-8816908-0652149?ie=UTF8&s=books&qid=1186184282&sr=8-1

And I think a PDF versions is also available from the Manning site.

It is, for $22.50, about half the cost of the printed version.

On Aug 3, 2007, at 9:42 PM, Ari B. wrote:

shelf, I thought it was worth it. :slight_smile:

Thanks,
-------------------------------------------------------|
~ Ari
crap my sig won’t fit

Programming books are expensive, especially when you get one that
turns out to be no good or at least no good for you.
But luckily, Ruby (and Rails) books are always good. I haven’t found
a bad one yet.
When they’re good, they’re worth the price, because you’ll keep
looking back to them for information.

Thanks! I’m going to start a little page of MetaProgramming links
(either generic languages or ruby-specific),

Just to be entirely capricious, there’s a totally different way to
take the words “Ruby metaprogramming,” which concerns using IRB with
lots of enhancements. A lot of popular Ruby apps have interactive
shells, Ruby itself has one, and if you do a lot in the interactive
shells, you’re working in an environment defined by Ruby code. You can
add features to that environment by adding new Ruby code to the Ruby
code which already defines it. So programming your programming
environment in Ruby is one highly productive way to deliberately
misuse the term “Ruby metaprogramming.”


Giles B.

Blog: http://gilesbowkett.blogspot.com
Portfolio: http://www.gilesgoatboy.org

Hi –

On Sat, 4 Aug 2007, Ari B. wrote:

I found this stuff just by googling “ruby metaprogramming.” There’s
plenty of good stuff out there.

Thanks! I’m going to start a little page of MetaProgramming links (either
generic languages or ruby-specific),

so if anyone has any link or book they’d like to share, I’d be glad to put it
up.

http://dablog.rubypal.com/2007/1/7/meta-shmeta-learning-ruby-horizontally

David

Personally, I have found my local libraries to be an excellent resource
(though the branch libraries do lag a little behind the main ones).

And the main library in my area (Arlington Heights, IL, USA) has been
stocking up on Ruby books for a while now.

That way, I get to look at them for 3-4 weeks and can then decide
whether or
not to buy them.

Garry