Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of jjore (6662)

Wednesday August 19, 2009
10:27 AM

Ruby's regexp engine sucks to debug

[ #39491 ]

Today, I'm using Ruby for a project at work and Oh! My! God! Every week I get deeper with Ruby I become more impressed with how much I like writing ordinary things in it and how much I loath having to solve hard problems in it. This language, or the implementation seems to go miles out of its way to make it nigh impossible to debug.

Today's frustration:

  • Without changing anything I'm aware of my trepan gem ( has started throwing Bus error
  • I've found that the regexp engine is matching "something" wrong
  • To debug a regex in 1.8.6, I recompiled ruby with CFLAGS=-DDEBUG_REGEX
  • -DDEBUG_REGEX produces only the inscrutable output "regex loop(5): matching 0x01" which doesn't seem to map to anything like characters or offsets or anything. I can't use it
  • Ruby 1.9 uses Oniguruma but it also fails to match the same regexp
  • Installing the latest Oniguruma from yields libonig, not something I can use in ruby. Oops
  • Building 2.x per the page tries to patch my Ruby 1.8 source code but fails
  • There's apparently a /third/ version of Oniguruma at Maybe's it's just old? Maybe it's the version that works. Dunno

    I just want a language that doesn't make me spend immense amounts of energy! Is that so much to ask? I throw tons of energy at perl but I get cool things for it. I'm throwing tons at ruby now and not even getting things I have for FREE in perl.

    FWIW, after spending several hours struggling with Ruby, I threw in the towel. Read a book and went to bed early, exhausted.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.