Where does ruby excel?

I have only used ruby for writing little scripts. Things that are
typically done using Perl/awk/bash… Ruby has the potential for much
more, but there doesn’t seem to be a problem domain where it truly
excels. Maybe Rails, but that’s a bit controversial (would it carry
large websites like Amazon or Facebook?).

On the client side Javascript seems to be the big winner. It is the
plugin language for Firefox, and in the future it may even become a
standard choice for desktop software development (with Adobe Air).

So where is ruby nowadays? For what kind of software would ruby be the
programming language of choice?

Dolazy wrote:

So where is ruby nowadays? For what kind of software would ruby be the
programming language of choice?

As a high-level API wrapper (or domain-specific language) around some C
library.

Dolazy wrote:

So where is ruby nowadays? For what kind of software would ruby be the
programming language of choice?

Well, certainly Rails is a large part of it, but I would say that the
second biggest “almost-killer-app” for Ruby is in test/behavior driven
development. I haven’t looked very hard, but I don’t know of anything
that comes close to RSpec that is written in another language.

Another area where I think Ruby is the language of choice is when you
need to create an “internal” domain-specific language. It used to be if
you wanted to do something like that, you pretty much had to use
Lisp/Scheme or Forth, and in many cases require your users to adapt to
Lisp/Scheme parenthesized prefix or Forth postfix notation.

2008/6/21 Dolazy [email protected]:

I have only used ruby for writing little scripts. Things that are
typically done using Perl/awk/bash… Ruby has the potential for much
more, but there doesn’t seem to be a problem domain where it truly
excels. Maybe Rails, but that’s a bit controversial (would it carry
large websites like Amazon or Facebook?).

Rails carries Twittr, apparently, and that’s pretty huge - there are
plenty of examples of high volume Rails sites (shameless plug:
traveliq.de, is one German example). It scales better than people
generally seem to think, and it’s (arguably) infinitely easier to
maintain large well-written Rails apps than those written in some
other configuration-heavy frameworks. Rails isn’t perfect, but God
knows Struts aren’t either.

On the client side Javascript seems to be the big winner. It is the
plugin language for Firefox, and in the future it may even become a
standard choice for desktop software development (with Adobe Air).

Client-side ruby (in the context of the web) doesn’t really make much
sense, and it’s usually safest to assume that the ubiquitous
browser-embedded technology is Javascript. But conversely, despite
Netscape’s hard work, server side Javascript is pretty rare.

So where is ruby nowadays? For what kind of software would ruby be the
programming language of choice?

Choice is a big word. :slight_smile: Ruby would be my choice for any application
where I didn’t rely on an end-user to already have it installed. This
includes server-side web apps, internal tools such as build systems,
and large user-applications where bundling a Ruby with the
distribution wouldn’t seem like overkill. If you’re more comfortable
in another language, then that should be your choice. Or if you can’t
find a Ruby binding to a required library (and don’t want to write
one), then go with a language for which such a binding exists. And if
you’re writing an inter-continental ballistic missile launch
controller, just make sure you have every line of code tested.

Ruby has the potential for much more, but there doesn’t seem to
be a problem domain where it truly excels.

Any place perl is used, ruby beats it with ease.

Personally I never understood people who claim to use the right tool for
the right job is the proper thing - and using 20 different solutions to
achieve this with archai unix solutions.

On the client side Javascript seems to be the big winner.

Ruby as a language - including practical and from a language design
point of view - beats Javascript every time.

That Javascript is a web-browser language only is a huge disadvantage. I
have yet to see gtk widgets in Javascript. In ruby, piece of cake.

It is the plugin language for Firefox, and in the future it may
even become a standard choice for desktop software
development (with Adobe Air).

In the future it might conquer the world, but ruby is a better choice
until that day. And when that day comes, I want to use ruby instead of
javascript, even if this means that only other people who have
ruby can “benefit” from it - I guess writing perl or php can be
more annoying than writing in javascript, but javascript soon follows
these languages.

(Ob. Disclaimer: I use Ruby for most of my programming except where
Erlang does the job better.)

On Mon, 2008-06-23 at 02:36 +0900, Marc H. wrote:

Ruby has the potential for much more, but there doesn’t seem to
be a problem domain where it truly excels.

Any place perl is used, ruby beats it with ease.

Except speed.

Personally I never understood people who claim to use the right tool for
the right job is the proper thing - and using 20 different solutions to
achieve this with archai unix solutions.

Just like I never understood why automobile mechanics need a toolbox
that’s taller than them with literally hundreds of tools in it, some of
them really super-specialized. Surely they can do all their work with a
hammer, a screwdriver and a wrench, right?

On the client side Javascript seems to be the big winner.

Ruby as a language - including practical and from a language design
point of view - beats Javascript every time.

Personally I prefer JavaScript’s prototype object system over Ruby’s …
pretty damned odd hybrid system. Ruby’s singleton classes, for example,
look to me an awful lot like a kludge hacked on to give capabilities
that come out of the box for prototype-based systems.

That Javascript is a web-browser language only is a huge disadvantage.

That would indeed be a huge disadvantage were it true. But oddly
enough, I have no fewer than three different ECMA-conforming JavaScript
implementations sitting on my hard drive right now without a browser in
sight when I use them. (And that would be another advantage JavaScript
has over Ruby: an actual standard that defines the language and its
semantics along with several different implementations that conform –
sometimes roughly – to that standard. My dream is for Ruby to have
fully-defined semantics enshrined in a standard somewhere someday – ISO
or ECMA or even something semi-proprietary: as long as it is actually
defined by more than inscrutable C code.)

I have yet to see gtk widgets in Javascript. In ruby, piece of cake.

http://trac.webkit.org/wiki/BuildingGtk
http://www.ibm.com/developerworks/linux/library/l-sashxb/

I humbly submit that you haven’t seen them because you’ve allowed
prejudice to make you not look for them. It took me less than five
minutes of googling and hitting links to find the above stuff.

On Mon, 2008-06-23 at 18:07 +0900, Robert D. wrote:

That Javascript is a web-browser language only is a huge disadvantage.

I humbly submit that you haven’t seen them because you’ve allowed prejudice
to make you not look for them. It took me less than five minutes of
googling and hitting links to find the above stuff.

Good point Michael but would you mind sharing the links ;)?

I… did? At least according to my “sent items” folder, the message I
posted had:

  * 

* BuildingGtk – WebKit
* IBM Developer
* The Open Software Wiki - SWiK

Are the links just not showing up in your client for some reason?

On Mon, Jun 23, 2008 at 4:50 AM, Michael T. Richter
[email protected] wrote:

Personally I prefer JavaScript’s prototype object system over Ruby’s …
Agree 100%
pretty damned odd hybrid system. Ruby’s singleton classes, for example,
look to me an awful lot like a kludge hacked on to give capabilities that
come out of the box for prototype-based systems.
Although I feel “damned odd” exaggerated, I guess people are pretty
much aware of the shortcomings
of mixins and traits were not around when Ruby was created. When it
comes to singleton classes I rather
like them, but you are right that they would not be needed in a
prototyped class system and neither in
a traited system as long as traits are allowed to be applied to any
object.
Now I see the advantage of traits over prototypes in the simple,
single feature of conflict resolution.

That Javascript is a web-browser language only is a huge disadvantage.

I humbly submit that you haven’t seen them because you’ve allowed prejudice
to make you not look for them. It took me less than five minutes of
googling and hitting links to find the above stuff.
Good point Michael but would you mind sharing the links ;)?

Cheers
Robert


http://ruby-smalltalk.blogspot.com/


Les mêmes questions qu’on se pose
On part vers où et vers qui
Et comme indice pas grand-chose
Des roses et des orties.

Francis Cabrel

On Saturday 21 June 2008 08:08:34 Dolazy wrote:

I have only used ruby for writing little scripts. Things that are
typically done using Perl/awk/bash… Ruby has the potential for much
more, but there doesn’t seem to be a problem domain where it truly
excels. Maybe Rails, but that’s a bit controversial (would it carry
large websites like Amazon or Facebook?).

Answer: It already does, to some extent.

The trick is, first of all, programmer time is more important than
performance. If you can throw another ten servers at a problem instead
of
another ten developers, that is a massive win.

And second, Rails is designed to encourage a share-nothing style of app,
which
makes it horizontally scalable. That means you can actually just throw
more
hardware at the problem. Obviously, it’s more complex than that in
practice,
but nothing as big as Amazon or Facebook will ever work without being
horizontally scalable.

