Ruby Impressions

Phil Tomson ptkwt at aracnet.com
Fri Jan 11 20:58:42 EST 2002


On Fri, 11 Jan 2002, Brian Quinlan wrote:

> Phil Tomson wrote:
>
> > >2. Must be true multiplatform with ports to Windows, Linux and MacOS.
> >
> > Ruby runs on Windows, Linux and MacOS including OSX (BTW: there are
> some
> > nice Cocoa bindings for Ruby now - very nice for scripting OSX apps)
>
> Does Ruby support threads on Windows yet? (not that the Ruby
> microthreading model impresses me very much)

It has supported Threads on Windows for quite some time.  I've used
Ruby threads on Windows without any problems, however there was an issue
raised recently related to setting priorities on different threads under
Windows.  The issue is apparently related to the fact that Ruby currently
relies on Cygwin to run on Windows (it's a cygwin issue).  Even before
this revelation the Ruby community planned to move away from reliance on
Cygwin for the Windows version.  The next Windows binary release of Ruby
will be compiled with MSVC and will not rely on cygwin - those who have
tried the new binaries say that the threading problem is fixed.

As for the 'microthreading' model...  Yes, Ruby threads are not native.
For my purposes it's more important that threads work cross-platform (my
particular applications don't need high performance, multi-processor
threading, but YMMV).  There is talk of creating an extension for native
threads so that - some want them to totally replace the current threads
in Ruby, IMHO we should have both the current platform neutral threading
model and a native threading extension.

>
> > Extensions: It is very easy to extend Ruby with C (and it even works
> with
> > the Garbage collection :)
>
> And the trade-off is that it requires a long jump hack.
>

Not sure about that, but if it's true, what's the problem?  It works.

> > Seems to be a matter of opinion - I certainly find Ruby to be clean
> and
> > clear.
>
> Ruby borrows too many idioms from Perl to be considered clear. For
> example, the predefined variables and post-fix if are ugly as hell.
>

I'm a former Perl guy and I don't even use the predefined variables all
that much (and there is the english.rb module that gives them reasonable
names - I recommend that people use it.)

Sure there is a bit of Perl in Ruby.  And there's a bit of SmallTalk and
CLU and maybe even a bit of Python (I think matz said he borrowed 'def'
from Python).  Not everything about Perl was bad.  Perl really did allow a
lot of folks to do some pretty powerful things in not much code.  But now
that more of these people are needing to build larger, more OO systems
they're finding the Perl is not Nirvana and they're looking around for
something better.

> Don't get me wrong, I think Ruby is good and I would definitely use it
> if Python didn't exist. But Python does exist so...

Sure. It's all a matter of taste.  I really think that we're mostly
gaining Ruby 'converts' from the Perl camp much more so than from
the Python camp.  In many ways Ruby is  Perl.next (the next Perl) but it's
here and available now, not two years off.  If we draw anyone from the
Python camp it's probably only those that used Perl previously and have
only used Python for a short time.

Phil





More information about the Python-list mailing list