That's ambiguous, 'new' could mean that someone has knowledge of the other. So if everybody here already know Rails then their 'new' language preference would automatically have to be python.
Also, you're comparing a framework and a language, a better comparison would be python with ruby or django with rails...
I wouldn't trust a vote on this. Some voters will have no clue and just vote based on gut feeling and PR. Some will know Python, like it and vote for it based on that. Others will dislike and vote for RoR, without considering what they would do when they hadn't yet learned they disliked it, etc.
Knowing what I know today, I would probably try my luck with Python, as I've too often been bitten by Ruby's lack of properly documented, stable libraries. However, I think I would miss the power of Ruby's easy metaprogramming facilities. Clojure comes to mind as a third option...
Ruby is not almost always picked with ROR, ROR is built on top of Ruby so it cant be used without it. There's an inherent flaw with comparing a framework with a language: You're removing the people that use Ruby without ROR but with other frameworks (be it because they use Merb, Sinatra, or w/e) from the voting. Also, I find Hacker News generally tips on favor of Python, I might be incorrect though.
I'm a Perl guy. If I pick Ruby just because it's more like Perl, will I wish I had chosen differently in 12 months. In other words, are there any limitations that I will hit as my skills progress?
My base web development stack today is Python2.7+Flask+Fabric. I'm loving it. I've been using a lot of Fabric to do adhoc testing, write little tasks to do little specialized things, debug using code.interact() sometimes. It's the best thing ever. Flask is also the best thing that happened to the Python web development community recently. The documentation is truly awesome and library is extremely minimalist. There are many things Flask refuses to do in order to keep simplicity. But there are plenty of recipes in the site that teach you how to integrate specialized solutions for your apps. I really like loosely coupled systems and the Python culture is aligned with it.
I've pretty much stopped using package managers tho. Sometimes I may use pip to install some library, but most of the time, I try to keep everything (full packages) cached in a "lib" subdirectory and install on-demand. Even for Flask extensions, I try to to manually copy the libraries to lib/flaskext instead of letting pip handle it for me. The benefits of this is that you're never dependent on ANY package manager to run your app, and you keep all your dependencies frozen in your project's repository. (PS.: I f_cking hate git submodules).
The other thing I've been doing is using a more Unix-y configuration style (https://gist.github.com/aa9158d559c642fed619). My Python web applications today consist of an app.py file, an app.conf file, a support.py file (which loads all dependencies isolatedly and then I just do "from support import *" in app.py), a lib/ directory with dependencies and fabfile.py. In fabfile.py, I usually have a "web" task to start the development server and many other small tasks I add as I go. It can't get any simpler than that.
I know it's been touted before. But Python is a programming language, and Rails is a framework on top of Ruby.
You can compare Ruby with Python, or Rails with Django.
There are quite a few web frameworks for Ruby now as well (Sinatra -> Padrino, Merb, Nitro, Waves) ..
I think it's useful to know both languages. And pick whichever framework fits the problem domain best. Django is obviously really good for publishing. Rails is great for B2C. If you intend to market a SaaS API to businesses, and you expect lots of traffic, maybe even a framework in another language will be a better fit.
Ruby and Python are more alike than any other pair of languages I know. The frameworks however, can be quite contrasting.
If I had to pick a new language today (I know both languages and I slightly prefer Ruby over Python) and I didn't already know Javascript, that would be it. Javascript is the new popstar right now. The language I want to try right now is Haskell, sadly I don't have a project for it right now. Anyways, my vote is for Ruby here so I'll vote ROR :)
I didn't vote, due to the fact that you're asking us to choose between a programming language and a web framework (as others have mentioned already). It would be insincere for me to choose between those two choices.
That said, my latest new language has been Clojure.
I have played with Python only lightly, but that I did play with seemed to talk a lot about Ruby libraries recoded for Python. I stopped what I was doing and went back to Ruby as I felt there was no point in working with doppleganger libraries rather than the original. Why work with something that often aspires to be it's competitor.
Both have a good following. From my experiences I will always stick with Ruby. I see it happen countless times again. Most of my designer friends go with Python and most of my programmer friends go with Ruby. Honestly, both are good languages all the same.
Try them both out briefly and see which you prefer?
I don't know that many people (if any) could be truly un-biased to choose one or the other. I like Python but I learned Ruby first. Every encounter with Python gets compared to Ruby in my mind. "Ruby doesn't do things like this. Is this better or worse than what I'm used to?" I'm sure a Python developer looking a Ruby does the same.
Unless you ask just the people who looked at Ruby and Python at the same time, I think your poll will be weighed to whether readers were Python devs first or Ruby devs first.
Well... Since I know a bit of Ruby an I regard myself as proficient in Python, I would go with Clojure.
I find Ruby's syntax a bit "magical" and that it makes groking RoR a bit hard once you go beyond the basics. I would recommend Python over Ruby for a Java/PHP/C# expat willing to learn something different.
24 comments
[ 4.1 ms ] story [ 71.4 ms ] threadAlso, you're comparing a framework and a language, a better comparison would be python with ruby or django with rails...
I know it's a bad comparison, but that seems to be what most people pick from...since ruby almost always is picked with RoR
Knowing what I know today, I would probably try my luck with Python, as I've too often been bitten by Ruby's lack of properly documented, stable libraries. However, I think I would miss the power of Ruby's easy metaprogramming facilities. Clojure comes to mind as a third option...
o_O, example?
I've often turned to Ruby due to it's awesome documentation and actively developed gems.
So that's like saying "Yep, I can confirm that Python and Ruby are indeed programming languages."
I've pretty much stopped using package managers tho. Sometimes I may use pip to install some library, but most of the time, I try to keep everything (full packages) cached in a "lib" subdirectory and install on-demand. Even for Flask extensions, I try to to manually copy the libraries to lib/flaskext instead of letting pip handle it for me. The benefits of this is that you're never dependent on ANY package manager to run your app, and you keep all your dependencies frozen in your project's repository. (PS.: I f_cking hate git submodules).
The other thing I've been doing is using a more Unix-y configuration style (https://gist.github.com/aa9158d559c642fed619). My Python web applications today consist of an app.py file, an app.conf file, a support.py file (which loads all dependencies isolatedly and then I just do "from support import *" in app.py), a lib/ directory with dependencies and fabfile.py. In fabfile.py, I usually have a "web" task to start the development server and many other small tasks I add as I go. It can't get any simpler than that.
Previous threads about learning Python vs Ruby:
http://news.ycombinator.com/item?id=741257
http://news.ycombinator.com/item?id=682101
http://news.ycombinator.com/item?id=1258099
http://news.ycombinator.com/item?id=1078628
http://news.ycombinator.com/item?id=1311586
http://news.ycombinator.com/item?id=1463425
You can compare Ruby with Python, or Rails with Django.
There are quite a few web frameworks for Ruby now as well (Sinatra -> Padrino, Merb, Nitro, Waves) ..
I think it's useful to know both languages. And pick whichever framework fits the problem domain best. Django is obviously really good for publishing. Rails is great for B2C. If you intend to market a SaaS API to businesses, and you expect lots of traffic, maybe even a framework in another language will be a better fit.
Ruby and Python are more alike than any other pair of languages I know. The frameworks however, can be quite contrasting.
Python on Zope would be my choice. It kicks RoR ass since 1999.
Python on Dope sounds fierce. Snakes and drugs are cooler than jewels and trains.
That said, my latest new language has been Clojure.
I have played with Python only lightly, but that I did play with seemed to talk a lot about Ruby libraries recoded for Python. I stopped what I was doing and went back to Ruby as I felt there was no point in working with doppleganger libraries rather than the original. Why work with something that often aspires to be it's competitor.
Both have a good following. From my experiences I will always stick with Ruby. I see it happen countless times again. Most of my designer friends go with Python and most of my programmer friends go with Ruby. Honestly, both are good languages all the same.
Try them both out briefly and see which you prefer?
Unless you ask just the people who looked at Ruby and Python at the same time, I think your poll will be weighed to whether readers were Python devs first or Ruby devs first.
I find Ruby's syntax a bit "magical" and that it makes groking RoR a bit hard once you go beyond the basics. I would recommend Python over Ruby for a Java/PHP/C# expat willing to learn something different.