On the client side Javascript seems to be the big winner. It is the
plugin language for Firefox, and in the future it may even become a
standard choice for desktop software development (with Adobe Air).

That hasn’t happened yet. Until it does, we still have things like Shoes
for
true desktop apps, and various tweaks to get Ruby into JavaScript.
There’s
already IronRuby, for .NET, which means you could theoretically use Ruby
in
Silverlight, and I’d be surprised if no one ports Ruby to Tamarin, which
is
the bytecode engine used for Javascript/Actionscript in Flash (and in
future
versions of Firefox).

For what kind of software would ruby be the
programming language of choice?

Anywhere I can – I like the syntax. What I would ask is, for what kind
of
software would ruby not be suitable for?

I have three answers:

First, anywhere that you can’t actually run Ruby right now. For now,
it’s
better to write the client side of a web app in Javascript – but that’s
no
reason the server side can’t be Ruby.

Second, anywhere performance on a given set of hardware is important.
You
might well write a word processor or a spreadsheet in Ruby, but you
probably
wouldn’t write a fast-paced first-person-shooter in Ruby – at best, you
might use Ruby to script it, once the engine has been written in C/C++.
And
many embedded controllers would physically not be able to load the Ruby
interpreter, let alone an app.

And third, anywhere you actually need to work at a low-level – in C or
ASM.
Things like bootloaders, device drivers, and bytecode compilers are
probably
not practical in Ruby – and this is also generally an area where #2
applies
as well. (If you want the game to run fast, the video driver must be
fast as
well.)

As a side note, if a project has a very tight deadline, it might make
sense to
use whatever currently has the libraries you need. If something exists
on
CPAN, but not in Rubygems, you’ll be using Perl. But that’s mostly
related to
#1 – things Ruby hasn’t been ported to, or things which haven’t been
ported
to Ruby.

What does that leave?

Quite a lot, actually. I plan to write a filesystem in Ruby. It doesn’t
need
to be fast, as I know for a fact that the underlying medium will be very
slow
(recordable DVDs) – and I can use the Ruby FUSE bindings.

On Mon, Jun 23, 2008 at 3:10 PM, Michael T. Richter
[email protected] wrote:
you probably did and I missed it, thx for reposting them.
Cheers
Robert

David M. wrote:

The trick is, first of all, programmer time is more important than
performance. If you can throw another ten servers at a problem instead of
another ten developers, that is a massive win.

For some business models, this may be true. In general, it is not. If
you do not pay attention to performance in your design process, then
your “ten developers” are not earning their keep.

systems engineers (or anyone asked to choose software) usually go with a
nice combo of performance and “reputation” of the vendor/software… in
big
(gov) shops, rep wins A LOT.

On Sat, Jun 28, 2008 at 5:43 PM, John J. <
[email protected]> wrote:

For some business models, this may be true. In general, it is not. If you
While there are lots of things that “work”, sensible software design
decisions will always be better decisions.

Think about systems engineers… they’re almost always going to choose
software performance.


Aloha!

Mike McKinney
(http://blog.huikau.com)

On Jun 21, 2008, at 7:08 AM, Dolazy wrote:

So where is ruby nowadays? For what kind of software would ruby be the
programming language of choice?

anything which requires high level abstraction - ruby is easily in a
hand-full of languages which allow the programmer to reason over
complex problem domains with a significantly lower mental effort.
anytime you have a hard problem it’s good to start in ruby - if you’re
lucky you can stay there.

a @ http://codeforpeople.com/

On Jun 28, 2008, at 3:02 PM, M. Edward (Ed) Borasky wrote:

David M. wrote:

The trick is, first of all, programmer time is more important than
performance. If you can throw another ten servers at a problem
instead of another ten developers, that is a massive win.

For some business models, this may be true. In general, it is not.
If you do not pay attention to performance in your design process,
then your “ten developers” are not earning their keep.

Basically, Ed is spot on with this.
While there are some cases where more hardware is a more practical
solution than more programmers, good programming will rule the day
most of the time. (microsoft is the exception that comes to mind
most…)

While there are lots of things that “work”, sensible software design
decisions will always be better decisions.

Think about systems engineers… they’re almost always going to choose
software performance.