Ruby and Python, questions (not a flamewar!)

gga wrote:

 In terms on scripting language performance, LuaJIT has left

YARV, CPython+Psyco, and Perl quite in the dust if you ask me (this is
not so surprising as Lua is a much simpler language, albeit somewhat
less friendly).

For more on LuaJIT, see the thread
“Intensive computing: Ruby? Ruby/C? Pure C++?” in this
newsgroup.

(Or at least, more users for now. Ruby books are outselling Python
books today, according to O’Reilly.)

Citation needed :slight_smile:

The information I’ve seen on this suggested that Ruby book sales were
growing at a faster rate than Python book sales. That’s not at all
the same thing as saying that Ruby books are outselling Python books.

Of course, perhaps I haven’t seen the most up-to-date information.

Good day!
First, let me apologise for some Japanese nationalism and Ruby
fanaticism, and do not be offended if I say something inappropriate.

On Jan 20, 2007, at 05:21, Tom P. wrote:

Well, Ruby was written by a /person/, not a culture, and it’s largely
a tasteful amalgam of good ideas introduced in those old “Western”
languages. I’d be interested to hear what you (or anyone else) thinks
is distinctively non-Western about Ruby, as opposed to C or Lisp or
Smalltalk.

It is worth noting that a person who created Ruby have originated from
a distinct (Japanese) culture. And one of the key characteristics of
Japanese culture is its openness for adoption of other cultures. Many
great pieces of Japanese culture were taken from others and then
transformed by adding subtle differences, thus making them (IMHO)
perfect. Think about Zen Buddhism (a philosophy that came from China),
or quality control (curiously, an American idea that originally didn’t
get support in the US and had to be adopted later from Japanese) — the
trend is obvious.
And I don’t think it would be an exaggeration to see something similar
in Ruby design. All Ruby’s features were widely known and used in a
whole bunch of high-level languages, but it took a Japanese to unite
them together in such subtly unique way that was Ruby, and the result
was a (IMHO) perfect language.
Python has similar capabilities (and is even a little more advanced if
we speak about Unicode support, and more mature if we speak about many
third-party libraries available), but it doesn’t make programming fun
as Ruby claims, and in fact, does. It is those small subtleties that
make this possible. The ability to write [1,2,3].length and
[1,2,3].size as it pleases you, those funny blocks instead of dull
for-loops or clumsy lambdas, optional use of parentheses — all this
makes writing programs more natural and pleasant.

  1. print is a statement in Python 2 and I can imagine no programmer who
    deliberately chooses to write print(“boo”) instead of just print “boo”.
    And in Python 3 it’s going to become a function so that only the former
    syntax will be correct. They say, to make it more readable. I don’t
    think lots of parentheses and brackets improve readability.
  2. indentation eliminates multiple “end” clauses but makes pure python
    virtually unacceptable for use as a templating language. And again, I’m
    not sure that

if boo:
doo()

is more readable than simple “doo if boo”
3. can’t understand why only in recent 2.5 Python became to agree with
both “except” and “finally” clauses in exception handling.

These are the examples of constraints that Python puts on programmer’s
mind. They are not severe, but a creative mind searching for a solution
doesn’t want any limits at all! Ruby really gets out of your way when
you create programs. And maybe it is that freedom that makes
programming Ruby fun. And that’s why there couldn’t exist such thing as
Python on Rails. Ruby attracts programmers that want to freely
experience their thoughts and have fun — and this is why it yields such
original and convenient products.

An answer to the OP’s questions — why Ruby is not as wide-spread as
Python — lies in two domains:

  1. Aforementioned language barrier and Ruby’s youn age in general.

  2. Ruby’s flexible syntax gives too much freedom — and this may drive
    away some less creative programmers that need something solid under
    their feet. When you first com to Ruby you may become overwhelmed with
    all that freedom and panic :slight_smile:

Thanks for your attention.

Your sincerely,
Damian/Three-eyed Fish

On 2007-01-18 22:52:23 -0500, “Gavin S.” [email protected]
said:

The information I’ve seen on this suggested that Ruby book sales were
growing at a faster rate than Python book sales. That’s not at all
the same thing as saying that Ruby books are outselling Python books.

Of course, perhaps I haven’t seen the most up-to-date information.

Gavin

Well, according to Tim O’Reilly, as late as last August Ruby was
outselling Python:

No clue whether the trend continued.

Best,
James

On Jan 19, 6:03 am, “Giles B.” [email protected] wrote, in part:

Basically, the advantage is the bytecode interpreter, and that Ruby
came from outside the West. Faster performance plus lower barriers to
adoption equals more users.

(Or at least, more users for now. Ruby books are outselling Python
books today, according to O’Reilly.)

Citation needed :slight_smile:

The information I’ve seen on this suggested that Ruby book sales were
growing at a faster rate than Python book sales. That’s not at all
the same thing as saying that Ruby books are outselling Python books.

Of course, perhaps I haven’t seen the most up-to-date information.

Gavin