Dave said:
I'm going to be giving a number of talks on Ruby over the next six
months, starting with one at Amazon next week. I'd like to include a
slide on the growth of the Ruby community over the last 4 years.
Does anyone have any metrics that I could use for this, or any ideas
for finding these kinds of figures?
How many magazine articles attend to Ruby? (Beyond "check out this weird
fringe language, dude!")
How many books use Ruby for their sample language? How many books are about
Ruby? What are their sales figures?
Irritatingly, most of the Agile & XP books use Java "because everyone else
was doing it". The authors wouldn't want their opinions about the language's
technical merits to affect their sales. These books will look quaint after
Agile & XP (and Pragmatism) outlive Java.
I use C++ for the hard fast layer and Ruby for the soft scripting layer in
all my projects. For example, here's the core of a C++ unit test:
rb_require("profile");
int state = productionCodeThatCallsRuby();
assert(0 == state);
rb_eval_string_protect("Profiler__.print_profile($stderr)", &state);
if (state)
push(rb_gv_get("$!"));
assert(0 == state);
Code elsewhere redirects $stderr into both a scrolling C++ window, and my
editor's Output panel. So when that unit test profiles the Ruby code, I can
read the output, immediately, in my IDE.
If any of that code experiences an (unintentional) Ruby error, it can call
push(rb_gv_get("$!")).
push() looks like this:
void
push(VALUE xyzIn)
{
VALUE str = rb_funcall(xyzIn, rb_intern("inspect"), 0);
OutputDebugStringA(STR2CSTR(str));
OutputDebugStringA("\n");
}
As a debugging aid, push takes any Ruby object, calls .inspect() on it, and
pushes the result into OutputDebugString(), which flows into my IDE's Output
panel.
The result of these tweaks - I can trace, profile, and unit test Ruby
straight out of my C++ editor, with round-trip support.