Python vs Ruby

J

Joao Pedrosa

Hi,

Could you elaborate on those aspects?

It would be great to hear about those... But really, if someone that
programs in Ruby and Python doesn't know them, they probably don't
exist, right? :)

Guido could have created Ruby and Matz Python and no one would have
found that strange. :)

My take is that Ruby and Python are too different to make for an easy
comparison.

If someone created a couple of libs in both languages I'm sure he
would have to choose one of the two soon... :) But just to use the
languages and libraries I think someone could keep up with both
worlds.

Anyway, I'm just thinking out loud...

Cheers,
Joao
 
L

Lothar Scholz

Hello Premshree,

PP> On Mon, 10 Jan 2005 04:06:40 +0900, Lothar Scholz

PP> Could you elaborate on those aspects?

Orthogonal OO design, blocks and open classes are in my opinion the only
serious differences in the language. A mark-sweep GC vs. reference
counting GC is also a huge difference but only visible in the C-API.

I think that the GC is the reason why many people find writing ruby
extensions is easier then writing python extensions - also the basic
ruby routines are easier to call from C then in python.

IMHO the different syntax shouldn't be an argument for a "serious"
programmer. But i prefer ruby's syntax when written and indented in a
good way. The situation where you get cascaded 'end's at the end of a
method or class is quite confusing in python, because with multiple
'ends' you have a better visual hint then one huge de-indentation.
 
B

Bil Kleb

Lethalman said:
(sorry for my poor English)
Hello,
i'm a pythonist but i like very much some ruby features, however it
doesn't seem to be very supported at all like Python.

I don't understand "supported". The *longest* time
that has ever elapsed between when I asked for
help here and gotten a response has been just over
an hour!

I've simply been amazed at the "support" of the Ruby
community.

Regards,
 
P

Premshree Pillai

Hello Premshree,

PP> On Mon, 10 Jan 2005 04:06:40 +0900, Lothar Scholz


PP> Could you elaborate on those aspects?

Orthogonal OO design, blocks and open classes are in my opinion the only
serious differences in the language. A mark-sweep GC vs. reference
counting GC is also a huge difference but only visible in the C-API.

Yes, that's one of the major differences I point out when I compare
Ruby with Python. The other thing I used to point out was that Ruby
doesn't have a "self" for instance variables :-D I can't use that
anymore, though: that has been elminated now, I'm told.
I think that the GC is the reason why many people find writing ruby
extensions is easier then writing python extensions - also the basic
ruby routines are easier to call from C then in python.

IMHO the different syntax shouldn't be an argument for a "serious"
programmer. But i prefer ruby's syntax when written and indented in a

Rightly said.
 
T

tony summerfelt

Boy, do you hate Python or what! I haven't seen Ruby users so critical
about Python.

ruby has what python IMHO will never have. a friendly community.
tcl/tk has it also...perl and python seem to be in the same camp when
it comes to it's users...

a few years ago i asked a question in the python newsgroup. i was
trying to port some perl code to python (which i was in the process of
learning)

it was immediatly tagged as a troll and the vitriol of the responses i
got was shocking. rudest bunch of people i've ever met online.

you can still google the responses to me:
(http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/14039)

it was in the ruby newsgroup, but written by a python person...i'm
sure a ruby programmer would never have replied like that :)

i've found that python people DO have an attitude. they don't like to
hear anything negative about their language of choice (even if it
happens to be factually true).

one thing i liked about perl was tim toadie...and that seems to apply
to ruby as well. but with python (to quote the author of the language
himself):

'there's only ONE way to do it'

how can a language with tenets like that be flexible OR user friendly?
and worse yet, the python community subscribes to this way of
thinking...

i've been forced to use python on on occasion, but as i learn more and
more ruby i'm at the point of never needing python again...


http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org
 
L

Lothar Scholz

Hello Premshree,

PP> Yes, that's one of the major differences I point out when I compare
PP> Ruby with Python. The other thing I used to point out was that Ruby
PP> doesn't have a "self" for instance variables :-D I can't use that
PP> anymore, though: that has been elminated now, I'm told.

But Ruby uses @ and @@ as a prefix, also not 100% perfect.
And no, Python still have "self" or "current" or however you want to call
the first argument.
 
D

David Heinemeier Hansson

IMHO the different syntax shouldn't be an argument for a "serious"
programmer.

