Slashdot Mirror


RAD with Ruby

Amit Upadhyay writes "KDE's award winning integrated development environment KDevelop, has integrated support for Ruby, an excellent and easy to use object oriented scrpting language. If you are looking for a good programming tool for quickly developing a professional one off application, Ruby (with KDE bindings) maybe just the thing for you. There is a quick tutorial and an online book to get you started. You may also want to read a quite informative comparison of Python with Ruby. If you are web developer or write enterprise applications with JAVA etc, take a look at Ruby on Rails(api), they have a nice blog too. KDevelop provides a GUI builder and Debugger for rapid application development(RAD) with Ruby, which is getting better. There is a nice tutorial on using KDE libraries with Ruby. And if you have lots of code in C/C++, extending Ruby to use them is easy.
"

13 of 162 comments (clear)

  1. Why Ruby? by Anonymous Coward · · Score: 5, Informative

    With so many other languages out there, why bother with Ruby?

    Perhaps an example would be best.

    http://www.rubyonrails.org/show/AccessControlLis tE xample

    NOTE: In the above example, the Model Code (just a handfule of lines) is what creates all the database-mapped classes and relationships. In other words, the implementation of functions used in the Example Usage were created on the fly!

    If you haven't done enough object-relational mapping using other languages to be blown away by this example, then here are 37 other reasons:

    http://hypermetrics.com/ruby37.html

    Ruby Home
    http://www.ruby-lang.org/

    1. Re:Why Ruby? by GnuVince · · Score: 3, Informative

      The equivalent is Gem and the reason it isn't mentionned is because this 37 list was written about two years before work on Gem began and the list has never been updated since then.

  2. Re:But does it work on Windows? by Anonymous Coward · · Score: 3, Informative

    Here's Ruby for Windows. It includes many extras such as FreeRIDE (a Ruby editor written in Ruby):

    Ruby One-Click Installer for Windows

    With Ruby, there are even classes that let you do OLE automation.

    And calling C/C++ functions is super-easy using Ruby so you can use all those DLL functions out there.

  3. JRuby and RDT by Headius · · Score: 5, Informative

    As long as we're dumping Ruby links, I must plug a project I work on and a project I work with daily:

    JRuby is a 100% java implementation of Ruby 1.8. The most recent release is pretty old, but the version in CVS is shaping up nicely and is getting quite stable. I joined development over a month ago, and work has been rapidly ramping up.

    The Ruby Development Tool aims to bring a full Ruby develop/test/debug environment to the Eclipse platform. It is also rapidly maturing, and may in the future use portions of JRuby for parsing and debugging. While using or developing JRuby, the RDT is a welcome companion, allowing me to stay within Eclipse when developing both Java and Ruby.

    I would also recommend tracing back to previous Ruby posts on /. for more information and links.

  4. Re:Ruby seems on the right track. by master_p · · Score: 2, Informative

    "Just out of interest, which web developement systems use thousands of XML configuration files?"

    J2EE. Application servers. Tools that generate mappings between databases and Java classes. Struts. etc etc etc.

  5. Ruby's remaining problems by fizbin · · Score: 3, Informative
    Ruby still has two big problems that prevent it from being my scripting language of choice when compatibility with others isn't at issue:
    1. I find Ruby's limited multi-language string support a bit surprising for a language that was created in Japan. Perl and python have had UTF support built into strings for... how long now? Come on, ruby, get with it. (I frankly would expect ruby to come with the swiss-army-knife character set support that you see in emacs+mule)
    2. Performance. Compared to even, say, python, ruby has performance problems. Most of the time this isn't an issue, but when it is it makes me reach back for perl. Ruby's performance should be sufficiently good so that when I find ruby isn't fast enough, I'm at the point where what I need to do is reach for a compiled language.

    Of course, any scripting language is a big disadvantage when compared to perl because only perl has CPAN. The organized central archive for extensions with support distributed as a standard module was a brilliant move by Larry Wall; every other scripting language is still playing catchup, and still no one else can compare to even where CPAN was four years ago. (RAA is better than nothing, but it's still not there. CPAN's hierarchical naming scheme, while occasionally inconsistent, was a really good idea)

    For commercial use, I'd also want some of ruby's remaining licensing issues cleaned up, but I understand that's been taken care of. (I haven't checked lately)
    1. Re:Ruby's remaining problems by Anonymous Coward · · Score: 3, Informative

      Well, it supports *Japanese* encodings! This is a shortcoming though, for some apps.

      Performance: Well, don't forget it include programmer performance. My Ruby programs are written in 1/5 the time of my Perl programs and usually have acceptable performance.

      Ruby is dual-licensed, and one of the licenses is the familiar GPL so commercial use is no problem.

  6. Re:Ruby Rules! by multi+io · · Score: 2, Informative
    [Ruby] isn't half as legible as Python

    Example?

    not half as consistent as Smalltalk

    (so you agree that Ruby is more consistent than Python?)

    Smalltalk has no form of MI, has it? At least not in the original version. That may be consistent, but it's not practical at times...

  7. Re:Why reimplement Ruby? by WayneConrad · · Score: 3, Informative

    That's a good summary of some of Ruby's shortcomings.

    You can step through a string character by character, though. It's just not obvious how, and that's a bit of a flaw. There should probably be an obvious method like "each_char".

    If you don't mind getting your characters as numeric codes, you can use String.each_byte. It's easy to turn each byte back into a character using Integer.chr:

    "abc".each_byte do |b|
    puts b.chr
    end

    Or use String.scan:

    "abc".scan(/./) do |c|
    puts c
    end

    Ruby being Ruby, there are probably another dozen ways to do it. And, for those who wish Ruby did have a String.each_char method, just add it:

    class String
    def each_char
    scan(/./) do |c|
    yield(c)
    end
    end
    end

    And now...

    "abc".each_char do |c|
    puts c
    end

    (Please excuse the lack of indenting. /. and I can't seem to agree on how to make indenting work.)

  8. There is only one guide to Ruby... by Copley · · Score: 5, Informative

    You have to read this. It's more than an intro to Ruby... It's a mini adventure!

    Why's Poignant Guide to Ruby

    Those foxes! That cat! The crazy goat!

    --
    I am bald
  9. Ruby thread scheduler uses gettime.. DANGER!!! by Groth · · Score: 2, Informative

    I like both ruby and python. In a recent project were we tried to use ruby for linux OS control I came across a dangerous problem.

    The Ruby thread scheduler relies on gettime to schedule threads. What's the problem with this? Just change our clock back in time will running a threaded ruby application. You'll notice that your thread stalls and will stay that way until time catches up with it.

    For this reason alone I can never recommend Ruby until it gets a proper thread scheduler that employs a more reliable scheduling method or uses pthreads.

  10. Re:Why reimplement Ruby? by kahei · · Score: 2, Informative

    if one goes to full unicode, then some chunks will be one size, and some another (up to 32 bits).

    Sounds like a case for my Unicode FAQ!

    http://www.jbrowse.com/text/unicode.shtml

    Character set != encoding. Longest representation of a character in a standard Unicode encoding is necessarily > 32 bits.

    In any case, Java, C# and (with eg Boost) C++ don't have this problem and Perl and Python, while not perfect, are much better than Ruby. If you have a mass of generic text to process, like maybe a big database of emails written in various languages, with Ruby your first task is to sit down and implement the relevant character encodings, followed by an enhanced string class and maybe plugging in a new regex engine. This makes Ruby a particularly bad choice for a lot of things, although I maintain a bit of an interest in it anyway because it's a good way to practise reading docs in Japanese.

    --
    Whence? Hence. Whither? Thither.
  11. Re:Where's [where is] by nihilogos · · Score: 2, Informative

    "Where is the thought provoking stories ... " how is that correct? It's "Where are the thought provoking stories ... "

    --
    :wq