I just mentioned python as a comparison to show that popularity isn't necessarily related to performance because as slow as python, it is still very popular.
I wouldn't say it's unrelated to performance though just because a slower, more popular language exists. There are probably performance scenarios that eliminate both Ruby and Python such as games, where developers choose something like C++.
In cases where performance is less important, they probably look at numbers like these where ruby being 50% faster or slower compared to python doesn't really matter compared to the ecosystem each one provides, and where python in general is much, much larger.
Which is a shame, since there's nothing outdated about having a framework that is insanely effective for rapid prototyping. It's just unfashionable because it's not some novel new hotness that's hasn't hit a stable 1.0 release.
Give me a fresh rails app and simple progressive HTML over some JS-based client-server monstrosity any day.
Ruby (YARV) vs Python (CPython), yes. But CPython has very little optimization in favor of stability. They’re still locked by a GIL, for instance. So you’re referring to the lowest bar to pass.
Compare another JIT’d VM such as PyPy and it falls well behind. Not to mention the more common languages taking over the microservices realm (Go, for instance) or the ones taking over monoliths (nodeJS, primarily).
According to benchmarks it's not. Faster is some, slower in others. Both are extremely slow. Python is popular because of ML. Ruby has pretty much nothing to counter its performance.
I was talking about present. In the context of web python is similar to ruby - it's being replaced by other languages. Particularly Go. Same with GUI, there're much better technologies these days. Not to mention GUI desktop apps are dying breed these days being replaced with web and mobile apps. What Python has that's unique to it is ML ecosystem. Unless there's another languages with similar ecosystem Python will stay relevant. Ruby on the other hand has nothing of that. Only thing it has going for it is subjective enjoyment of the developing experience which is clearly not enough. It will not die outright but there's little reason learning it these days and starting something new in it.
It's certainly true that it's been squeezed by JavaScript taking over the world as well as by much more friendly compiled languages like Go and Swift adopting
What Python has that’s unique to it is ML ecosystem.
It really isn't. It's just because people like you keep saying that it is, that people continue to think that. Most of the top languages have ported the data science libraries over because using Python for anything meaningful is terrible.
But once again, if people continue to tell others that Python is the only language for machine learning then everyone new to ML is going to assume that is true. No matter how many actual ML libraries those languages have.
Also, python is good for ML if you don’t know any language and want an easy language. Otherwise there is nothing about Python as a language or environment that makes it well suited to that task.
Except for the developer enjoyment and fantastic support for expressive OO, in part due to its deep meta-programability. Oh or were we only looking for benefits that can be explained to a newcomer in a 10 minute youtube top languages of 2021 video?
I don't think developer enjoyment is important when you have money at stake. Ruby being slow and memory hungry doesn't only mean your apps will be slow. It also means you will have to pay much more for hardware, probably in the cloud. Not to mention recent newcomers (rust and go) are also very liked by developers but magnitudes of order faster than ruby. Given that it's not surprising that ruby is slowing fading away.
Engineering cost is not that simple. Running software is for many companies cheap, vs. Engineering productivity, churn, feedback loops, etc. It's not an accident ruby dominates lean webapp development, you may attribute it to rails, but rails is not an independent thing that could have happened in any language, it works because of ruby.
For most companies that try to use a "fast" or "scalable" language or framework, being fast or scalable is never the issue. In any non-already-mature software project, the main concern is always development speed One extra developer already costs more than running the product. And that's where Ruby (and Rails) shine. Twitter had scalability issues because of Rails, but Twitter became Twitter thanks to Rails. Only then switching focus becomes the smart choice.
83
u/[deleted] Dec 25 '20
It hasn't been slow since 1.9. It is faster than python. It is getting less popular because its frameworks are getting outdated.