Please count me out as a serious programmer, then. I care deeply about
the aesthetics of Ruby. I derive great joy from writing beautiful
programs. Ruby let's me write the most beautiful programs I've ever
done. Ergo, Ruby makes me happy.

I couldn't think of a higher praise to bestow upon a programming
language.
--
David Heinemeier Hansson,
http://www.basecamphq.com/ -- Web-based Project Management
http://www.rubyonrails.org/ -- Web-application framework for Ruby
http://macromates.com/ -- TextMate: Code and markup editor (OS X)
http://www.loudthinking.com/ -- Broadcasting Brain
 
K

Kristof Bastiaensen

Hello Premshree,


PP> Yes, that's one of the major differences I point out when I compare
PP> Ruby with Python. The other thing I used to point out was that Ruby
PP> doesn't have a "self" for instance variables :-D I can't use that
PP> anymore, though: that has been elminated now, I'm told.

But Ruby uses @ and @@ as a prefix, also not 100% perfect.

Then what would you suggest?
I think visually distinguishing between local and instance variables isn't
so bad.

KB
 
T

Thursday

Lethalman said:
(sorry for my poor English)
Hello,
i'm a pythonist but i like very much some ruby features, however it
doesn't seem to be very supported at all like Python.
I never programmed in ruby, because i python is more used.

I would like to know why ruby doesn't "take the fly" like Python did,
because i really would like to try the ruby language!

Bye!

Some might say the same about Microsoft Windows vs Linux. Rather than
looking at the current status, look at the trend to see which technoloy
is enjoying a faster growth rate.

As I type this, #python has 130 users and #ruby-lang has 185 users (the
most I've seen). About 2-3 months ago, I saw around 190 in #python and
only 160 in #ruby-lang. Ruby is seeing constant and continuous increase
in popularity while Python does not (based solely on the IRC observation).

I understand that using only IRC channel membership by itself might not
be accurate but it is something we can measure. And the trend is clear:
ruby is growing in popularity while python is not. So you decide if you
want to stick with something that has already peaked or if you want to
go with something that is growing consistently.

Also keep in mind that Ruby didn't have any English-language books
before year 2000. It now has around a half-dozen or so and more is
coming out each year. The lack of English documentation was the biggest
(perhaps only) weakness in Ruby.

I've heard Ruby is already more popular in Japan than Python--but I
don't know if that is true because I don't know how the numbers were
measured. Again, what is important is the growth trend and not just the
current status (think MS Windows, Mac OSX, and Linux).
 
P

Premshree Pillai

Some might say the same about Microsoft Windows vs Linux. Rather than
looking at the current status, look at the trend to see which technoloy
is enjoying a faster growth rate.

As I type this, #python has 130 users and #ruby-lang has 185 users (the

That's interesting, but (as you mentioned later) not an accurate
measure. Compare the mailing list posts at Python with that of Ruby.
The picture is _very_ different.
most I've seen). About 2-3 months ago, I saw around 190 in #python and
only 160 in #ruby-lang. Ruby is seeing constant and continuous increase
in popularity while Python does not (based solely on the IRC observation).

I understand that using only IRC channel membership by itself might not
be accurate but it is something we can measure. And the trend is clear:
ruby is growing in popularity while python is not. So you decide if you
want to stick with something that has already peaked or if you want to
go with something that is growing consistently.

Also keep in mind that Ruby didn't have any English-language books
before year 2000. It now has around a half-dozen or so and more is
coming out each year. The lack of English documentation was the biggest
(perhaps only) weakness in Ruby.

Exactly. I don't see any other reason why Ruby didn't take off as well
as Python.
 
E

Eustaquio Rangel de Oliveira Jr.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For me the problem is not really the language, but people who uses and
likes a lot Python. They are hard to talk with. :p

- ----------------------------
Eustáquio "TaQ" Rangel
(e-mail address removed)
http://beam.to/taq
Usuário GNU/Linux no. 224050
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB4lhrb6UiZnhJiLsRAljaAJ9RgS+/Nv1g5lfgNGXOwfVbBDdX5ACgq3rJ
WMDOPjN1f0ef3HXmo79HrY8=
=g9Kw
-----END PGP SIGNATURE-----
 
G

gabriele renzi

Thursday ha scritto:
As I type this, #python has 130 users and #ruby-lang has 185 users (the
most I've seen). About 2-3 months ago, I saw around 190 in #python and
only 160 in #ruby-lang. Ruby is seeing constant and continuous increase
in popularity while Python does not (based solely on the IRC observation).

