Newbie questions

Hallo everybody. I discovered the Ruby Q. site some time ago and I’ve
been much intrigued by the Ruby language. So I’ve begun trying to solve
some of the old problems, and I’m very interested in learning Ruby to
finally resume work on my many old hobby projects that lie unfinished
since when I stopped using Pascal and then never managed to use C++ for
anything that I didn’t REALLY HAVE to do :wink:

As an hobbyist programmer, I am an orphan of the good old Borland Turbo
Pascal 7 :wink: I remember well how I learnt to use it mostly from the
online help (!) many years ago, in school. The thing I most liked about
it was the tight integration of every part (editor, compiler, debugger)
and the well-organized default libraries: I put “uses crt” at the
beginning and had my console/speaker functions, “uses graph” and I had
my graphics primitives, etc… Pretty rudimental things for today’s
standards, yeah, but I never found something that usable anymore. And
I’m talking about a 16-bit DOS application… ^___^

So, I’d like to know if someone put together a well-documented
“compilation” of basic libraries for 2D graphics, simple windowing,
audio, and inline C functions. Nothing too fancy: the easier the better,
since I have to worry first and foremost about learning Ruby for now. I
like to spend time writing clever algorithms (well, as clever as I
manage to be ;), much less managing interfaces. Also, I don’t like to be
forced to read dozens of specifications to choose a couple of libraries
for a 300-line program: i’ll do that if and when programming becomes my
main job :stuck_out_tongue:

I’ve googled far and wide and found many interesting projects that may
wery well be worth a try, but I would like to know well my “base
architecture” while I learn, and not overwhelm myself with details
already. For the same reason I’d like to use only stable and
well-documented libraries (eg. the “shoes” project that has been
advertised yesterday seems very much like what I need for graphics, but
alphas are for people who KNOW what they are doing, right?)

I’ve seen that many efforts have been done in this sense regarding
Rails, but I’m not interested in web development (yet :wink: so they aren’t
quite what I need. Quite the opposite, I’d like to dabble with hardware
a bit, e.g. writing a control application for a small microcontroller
device that needs to communicate via serial port.

Thanks in advance for any response :slight_smile:

On Jan 10, 2008 2:28 PM, Martin B. [email protected] wrote:

I’ve googled far and wide and found many interesting projects that may
wery well be worth a try, but I would like to know well my “base
architecture” while I learn, and not overwhelm myself with details
already. For the same reason I’d like to use only stable and
well-documented libraries (eg. the “shoes” project that has been
advertised yesterday seems very much like what I need for graphics, but
alphas are for people who KNOW what they are doing, right?)

I think the first library you’ll want to install is Rubygems, if you
haven’t already :). The O. Click Installer for Windows already comes
with it, I believe, and nearly all other libraries mentioned here can
be obtained through it.

Well, Shoes does sound like what you need for graphics, as it’s meant
to be simple and support a wide array of fun eye candy. The only
problem I see with Shoes is that it’s a bit of a standalone
application, so you have to work a little harder when trying to
integrate other gems (Ruby libraries) with it. Not /much/ harder,
though - I think it mostly involves installing the gem in your Shoes
directory, rather than performing a system-wide installation. It’s
surprisingly friendly for an alpha, and comes with lots of examples.

There are many other GUI toolkits with bindings for Ruby, but they
tend to be a bit more complicated than Shoes :). If you’re on
Windows, I think your best bets might be Tk and FX (Fox). Ruby comes
with bindings for TK, and you can download a Windows version of the
toolkit itself from ActiveState (google for their site :)). Fox can be
used through FXRuby.

Linux also has Tk and Fox, and also has easier access to QT and GTK+.
I know GTK has a graphical interface designer named Glade, which you
can use to design interfaces for your Ruby programs. QT probably has
something equivalent.

For inline C functions, RubyInline seems to be the “de facto” standard
(I /think/ it’s for embedding C code into Ruby, but I may have gotten
it backwards :)).

I’m not too familiar with Ruby audio libraries, but I don’t think
there’s a single audio manipulation library for Ruby. What exactly
would you like to do with audio? I’m sure other people here can name
some cool gems for that.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs