From: ptkwt@...2.teleport.com (Phil Tomson) Date: 2001-02-21T03:40:02+09:00 Subject: [ruby-talk:11184] Re: Ruby success stories? In article <3a921bab.2019049579@news-server>, Harry Ohlsen wrote: > >There's a third-party Java library for regular expressions that >accepts the same syntax as Perl. I'll see if I can find a URL ... > > http://jakarta.apache.org/oro/index.html > >I've used this before and it is excellent. As far as I recall, his >licence is such that you can use it for commercial purposes, so long >as you're not building a product to on-sell. Ie, if it's used to >write something that your company will use. > >Of course, as you say, this is not bult-in. But, of course, most of >the built-in libraries are written in Java, so there's nothing >particularly strange about using a third-party library like this, so >long as the licence agreement doesn't hinder you. Yes, I know there are several regex libs for java. One problem would be deciding on which one to use. I prefer having regex's be a built-in part of the language especially for this particular application where we rely on them heavily for searching log files for various types of errors. Also, since the regex libs for Java are written in Java, I suspect that they're a lot slower than using Ruby's built-in regexes. > > Process process = Runtime.getRuntime().exec(command); Actually, I suspected this was doable. I also need to access some Win32 api calls on the Windows side of things - I suspect that that isn't too easy in Java. I've written a C extension for Ruby to make some of the calls I need to make and pass back info to Ruby (in one case - for getOSVersion - a hash is passed back to the Ruby program - this was easy to do in Ruby. I don't have any idea how easy or difficult it would be in Java, but I suspect that it would be a lot harder) > >Of course, I'm not trying to suggest you use Java rather than Ruby; it >just sounded like you might not know about these classes. > The other problem with Java is the development model - Java is a compiled language, Ruby (like perl and python) is interpreted, which in this case I think is a better choice - quicker development time. Phil