well, supposing you're talking about freenode, consider tha a #python2
channel exists. Well, we have #rubyonrails and #iowa too. And btw they
have #twisted and #twisted.web. Oh, and #rubygems and #rpa. But, hei,
#python.web and probably #zope. I mean, there could be a better analisys :)
I understand that using only IRC channel membership by itself might not
be accurate but it is something we can measure. And the trend is clear:
ruby is growing in popularity while python is not. So you decide if you
want to stick with something that has already peaked or if you want to
go with something that is growing consistently.

I won't say python is not growing. Maybe ruby is growing a little bit
more, anyway. But maybe not. Statistical considerations are the next
thing in the "lies, damn lies, benchmark" list, I guess :)

In the end It always boils down to "I'm happy with ruby, you're happy
with python, lest's spread good karma"
 
E

Eustaquio Rangel de Oliveira Jr.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Check this out:

http://onthethought.blogspot.com/2005/01/thinking-in-ruby-not.html

- ----------------------------
Eustáquio "TaQ" Rangel
(e-mail address removed)
http://beam.to/taq
Usuário GNU/Linux no. 224050
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB4lzRb6UiZnhJiLsRAgS7AJ9GJoJINj6V7s0pYnnrm7vFkiL9wQCgpG4x
If2g3y8xvbjhFyGyqnm2Rgc=
=3t6B
-----END PGP SIGNATURE-----
 
A

Alexander Kellett

Boy, do you hate Python or what! I haven't seen Ruby users so critical
about Python.

i happen to intensely hate python also for what its worth :)
reason: 3 wasted hours due to an indentation "bug"

Alex
 
T

tony summerfelt

Check this out:

i've found that when someone becomes a 'python person' they
absolutely REFUSE to consider another language.

personally i'm of the mind of 'right tool for the job'. and for me
python doesn't seem to be the right tool for anything.

somebody with mr. eckel's smarts should know better...can you imagine
what he could do with 'thinking in ruby'

in that blog he's guilty of the same thing he accuses ruby of:

'Of course I only get bits and pieces, usually from people who don't
know Python trying to convince me that Ruby is better,'

and rubyist's get it the other way around :)

the main argument that python programmers use to use is that python
is OO from the ground up. clearly it's not, but ruby is...and i think
that sticks in their craw more than then they'd like to admit...

rather than get bombarded by moronic hatemail (as happened last time
when i point all this out) i'm leaving it at that...

http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org
 
T

tony summerfelt

i happen to intensely hate python also for what its worth :)
reason: 3 wasted hours due to an indentation "bug"

yeah, that can be a killer if you don't use a fixed width font.

i found the only way to avoid that was to write python code with a dos
or some console editor (like the console version of vim, boxer, etc).

if i had any complaint about ruby it would be begin/end blocks. i
thought we ( as programmers) were done with that when pascal fell by
the wayside. i much prefer {curly brackets} to designate blocks of
code...
http://home.cogeco.ca/~tsummerfelt1
telnet://ventedspleen.dyndns.org
 
E

Eustaquio Rangel de Oliveira Jr.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

| i've found that when someone becomes a 'python person' they
| absolutely REFUSE to consider another language.

Yeah, that's what I said about that: you can't talk on a nice way with them
anymore. :p

- ----------------------------
Eustáquio "TaQ" Rangel
(e-mail address removed)
http://beam.to/taq
Usuário GNU/Linux no. 224050
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB4n0/b6UiZnhJiLsRAlJPAJ4oKGuA5g+9Vu/6ujQ47zGpkSvaqwCgvWbb
Q8K2maJcXT0KZenkRef4nZE=
=UpuR
-----END PGP SIGNATURE-----
 
L

Lothar Scholz

Hello tony,


ts> yeah, that can be a killer if you don't use a fixed width font.

ts> i found the only way to avoid that was to write python code with a dos
ts> or some console editor (like the console version of vim, boxer, etc).

ts> if i had any complaint about ruby it would be begin/end blocks. i
ts> thought we ( as programmers) were done with that when pascal fell by
ts> the wayside. i much prefer {curly brackets} to designate blocks of

Even C++ Freaks like Björn Stroustroup don't like brackets because
they are too much overloaded, thats why the new cast operators use <>.

I think the current balance between backets and begin/end in ruby is
very good. In Pascal the problem was that you had if/begin/end and no
implicit begin as part of the control statement. Ruby and all later Wirth
languages (Modula/Oberon) learned from the wrong Pascal way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top