Dave Howell wrote:
> On May 22, 2006, at 9:50, James Britt wrote:
> ...
>>
>> Those people having speed issues: Is it not a reasonable option to 
>> replace the bottleneck Ruby code with custom compiled C libraries?
> 
> 
> In a word, "no." Not for me.
> 
> I'm a hobbyist programmer, not a professional. I program in order to 
> accomplish something else, or to save time, and I don't spend more than, 
> oh, 4-5 hours a week, on average, programming. I cannot *imagine* what I 
> would *ever* program that would justify learning a whole new language, 
> when I haven't even finished learning this one yet. (I know, one never 
> 'finishes' learning a language. But I still have to look up "Array" and 
> "Enumerate" methods, and probably always will, because I haven't 
> memorized which one does what yet.)
> 

I would posit, then, that the discussion of speed here is probably not 
the same for you as it is some others in the thread.


> On the other hand, it's also amusingly irrelevant for me. I have 
> replaced some of my older code with newer Ruby versions in order to make 
> them *faster.* Ruby's way faster than AppleScript, which is what most of 
> my older programs are written in.
> 
> On the third hand, I hope the next time this thread appears, nobody will 
> waste time advancing the nearly nonsensical argument that you can always 
> speed up ruby by replacing parts with custom compiled C libraries. Or, 
> to put it another way "You can make Ruby faster by . . . not using Ruby."
> 

Interesting.  You assert this to be a nearly nonsensical argument, yet 
you describe yourself as hobbyist programmer, and say that, for you, the 
speed concerns are amusingly irrelevant.

> That might make my *program* run faster, but it didn't do diddly-squat 
> for making *Ruby* faster. 

Do you use the YAML parser in Ruby?  Or the String class?  They're C. 
Ruby and C are old friends.  If you really want to know Ruby, you need 
to know at least some amount of C.    One of the great virtues of Ruby 
is the way it hooks into C code.  Suggesting that augmenting a Ruby 
program with a C-based library is somehow un-Rubyish strikes me as, 
well, nearly nonsensical.

Most of what I've seen in this thread are concerns that, at certain 
times, for certain programs, certain people have certain speed issues.

I don't think anyone said that Ruby itself was intrinsically slow for 
every task, so for most of the people concerned with speed (people whose 
concerns tend to arise from professional or academic circumstances), 
suggesting the use of C sounds more than a little reasonable.  It's 
pragmatic and professional.



-- 
James Britt

"The use of anthropomorphic terminology when dealing with
computing systems is a symptom of professional immaturity."

  - Edsger W. Dijkstra