Python vs. Ruby vs. PHP

Hey drop us a line about the show. Feel free to ask questions, provide feedback and criticism, or just ramble on about anything your little heart desires.

Moderators: snarkout, Patrick, dann

Post Reply
User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Python vs. Ruby vs. PHP

Post by Jza » Sat Apr 22, 2006 3:22 pm

On the latest show Pat talked about usin python, I am a big fan of Python411 a python podcast that has become really popular. Python is by far the best general programming language. the big difference is basically the wsy the language is written makes a very clean and readable code. the huge ammount of modules and frameworks make it a developer paradise.

Python in general has develop at a faster rate than Perl and even Ruby. Even thought a lot of people bought into the ruby on rails thing, this is nothing but an API, a framework rather. There are many frameworks in python as well not just for web but for real programming, embedded systems/handhelds/web/robotics etc.

Comparing Ruby and Python to PHP has been a battle that has change a lot in the past. PHP was (and is) known as a web scripting language, most people havent used php-cli or build applications with php-gtk. This is why the development and appreciation keeps php on a very narrow corner. However there was a reason for this, and rely on php poor handling of objects.

PHP also had poor recognition of XML and make this really lagging vs Python powerful parsers -- PyXML and Ruby's REXML. PHP5 make significant advantages on this while still not a match for the previous new implementations and a huge supported community had made this possible.

PHP5 uses something called SimpleXML which is the way php can read and write xml. However like the name shows it, is simple, maybe too simple. The new object model also helped and the new PEAR modules might be good also check the PHPclasses API's on XML.
Alexandro COLORADO

User avatar
Gomer_X
Posts: 901
Joined: Fri Jun 03, 2005 1:31 pm
Location: Cincinnati, Ohio, USA
Contact:

Re: Python vs. Ruby vs. PHP

Post by Gomer_X » Mon Apr 24, 2006 8:50 am

Jza wrote:On the latest show Pat talked about usin python, I am a big fan of Python411 a python podcast that has become really popular. Python is by far the best general programming language.
I disagree Python is "by far" the best. It's good, but personally it hasn't won me over. I've tried, but it doesn't do what I need. I find it harder to learn than Perl, and some things are just confusing. If I had to choose between Python, PHP and Ruby, yes Python is the best.
Jza wrote:Python in general has develop at a faster rate than Perl and even Ruby.

Perl is actually only a year older than Python. Comparing CPAN to what's available for Python, I don't believe it has developed faster.

If you're just learning to program, Python is a good language to use. If you want to learn object-oriented programming, I'd definitely recommend Python. For just doing general systems administration and automation, I like Perl. For web stuff I'd definitely go with Perl or PHP over Python.

I agree Python will become increasingly more important.

User avatar
CptnObvious999
Posts: 798
Joined: Fri Jun 03, 2005 7:54 pm
Location: Maryland
Contact:

Post by CptnObvious999 » Mon Apr 24, 2006 11:55 am

I have to be honest, I have not tried Perl or Ruby. However Python is my favorite language. I love not having to deal with data types and since everything is an object it has some cool functions such as selecting characters out of a string the same way you would select an array row. It seems very well thought out and planned. It doesn't require stupid get and set methods but you can overload the system handler if you find you need it in the future. The overall syntax is so light but powerful and that is what I love about it.

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Re: Python vs. Ruby vs. PHP

Post by Jza » Wed Apr 26, 2006 12:56 pm

Gomer_X wrote:
Jza wrote:On the latest show Pat talked about usin python, I am a big fan of Python411 a python podcast that has become really popular. Python is by far the best general programming language.
I disagree Python is "by far" the best. It's good, but personally it hasn't won me over. I've tried, but it doesn't do what I need. I find it harder to learn than Perl, and some things are just confusing. If I had to choose between Python, PHP and Ruby, yes Python is the best. .
Well I cant really answer for your personal pre but I can sayy why python is less confusing than perl, and is because of heir indentatition and strict syntax oriente3d aproach. Is more pragmatic and this make it easy to read and understand. For example I am not a programmer but I can understand a python script 100 times better than a perl script. Again this might be personal preferences but just the syntax looks cleaner and with less anoying simbols and signs.

