Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

RAD with Ruby 162

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.
"
This discussion has been archived. No new comments can be posted.

RAD with Ruby

Comments Filter:
  • Ruby Rules! (Score:2, Interesting)

    by Mr Foobar ( 11230 )
    And Python and essp. Perl just plain drools...

    Ruby will be easy for any Perl user to learn, and it really is OO from the bottom up, not just bolted on like Perl's so-called OO.

    And Ruby's OO makes much more sense than Java's and Python's OO. I can't explain it, but I can't think OO in Java or Python, and I can in Ruby.
    • by Zorilla ( 791636 ) on Monday December 06, 2004 @07:48AM (#11006635)
      Perl just plain drools...

      You dare badmouth Perl on Slashdot?! Take this! s/(12^\n)monkeychar6969BakerStreet(monkey(gibbon(p rocoscismonkey(mandrill))))^%52!
  • by OllySmith ( 624006 ) on Monday December 06, 2004 @07:45AM (#11006629)
    Windows support is the big thing it needs to match the flexibility of Python+Glade for RAD stuff. I'm using Python+Glade every day at the moment for prototyping and for making up quick little proof-of-concept solutions, but Windows support is neccessary for my employer to take it at all seriously (even tho I do most of my actual development on Linux).
    • http://rubyinstaller.rubyforge.org/wiki/wiki.pl Yep
      • Sorry, I hadn't made myself clear - the sticking point was is there a one-click installer for the GUI prototyping environment too like there is for Python+Glade (ok, it's a handful of one-click installers for Python/PyWin32/GTK+/Glade/PyGTK, but you get my drift)? Is deployment of a Ruby+KDE(?) prototype application going to take anything other than double-clicking a few exe's to get the runtime environment setup and installed? I may be completely wrong (and too lazy to do the research - welcome to Slashd
    • by Anonymous Coward
      Here's Ruby for Windows. It includes many extras such as FreeRIDE (a Ruby editor written in Ruby):

      Ruby One-Click Installer for Windows [rubyforge.org]

      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.

      • That's not quite what he meant. KDE is not ported to Windows and Qt has a hefty cost especially if you're just doing a one-off custom app thing. Python + Glade is quite a powerful combination because it includes the GUI environment as well, not just the runtime.
        • You can use either Fox or wxWindows with Ruby (or GTK...though I know even less about that than about wxWindows). Still, all three are protable GUI toolkits. Fox is the most popular GUI interface on windows, probably because that's what the people who built the installer liked. I'm not sure what FreeRide uses...I thought it was GTK, but I haven't checked, and don't remember why I thought that.

          OTOH, the last time I checked, FreeRide was a bit alpha. But that's quite awhile ago, so that could have change
        • Look [sourceforge.net] again [kde.org].
  • by Mmm coffee ( 679570 ) on Monday December 06, 2004 @07:48AM (#11006634) Journal
    Don't get me wrong, I'm quite the Ruby fan myself. However, what the hell kind of story is this? There is little to no real meat to this story, it's just a long winded ad for two Free Software applications! What's to discuss, how great these two things are? Where's the thought provoking stories from the olden days of the site?
    • If I haven't heard of it before then it's news to me.
    • Actually, this *is* more like the stories from the elder days. It's news for nerds, not news for webmonkeys. BITD, this was the kind of thing I came to /. for -- what's in the new kernal, is there going to be a new filesystem, is there support for >512M of memory yet? Articles like these help keep this site true to its roots.
      • So, is this your second ID, or do you change them yearly? :)

        Personally, I'm pretty sure that Ruby will remain forever in Python's shadow (which is a dark shadow, since Python is stuck in Perl's shadow), and therefore could care less what's new with Ruby. :)
    • Where's the thought provoking stories from the olden days of the site?

      I know my friend they've been quite rare this days... However, for spelling's sake, you should use plural ;)
      • Where's [where is] (Score:3, Insightful)

        by soloport ( 312487 )
        However, for spelling's sake, you should use plural

        No, actually, he's correct. However, for grammar's sake, you should go back to school.

        (e.g. "I know, my friend. They've been quite rare, these days.")
    • by ryanvm ( 247662 ) on Monday December 06, 2004 @10:42AM (#11007637)
      Where's the thought provoking stories from the olden days of the site?

      This is known as "Star Wars Syndrome". It's the delusion that the content used to be good, when in reality, the sufferer was just less discriminating.
      • There really isn't a good analogy that refers to media. I was going to say that he's like the kid that has grown up on phantom menace, judging by the magnitude of his UID, but that doesn't work so well in /. sense. Sure, there are older articles, but that form of media isn't as readily accessible as the Star Wars trilogy on DVD.

        I'm willing to bet that he wasn't around much before 2001, and isn't quite hip to what the "old" days were like. I remember. We'd have announcements of new ways of playing with

  • Why Ruby? (Score:5, Informative)

    by Anonymous Coward on Monday December 06, 2004 @07:51AM (#11006650)
    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/
    • Shows up empty for me.
      • Someone--probably from here--keeps deleting all contents of the page. Click "Back in Time" at the bottom of the window. I'm trying to revert it, but whenever I do, the person just deletes the page again.
    • First, the examples are blank.

      Second, hypermetrics.com doesn't work.

      Third, you didn't use <a>.

      You're making me work too hard!!
    • OK Ruby evangelists, after checking out the 37 reasons on the list above I can give you 1 big reason I haven't dived into Ruby yet:

      What is the Ruby equivalent of CPAN and why isn't it on this guys list?
      • Re:Why Ruby? (Score:4, Informative)

        by GnuVince ( 623231 ) on Monday December 06, 2004 @09:48AM (#11007276)
        The equivalent is Gem [rubyforge.org] 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.
        • Thanks GnuVince!

          Next question: at the front page of that site I can't query the available packages. What gives? Is there a search function that is web accessible? (like search.cpan.org) For example, one nice Perl module I recently started using is MIME::Lite. How can I easily find out if there is a Ruby equivalent to this module?

          I've read about Ruby and am eager to try, but CPAN isn't just important to me--it is perhaps the only reason I use Perl.

          Not trying to be a pain: I know I can google for this stuf
    • Why not? (Score:3, Insightful)

      I discovered Ruby a while back after reading Dave Thomas' "The Pragmatic Programmer". One of his suggestions was to learn a new programming language each year. I psuedo-randomly picked Ruby. It has some interesting and unique features, that have helped me later on with C++ and Java programs.

      One of the advantages of learning new languages, even though they may not get used professionally, is the ideas and metaphors that come with the language. Each language was designed to solve a problem, and almost every
    • Re:Why Ruby? (Score:3, Interesting)

      by slamb ( 119285 ) *
      That example really shows off why I hate object-relational mappings (Ruby's or any other). It looks like each of those lines of code requires a round trip to the database. In fact, this one requires three:

      role.add_permissions(Permission.find(2), Permission.find(3))

      If you put some actual thought into the queries you make, you can do much better. For example, what you'd really like to do is see what permissions the user has. So:

      select distinct perm.id, perm.name, perm.serial
      from user_roles user_role
      join r

      • I've done alot of work with ruby in my free time on narf (http://www.narf-lib.org/ [narf-lib.org]). I'm not particularly fond of the permissions example either.

        ruby is a young community, with a tolerant and diverse set of opinions. Rails isn't the only ruby O-R mapping; there is also lafcadio (http://lafcadio.rubyforge.org/ [rubyforge.org]). And Rails isn't the only web enviroment; there is also iowa (http://enigo.com/projects/iowa/index.html [enigo.com]), as well as narf.

        The english-speaking ruby community is young. Some parts of the language
  • Short version... (Score:5, Insightful)

    by Cooper_007 ( 688308 ) on Monday December 06, 2004 @07:52AM (#11006651)
    KDevelop has Ruby bindings.

    That's all the news in there. I really don't understand why the submitter chose to include a whole bunch of Python vs Ruby links. The actual news bit isn't about that at all...

    Cooper
    --
    I don't need a pass to pass this pass
    - Groo The Wanderer -

    • by BalloonMan ( 64687 ) on Monday December 06, 2004 @08:22AM (#11006769) Homepage Journal
      That's cutting it just a bit short. KDevelop now has Ruby bindings... but why? Perhaps because Ruby is gaining momentum and mindshare, which is a good (IMHO) and newsworthy thing.

      As for the Python vs. Ruby soapbox: I think it'a a valid component of the news because the two languages are fighting for mindshare in the same pool of savvy OO-script developers.

      Without getting into particulars, I must say I've been through Perl, then Python, and now Ruby, and I'm most satisfied with Ruby. Sadly, Ruby folks seem to be so busy doing cool things that they are just awful at evangelizing their language. The language a little bit younger and less polished than Python, but they're catching up fast. The inclusion in KDE is an indication of this progress.
      • That's cutting it just a bit short. KDevelop now has Ruby bindings... but why?

        It's always the same Open Source principle: it's there because somebody had fun to do it. Nothing more and nothing less.
      • by ultrabot ( 200914 ) on Monday December 06, 2004 @10:00AM (#11007351)
        Sadly, Ruby folks seem to be so busy doing cool things that they are just awful at evangelizing their language.

        Really? It seems to me that all the ruby people do is evangelizing their language...
        • by Anonymous Coward
          Well, you see here's the day of a typical Ruby programmer:

          8am-10am : Write basic new CMS application in Ruby on Rails. Design and create DB tables, use Rails Active Record to create object layer in ~50 lines of code, use scaffolding feature to prototype app. Deploy to customer site and wait for feedback.

          10am-11am : Help Jim with HotDotCom.com's big Java app (he needs to set up some XML files for Hibernate). Just show him how to do one table and let him tackle the other 22 on his own.

          11am-12pm: Lunch!

          12p
      • by fizbin ( 2046 ) <martin@snoFORTRA ... g minus language> on Monday December 06, 2004 @10:38AM (#11007606) Homepage
        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)
        • by Anonymous Coward
          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.
      • Re:Short version... (Score:3, Interesting)

        by Ian Bicking ( 980 )

        As for the Python vs. Ruby soapbox: I think it'a a valid component of the news because the two languages are fighting for mindshare in the same pool of savvy OO-script developers.

        Not really; if you are a savvy OO-script developer, you are using Ruby or Python or something like it already, you've made your choice. Both languages are trying to pull new developers from other languages, like C or Java. As such, I think they actually help each other -- the potential pool of new people is still very large.

      • There is one problem. KDevelop is an IDE, and it's not really a RAD. It's missing the graphical dialog, message box, and window builder utility. It might have one for QT as an external program, but I doubt it binds anything else like Ruby or wxWidgets. If does have one, especially one that can build wxWidgets dialogs and windows, I haven't found it yet.
      • From what I have been told, the reason Ruby bindings, like any other non-native language to Qt has bindings is because someone took up the role of creating the bindings as a KDE project.

        I was told Objective-C was there but stopped being maintained and presently isn't in the tree. Too bad. I'd rather see ObjC and ObjC++ than Ruby.

    • I'm sorry Cooper, pimpin' linux tech is oldschool /. style.

      If a story isn't about CPUs, SCO, the DMCA, Games, or Linus himself then it doesn't make it any less interesting. It's people bitching about content like this that's been making Slashdot into another mindless web portal.

      In fact, it's little jems like this that keep the saturation of the same old crap from being too much.
  • by putko ( 753330 ) on Monday December 06, 2004 @07:57AM (#11006668) Homepage Journal
    I'm quite partial to scsh [scsh.net].
    I mention this because I understand Ruby's semantics are like Scheme (but the syntax is different, or we'd call it a Scheme).

    The intro from the scsh paper [scsh.net] (Olin Shivers) convinced me to try it out:

    "Shell programming terrifies me. There is something about writing a simple shell script that is just much, much more unpleasant than writing a simple C program, or a simple COMMON LISP program, or a simple Mips assembler program ..."

    He's not talking about a simple shell program (like "rm -fr /") -- but something with variables, control flow, conditionals, etc.
    • How can a language in which functions are not first-class objects be semantically similar to scheme? Semantically Python has much more in common with lisp variants such as scheme than Ruby ever has.

      Objects, messages, mix-ins, the mixing in of kernel to the implicit root object, etc. are not elements of scheme. Blocks come from smalltalk, though they enjoy relatively simple representation in scheme, they're in no way the same concept. Iterators (in the ruby sense) don't appear in scheme either.

      I generally
  • ... scripting language?
  • Crossplatform Ruby (Score:3, Interesting)

    by beware1000 ( 678753 ) on Monday December 06, 2004 @08:04AM (#11006691)
    I actually wish I had had these details all in one place when I was looking afew months back (abit of googling eventually showed all those pages).
    Personally, I have found if you are really interested in RAD w/ Ruby + QT is fine for linux.

    But Wx is cross platform and free! and tools like VisualWx [altervista.org] which has support for WxRuby certainly help.

    Unfortunately it is only on windows atm AFAIK
    • How does wxRuby compare to wxPython? I have extensive experience with the latter, but have never experimented with the former. wxPython has the best user-community of any open source project I've encountered, and Robin Dunn is IMHO one of the most dedicated project heads out there. There is also a lot of python-specific wx stuff in wxPython (custom widgets, STC, OGL, etc). Does wxRuby have similar extensions or is it basically a thin layer over wxWidgets?
  • KDevelop (Score:5, Insightful)

    by Pemdas ( 33265 ) * on Monday December 06, 2004 @08:21AM (#11006761) Journal
    I love emacs. (No this is not an attempt to start a flamewar).

    Since I wanted to see what the fuss was about, I recently grabbed the most recent KDevelop and took it for a spin. It's got a ton of really, really cool stuff in there. Integration with valgrind is sweet. The debugger integration is a Good Thing. The reasonably intuitive API documentation access is great. The integration with QT designer is beautiful.

    If I were just starting to code, I'd probably use Kdevelop.

    However, I found over the course of a couple of painful days that I'm too dependent on some features of emacs to make the switch worthwhile. Quick searching. Tab indentation. Keyboard split buffers. Mouseless cut and paste.

    Some of these have equivalents in Kdevelop that would just require relearning a different way to work, which is fine, if somewhat aggravating in my personal case. But some, like tab indentation, don't. So I'm back in good old emacs.

    I hear that there may be an effort to embed emacs as one of the source code editor options, in which case I'd definitely switch. I'd probably even switch if there were some reasonable emacs-like bindings in Kate. It looks like a really cool tool generally, and I'm hopeful that I'll be able to make a switch sometime in the not too distant future.

    • If I were just starting to code, I'd probably use Kdevelop. However, I found over the course of a couple of painful days that I'm too dependent on some features of emacs to make the switch worthwhile. Quick searching. Tab indentation. Keyboard split buffers. Mouseless cut and paste.

      Ditto, ditto, ditto, except in my case it's with vim.

      I'd love to be able to use vim inside kdevelop. I'm actually a bit better off than you are, because there's a vim kpart, so it's theoretically possible to do: except whenev

  • by master_p ( 608214 ) on Monday December 06, 2004 @08:26AM (#11006793)
    Developing web applications is a nightmare, because the knowledge domain is too big and too heterogeneous.

    Ruby seems on the right track: the decision of not using thousands of XML configuration files but rather doing everything in code seems like heaven.
    • Just out of interest, which web developement systems use thousands of XML configuration files?
      There must be some awful uses of XML config files out there, because a lot of developers complain about it.

      I don't know much about it, but seems like they could have a use in some circumstances, and allowing users to edit those rather than strings in the code might be a Good Thing. This depends of course on them having a decent end-user XML editor, clear and succinct XML, and tools for processing XML for the progr
      • "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.

        • Thousands of files? Nah. Some files, with thousands of lines. Generated though, so what's the fuss?
          • But what's the point?

            Don't tell me you have a normal text config file that looks something like:

            param1=1
            param2=10.2

            And then you run it through something to convert it to XML, and then that is parsed by the java application...

            That'd be weird.

            I still don't get it - e.g. I used the XML style config files for configuring Jetty, and it's bitten me before when I tried to configure something in the XML style (after digging through all the docs and copying the styles). Didn't work, after checking on the mailin
    • Python Is Not Java [dirtsimple.org] is a good description of how to approach programming differently when using a dynamically-typed language. Pretty much everything it says applies to Ruby as well. One of the things it mentions is that in most cases where Java programmers use XML, it's to make up for the deficiencies of Java, and you express the same things using Python (or Ruby) source code, which is easier to work with and more general than any XML configuration.
      • Or, for that matter, Lisp. The first time I saw that argument it was someone claiming that XML was merely a weakened version of Lisp (well, of s-expressions, but basically that means lisp ... and he was saying this in a context that made this clear).
  • JRuby and RDT (Score:5, Informative)

    by Headius ( 5562 ) on Monday December 06, 2004 @08:46AM (#11006886) Homepage Journal
    As long as we're dumping Ruby links, I must plug a project I work on and a project I work with daily:

    JRuby [sf.net] 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 [sf.net] 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.
    • I'm curious, why reimplement Ruby in Java? What is the benefit of doing so?
      • by kahei ( 466208 ) on Monday December 06, 2004 @10:14AM (#11007431) Homepage

        Well, the trouble is that Ruby is a great language in search of a good implementation.

        The current Ruby implementation has various weaknesses -- primitive text support is the most mentioned one (you can't step through a string char by char, I kid you not). Lack of native threading (it uses weird homemade application-level threads) some concurrency issues (it's C with lots of static variables -- I may be very out-of-date here though) and integration problems (it's very much designed with a 'C and UNIX and nothing else' mindset) are also problematic.

        Thus, a port of Ruby to the Java or .net runtime, that kept the language intact but performed text processing, threading etc via those runtimes, would be absolutely amazing. The .net one stalled, though -- maybe the Java one is doing better.

        • by WayneConrad ( 312222 ) * <.wconrad. .at. .yagni.com.> on Monday December 06, 2004 @11:31AM (#11008061) Homepage

          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.)

        • irb(main):010:0> "hello".each_byte do |ch|
          irb(main):011:1* puts "%c" % [ch]
          irb(main):012:1> end
          h
          e
          l
          l
          o
          => "hello"

          Are you referring to something other than what I just demonstrated?
          • by kahei ( 466208 ) on Monday December 06, 2004 @11:49AM (#11008273) Homepage

            (this goes for both comments above)

            I'm referring to stepping through a string character by character -- I should have said that rather than 'char by char', which is open to misinterpretation. I meant 'text character' rather than a C 'char' type, which can indeed be done with 'each_byte'.

            For instance, a lot of strings contain Asian characters that are intrinsically more than 1 byte long, or combining characters which consist of a 'main' character and 1 (for most european languages) or more (for the nightmare that is Vietnamese) accent marks. To ruby, it's all just bytes -- if 64 A7 03 A7 04 means an 'a' with an acute accent and a dot, ruby will cheerfully give you those 5 seperate bytes and let you implement the concept of a character yourself.

            There are various libraries for Ruby that extend the string class to handle text in different languages and encodings, but this is still nothing like as good as just being able to get, set, read, write, and match characters, as I can in most other high-level environments. Unfortunately, while the concept of a text encoding is built into ruby, it is hardcoded with knowledge of a few particular encodings and it only uses them for IO -- in internal processing, it's welcome to the wonderful world of each_byte.

            All this would go away (along with many other issues) if there were an implementation of Ruby for some modern runtime environment such as Java.

            This situation and the discussions behind it is one of the things that inspired me to write this essay (which may or may not be interesting, I just mention it):

            http://www.jbrowse.com/text/unij.html

            • You have a good point...but Ruby isn't alone in having this problem. In fact most languages that I've encountered have it. Partially this is because it is so common for a language to assume that a character is a char, and this is largely for efficiency reasons (and historical reasons, admittedly).

              Currently D (Digital Mars D) is having a library built to address the problem, even though the language was designed with a wide character type. Stepping through a character string in an arbitrary character set
              • by kahei ( 466208 )
                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 data
                • If you are practicing "reading docs in Japanese", then I can understand why this would seem more important to you than it does to most people.

                  OTOH, I was surprised that in Ruby a characterwas, by default, an integer. And I can certainly sympathise with having strings be an array of chars, where chars were an appropriate number of bits long. But this would greatly slow down regexp handling, which is an important part of how Ruby operates. (I didn't know that full unicode ever required more than 32 bits f
                • So can Java classes be used within Ruby? If so, then why not figure out which ones need to be used to handle I18N/L10N on strings in a clever Ruby class?

                  Or, for Win32, identify which Win32 DLLs/Com objects need to be invoked to do it, etc.

        • You hit the nail on the head. While a Java implementation like JRuby isn't able to implement the full set of POSIX methods provided by Ruby, it is able to provide an entirely different VM. While JRuby still needs work in plent of areas, it already provides things like JVM/native threads for Ruby threads, integration with standard Java code, and easy access to the full J2SE library set.

          We've also started the process of (helping with) standardizing the "Rubicon" suite of unit tests that defined the Ruby "spe
  • by mrbnsn ( 24209 ) on Monday December 06, 2004 @09:27AM (#11007119)
    "a good programming tool for quickly developing a professional one off application"

    All well and good, but if your professional application is proprietary (non-open), you'll need a paid-up Qt licence to go with it.
    • Exactly. That's why I use other toolkits such as the Tk Ruby extension. Then the GTK Glade stuff is out there as well for Ruby. Plus Fox, Wx, et. al. To me the Qt licensing makes me wary.

      There also a good IDE called Widestudio [widestudio.org]. It's a large download (over 100MB) because it comes with installs for Python, Perl and Ruby. But it's a good tool for creating effective GUI applications.

    • Not if you do in-house software. Then you can use GPL just fine and not release your sources. If you are planning to sell your software for a living, but can't afford the relatively modest fee of commercial Qt, then you should REALLY reconsider your career-options.

      Do carpenters get free tools? No, they have to buy them. And if their products are good enough, they can easily afford them. If your software is so crappy that you can't afford Qt, may I suggest different career?
  • I've been getting into wxPerl as I've decided it's gained critical mass and you can do real things with it. Of course some functions are still getting filled out but it has a great mailing list and it is fun.

    Seems to me it would be really interesting if there was a wxRuby and a way to package the wxRuby app. Perhaps when parrot is finished this will be a ring to bind them?
    • Re:wx..Ruby? (Score:1, Interesting)

      by Anonymous Coward
      Have a look at the WxRuby homepage [rubyforge.org]. I've used this before for coding up a frontend for a Ruby game and it has worked very well for me. I was also able to package it up into one binary via RubyScript2Exe [erikveen.dds.nl] and ExeRb [sourceforge.jp] which was important for me.
  • <nitpic>Yeah, um, it's just Java, a word, not JAVA. It's not an acronym for anything, like SQL (Standard [English] Query Language). It's not all caps for no good reason, like .NET. It's not even a witty recursive acronym like GNU (GNU is Not Unix) or PHP (PHP Hypertext Preprocessor). Just a word for coffee commandeered for another use.</nitpic>
  • Can someone please tell me what the advantage of Ruby+Qt is? I'm not knocking open source. I can see lots of use for commodity/infrastructure software. In fact I plan to open source a CRUD tool I needed to build for a project. But to pay the bills, I need to develop vertical. $1550+ [trolltech.com] seems a little steep just to maintain my intelectual advantage. Especially when I can do it for $379 [amazon.com].
  • Where's the flowchart preprocessor for KDevelop? I need to whip out flowcharts to snag marketdroid budget slices, then compile the flowcharts into Ruby or Perl for prototypes, then all the way "down" to C++ or Java. In the same IDE, showing the flowcharts back to the marketdroids in demos at every step, to keep their ADD nailed to their check-signing hand.
  • by _am99_ ( 445916 ) on Monday December 06, 2004 @11:54AM (#11008332)
    I learned Python last winter and have not looked back to Java despite being a Java programmer since it was in wide-distribution.

    And since Python makes win32 programming easy for those who don't use Visual Studio, I have learned to be a Windows programmer over the last couple of weeks.

    What do I gain over Python by switching to Ruby? I see a lot of explainations, but as far as I can tell, in addition to the awesomeness of Python's language and libraries, these are the things that I need that I can't seem to find in Ruby(but might not be looking in the right place):

    1) Java byte-code compiling (jython)
    2) full win32 APIs
    3) full win32 COM access
    4) Complete Object Database implementation (ZODB)
    5) List-comprehension

    Someone please educate me on the advantages of Ruby over Python. Cause right now, it is hard to imagine a better language than the snake!
    • The advantages right now are mostly not pragmatic, but aesthetic. Programming with anonymous functions, closures, and higher order functions is more convenient in Ruby. The OO model seems better thought out.

      JVM implementation: http://jruby.sourceforge.net/

      Win32 support:
      http://www.rubycentral.com/book/win32.h t ml

      Object DB: http://www.garret.ru/~knizhnik/dybase.html (I don't know anything about this one, just found it on Google)

      List comprehension: Ruby blocks are a more general (and IMO more elegant) me
  • by Copley ( 726927 ) on Monday December 06, 2004 @12:09PM (#11008463)
    You have to read this. It's more than an intro to Ruby... It's a mini adventure!

    Why's Poignant Guide to Ruby [poignantguide.net]

    Those foxes! That cat! The crazy goat!
  • 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 reli
  • I know its rumored.. anyone have any facts?

"Hello again, Peabody here..." -- Mister Peabody

Working...