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.
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
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
A Starkit (http://equi4.com/starkit.html) 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 (http://wiki.tcl.tk/3663).
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
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.