Live data from Hacker News

Has Python killed Ruby?

news.ycombinator.com

11–20 of 64 posts

Re: Has Python killed Ruby?

#12
I use both fairly regularly, and they are very similar.

Where they are different in terms of syntax or capability or philosophy, I nearly always prefer ruby.

I find bundler/Gemfile/rvm to be less headachy for project dependency management than pip/requirements.txt/venv.

For me, ruby code is easier and more pleasant to read.

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.

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.

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.

Re: Has Python killed Ruby?

#13
post #9

From a devops perspective, both may be needed depend on your approach to configuration management. - Ruby is used for Chef. - Python is used for Ansible.

Not much of Python is exposed through Ansible. Almost none in fact. Unless you're deciding to write your own modules, and even then you don't have to use Python. From a user's perspective Ansible is mostly YAML and Jinja2 filters.

Chef on the other hand is Ruby. Pretty much fully exposed as such.

Re: Has Python killed Ruby?

#15
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.

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.

Re: Has Python killed Ruby?

#16

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. 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 bei…

I agree Ruby is visually nicer and more aesthetic (though that will always be subjective), but I'd say it's probably harder for a beginner due to all of the metaprogramming constructs.

Python is also very much not stagnant. Look at all of the major changes and feature additions in Python 3.3, 3.4, 3.5, and now 3.6.

Re: Has Python killed Ruby?

#17
Answering directly to the question: no, both languages coexist for so long. I don't see "Python killing Ruby".

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.

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).

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.

Re: Has Python killed Ruby?

#18
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.

If you're doing DevOps, you should probably learn both.

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.

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.

Re: Has Python killed Ruby?

#19
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.

If you're doing DevOps, you should probably learn both.

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.

So all things being equal, Python, and then for all things not being equal, Python.

Re: Has Python killed Ruby?

#20

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. 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 bei…

I agree Ruby is visually nicer and more aesthetic (though that will always be subjective), but I'd say it's probably harder for a beginner due to all of the metaprogramming constructs. Python is also very much not stagnant. Look at all of the major changes and feature additions in Python 3.3, 3.4, 3.5, and now 3.6.

Not just visually. It is also conceptually much more aesthetically pleasant. I still don't know how metaclasses, descriptors, __magic__ methods, multiple inheritance, all the different string formatting schemes, generators/co-routines, etc. work in Python. The amount of stuff you have to learn in Python is a lot more than in Ruby.
Post reply on HN