# Which project should I work on?

**URL:** <https://www.ruby-forum.com/t/which-project-should-i-work-on/171879>\
**Category:** Ruby\
**Created:** [July 10, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879 "2009-07-10T16:10:55Z")\
**Posts on this page:** 20\
**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:** [July 10, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/1 "2009-07-10T16:10:55Z")

</div>

I was wondering on any feedback on which of the following pet projects  
would be most helpful to the community.

1. create [another] ruby JIT  
There are some ideas that could speed up the tired old VM [and the new  
VM]. Speed is good, right?

2. Documentation: hack on rdoc with a few things – some bugs, update  
the hanna template so that it looks prettier, create a live method  
introspection gem, add remote ri gem, etc.

3. hack on the KRI GC. I think I might be able to run the sweep phase  
in a separate thread, thus speeding up GC.

4. create a ruby tutorial gem, which supplements the RI information for  
core class by adding tutorials to them [yea!]. It would be wiki  
editable and every so often the wiki content snurfed up and packaged  
into a gem with only documentation in it [no real code]. That’s the  
initial thought anyway.

5. create gem plugin to add pre-install hooks [ex: “apt-get install  
some\_dependency”]

6. create an “optimized” edition of Ruby–i.e. an REE but for 1.9 [so  
tcmalloc, tuned GC to start, GCC profile optimized, etc.]

7. try to crack down and kill some of the outstanding bugs in the core.

8. try to update mod\_rails to allow for “per virtualhost”  
PassengerMaxInstancesPerApp

9. a ruby optimizing pre processor  
converts things like  
def go  
if a == ‘3’  
end  
end

to

@\_3 = ‘3’  
def go  
if a == @\_3  
end  
end

Thus avoiding extra allocations [also an optimized erb].

1. try to optimize rails [is there much possible there though?]

So anyway feel free to vote on your favorite [+1 it] and say why. I  
don’t want to work on something that people don’t feel is important 🙂

Here’s my own:  
+1 for number 1. It might be useful across ruby implementations, and  
would make ruby look better in synthetic benchmarks.

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:** [July 10, 2009, 4:33pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/2 "2009-07-10T16:33:14Z")

</div>

huh, a toughy, but I’d vote +1 for

1. try to crack down and kill some of the outstanding bugs in the core

> 

killing bugs is never a bad idea after all 😉

Greetz

---

<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:** [July 10, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/3 "2009-07-10T17:39:51Z")

</div>

Roger P. wrote:

> def go  
> if a == @\_3  
> end  
> end

Is that really faster? Even so, what is the effect of many such  
conversions (hence many ivars) on ivar lookup time and on object size?

---

<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:** [July 10, 2009, 4:32pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/4 "2009-07-10T16:32:03Z")

</div>

2009/7/10 Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> I was wondering on any feedback on which of the following pet projects  
> would be most helpful to the community.

> Here’s my own:  
> +1 for number 1. It might be useful across ruby implementations, and  
> would make ruby look better in synthetic benchmarks.

Thanks for this opportunity: I always wanted to try out how good  
Doodle works. I took the liberty to set up a doodle at

> **[Expired Group Poll - Create a New Poll or Contact the Owner](https://doodle.com/poll/wwhedcavpte9ptan)**
>
> The Group Poll you're trying to access isn’t up-to-date and has been archived

Happy voting!

Kind regards

robert

---

<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:** [July 10, 2009, 6:51pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/5 "2009-07-10T18:51:12Z")

</div>

On Sat, Jul 11, 2009 at 12:36 AM, Roger P.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Also if anybody wants to vote for it, could hack on the redcar editor or  
> arcadia in the _hopes_ of someday creating an editor

+1  
and make them 1.9 ready, pls 😉

---

<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:** [July 10, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/6 "2009-07-10T18:36:13Z")

</div>

Joel VanderWerf wrote:

> Roger P. wrote:
> 
> > def go  
> > if a == @\_3  
> > end  
> > end
> 
> Is that really faster? Even so, what is the effect of many such  
> conversions (hence many ivars) on ivar lookup time and on object size?

> > def go; ‘3’; end  
> > Benchmark.realtime { 1000000.times { go }}  
> > =\> 0.40625
> 
> > @\_3 = ‘3’.freeze  
> > def go2; @\_3; end  
> > Benchmark.realtime { 1000000.times { go2 }}  
> > =\> 0.359375

So…just barely [plus saving on the GC a bit].

Also if anybody wants to vote for it, could hack on the redcar editor or  
arcadia in the _hopes_ of someday creating an editor equal to the great  
TextMate [except free, open source, and cross platform] 🙂

Just +1 it here 🙂

=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:** [July 10, 2009, 7:58pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/7 "2009-07-10T19:58:58Z")

</div>

ah, vim is all I need… 😉

2009/7/10 botp [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<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:** [July 10, 2009, 11:11pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/8 "2009-07-10T23:11:22Z")

</div>

Roger P. wrote:

> 1. create a ruby tutorial gem, which supplements the RI information for  
> core class by adding tutorials to them [yea!]. It would be wiki  
> editable and every so often the wiki content snurfed up and packaged  
> into a gem with only documentation in it [no real code]. That’s the  
> initial thought anyway.

+1  
That’s very useful for newcommers to Ruby and those who don’t want to  
write the same things again and again.

Marvin

---

<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:** [July 10, 2009, 11:42pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/9 "2009-07-10T23:42:12Z")

</div>

On Fri, Jul 10, 2009 at 9:10 AM, Roger P.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 1. try to optimize rails [is there much possible there though?]

+1 🙂 This more than anything else would aid all Ruby implementations  
on all platforms. But it’s obviously a large task. I’d say any help  
you can provide Rails folks on moving toward a 3.0 that runs faster,  
uses less memory, makes better use of threads, and opens the door to  
platform integration (like ActiveORM could wrap Hibernate or JPA), the  
better. That’s what I’m going to be looking into.

- Charlie

---

<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:** [July 11, 2009, 10:32pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/10 "2009-07-11T22:32:04Z")

</div>

On Jul 10, 4:10 pm, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. Documentation: hack on rdoc with a few things – some bugs, update  
> the hanna template so that it looks prettier, create a live method  
> introspection gem, add remote ri gem, etc.

At the moment there is still no (rdoc) documentation for Ruby 1.9.1  
available anywhere, so it would be great if that could be improved.

Björn

---

<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:** [July 12, 2009, 3:17am UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/11 "2009-07-12T03:17:52Z")

</div>

> I’d say, hack on one of the existing ones. Or, if you can, make Rubinius  
> as  
> fast as (or faster than) MRI. Hey, shoot the moon!

Yeah it would be a hack to make ruby2cext better [already existing, for  
MRI].

> This, I’d love to see. REE meaning Ruby Enterprise Edition, right?

Yep.

> if (a[0] == ‘3’ && a[1] == NULL)
> 
> I’m assuming C strings, Ruby strings might work differently, but you get  
> the  
> idea.

That’s a great idea. Avoid ruby calls totally 🙂 [NB that ruby2cext  
already does this for a few things, so…maybe I can just use that].

> > 1. try to optimize rails [is there much possible there though?]
> 
> Yes! Happening as part of merging with Merb, I thought. I’d love to see  
> progress there, though…

Thankfully not many people voted on that one since I didn’t want to  
really do it anyway 🙂

=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:** [July 10, 2009, 11:35pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/12 "2009-07-10T23:35:46Z")

</div>

On Friday 10 July 2009 09:10:57 am Roger P. wrote:

> I was wondering on any feedback on which of the following pet projects  
> would be most helpful to the community.

I can only speak for myself…

> 1. create [another] ruby JIT  
> There are some ideas that could speed up the tired old VM [and the new  
> VM]. Speed is good, right?

I’d say, hack on one of the existing ones. Or, if you can, make Rubinius  
as  
fast as (or faster than) MRI. Hey, shoot the moon!

> 1. hack on the KRI GC. I think I might be able to run the sweep phase  
> in a separate thread, thus speeding up GC.

So, I’d file that with #1.

> 1. create a ruby tutorial gem, which supplements the RI information for  
> core class by adding tutorials to them [yea!]. It would be wiki  
> editable and every so often the wiki content snurfed up and packaged  
> into a gem with only documentation in it [no real code]. That’s the  
> initial thought anyway.

Hmm. Would this be something that could be combined with a Try Ruby  
style  
tutorial? ([tryruby.hobix.net](http://tryruby.hobix.net))

> 1. create gem plugin to add pre-install hooks [ex: “apt-get install  
> some\_dependency”]

Pre-install hooks? Maybe, though I’d be wary. I like being able to  
install a  
gem just to read the rdocs.

And that sounds like a TERRIBLE way to do what you’re trying to do, by  
the  
way. I know gems doesn’t already do this, but what about reverse  
dependencies?  
What about portability?

Find me an example of a pre-installation script that isn’t better done  
some  
other way.

> 1. create an “optimized” edition of Ruby–i.e. an REE but for 1.9 [so  
> tcmalloc, tuned GC to start, GCC profile optimized, etc.]

This, I’d love to see. REE meaning Ruby Enterprise Edition, right?

+1 here.

> 1. try to crack down and kill some of the outstanding bugs in the core.

Always a good idea, but I’m guessing there are people on that. Anyone  
doing a  
Ruby Enterprise Edition for 1.9?

> def go  
> if a == @\_3  
> end  
> end

I’d do that in the VM, if you can. Especially seeing as there’s no way  
to tell  
if your example is universally faster – it necessarily adds an instance  
variable. A particularly intelligent optimization might notice that this  
string is only ever used for the one comparison, so as long as String  
isn’t  
messed with, it could be converted into code like the following C:

if (a[0] == ‘3’ && a[1] == NULL)

I’m assuming C strings, Ruby strings might work differently, but you get  
the  
idea.

> 1. try to optimize rails [is there much possible there though?]

Yes! Happening as part of merging with Merb, I thought. I’d love to see  
progress there, though…

---

<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:** [July 12, 2009, 5:28am UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/13 "2009-07-12T05:28:05Z")

</div>

> x = 0  
> foo = lambda { x += 5 }  
> 5.times do  
> foo.call  
> end
> 
> into something more like this:
> 
> x = 25
> 
> Of course, that optimization only makes sense if no one’s making changes  
> to  
> the Proc class, or to the scope in which that’s run – or maybe we’re  
> actually  
> storing ‘foo’ deep in some object, where it probably won’t be touched,  
> but it  
> might.

Good point. If there aren’t any class changes you’d think a number of  
optimizations would be possible.  
=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:** [July 12, 2009, 4:22am UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/14 "2009-07-12T04:22:34Z")

</div>

On Saturday 11 July 2009 08:17:54 pm Roger P. wrote:

> > if (a[0] == ‘3’ && a[1] == NULL)
> > 
> > I’m assuming C strings, Ruby strings might work differently, but you get  
> > the  
> > idea.
> 
> That’s a great idea. Avoid ruby calls totally 🙂 [NB that ruby2cext  
> already does this for a few things, so…maybe I can just use that].

Maybe. The point was to do this at runtime, in the VM. I don’t think all  
Ruby  
code can be easily converted to C, nor would I want to (I like having  
‘eval’  
work). But looking at the AST, or even the bytecode representation, this  
kind  
of thing should be possible to figure out.

Other ideas would be to do clever runtime optimizations, or to do  
optimizations that wouldn’t be sane at compile time – for instance,  
unroll  
this:

x = 0  
foo = lambda { x += 5 }  
5.times do  
foo.call  
end

into something more like this:

x = 25

Of course, that optimization only makes sense if no one’s making changes  
to  
the Proc class, or to the scope in which that’s run – or maybe we’re  
actually  
storing ‘foo’ deep in some object, where it probably won’t be touched,  
but it  
might.

All of these are dangerous assumptions to make at compile time, but at  
runtime, it might be reasonable to say “If any of these assumptions  
change,  
drop the optimized version and do it the slow way.”

But I am in a bit over my head, here – I only know in theory how  
compilers  
and VMs work; I’ve never actually contributed to one.

---

<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:** [July 12, 2009, 11:17pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/15 "2009-07-12T23:17:01Z")

</div>

Create a package like pythons multiprocessing to make multi -process  
code  
easier in ruby and also to unify the programming model between windows  
and  
unix variants.

---

<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:** [July 13, 2009, 12:40am UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/16 "2009-07-13T00:40:57Z")

</div>

> Create a package like pythons multiprocessing to make multi -process  
> code  
> easier in ruby and also to unify the programming model between windows  
> and  
> unix variants.

A great suggestion.

Any +1’s for it?

I had considered something like it but forgot about it. My first  
thought was to wrap the apache runtime calls so that forked processes  
could have shared mutexes, shared memory, etc.

However I couldn’t think of…how it would actually be useful in day to  
day–would it be? In what circumstances? (just wondering)

Also, can windows actually do something like  
a = 3  
Thread.new { # other process }  
b = 3

? like shared startup state? huh? is that even possible? (just thinking  
about how Python’s multi process does things–it seems to allow for  
something like that and I’m not sure how).

A search for process gems [1] seems to reveal a few that make forking  
more convenient, and I’ve used them before. Would more convenience be  
useful, is the question.

?

=r

[1]  
[http://allgems.ruby-forum.com/gems?search=fork](http://allgems.ruby-forum.com/gems?search=fork)  
and  
[http://allgems.ruby-forum.com/gems?search=process](http://allgems.ruby-forum.com/gems?search=process)  
there are some shared memory gems, it appears, as well  
[http://allgems.ruby-forum.com/gems?search=memory](http://allgems.ruby-forum.com/gems?search=memory)  
google “ruby mmap” and

> **[GitHub - espace/sysvipc-0.8-rc1: SystemVIPC release compatible for Ruby 1.8 and...](https://github.com/espace/sysvipc-0.8-rc1/tree/master)**
>
> master

---

<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:** [July 13, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/17 "2009-07-13T14:07:51Z")

</div>

> Well, in your example, you used threads, and I’m not entirely sure how  
> it’s  
> possible. Pretty much by definition, processes don’t share state,  
> threads do.

> There are exceptions – shared memory, the filesystem, and other  
> well-defined  
> interfaces – but languages generally don’t make these things obvious.

Hmm. If that’s the case than perhaps the python multi process gem  
_only_ shares memory among processes. I suppose I could dig into its  
source if needed. Maybe even reuse it! 🙂

Regardless, any +1’s for my working on this one?, or am I right that it  
isn’t in strong demand?

=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:** [July 16, 2009, 3:41pm UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/18 "2009-07-16T15:41:26Z")

</div>

Dominic S. wrote:

> Create a package like pythons multiprocessing to make multi -process  
> code  
> easier in ruby and also to unify the programming model between windows  
> and  
> unix variants.

I am quite interested in multiprocessings

“A manager object returned by Manager() controls a server process which  
holds Python objects and allows other processes to manipulate them using  
proxies.”

I envision refitting drb so that you can do something like  
global\_store = SharedHash.new

global\_store[:shared\_var] = 3  
global\_store[:shared\_var2] = 3

Process.fork {  
proxy = global\_store[:shared\_var] # drb proxy object to the ‘3’ in the  
main class  
proxy.to\_s # proxy method call with marshalling, etc.  
}

i.e. a multi-process friendly wrapper for drb to make it “easy to use  
among forked children”

I think this would allow for cross process mutexes  
(global\_store[:mutex1] = Mutex.new; global\_store[:mutex1].synchronize {}  
)

Thoughts? Would this be useful to anyone?  
=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:** [July 13, 2009, 1:37am UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/19 "2009-07-13T01:37:13Z")

</div>

On Sunday 12 July 2009 05:41:05 pm Roger P. wrote:

> Also, can windows actually do something like  
> a = 3  
> Thread.new { # other process }  
> b = 3
> 
> ? like shared startup state? huh? is that even possible? (just thinking  
> about how Python’s multi process does things–it seems to allow for  
> something like that and I’m not sure how).

Well, in your example, you used threads, and I’m not entirely sure how  
it’s  
possible. Pretty much by definition, processes don’t share state,  
threads do.  
There are exceptions – shared memory, the filesystem, and other  
well-defined  
interfaces – but languages generally don’t make these things obvious.

If you’re wanting something like your example, you’re wanting threads,  
and  
you’re getting all of the concurrency issues that threads have that  
processes  
generally don’t.

---

<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:** [July 17, 2009, 5:12am UTC](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879/20 "2009-07-17T05:12:24Z")

</div>

All righty the results are in.

You said:

YARJIT [Yet Another Ruby JIT]  
4

Documentation enhancements:  
10

KRI GC improvements:  
5

Tutorial gem:  
6

pre-install gem hooks:  
1 [yea!]

REE for 1.9  
6

Try to crack down on core bugs:  
10

update mod\_rails  
1

ruby optimized pre-processor  
2

try to optimize rails  
3

So the winners are Documentation and core bugs. Both already have  
maintainers but I’ll see what I can do.

Current plan for documentation:  
create #desc methods for classes and methods [i.e. “String.desc, String.desc\_method :strip”] [1]  
update Hanna template to be more space friendly  
try to see if I can fix some odd ambiguities in the ruby core docs

Would remote ri be useful to anyone?

Current plan for core bugs:  
Are there any outstanding that people would have me work on? Any  
RCR’s you’d like me to submit to core? I’m currently not annoyed too bad  
by any bugs, but if there are some I could give them a whack.

Thanks for the input.

[1] [http://github.com/rogerdpack/desc\_methods/tree/master](http://github.com/rogerdpack/desc_methods/tree/master) though it’s  
not perfect yet

[Next page](https://www.ruby-forum.com/t/which-project-should-i-work-on/171879.md?page=2)
