Been programming with Ruby and Rails sporadically for the last two years. Tonight, I tried Python and whoa! It was a blast. It's easy to understand and write where Ruby is harder to grasp for me b/c it's more abstract and things are done without any closures.

I hear the Python interpreter is a lot faster than the Ruby interpreter.

I'm cool with Django being a rails for python. There are a lot of smart people out there who don't use the same tools you use or I use and we have to tip our hat to their creativity and knowledge.

I like the flow of Python better than Ruby. When I program in Ruby I always feel something is missing that I'm getting from Python.

I'd like to learn Python sometime.
But learning a language (properly) takes a lot of time & effort.
Currently I am not motivated enough to learn a new language. :-(

I felt the same way until I actually tried Python. It takes a week to grab the basics - depending on where you are coming from language-wise.

Until I tried Python, I programmed because it was my job. Python brought the love and joy back to programming that I had when I was a kid, and it had been missing for 15 years or so.

__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick

You mention Django and Rails, so I gather you plan on doing some web programming?

I tried both Django and Zope, and found them to be rather big and complicated to deal with with, I found using just the cgi module and cheetah to be easier ... YMMV of course
As a sidenote, a friend of me if very enthusiastic about web.py ...

I have never used Ruby.

__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.

Ugh, a programming language where you can't copy paste from xterm to xterm
without fucking up the program is just way to much pain to work on.
The indenting of code is an optical help but should not change the
behaviour of the program. For me it is important to be able to write code
with style(9) in mind (and I think most other BSD developpers think
similar because our code all looks similar).

I've been programming a lot of Action Script 3.0 these last three years. I've used Ruby on Rails as the back end, but found Rails easy while Ruby was a thorn in my side the whole time. To be honest, Ruby rocks, but it's too abstract for me right now. The conventions in the language are constantly throwing me off because of my background being Java Script, Java, AS3 which all three are so similar if you can program one, picking up the other two is very straight forward.

Python is like roddierod said bringing some of the joy I've lost in programming back. My first attempts to program on my own were with Basic on the Commodore 64. Python works like it should. Ruby would call this principle the principle of least suprise. I like Python better than ruby and wish rails ran on Python, which is why I was seriously taking a look at Django.

I've spent a few times trying socket programming with C. Still, C isn't second nature to me. Neither is Python. Not the way AS3 is. I'd like to get at last 1 scripting language down second nature. And, get C down second nature. Then, I feel I will really be in a good place programming wise. I don't like making programs in a language that isn't like an extension of my mind b/c I feel like I'm debugging all the time. When you've got a language down second nature, you feel the force flowing through your system and it's almost a spiritual transcendental experience. I know all you guys who have at least one langauge down second nature know that feeling.

@j65nko:
That's their opinion, not sure if you mean to imply that that's also yours or if it's jut a random quote ...?
Anyway, you can copy Python, so I don't know what he's doing ... Also, style(9) doesn't really apply since Python looks different from C anyway. I don't understand some people's fetish for curly braces and semicolons ...

__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.

I've come to prefer Python: it makes my life easier. In researching various languages and their utility for cross platform development, with particular eyes on FreeBSD and Windows; I found Python to be much less trouble then Ruby, although getting support for the correct versions can be problematic in some cases (e.g. Panda). My research also makes me wonder if Common Lisp is the best language available... lol.

Both Ruby and Python are very fine languages and both have survived me as "General purpose language for new projects and scripts" for years at a time. I look at comparing them much the same as comparing Java and C++, they are about the same in that regard to be different beats. I find Ruby better suited for interactive usage (irb), but like wise that Python has considerably better documentation on how to use stuff - that's why I prefer Python. The documentation is just several times better then Rubies was, when I took up using Python, and I expect it still is that way. My only complaints about Python, missing dictionary keys are exceptions rather then None (more logical but also more inconvienant), and that regular expressions are not built into the language. I like how Perl mates regular expressions directly into the language, Ruby does this to a lesser extent (in fact, I often use a Ruby regexp reference when I need a regex reference for any language), but Python implements it through the re module. I don't like the re module, because I feel it unnatural compared to Perl, but re does do what's needed most of the time.

I have dabbled with Django and have no problems with it, but I have never used Rails. My use of both languages is oriented on developing cross platform applications and task specific tools, not web development. If I was going to do serious web development in any language, I would probably want something like GWT. So that would likely suggest using something like Pyjamas or RubyJS rather then Django/Rails, given my experience with using core Ruby classes and third party modules in every language, I would probably opt for Pyjamas. More likely I would be forced to use PHP, and therefore develop something around it that I can 'live with'.

Quote:

Originally Posted by roddierod

It takes a week to grab the basics - depending on where you are coming from language-wise.

It actually took me parts of 3 days. One to study Python, one to learn Qt through the C++ docs and Python bindings, and a third to experiment in using them together non-trivially. It would've gone faster if I hadn't skipped using any C++ OOP features for a couple years lol.

Even if indentation could be preserved in a cut-and-paste operation, rarely is the target at the same indentation level as the original. Additional fussing has to be spent lining everything appropriately to be syntactically correct. Having worked on large Python projects, copying code is not as trivial as it should be.

Quote:

Originally Posted by TerryP

I find Ruby better suited for interactive usage (irb), but like wise that Python has considerably better documentation on how to use stuff - that's why I prefer Python.

What you are seeing is the difference in cultures. Python has been around significantly longer than Ruby, & with Google's embrace of the language, Python's documentation has gotten noticeably better during the last few years. If it wasn't for Rails, Ruby would still be an obscure language coming from Japan.

Not to digress, but what makes any one language "successful" in the marketplace over another is an interesting study. Ruby is very popular in Japan, but it has not taken on here in the US outside of the Rails phenomena. I have seen it stated that it didn't help that Matz' command of English is minimal, & his first O'Reilly book on Ruby was poorly translated. With the popularity of Rails, a number of solid books penned by a later generation of Ruby enthusiasts have been published, but I don't suspect that Ruby offers enough of a different feature set for it to become a dominant player.

But I will also take the moment to place devil's advocate. While I too like Python for its lack of syntactic cruft, Ruby is more pure when it comes to being an object-oriented language. Everything is an object. Thus, everything can have related methods applied. This can lead to some very powerful code, & it is not a surprise that Martin Fowler championed Ruby here in the US over a decade ago.

On the other hand, Python had object extensions tacked onto the language long after its inception, & it shows. I have not studied Python3 enough to have an opinion, but I suspect that providing any level of backward compatibility will hamper Python from becoming as syntactically powerful as Ruby.

Quote:

Originally Posted by tetrodozombie

I hear the Python interpreter is a lot faster than the Ruby interpreter.

I haven't seen published benchmarks lately, but Ruby offers a lot of its feature set through runtime binding. This has both its good & bad aspects. I also know that the Ruby community is working on making their interpreter more efficient too.

Quote:

Originally Posted by Carpetsmoker

I tried both Django and Zope, and found them to be rather big and complicated...

Here, I agree with you. While Django, Zope, TurboGears, etc. all have their followings, none have had the success of Rails. The popularity of libraries & frameworks don't always follow from the popularity of their underlying languages.

Haha, well, maybe I didn't formulate my question very well, my question was whether you were reporting your opinion by proxy, of if you were just reporting some quotes ... It would seem the last was the case

Quote:

Even if indentation could be preserved in a cut-and-paste operation, rarely is the target at the same indentation level as the original. Additional fussing has to be spent lining everything appropriately to be syntactically correct. Having worked on large Python projects, copying code is not as trivial as it should be.

I never had any problems copying the TAB characters, come to think of it, that may be due to the fact I mostly copy my code inside Vim tabs and almost never from xterm to xterm.
But yeah, if you copy a post from a different level then that won't work work of course ... I haven't worked on any large projects, but Vim deals with this pretty well IMO (Using < and > with visual mode for example) ... But yeah, I can understand this can be a problem, Python isn't perfect.

__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.

On the other hand, Python had object extensions tacked onto the language long after its inception, & it shows. I have not studied Python3 enough to have an opinion, but I suspect that providing any level of backward compatibility will hamper Python from becoming as syntactically powerful as Ruby.

I first encountered Python in the 2.4'ish days so that's where I'm most used to it. Compatibility is quite broken between major versions but not shorter gaps. Aside from issues relating to string types, you can easily write code that will run on Python 2.6 and 3.1 without much trouble. General compatibility between 2.6 and 3.1 is very good (by design), but for example, don't expect 3.1 and 2.2 code to work together.

Since the early days Python has gotten better with the OO stuff, but culturally, it's not as ingrained as with Ruby. I'm almost surprised that Ruby doesn't follow closer to Java / C# in some ways.