[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

RubyGems HackFest Weekend #1 is complete!

Ryan Davis

5/30/2005 4:56:00 AM

http://blog.zens...archives/2005/05/rubygems_h...


We started our RubyGems Hackfest Saturday, with a turnout of 6
people. Five were regulars from Seattle.rb, and we even got someone
up from Portland! We started Saturday by brainstorming things we'd
like, writing up story cards, estimating and risking them. Then we
paired up and got testing!

By the end of day 1, we'd finished cards 1-3 and gotten pretty good
testing infrastructure in place for stuff we needed. I spent some
extra time making it so that all unit tests generate their gems on
the fly, weren't dependent on the location from which they were run,
and didn't use or create any files in the test directory. We went
over our estimates by 3.5 hours. Much of that was my fault, it was
too hot for me to think.

On day 2, we were down to 4 people, but had much better testing
capabilities. Aaron and Evan finished up the package listing command
extension and gave .gemrc the ability to have .cvsrc-style command
option specifications. Eric and I worked on the hardest bug we had,
which was to get rid of the use of Date. We succeeded on both counts!
We went over by 1 hour on a task, and under by 1 hour on the other.
YAY! I've been wanting to conquer this issue for quite some time!

Below you can see a the fruits of our labors:

Old and Bad:

% time ruby -rprofile -rrubygems -e 'require_gem "RubyInline"' 2>&1 |
head
% cumulative self self total
time seconds seconds calls ms/call ms/call name
19.79 0.95 0.95 132 7.20 10.38 Integer#gcd
8.96 1.38 0.43 572 0.75 1.47
Gem::Specification#copy_of
6.46 1.69 0.31 68 4.56 100.88 Array#each
5.21 1.94 0.25 3315 0.08 0.08 Fixnum#==
3.96 2.13 0.19 220 0.86 1.23
Rational#initialize
3.54 2.30 0.17 1628 0.10 0.16 Kernel.===
3.12 2.45 0.15 132 1.14 13.48 Rational#reduce
2.71 2.58 0.13 463 0.28 0.37 Kernel.dup

real 0m5.530s
user 0m4.856s
sys 0m0.323s
New and Good:

% time ruby -Ilib -rprofile -rrubygems -e 'require_gem "RubyInline"'
2>&1 |head
% cumulative self self total
time seconds seconds calls ms/call ms/call name
24.63 0.50 0.50 572 0.87 1.50
Gem::Specification#copy_of
8.87 0.68 0.18 37 4.86 82.43 Array#each
7.39 0.83 0.15 44 3.41 4.32 Date#_parse
6.90 0.97 0.14 1628 0.09 0.14 Kernel.===
4.43 1.06 0.09 1386 0.06 0.06 Kernel.==
4.43 1.15 0.09 1211 0.07 0.07 Module#===
3.94 1.23 0.08 5 16.00 22.00 Hash#each
3.94 1.31 0.08 20 4.00 29.00 Kernel.require

real 0m2.415s
user 0m2.070s
sys 0m0.183s



--
ryand-ruby@zenspider.com - Seattle.rb - http://www.zens...
seattle.rb
http://blog.zens... - http://rubyforge.org/proje...




4 Answers

Navindra Umanee

5/30/2005 5:08:00 AM

0

Ryan Davis <ryand-ruby@zenspider.com> wrote:
> http://blog.zenspider.com/archives/2005/05/rubygems_h...

Great work!

> % time ruby -rprofile -rrubygems -e 'require_gem "RubyInline"' 2>&1 |

So no-one managed to get rid of the require_gem stuff yet? :-)

Cheers,
Navin.


Simon Strandgaard

5/30/2005 6:21:00 AM

0

On 5/30/05, Navindra Umanee <navindra@cs.mcgill.ca> wrote:
> Ryan Davis <ryand-ruby@zenspider.com> wrote:
> > http://blog.zenspider.com/archives/2005/05/rubygems_h...
>
> Great work!
>
> > % time ruby -rprofile -rrubygems -e 'require_gem "RubyInline"' 2>&1 |
>
> So no-one managed to get rid of the require_gem stuff yet? :-)

I made something.. not sure if it still works?

http://rubyforge.org/tracker/index.php?func=detail&aid=439&group_id=126&am...

--
Simon Strandgaard


Ryan Davis

5/30/2005 6:46:00 AM

0


On May 29, 2005, at 11:21 PM, Simon Strandgaard wrote:

> [noise omitted]
> I made something.. not sure if it still works?
>
> http://rubyforge.org/tracker/...
> func=detail&aid=439&group_id=126&atid=577

Not necessary anymore, or they already incorporated your patch or
some variant thereof.

% find /usr/local/lib/ruby/site_ruby -name inline.rb
% gem list | grep -i inline
RubyInline (3.3.2)
% ruby -rrubygems -e 'require "inline"; puts "yup"'
yup

I'll close that bug.



Mark Hubbart

5/30/2005 6:49:00 AM

0

On 5/29/05, Simon Strandgaard <neoneye@gmail.com> wrote:
> On 5/30/05, Navindra Umanee <navindra@cs.mcgill.ca> wrote:
> > Ryan Davis <ryand-ruby@zenspider.com> wrote:
> > > http://blog.zenspider.com/archives/2005/05/rubygems_h...
> >
> > Great work!
> >
> > > % time ruby -rprofile -rrubygems -e 'require_gem "RubyInline"' 2>&1 |
> >
> > So no-one managed to get rid of the require_gem stuff yet? :-)
>
> I made something.. not sure if it still works?
>
> http://rubyforge.org/tracker/index.php?func=detail&aid=439&group_id=126&am...

Current versions of RubyGems alter Kernel#require to do exactly that.
RUBYOPT=rubygems in your shellrc will autorequire rubygems for you.

cheers,
Mark