Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old December 13th, 2002, 05:13 PM
richard_h richard_h is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: London, UK
Posts: 28 richard_h User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 36 sec
Reputation Power: 0
Ruby or Python?

Ruby or Python?

I'm considering adding another language to my development tool belt and would be interested with any comments regarding the comparision of Ruby and Python; speed, features e.t.c.

- cheers

Reply With Quote
  #2  
Old December 17th, 2002, 12:12 AM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
Well, I'm a Python zealot, so take my statements with whatever grains of salt you wish.

That being said, here goes:

What Python has on Ruby:
Speed of exeuction - even in normal execution Python is faster than Ruby in most cases. Throw in things like Psyco and the speed is unmatchable (with Psyco, Python can reach half C-speed).
Available libraries - I'm gonna go ahead and give the edge to Python here without being sure about this one. There's not many things I've looked at coding which haven't had good Python bindings.
Support/Usage in the community - Python has a much bigger user base than Ruby, with my only evidence being the number of projects written in Python vs Ruby and the activity on the comp.lang.* mailing lists for each.
Readable, Consistent Syntax - Yes, some people think the indentation to specify nesting levels is a mistake, but I can guarantee you that 90% of those people haven't given it a fair shot. Ruby chooses to use a mish-mash of brackets and begin..end blocks as well as other strange delimiters. In my experience Python code generally reads a lot like pseudocode when best practices are applied, the same cannot be said for Ruby.

Where it's about a draw:
Simplicity of language - Both Python and Ruby are relatively simple languages to learn in terms of syntax and of the languages' best practices. Development time is probably approximately the same for both for any given app.
Power of language - both are quite powerful, and none more powerful than the next anymore, it would seem. It used to be the case that Ruby had the edge here, but I wouldn't say so with Python 2.2 and greater.

Where Ruby wins:
Japan - Ruby's big in Japan

So, that's my summary of the arguments between the two. I've used Python a ton, and Ruby only a smattering (I started learning it around the same time as I learned Python and once I knew Python I didn't pursue learning Ruby much anymore).
__________________
Debian - because life's too short for worrying.
Best. (Python.) IRC bot. ever.

Reply With Quote
  #3  
Old December 17th, 2002, 05:01 PM
jimmy2k1 jimmy2k1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 89 jimmy2k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 48 m 50 sec
Reputation Power: 7
here's a link to an article comparing the two languages:
http://www.mindview.net/Etc/FAQ.html#Ruby

Reply With Quote
  #4  
Old December 18th, 2002, 03:48 AM
richard_h richard_h is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: London, UK
Posts: 28 richard_h User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m 36 sec
Reputation Power: 0
Quote:
Originally posted by jimmy2k1
here's a link to an article comparing the two languages:
http://www.mindview.net/Etc/FAQ.html#Ruby

Good link.

I've made the plunge and "Learning Python" - O’Reilly arrived on my doorstep yesterday

- Thanks for your posts.

Reply With Quote
  #5  
Old December 19th, 2002, 11:06 PM
yabanjin yabanjin is offline
Sojournor of Lies
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Chicago
Posts: 15 yabanjin User rank is Private First Class (20 - 50 Reputation Level)yabanjin User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation

Python has it's following, and in Japan ruby's popular. But I don't recall seeing jobs for either so I wonder why not go for something in demand. No disrespect intended, I think python (haven't looked at ruby) is a great language. But will it help pay the bills?

Reply With Quote
  #6  
Old December 19th, 2002, 11:44 PM
Strike Strike is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 383 Strike User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 41 m 27 sec
Reputation Power: 7
Send a message via ICQ to Strike Send a message via AIM to Strike Send a message via Yahoo to Strike
Quote:
Originally posted by yabanjin
Python has it's following, and in Japan ruby's popular. But I don't recall seeing jobs for either so I wonder why not go for something in demand. No disrespect intended, I think python (haven't looked at ruby) is a great language. But will it help pay the bills?

Well, it's not in nearly as much demand as Java or C/C++, of course. But, in terms of capabilities, it can do everything those languages can do, and often with more pleasing results (slower, but more stable and faster-to-market). So, for new products that aren't required to be run at C speeds, it's a sound choice.

Perhaps one of the biggest stumbling blocks is the general practice of the software industry itself, though. It's pretty difficult (impossible?) to create a sufficiently obfuscated executable program from Python sources. Sure, you can use the py2exe "freezing" method, but basically that locks in an interpreter and the compiled bytecode with some win32 .exe magic to create its executables. Supposedly, obtaining the bytecode out of there, and subsequently, the original code .. is more or less a trivial task. "How do I obfuscate my Python sources?" is one of the most frequently asked questions on comp.lang.python and the generally accepted answer is - it'd take you more work to come up with a decent enough scheme than it would for someone to crack said scheme.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Ruby or Python?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway