Where do you use Ruby?

  • Thread starter PÃ¥l Bergström
  • Start date
P

Pål Bergström

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?
 
S

Suraj Kurapati

Pål Bergström said:
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.
 
P

Pål Bergström

Suraj said:
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 :) ). What about Eclipse?
 
R

Richard Conroy

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 :) ). 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 cli=
ents,
SNMP tools, database clients .... etc. etc. etc.

Where Ruby really shines is at the lower end of the scale, where I can writ=
e
complex applications in days or less. Java or C equivalents would take week=
s
or possibly months.
 
P

Pål Bergström

Richard said:
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?
 
R

Robert Dober

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

--=20
We have not succeeded in answering all of our questions.
In fact, in some ways, we are more confused than ever.
But we feel we are confused on a higher level and about more important thin=
gs.
-Anonymous
 
R

Richard Conroy

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-acceptabl=
e.

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

David Roberts

Pål Bergström said:
So, my question is; what is Ruby for?

"Donuts. Is there anything they can't do?" - Homer Simpson

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

Richard Conroy

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

Pål Bergström

SonOfLilit said:
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 Saraf

(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?
 
D

Dave Rose

Very said:
So, my question is; what is Ruby for?

"Donuts. Is there anything they can't do?" - Homer Simpson

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

Pål Bergström

Pål Bergström said:
(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. :)
 
M

M. Edward (Ed) Borasky

Richard said:
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.
 
F

Francis Joanis

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

Cheers,
Francis Joanis
 
B

Bira

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.



--=20
Bira
http://compexplicita.blogspot.com
http://sinfoniaferida.blogspot.com
 
V

Vladimir Konrad

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

* 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
 
R

Rebhan, Gilbert

=20
Hi,
question is; what is Ruby for?

as a RubyNewbie (coming from Java)
i don't know much about Ruby, but =3D

I'm using Ruby with JRuby 0.9.2 and <script>
task in ant scripts, as JRuby runs in
BSF (Bean Scripting Framework)=20
Works great :)

Before i used javascript (via Rhino), groovy, beanshell
but then i discovered Ruby ...

Beside that, i try to use Ruby whenever possible for all
other stuff (scripting Windows ...)

Regards, Gilbert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,234
Messages
2,571,178
Members
47,809
Latest member
Adisty

Latest Threads

Top