Gomer_X wrote:
Jza wrote:Python in general has develop at a faster rate than Perl and even Ruby.

Perl is actually only a year older than Python. Comparing CPAN to what's available for Python, I don't believe it has developed faster.
Well Python has gone into fields where just low level languages like C/C++ languages has gone before. Including robotics and biotechnology. I also have heard a wider adoption into handhelds where only JavaME was the ony choice.

Even in the open source world Python is becoming the scripting platform of choice, like pygtk, py-fu for gimp, python for blender, pyUNO for OpenOffice.org, python for xchat, ironpython for .NET / Mono and the list go on and on.
Alexandro COLORADO

User avatar
snarkout
Site Admin
Posts: 1342
Joined: Tue Aug 16, 2005 9:35 pm

Post by snarkout » Wed Apr 26, 2006 8:43 pm

Perl or bash for me - I'm a scripter, not a coder.
Shared pain is lessened, shared joy is increased; thus do we refute entropy.
--Spider Robinson

thetza
Posts: 146
Joined: Tue Jan 10, 2006 7:25 pm

Post by thetza » Sun Apr 30, 2006 12:00 am

(Note: I've never used php, so I exclude it from my post... though I have extensive experience with ruby/perl and some python)

Perl, Ruby, Python have much more in common than in difference. They all:
-have similar uses (sysadmin-ing, server side scripting, etc) but are useful for generic tasks
-are dynamically typed
-are slow
-have strong standard libraries
-have decent 3rd party libraries, though each lacks in some areas compared to others
-are all extensible with C, though in general ruby > python > perl in this area
-can lead to illegible code.

If you want something different, try Lua, Eiffel or one of the functional languages.
Well Python has gone into fields where just low level languages like C/C++ languages has gone before. Including robotics and biotechnology. I also have heard a wider adoption into handhelds where only JavaME was the ony choice.
Do you have any data to back this?

There may be isolated examples, but I hate to break it to you that Python is not gaining any significant ground in robotics and biotechnology.

And if popularity were the measure of a language's quality, Visual Basic would bury all three any day.
Even in the open source world Python is becoming the scripting platform of choice, like pygtk, py-fu for gimp, python for blender, pyUNO for OpenOffice.org, python for xchat, ironpython for .NET / Mono and the list go on and on.
Gtk has dozens of bindings. Mono has many as well. And "X-Chat uses perl for scripting, and pretty much only perl" (xchat.com). Then there's Ruby on Rails and the countless perl scripts running on every linux server.

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Sun Apr 30, 2006 12:21 am

Do you have any data to back this?

There may be isolated examples, but I hate to break it to you that Python is not gaining any significant ground in robotics and biotechnology.
PyCon 2006 just passed and people talkig about fast developing with python (as opposed to prototyping) is becoming a reality. As the Pythons i getting faster and faster. The recent IronPython examples were as good as the original C#.

Of course most of this data is not first hand (I dont build robots) but this are most of the thoughts that were expressed on Python411 podcast at:
http://awaretek.com/python/index.html

Which in itself came from PyCon 2006, and Guido Van Rossum's mouth (some of them nevertheless).
Alexandro COLORADO

User avatar
Gomer_X
Posts: 901
Joined: Fri Jun 03, 2005 1:31 pm
Location: Cincinnati, Ohio, USA
Contact:

Post by Gomer_X » Mon May 01, 2006 3:38 pm

I've got a good friend who does factory automation and robotics. He once told me they do most of their programming in Visual Basic.

User avatar
Jza
Posts: 466
Joined: Sun Oct 30, 2005 7:01 pm
Location: Mexico
Contact:

Post by Jza » Mon May 01, 2006 5:04 pm

good for him, I just hope I dont get those robots thought. :lol:
Alexandro COLORADO

Post Reply