I've used Python for about about eight years, and Ruby for right at six months. It took me about a week to feel competent in Ruby, and about a month before I was really comfortable with all of the metaprogramming functionality. Add another month to that before I really grokked ActiveRecord.<p>I much prefer Python. I thought for a long time that this was because I learned most of the fundamentals of computer science and professional development in the language, but I'm at the point now where I'm sure that's not the case. The Zen of Python really shows the differences between the two of them - "explicit is better than implicit", versus Ruby's "convention over configuration". I don't mind writing some boilerplate in Python, because the boilerplate is itself fairly terse and fully informs you of your system's architecture in the process.<p>I hate that functions aren't first-class objects in Ruby. Hate it. The subtle distinctions and behavioral differences between blocks, Procs, and lambdas are infuriating.<p>There are many things I would change about Ruby, but there's nothing <i>wrong</i> with it. It's just not a good fit for my way of thinking.<p>All that said, the question was "Has Python killed Ruby?" No, it hasn't. Ruby is still popular, and I think it very much fits the manner of thinking of many developers. For them, thinking in Ruby is natural and wrangling Python into submission would feel like writing Ruby does to me.
I use both fairly regularly, and they are very similar.<p>Where they are different in terms of syntax or capability or philosophy, I nearly always prefer ruby.<p>I find bundler/Gemfile/rvm to be less headachy for project dependency management than pip/requirements.txt/venv.<p>For me, ruby code is easier and more pleasant to read.<p>When I need to write a quick bit of temporary code or do some simple data parsing/file management, I nearly always use ruby if it doesn't matter which language I use.<p>But if I had to choose one of them to learn, I would focus on python -- even with everything I said above and the really long and drawn out (and still unsuccessful) transition to python 3.<p>Python has much stronger non-web app libraries and perfectly adequate web app libraries and is definitely much more widely supported in academia. Ultimately there are more things you can do with python and more python job opportunities.
If going with the web, I'd go with JavaScript, to a degree you have to learn it anyway. Python and Ruby are both relevant for web as well. Rails vs Flask/Django - both will get the job done, plenty of use cases of major corporations using one or the other.<p>If you're doing DevOps, you should probably learn both.<p>Everything else, which is more backend, APIs, data, data science, AWS, Google Cloud, Big Data databases, etc - Python over Ruby. You may want to consider Java here tho depending on how much performance is required due to many of those aforementioned Big Data platforms having the JVM underneath the hood.<p>So all things being equal, Python, and then for all things not being equal, Python.
Ruby is commonly used by programmers along with Ruby on Rails for Web Development so it's scope is very limited. Python on the other hand has been widely adopted by the academia and has become pretty much essential to startups in the big data/AI sector, additionally Python can also be used with Django for web development (Instagram's website is built in Django). The pip library is vast and the Django community is on par with the Ruby on Rails community. I dont see any reason to stick with Ruby.
Ruby is a much simpler and more aesthetically pleasant language. Python has all sorts of sharp corners. You really should learn both but I think Ruby is a much easier starting point.<p>Also, a lot of research on dynamic languages is being done with Ruby, e.g. TruffleRuby, JRuby, RubyOMR, and probably a few more I'm forgetting. Each of those projects is an impressive body of work in and of itself that points to Ruby being very alive and well. Oh, almost forgot about MRuby. I don't think there are similar efforts for Python. In some sense Python is much more stagnant these days in terms of innovation at the language level.
No.<p>I wrote a small Rails project a while back and along with it small non-Rails utility that made used a couple of generic modules (mail, config). Both the Rails project and the utility bit-rotted faster than anything anything that I ever written. Ruby, the language, is pleasant, and you can write beautiful, terse, expressive code. Functional constructs are nice, etc. Soured me on Ruby, I am afraid. I liked Perl too, and Ruby is not that different.<p>Python... I don't care for the significant whites space. lambda is crippled because it has to fit into a single line, tertiary operator is weird, and compressions reads backwards to me. Haskell has the same problem. It is nice how you can start with a class, then wrap attribute access later. Writing a simple new style class is verbose. The version 2 to 3 was rough, not sure if it's done by now. There is a lot of libraries, some parts of the standard library are nice.<p>JavaScript to me is mess with classes being bolted on, different ways to build an object, different ways to handle errors, different ways to handle callbacks. The write it once and run it either in browser and server ignores that version differences (i.e. what is the crappiest browser you have to support), and in general that environment is different. node.js with the async is an interesting experiment. To me it becomes difficult to read and reason about. To me, it was surprisingly difficult, to write a small sync util in node.js. There is a metric ton of libraries. I quite like JavaScript, but to me its becoming complex (as in C++) instead of burning off the bad parts (as in C). The language will be around "forever" due to the web, so that is what I use if possible.
I've never had a language click with me the way ruby has, I use it for basically any task that isn't low level. I have never liked python at all despite them being quite similar. Do whatever makes you happiest and most productive.
Either is fine as a learning language. I'd pick Ruby if I wanted to learn how to make web apps, and Python if I wanted to work on scientific or AI projects. But, either is a very good learning language with excellent resources.
As a fan of python -and think python is overall better-, but also as someone that have learned (and used professionally) many languages, learn both. Even take a look at erlang/elixir or any other you think is interesting.<p>Ruby on Rails was a eye openner (my exposure to web was ASP classic (auch!!!) and ASP.NET (auch!!)) and the tutorial of<p><a href="http://poignant.guide/" rel="nofollow">http://poignant.guide/</a><p>Was something <i>good</i>. I choose later python just because I think is a better overall language, but I have always read what the other side have to say. I will not hate to work on ruby, in contrast to, let say, js or java.<p>Not hate a language is probably a more nice thing that just like it ;)<p>----<p>You must balance much more that just the superficial aspect of the syntax, despite that I agree syntax MATTER A LOT. With time the superficial syntax will become a more deeper aspect of the experience (when you truly understand the language and see the semantic behind the words), but the ecosystem, the thing you plan to build, how well you absorb the knowledge, etc are also important.<p>Even when 2 languages look "nice" is possible that down the road one be "better" in your mind and other "harder" or the opposite. For example I get lost reading C-like languages and get easy Pascal-like language for the same thing and the same level of difficult.<p>For example, I read<p><a href="http://learnyouahaskell.com/" rel="nofollow">http://learnyouahaskell.com/</a><p>And I loved it, but I can't make haskell work for real (to me). The language look nice at first, but it not "connect" to me. Instead I get F#.
Answering directly to the question: no, both languages coexist for so long. I don't see "Python killing Ruby".<p>Learn Ruby if you want to get started in web development, most of Ruby development projects is based on Ruby on Rails, and as a beginner is VERY easy to get started, you will get things done very quickly once you set it up.<p>Learn Python if you want to do... well, between the two of them python is way more popular in everything but web development. There's web frameworks with Python but I wouldn't recommend them for someone who is starting now (personally, I gave up on Django for Rails).<p>Nowadays it is better to start with javascript. It's not "beautiful" like those two languages, but is very forgivable and node.js is all the hype right now.
If going with the web, I'd go with JavaScript, to a degree you have to learn it anyway. Python and Ruby are both relevant for web as well. Rails vs Flask/Django - both will get the job done, plenty of use cases of major corporations using one or the other.<p>If you're doing DevOps, you should probably learn both.<p>Everything else, which is more backend, APIs, data, data science, AWS, Google Cloud, Big Data databases, etc - Python over Ruby. You may want to consider Java here tho depending on how much performance is required due to many of those aforementioned Big Data platforms having the JVM underneath the hood.<p>If you know exactly what you want and it's web, then Ruby, otherwise, all things being equal, Python, and then for all things not being equal, Python.
Ruby still has significant use in web development due to the huge popularity of Rails. Startups and established companies continue to start and maintain projects in Rails.<p>Beyond that Ruby isn't used much. But a language that's extensively used for one very common purpose is very very far from dead.
From a devops perspective, both may be needed depend on your approach to configuration management.<p>- Ruby is used for Chef.<p>- Python is used for Ansible.
Ruby created to build a DSL and accordingly allows to patch all that is possible and it sometimes causes a long search for bugs.<p>Python quality libraries seems better. for Example: I have not found a good HTTP client like Python's Requests or Guzzle from Php
Its like Rock, Paper, Scissors. One beats the other all the time. Its like a loop of Programming languages.<p>A programmer chooses a languages which is convenient for the task at hand. Ruby/Rails are amazing to lift off projects in hours.
if anything kills python or ruby it'll be golang or erlang/elixir ..my money is on Phoenix Framework / Elixir eclipsing a lot of the ruby on rails environment -- a lot of core rails devs have already begun building all new apps in Phoenix. I haven't really grokked elixir yet, but it's on my todo list someday when my day job eases up a bit.