# Rush wish list musings

**URL:** <https://www.ruby-forum.com/t/rush-wish-list-musings/145927>\
**Category:** Ruby\
**Created:** [August 15, 2008, 5:19am UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927 "2008-08-15T05:19:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [August 15, 2008, 5:19am UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/1 "2008-08-15T05:19:42Z")

</div>

> Two things:
> 
> 1. In my mind, this general thread is somewhat ridiculous. It’s been  
> going on for – what is it? – ten months now? It seems to be just a  
> laundry list for things you want Ruby to do, whether they’re sensible  
> or not, without a lot of thought into them, and at least sometimes  
> with reasoning like “I’m lazy and don’t want to type some brackets”.

Amen to the lazy part! Ruby in general seem to encourages this weakness  
by allowing me to write code in fewer lines, unfortunately.

> 1. “I wish X worked” is not a very useful way to describe what should  
> happen. I’m not saying you have to write tests or specs, but do  
> describe the behavior you expect. Maybe looking at the RubySpec  
> project will give you an idea of everything Ruby presently “should do”  
> and what the other implementations are working towards. If that  
> doesn’t get you going, think about it as contributing to Rubinius in  
> some way, and the sooner that comes out the sooner you can easily  
> twist even more of Ruby to your desires.

Wow my apologies I didn’t know values\_at existed [I looked up the docs for Array#[] but not that one–my bad]. That was an easy one 🙂 Go  
Ruby!

I don’t yet consider this thread useless as it has helped me gain a  
greater understanding of the capabilities of Ruby [I’m somewhat of a newbie]. It has also served as useful fodder for a few projects [GC and  
otherwise]. Feel free to disagree, but I like it!

-=R

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [August 23, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/2 "2008-08-23T21:38:37Z")

</div>

Question/project wish list:

Are there any existing projects out there like these:?

Project to implement MRI generational GC [Boehm or normal].  
Project to improve rails’ speed–perhaps by turning certain bottlenecks  
into C or what not.  
An asynchronous Mysql driver project [esp. in C]. I suppose there’s  
asymy but…anything else out there?  
A project to optimize the mysql adapter and make it more rails efficient  
[i.e. something like implementing [1]].

I guess if these projects don’t exist if anybody would like start any  
one of them I’d be happy to join and participate. 🙂

Take care.  
-=R  
[1]  
[http://railsexpress.de/blog/articles/2006/10/05/make-ruby-mysql-create-less-garbage](http://railsexpress.de/blog/articles/2006/10/05/make-ruby-mysql-create-less-garbage)

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [August 24, 2008, 3:56am UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/3 "2008-08-24T03:56:04Z")

</div>

On Saturday 23 August 2008 14:34:34 Roger P. wrote:

> Question/project wish list:

> Project to improve rails’ speed–perhaps by turning certain bottlenecks  
> into C or what not.

No, that would actually backfire in a big way, I think. Rails being in  
Ruby  
means that it’s portable. It means that when there’s a competing, faster  
VM,  
we can run Rails on it and enjoy a speed boost.

Rewriting parts in C would make those parts not portable – very  
possibly even  
between versions of the mainline Ruby interpreter (many 1.8 extensions  
don’t  
work on 1.9).

An example: Rails will now run on more than one webserver – many people  
run  
it on Mongrel, for example, instead of Webrick. But I seem to remember  
Mongrel not working at all on 1.9, last I tried – it is, after all,  
quite a  
lot of C.

That’s OK, because the webserver isn’t actually part of Rails, and there  
are  
webservers that work on 1.9.

> A project to optimize the mysql adapter and make it more rails efficient

Well, you could make it more efficient in general, but Rails doesn’t  
tend to  
make it easy on the database. (Simple example: Rails never uses prepared  
statements. The conditions look like they do, but Rails actually does  
string  
interpolation of your placeholders (those ? chars) in Ruby, and then  
sends  
the whole ginormous SQL query to the database backend, whatever it is.)

I think, if Ruby’s being too slow for you, you might start looking  
beyond  
Rails. If it’s really the database performance, you could start by  
replacing  
ActiveRecord with a faster, lighter ORM. But actually profile and see if  
it’s  
being slow, first – as they say, premature optimization is the root of  
all  
evil.

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [August 27, 2008, 7:19am UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/4 "2008-08-27T07:19:20Z")

</div>

Roger P. wrote:

> Question/project wish list:
> 
> Are there any existing projects out there like these:?

Seems like you could get some speedup by inlining Ruby methods:  
ex: [contrived]

def a  
@a += 1  
end

def b  
a  
end

300\_000.times { a }  
=\> .6s  
300\_000.times { @a += 1 }  
=\> .4s

Anybody know of any projects out there akin to this at all?  
Thanks!  
-=R

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [August 24, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/5 "2008-08-24T22:29:23Z")

</div>

Roger P. wrote:

> I guess if these projects don’t exist if anybody would like start any  
> one of them I’d be happy to join and participate. 🙂

I’m reminded of a horrible movie with an applicable message:

“If you build it, they will come.”

I bet if there’s enough interest, making initial headway on the project  
will be enough to attract contributors. Don’t wait for someone else to  
do it.

-Erik

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [September 1, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/6 "2008-09-01T20:05:05Z")

</div>

Hi –

On Tue, 2 Sep 2008, Roger P. wrote:

> Currently we have  
> IO#write\_nonblock(string) [writes as much of the string as currently  
> possible]
> 
> What I wish for is  
> IO#write\_nonblock(string, offset) [starts the write at offset bytes into  
> the string].
> 
> Would anybody else find this useful?  
> Thoughts?

Do you think you could start new threads, with relevant subject lines,  
for these discussions? There’s a sense of a kind of infinitely  
hijacked thread going on, without anything informative in the subject  
line. It’s hard to tell whether or not a post might be of interest  
when all I know about it is that it represents something mysterious  
that someone else wants added to Ruby 🙂

Thanks –

David

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [September 1, 2008, 7:37pm UTC](https://www.ruby-forum.com/t/rush-wish-list-musings/145927/7 "2008-09-01T19:37:49Z")

</div>

Currently we have  
IO#write\_nonblock(string) [writes as much of the string as currently  
possible]

What I wish for is  
IO#write\_nonblock(string, offset) [starts the write at offset bytes into  
the string].

Would anybody else find this useful?  
Thoughts?  
-=R
