What can Ruby offer?

I have been looking into the Ruby language for awhile now…reading
lots of information on its capabilities and whatnot. I bought the
Programming Ruby book as well to look into it some more. What blurs the
lines is information on Ruby and Ruby on Rails.

I’m just wondering if Ruby has the capability to create PROGRAMS in the
sense that say that I want to develop a multimedia program like a music
player, Can Ruby build a music player that doesn’t require installations
of ruby to be on the existing system? I know pretty much all *nix
systems have ruby installed by default, but I don’t like the sound of
developing a music player that acts like a script and requires an
existing installation of Ruby on said system.

I know it can call and access native APIs on the platforms it’s
available on but can such a program be done with Ruby? I’m really into
multimedia and I see myself developing multimedia applications.

I just don’t understand the capabilities of Ruby and what should this
tool be used for?

Smokey The B. wrote:

Can Ruby build a music player that doesn’t require installations
of ruby to be on the existing system?

As a script language, Ruby needs the interpreter to be installed. Tha
same happens with Perl, PHP and so on.

But you can use some tools that transform your ruby script to a
standalone executable.

On 11/25/06, Smokey The B. [email protected] wrote:

developing a music player that acts like a script and requires an
existing installation of Ruby on said system.

I know it can call and access native APIs on the platforms it’s
available on but can such a program be done with Ruby? I’m really into
multimedia and I see myself developing multimedia applications.

I just don’t understand the capabilities of Ruby and what should this
tool be used for?

Ruby is an interpreted programming language. That means that it
requires a runtime component (the interpreter and the set of standard
libraries) at execution time. This it the same for other interpreted
languages such as Perl or Python, and not dissimilar for things like
Java or C# (they both require a virtual machine to execute).

If you want to distribute Ruby programs to users that are unlikely to
have a working Ruby installation, have a look at Ruby2Exe, which can
package up the runtime and all required libraries.

Unless you are writing in C or some other compiled language, you will
always need some sort of runtime. And even with compiled languages,
more often than not you will need to bundle a certain set of libraries
with your application, which - depending on what the application does

  • can be fairly sizeable as well.

As for multimedia applications - depends on what you men by that. If
you are talking about a real-time video compositing system or live
audio effects, Ruby won’t help you much.

If what you want to do is create a music player with a nice shiny UI,
and you will rely on existing OS capabilities or third-party libraries
for the numerical heavy lifting (mp3 decoding, etc.), then yes, Ruby
can do that.

Cheers,
Max

Max M. wrote:

On 11/25/06, Smokey The B. [email protected] wrote:

developing a music player that acts like a script and requires an
existing installation of Ruby on said system.

I know it can call and access native APIs on the platforms it’s
available on but can such a program be done with Ruby? I’m really into
multimedia and I see myself developing multimedia applications.

I just don’t understand the capabilities of Ruby and what should this
tool be used for?

Ruby is an interpreted programming language. That means that it
requires a runtime component (the interpreter and the set of standard
libraries) at execution time. This it the same for other interpreted
languages such as Perl or Python, and not dissimilar for things like
Java or C# (they both require a virtual machine to execute).

If you want to distribute Ruby programs to users that are unlikely to
have a working Ruby installation, have a look at Ruby2Exe, which can
package up the runtime and all required libraries.

Unless you are writing in C or some other compiled language, you will
always need some sort of runtime. And even with compiled languages,
more often than not you will need to bundle a certain set of libraries
with your application, which - depending on what the application does

  • can be fairly sizeable as well.

As for multimedia applications - depends on what you men by that. If
you are talking about a real-time video compositing system or live
audio effects, Ruby won’t help you much.

If what you want to do is create a music player with a nice shiny UI,
and you will rely on existing OS capabilities or third-party libraries
for the numerical heavy lifting (mp3 decoding, etc.), then yes, Ruby
can do that.

Cheers,
Max

Even though Ruby is an interpreted language, its packaging capabilities
could certainly borrow something from Tcl’s starpacks. Tcl’s starpacks
leverage starkits which leverage Tcl’s VFS (see
http://wiki.tcl.tk/2138).

The VFS support allows for virtualizing the file system calls to more
naturally program things that are remote (HTTP or FTP) and local (zip
and tar files). Using this functionality, the Tcl community was able to
create starkits (originally with zip files and now with metakit
(Metakit embedded database library) files).

A Starkit (Starkit deployment technology) creates the illusion of a
“file system in a file” - on the outside, it’s a single file, yet the
application code continues to see a complete directory of scripts,
extensions, packages, images, and whatever other files it needs.
Starkits can be multi-platform.

After the success of starkits, they were able to wrap up everything into
a single executable that they call starpacks (Starpack).
This allows for the delivery of an application as a single file that,
for the most part, does not need to be unpacked to temporary locations
because the Tcl core has VFS that allows it to look introspectively into
the executable.

I am not bashing Ruby. I love the clarity of the language and wish that
packaging could be made as simple. RubyScript2exe is a good start;
however, it would be great if a more robust solution were available to
allow for clean packaging of Ruby applications.

Thanks,
Oleg