InfoQ

News

JRuby ports of Ruby/LDAP, ruby-debug

Posted by Werner Schuster on Oct 10, 2007 05:00 PM

Community
Java,
Ruby
Topics
JRuby,
Debugging
Tags
JRuby,
RubyGems
Many Ruby libraries, implemented using native extensions, are not usable with JRuby since it doesn't support native extensions. In the jruby-extras project, JRuby ports of these libraries are collected.

Ola Bini just added another port of Ruby/LDAP called JRuby/LDAP. The JRuby version is built using the LDAP libraries shipped with Java and can be configured with the properties of Java LDAP. Installation is simple by using the Ruby Gems package system:
jruby -S gem install jruby-ldap 

Another of JRuby's missing pieces is being worked on right now: fast debugging. Other Ruby implementations already have this in various states of completeness. Ruby 1.8.x has ruby-debug, which uses native extensions to speed up debugging. An alternative is Sapphire Steel's Cylon debugger. Rubinius has fast debugging using special bytecodes at runtime.

JRuby currently only uses the set_trace_func method of debugging. set_trace_func allows to set Ruby callback function or Proc, which is invoked every time a line of Ruby code is executed. This obviously slows down execution of code during debugging.

Now, a JRuby version of ruby-debug is in the works. Recently a milestone was reached: a first running version was packaged as a Ruby Gem; the project is hosted in the debug-commons project at RubyForge.  Currently debugging in JRuby means using a set_trace_func based implementation written in Ruby.  jruby-debug uses a similar approach, but the code is written in Java, which should improve performance significantly by avoiding the execution of multiple lines of Ruby debugger code for every line of debugged Ruby code.

It's important to note, that at this time, the project is at an early state and not complete at all, but this is a promising start.

No comments

Reply

Exclusive Content

Typemock: Past, Present and Future

Eli Lopian of Typemock answers a few questions on Typemock origins and where Typemock is headed.

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.