2010-09-02

zenprofile version 1.3.0 has been released!

0 comments

zenprofiler helps answer WHAT is being called the most. spyon helps answer WHERE those calls are being made. ZenProfiler provides a faster version of the standard library ruby profiler. It is otherwise pretty much the same as before. spyon provides a clean way to redefine a bottleneck method so you can account for and aggregate all the calls to it.

% ruby -Ilib bin/zenprofile misc/factorial.rb 50000
Total time = 3.056884
Total time = 2.390000

          total     self              self    total
% time  seconds  seconds    calls  ms/call  ms/call  name
 50.70     1.64     1.64    50000     0.03     0.05 Integer#downto
 19.63     2.27     0.63   200000     0.00     0.00 Fixnum#*
 14.19     2.73     0.46    50000     0.01     0.05 Factorial#factorial
  9.93     3.05     0.32        1   320.36  3047.10 Range#each
  5.54     3.23     0.18        2    89.40   178.79 ZenProfiler#start_hook

Once you know that Integer#downto takes 50% of the entire run, you can use spy_on to find it. (See misc/factorial.rb for the actual code):

% SPY=1 ruby -Ilib misc/factorial.rb 50000
Spying on Integer#downto

Integer.downto

50000: total
50000: ./misc/factorial.rb:6:in `factorial' via 
       ./misc/factorial.rb:6:in `factorial'

Changes:

1.3.0 / 2010-09-02

event_hook version 1.0.2 has been released!

0 comments

Wraps rbaddeventhook so you can write fast ruby event hook processors w/o the speed penalty that comes with settrace_func (sooo sloooow!). Calls back into ruby so you don't have to write C.

% ruby demo.rb 
# of iterations = 1000000
                          user     system      total        real
null_time             0.120000   0.000000   0.120000 (  0.125279)
ruby time             0.560000   0.000000   0.560000 (  0.562834)
event hook            3.160000   0.010000   3.170000 (  3.175361)
set_trace_func       34.530000   0.100000  34.630000 ( 34.942785)

Changes:

1.1.0 / 2010-09-02

  • 2 minor enhancements:

    • Allow eventhookklass to work with class and metaclass.
    • Force ~/.ruby_inline cleanup in tests
  • 1 bug fix:

    • event_hook won't work on any 1.9 w/o major rework :(
  • http://rubyforge.org/projects/seattlerb

rake-remote_task version 2.0.2 has been released!

0 comments

Vlad the Deployer's sexy brainchild is rake-remote_task, extending Rake with remote task goodness.

Changes:

2.0.2 / 2010-09-02

2010-09-01

flay version 1.4.1 has been released!

0 comments

Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored. Making this totally rad.

Changes:

1.4.1 / 2010-09-01

  • 2 minor enhancements:

    • Added extra error handling for ERB flay to deal with tons of bad ERB
    • Skip plugin if another version already loaded (eg local vs gem).
  • 1 bug fix:

    • Fixed all tests that were having problems on 1.9 due to unstable hashes
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

flog version 2.5.0 has been released!

0 comments

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.

Changes:

2.5.0 / 2010-09-01

  • 1 major enhancement:

    • Added plugin system. Define a module under Flog to extend it.
  • 3 minor enhancements:

    • Added special case penalty for wtf to_proc: blah(&b = proc {...}) (benjaminb)
    • Improved tests and test coverage.
    • Unfactored & refactored report code. Much cleaner and more maintainable now.
  • 2 bug fixes:

    • Fixed API change for FlogTask (andreacampi)
    • Fixed bad edgecase handler for block_pass (benjaminb)
  • http://ruby.sadi.st/

  • http://rubyforge.org/projects/seattlerb

ruby2ruby version 1.2.5 has been released!

0 comments

ruby2ruby provides a means of generating pure ruby code easily from RubyParser compatible Sexps. This makes making dynamic language processors in ruby easier than ever!

Changes:

1.2.5 / 2010-09-01

  • 4 minor enhancements:

    • Added braces to hash args surrounded if in a binary method call.
    • Added rewrite_resbody to double check structure and freak if necessary.
    • Added stress task
    • rewrite_rescue now detects rescue with multiple arguments.
  • 2 bug fixes:

    • Fixed dstr/dregex/d* roundtripping problem
    • Fixed up call arg processing to be more correct and to work with the new sexp form
  • http://seattlerb.rubyforge.org/

  • http://rubyforge.org/projects/seattlerb

ruby_parser version 2.0.5 has been released!

0 comments

ruby_parser (RP) is a ruby parser written in pure ruby (utilizing racc--which does by default use a C extension). RP's output is the same as ParseTree's output: s-expressions using ruby's arrays and base types.

As an example:

def conditional1(arg1) if arg1 == 0 then return 1 end return 0 end

becomes:

s(:defn, :conditional1, s(:args, :arg1), s(:scope, s(:block, s(:if, s(:call, s(:lvar, :arg1), :==, s(:arglist, s(:lit, 0))), s(:return, s(:lit, 1)), nil), s(:return, s(:lit, 0)))))

Changes:

2.0.5 / 2010-09-01

ParseTree version 3.0.6 has been released!

0 comments

ParseTree is a C extension (using RubyInline) that extracts the parse tree for an entire class or a specific method and returns it as a s-expression (aka sexp) using ruby's arrays, strings, symbols, and integers.

As an example:

def conditional1(arg1) if arg1 == 0 then return 1 end return 0 end

becomes:

[:defn, :conditional1, [:scope, [:block, [:args, :arg1], [:if, [:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]], [:return, [:lit, 1]], nil], [:return, [:lit, 0]]]]]

Changes:

3.0.6 / 2010-09-01

sexp_processor version 3.0.5 has been released!

0 comments

sexp_processor branches from ParseTree bringing all the generic sexp processing tools with it. Sexp, SexpProcessor, Environment, etc... all for your language processing pleasure.

Changes:

3.0.5 / 2010-09-01

RubyInline version 3.8.5 has been released!

0 comments

Inline allows you to write foreign code within your ruby code. It automatically determines if the code in question has changed and builds it only when necessary. The extensions are then automatically loaded into the class/module that defines it.

You can even write extra builders that will allow you to write inlined code in any language. Use Inline::C as a template and look at Module#inline for the required API.

Changes:

3.8.5 / 2010-09-01