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.
"
"
With so many other languages out there, why bother with Ruby?
s tE xample
Perhaps an example would be best.
http://www.rubyonrails.org/show/AccessControlLi
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/
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.
As long as we're dumping Ruby links, I must plug a project I work on and a project I work with daily:
/. for more information and links.
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
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)
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:
Or use String.scan:
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:
And now...
(Please excuse the lack of indenting. /. and I can't seem to agree on how to make indenting work.)
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