Nathan Koren wrote:

> I'm trying to figure out if Ruby is the right language for a project
> that I'm working on, and I'd appreciate any advice that anyone can
> give me.  First, some background about myself and this project:
>
> * Depending on who you talk to, I either am or am not a "real"
> programmer.  I have no formal training, and although I have extensive
> experience in scripting languages like Bash, application-specialized
> LISPs, Matlab, and especially PHP, I've never programmed in a "real"
> relatively low-level language.  Nor am I particularly eager to.

The distance between low and high level in languages gets greater all the
time - from microcode and writable instruction sets to app-specific macro
languages.

Ruby can be used as a high-level macro language. For example, this code
draws a T:

tubes.longer(5).tube.tube.shorter.
    push.right.tube.pop.
    left.tube

Each command is actually a method (on 'tubes') that creates an object. Later
code will traverse the array of objects, executing each one. This makes Ruby
the scripting language for a Ruby project, via the 'eval' method. It takes a
string of Ruby code and executes it.

http://flea.sourceforge.net/reference.html

Put another way, one could write a sufficiently clever Ruby object model,
and users would drive it with matlab-style code.

> * I am currently developing my project with Matlab, but it looks like
> Matlab's GUI capabilities (among other things) may be insufficient.
> Thus I am looking for another language to port my program to, or at
> least use to build a graphical front-end for my Matlab programs.

This is how to use TkCanvas, the best canvas I have found so far. Each
painted element is itself an object, so you can manipulate its properties on
the fly.



There are also probably charting tools for Ruby. There may also be a Matlab
interface.

> * Whatever language I use should be cross-platform, although initially
> I am developing for Windows only.  When thinking "cross-platform,"
> Java is the first thing that comes to mind.  But Java is a pain in the
> ass, and I'd rather not do it - plus, I've never used a Java
> application that has struck me as anything other than clunky.

Portability is for canoes. There are three ways to be portable:

 1. screw it. Satisfy customers on one platform first, quickly
 2. predict portability, pick a portable platform, then apply 1.
 3. test on multiple platforms after writing each line.

> When searching around for languages, I ran across Python, which seemed
> like it would do everything I need, in combination with the wx widget
> library.  Then I noticed some people promulgating this "Ruby"
> language.  I'd never heard of it, but I was intrigued.  Particularly
> because they all seemed to have this particular glassy-eyed zeal that
> I usually associate with Amiga or BeOS users.  Now, I've been an Amiga
> and BeOS user - back in their heyday - and I know that their zeal is
> ABSOLUTELY 100% JUSTIFIED.  Those systems were simply a JOY to use,
> which is a selling point that seems to elude most computer people, but
> is important to me.  If I can experience some measure of joy while
> learning a new language and porting my project to it, then that is a
> very big selling point indeed.

Uh, yeah. Guilty. Python sucks.

> However, if Ruby doesn't actually do what I need, then I'll have to
> find another language to work with.  Here are the concerns I have:
>
> * This is going to be commercial software, and I do NOT intend to give
> away the source code.  Is their a way that Ruby programs can be
> securely compiled so that the source code is inaccessible?

r2c? A ruby compiler? I don't know the answers to the remaining questions.

-- 
  Phlip
  http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces