Where do you use Ruby?

As I get myself more and more into Rails, and Ruby, I wonder in what
other areas I can use Ruby, it’s such a wonderful language. So, my
question is; what is Ruby for?

Pål Bergström wrote:

As I get myself more and more into Rails, and Ruby, I wonder in what
other areas I can use Ruby, it’s such a wonderful language.

I use it to help me design, develop, and verify hardware modules written
in the Verilog language. In particular, it lets me apply agile
development practices like TDD and BDD to the otherwise grim world of
hardware development. See http://ruby-vpi.rubyforge.org for details.

Suraj K. wrote:

Pål Bergström wrote:

As I get myself more and more into Rails, and Ruby, I wonder in what
other areas I can use Ruby, it’s such a wonderful language.

I use it to help me design, develop, and verify hardware modules written
in the Verilog language. In particular, it lets me apply agile
development practices like TDD and BDD to the otherwise grim world of
hardware development. See http://ruby-vpi.rubyforge.org for details.

Is this a similar approach like CocoaRuby? In the case of CocoaRuby I’m
not sure why you wouldn’t develop directly in Cocoa. Seems like a rather
simple language to learn. Can Ruby be used more directly to develop apps
(sorry for my rudimentary knowledge :slight_smile: ). What about Eclipse?

Richard C. wrote:

What about Eclipse? Thats just a development tool.

Ruby is a programming language. Its got libraries for networking, file
manipulation,
database access, text processing, graphics processing, GUIs etc.

In short you can use it to make applications that you would normally
make
in another language. (as to which is better, thats an argument for when
you
have decided on the project).

Examples would include e-mail clients, productivity scripts, bittorrent
clients,
SNMP tools, database clients … etc. etc. etc.

Where Ruby really shines is at the lower end of the scale, where I can
write
complex applications in days or less. Java or C equivalents would take
weeks
or possibly months.

I’m learning Ruby via RoR, for developing a web application. But what if
I want to do a “normal” application using Ruby, how do I do that? What
tools are there for building a GUI and connect that to Ruby?

On 2/14/07, Pål Bergström [email protected] wrote:

Is this a similar approach like CocoaRuby? In the case of CocoaRuby I’m
not sure why you wouldn’t develop directly in Cocoa. Seems like a rather
simple language to learn. Can Ruby be used more directly to develop apps
(sorry for my rudimentary knowledge :slight_smile: ). What about Eclipse?

Eclipse hmm, good question.

I recall that there was a recent thread with a very good pointer to
why some tools work great with Java and C# and not so great with
highly dynamic languages.
Not surprisingly after all.
Just imagine what you know about the methods of an object in Java just
by parsing the code and what you know about the methods of an object
in Ruby just by parsing the code!

It basically boils down that you loose some of the functionalities of
Eclipse when using with ruby. I tried it and I really thought it was
not worth the effort.
But if you are already using Eclipse you might still find it the best
way to manage your ruby projects of course.

I just use vim and svn but I have small projects - so far;).

Cheers
Robert

On 2/14/07, Pål Bergström [email protected] wrote:

Is this a similar approach like CocoaRuby? In the case of CocoaRuby I’m
not sure why you wouldn’t develop directly in Cocoa. Seems like a rather
simple language to learn. Can Ruby be used more directly to develop apps
(sorry for my rudimentary knowledge :slight_smile: ). What about Eclipse?

What about Eclipse? Thats just a development tool.

Ruby is a programming language. Its got libraries for networking, file
manipulation,
database access, text processing, graphics processing, GUIs etc.

In short you can use it to make applications that you would normally
make
in another language. (as to which is better, thats an argument for when
you
have decided on the project).

Examples would include e-mail clients, productivity scripts, bittorrent
clients,
SNMP tools, database clients … etc. etc. etc.

Where Ruby really shines is at the lower end of the scale, where I can
write
complex applications in days or less. Java or C equivalents would take
weeks
or possibly months.

Pål Bergström wrote:

So, my question is; what is Ruby for?

“Donuts. Is there anything they can’t do?” - Homer S.

Might it be a shorter list to say what Ruby CANNOT be
used for?

On 2/14/07, Pål Bergström [email protected] wrote:

I’m learning Ruby via RoR, for developing a web application. But what if
I want to do a “normal” application using Ruby, how do I do that? What
tools are there for building a GUI and connect that to Ruby?

By a ‘normal’ application, I take it that you mean some kind of PC
runnable application that the user manually launches, and has some
kind of windows interface?

To get windowed apps in Ruby you need to use a windowing toolkit.
By default you use Tk, and Ruby has built in libraries to work with it.
Tk isn’t exactly the prettiest option, and you will quickly start
seeking
out others that:

  • Have some kind of visual form designer
  • Look aesthetically pleasing when you put the effort in
  • Look native on the different OSes
  • Are easy to use from Ruby
  • Are not a b*tch to get set up an working

The following are the windowing toolkits that are frequently discussed
here (not an exhaustive list of options):

  • Gtk/Gtk+
  • Qt
  • FxWidgets

I don’t know anything about the form designers for any of these, but
Qt is the prettiest by reputation, though it has byzantine installation/
legal issues for windows use. Gtk/Gtk+ is pretty stable and ubiquitous,
but its not pretty, and I have found it murder to install on windows for
some Ruby apps that require it. FxWidgets gets a lot of attention
for multi-platform development, I have never had issues getting it
installed on Windows, and it looks respectable (if very Win2K-like)
though I believe there are recent clashes between it and the latest
Ruby 1-click builds.

My experience with Ruby UI development is exclusively on windows
and very minimal, but installing windowing toolkits on windows in
the first place is a very unusual activity, and not very
customer-acceptable.

I don’t know if there are any Ruby specific libraries that let you use
native window toolkits like on Windows or Mac OS X.

Richard C. wrote:

On 2/14/07, P�l Bergstr�m [email protected] wrote:

I don’t know if there are any Ruby specific libraries that let you use
native window toolkits like on Windows or Mac OS X.

Thanks.

Anyone knows if Xcode can be used – besides using CocoaRuby?

Hi,

I haven’t done anything serious with it, but if you’ve got Xcode
installed when you install Ruby, it will add templates or whatever
that is called (as I said, don’t really know what I’m talking
about…) to Xcode and you can develop applications with Ruby.
(That’s true on Mac OS 10.3 and using DarwinPorts to install Ruby…)

I’ve read one tutorial which explains how to develop a simple
application using Xcode, Interface Designer and Ruby. It works for me.
Part 1 is at http://www.onlamp.com/pub/a/mac/2004/10/05/cocoa.html and
part 2 at http://www.onlamp.com/pub/a/mac/2004/10/12/cocoa.html

Regards,
Thomas

2007/2/14, PÃ¥l Bergström [email protected]:

On 2/14/07, Robert D. [email protected] wrote:

Eclipse hmm, good question.

I recall that there was a recent thread with a very good pointer to
why some tools work great with Java and C# and not so great with
highly dynamic languages.
Not surprisingly after all.

Basically static typing means that you can make intellisense and
method prediction work easily, as those languages are deterministic.
Ditto with refactoring.

IIRC one of the Ruby-in-Visual Studio projects (the main one, name
escapes me -Steel? , apologies to those concerned) made a big
point about this - that they basically had to run a ruby interpreter
in the background to know what types were actually being used
in a particular scope, vs what types could be used. A considerable
challenge, and they are still not deterministic.

Just imagine what you know about the methods of an object in Java just
by parsing the code and what you know about the methods of an object
in Ruby just by parsing the code!

By code parsing in Ruby, you can basically enumerate the methods and
their argument lists, thats it.

It basically boils down that you loose some of the functionalities of
Eclipse when using with ruby. I tried it and I really thought it was
not worth the effort.

Nods - at its core, the eclipse ruby plugins boil down to being an
editor

  • project view. If you got mixed source projects (Java web stuff + WATIR
    web tests) you retain some utility, and Windows users don’t have a lot
    of real options wrt Ruby tools, which does artificially inflate the case
    for eclipse.

RadRails deserves a lot of attention, but what is good for Rails
development
isn’t always good for pure Ruby development.

But if you are already using Eclipse you might still find it the best
way to manage your ruby projects of course.

Well we already use eclipse, and find eclipse insufficient for managing
Ruby projects. I don’t expect it to stay that way, but for now my ruby
tools are a bit stone age.

XCode CAN be used, but I’m not sure you’ll get much benefit out of using
it
in comparison with any text editor, for example.

I think Ruby is best developed with emacs/vi/textmate and a command
line,
and that’s not gonna change soon. (just my opinion),

Aur S.

SonOfLilit wrote:

XCode CAN be used, but I’m not sure you’ll get much benefit out of using
it
in comparison with any text editor, for example.

I think Ruby is best developed with emacs/vi/textmate and a command
line,
and that’s not gonna change soon. (just my opinion),

Aur S.

(My knowledge in “true” application programming is really low, so bear
with me.)

But what about the GUI, well that’s just a matter of design, but
Windows? Is CocoaRuby needed here?

Very funny David R. wrote:

So, my question is; what is Ruby for?

“Donuts. Is there anything they can’t do?” - Homer S.

Might it be a shorter list to say what Ruby CANNOT be
used for?
…here at work this post is now posted because ‘Homer’
is our (IT) unoffical mascot …very funny…but…
#3 of my yearly tasks is to convert all of VPRO5 Basis Basic
programs to Ruby…essentially these are all script like
programs that access our Oracle billing package with “required outside”
interfaces…

Pål Bergström wrote:

(My knowledge in “true” application programming is really low, so bear
with me.)

But what about the GUI, well that’s just a matter of design, but
Windows? Is CocoaRuby needed here?

To correct myself; it’s RubyCocoa and nothing else. :slight_smile:

Richard C. wrote:

I don’t know if there are any Ruby specific libraries that let you use
native window toolkits like on Windows or Mac OS X.
I don’t know anything about Macs, but I would assume that the various
Ruby .NET/CLR interfaces could do native Windows GUIs. And jRuby can do
“native” Java GUIs anywhere the Java Virtual Machine runs. Now on Linux,
pretty much all of the GUI toolkits are “native”, but the two most
common are Gnome’s GTK and KDE’s Qt.

The level of integration available between Ruby and Qt/KDE on a Linux
box is simply amazing IMHO. You have Qt, of course, and QtRuby, but
there is also Korundum, which adds a KDE API layer, and Kommander, which
is a QtDesigner interface for Ruby and other scripting languages. Then
there’s KDevelop and Quanta IDEs/web design frameworks. These tools are
starting to find their way into the Windows world via Cygwin, including,
IIRC, large chunks of KDE itself.

By the way, I ended up getting a Komodo license (on Linux) because I
found it easier to use than KDevelop as a scripting language IDE. It
definitely runs on Windows and if you use the recommended ActiveState
Tcl/Tk, Perl, Python, Tcl/Tk and Ruby GUI development are quite seamless
across all the places where ActiveState runs. The ActiveState Tcl/Tk
widgets look much less ratty than some of the other versions of Tcl/Tk
IMHO.


M. Edward (Ed) Borasky, FBG, AB, PTA, PGS, MS, MNLP, NST, ACMC§
http://borasky-research.blogspot.com/

If God had meant for carrots to be eaten cooked, He would have given
rabbits fire.

Hi gang,

Back on the original question, I primarily use Ruby as a platform to
develop tools like parsers and data translators, whenever I need them.
I’ve been using Perl and sometimes Python for these tasks, but I think
Ruby really shines in the “time required to materialize idea” area.
The more I use it, the more I “think” in Ruby when developing my tools
and the less time I need to make them work.

I also think that Ruby is a wonderful language for a scriptable test
system. I’ve been asking myself in the past “How could I make that
[c++] test app scriptable? How could I embed a scripting language into
it?”. It turned out pretty much every time that the easiest/more
flexible solution was to extend Ruby with my own c++ test extension so
that my test lib is now scriptable with all the power of Ruby.

And talking about Ruby editors, I mostly use Vim (both on
Windows/Linux/MacOS), but then… I’m pretty much a Vim-head anyway :slight_smile:

Cheers,
Francis Joanis

On 2/14/07, Pål Bergström [email protected] wrote:

As I get myself more and more into Rails, and Ruby, I wonder in what
other areas I can use Ruby, it’s such a wonderful language. So, my
question is; what is Ruby for?

Tough I work at a mostly-Java shop, I’ve managed to sneak Ruby (and
Rake) in as a tool for code generation, in order to save some typing.
Things like padding a long SQL query with StringBuffer.append calls
for insertion into a JDBC class, or unwrapping it from the same for
direct testing.

I use Ruby to write quick & effective vendor synchronization scripts
since I
can ftp, email, parse files, etc in a relatively small amount of code
and
the code is testable and just plain slick.

http://www.jason-palmer.com/

what is Ruby for?

i wrote a couple of things with ruby:

  • netcdf file data normalisation and import to postgresql database -
    ~100_000 files and 500_000_000+ records (the data import is still going
    on :wink:

  • linux pam module to block repeated failed attempts of ssh login (used
    in production)

  • database interface to postgresql using gtk and postgresql (ongoing
    project, personal use)

  • played with wrapping metakit using swig

vlad

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs