Monday, January 22, 2007

irb Ninja Shit

Amy Hoy's overview
Wirble (syntax coloring, tab completion, saved history)
Ultra fucking ninja, get it now
Apprentice ninja

Also useful for Rails console.

(Fair warning, in the "ultra ninja" one, you use it by copying and pasting a code sample. Problem is, the code sample is tainted with curly quotes and Wordpress devoured the slash in a newline sequence at the end of a string. Does require some very minor hacking.)

Update: the "ultra ninja" thing actually requires more hacking than I thought it would, so if you want to skip that effort, you can use this code sample instead. By the way, if you took a look and you're thinking, well, what's so ninja about that anyway, the answer is that it takes regular expressions as arguments. Is it convenient to be able to search any object's available methods with a regex? Of course it is.

1 comment:

  1. Very cool... I use the following snippets ALL the time in irb:

    puts foo.methods.sort
    puts foo.methods.grep /bar/

    (If you squint, you can actually see the ex-python hacker in me fumbling in the toolbox for dir()!)

    ...I din't know you could have an irbrc file in Windows. Thanks for the powerup!

    ReplyDelete

Note: Only a member of this blog may post a comment.