Monday, December 04, 2006

JRuby IRB Applet Revisited

Damian Steer, regular JRuby contributor, has taken the IRB applet and run with it. He's gotten readline working (history, line editing, tab-completion), added some fonts and colors to differentiate things, and even put in an intellisense-like menu for tab completion of method names.

Very cool stuff. Keep in mind also that this could be embedded in any app (like an IDE) to provide a really nice looking interactive console. Thanks Damian!


Damian Steer said...

I'll update this soon with a standard swing widget for completion (now I've finally found one). Looks a bit odd in linux. Once that's done I'll port it to ruby, which will remove a nasty hack, and allow others to play.

The colours are muted because I'm colour blind and stick to a conservative pallet :-) Suggestions welcome.

Ayal said...

Damian -
Could you share your source code? I'm really interested to see how you did these things.

Thanks - AYAL

Damian said...

Ayal: don't know how to contact you except via Charles' comments :-)

I'll add a link to the source tonight (on the applet page).

weepie said...

fantastic stuff. would be a great method to offer to allow people to try out your new classes etc.
--> is there an easy way to
require 'mylib' ?


Damian said...

Not hard. Grab the jruby source, install your lib (in lib/ruby/site_ruby), then:

ant jar-complete

Simple enough?

Roger Pack said...

is there any place on the web where I can use a working jruby irb applet?