Ruby today is slow as hell, but not as much as slower than other slow as hell languages as Ruby used to be.
After all, sharding message distribution via federation (even if you hide the federation behind a veneer of a global userid -> shard mapping) was a well understood long before Twitter even launched (e-mail... reflectors...), so it was a rather embarrassing architectural decision to not even try to account for it. Heck, I co-founded a webmail provider in '99, and one of the first things we did was implement ways to map user ids to a distributed set of backends and support for migrating accounts between backends, because we knew it'd be necessary to be able to shard smtp servers, frontends, and storage separately. That wasn't in Ruby, but the architectural pattern is so obvious.
The language change may or may not have made sense for them at the time (after all Ruby was much slower then, and they by then had the size where a rewrite of core parts to cut hosting costs might have been worth it), but that they blamed their architectural failures on Rails was a cheap shot.
Jruby a little faster than CRuby (it used to be more significantly faster, but CRuby has seen more recent performance increase); TruffleRuby is, OTOH, not slow like other implementations.
> Normally the "ruby is slow" argument, is based on not being involved with ruby and solving real problems with it.
Ruby is abstractly my preferred language, and I’ve done a fair amount in it, though I don't get to use it as much in anger because of issues other than its speed (ending up using another slow language as my main day to day.)
> Some people will just LOL this argument even harder if you add development time and code maintenance costs on that equation.
That’s just equivocation; time and cost to market is an orthogonal concern to execution speed, not a component of it; yes, Ruby has a decent code-writing experience, especially for small systems.
Probably you meant rails here. I don't see why ruby should be a problem for something not small, moreover, you should first define what a small system is, specially if you count the LOC of all the gems that you use..
Ruby is not "pretty fast". The hardware you run it on is insanely, mind bogglingly, out of this world fast and so people don't notice the way that they used to.
...which is fine, you don't always need to be fast. Just be wary of misattribution.
Truffleruby is "A high performance implementation of the Ruby programming language, built on GraalVM." If you prefer there is even a rust based ruby https://github.com/artichoke/artichoke
again, IMO, the microbenchmark, doesn't matter. What matters is the problem domain, whole stack and the whole "speed", including development, deployment and etc, and for some domains, ruby is the best and fast choice.
It's quiet fun to play around with actually, to see all your cores being utilized.
Don't ask me...
> Ruby in science is the path of most resistance; if your work isn't already hard enough
It actually isn't that hard, honestly.
Very few people do cutting edge work that requires analyzing massive amounts of data and, from my experience, other languages are not much better.
They still rely on C (or Rust) bindings, because they aren't adequate per se for the task.
> That's because everyone is using Python
Yep, the aforementioned inertia.
But, IMO, as a programming languages nerd, some syntax are worse than others and I have to review many Python programs that conceptually read like someone speaking a foreign language without knowing the rules, like "I go making shoppings". That code wasn't "created" but simply copy/pasted from somewhere else and then adapted because some concepts don't require understanding, just tinkering.
Python it's not easier than Ruby, shooting yourself in the foot with Python it's easier than in Ruby and yet, here we are.
At least in the diatribe C vs Rust, C is actually simpler than Rust as a language and programmers have to learn fewer concepts, even though Rust is better as a language/ecosystem overall.
> Everyone uses English, so you have to too
That's exactly the point, the most spoken language in the World is English spoken by non native speakers. Like me. It's not British English or American English (in Europe is Russian, anyway, and Chinese and Spanish would like to have a word with you).
So it is people's Esperanto, which is kinda of an abomination linguistically, but language evolve naturally it does not need a compiler or an interpreter to work.
When I am abroad for holidays or conferences, I can perfectly understand what people mean when they speak "Engrish", native speakers often don't.
A recent submission about it
https://news.ycombinator.com/item?id=25784683
But in programming the concepts are the same in every language, so it's not like learning Finnish if you are Egyptian, it's more like learning to ride a motorbike if you can ride a bicycle.
People learn Pandas and Numpy and Scikit-learn, not Python, when I learned how they worked porting the examples to Axon[1] wasn't hard. I managed to do it with the help of a colleague whose versed in learning programming and he thought Axon was more readable than Python. But then again, people usually think they know X better, feel more confident in X and will keep making the same mistakes over and over, because they don't know what they don't know and their salary do not depend on it. They have people like us fixing their code. Their salary depend on writing "I know X" on their CV, which usually is just not entirely true.
Ruby just got out of fashion, but it isn't inferior to any other language out there and its ecosystem is completely fine. Reminder: TruffleRuby exists.
Adoption-wise Ruby is a new Perl. Such a shame really, Ruby is one of the best scripting languages yet available, if Linux distributions had it by default it would dominate over py and shell-scripts.
It's a shame that this example will only be understood by the people who already agree with arguments against Python; but you really made my day with it.
in no particular order, on top of my mind (there are many more):
- mixed environments when you can't compartmentalize Python in a container. Python package management is one of the best examples of "poor implementation"
- mixed environments, when both Python 2.x and 3.x are present. Migration to Python 3.x is the textbook example of "badly executed". And we are still not entirely there 10 years after.
- prototyping web apps, in the same time spent configuring Python venv, you have a perfectly functioning Ruby prototype
- writing web apps, in the same time you understand how to make a custom sql query in Django, you're already selling your first product in Ruby and the website won't be ugly as hell by default. Rails is the killer app, nobody can deny it.
My biggest gripe with Python is that many times when I have to deploy Python, I discover an issue and ask the author(s), I'm back to "but It works on my computer" times, like when I started, in the 90s of previous century.
Yes, Python is used to write beautiful things such as youtube-dl and Sublime Text (porting Sublime to Python 3 is one of the reasons why Sublime is almost dead). However, given the fact that in Sublime plugins are written in Python, people flocked to (even!) Atom, because they could use other languages, not inherently better, but with less issues connected to the language used.
I lost count of how many times Sublime died on me and stopped working spouting Python errors that I had no time nor will to fix.
Disclaimer: I am a paying customer of Sublime 2 and 3.
Edit: lots of Pythonists triggered for no reason apparently. Don't take it personally, if you have counter opinions, express them. Downvoting is not an opinion, it's a passive aggressive way to show disagreement, which frankly is the reason why we're still stuck with Python. I don't mind an honest discussion and people disagreeing with me, it's why I am here after all.
worst possible choice VS not worst
> FWIW I haven't even seen Python 2 code in about 6 years.
there are a lot of scripts lurking around in corporate environments all over the World
6 years is brand new to them
There are a lot of environments "certified" to work only on, let's say, Redhat 5 <= 5.2
I can honestly say with complete confidence that I’d feel this way regardless of what language you were talking about.
In addition to this though, as someone that writes Python / Django professionally and has done so for some time, my familiarity with the language gives me the necessarily insight to see where your experience is limited. I’ve seen a few inarguable factual inaccuracies (i.e. not based on opinion) in what you’ve said in a few comments. It seems obvious that when you engage with Python and Django you aren’t doing so all that willingly. But honestly your strength in your convictions puts me off getting into a back and forth with you to reach a shared understanding. The confidence with which you’re writing feels a bit misplaced.
Your overuse of hyperbole makes it hard to tell what you actually believe and what you’d genuinely argue for in a real-life professional context rather than behind a screen name on an Internet forum, so even if I wanted to engage in a back and forth I wouldn’t even know where to meet you.
This is a classic example of the loudest and most impassioned voices framing themselves as winning because people just don’t want to engage.
This is all to say before writing off downvoters are upset people on “the other team” which are lesser than you, consider the possibility that you’re probably throwing your weight around a bit too much and are creating an environment that’s generally unpleasant. I’ve enjoyed the tech community largely moving away from the “us vs them” mentality. Truth be told, none of this shit matters enough to warrant that sort of mentality. I feel like I’ve stepped back in time reading your comments. Not only are they unenjoyable to read, but I am not an iota more enlightened about the comparative benefits of Ruby vs Python. So I ask you…what’s actually your intention in commenting in the first place? The truthful answer to that question is why I’ll continue to downvote.
I'm simply Italian and english is not my native language, so I use the most simple versions of it, resulting in what you call "vetriolic"
Have you ever heard some english native speaker imitating Italian?
they all sound like Don Vito Corleone. Should I assume they work for the mob?
So, basically, you let your prejudice guide your actions.
If you prefer possiamo parlare in Italiano, la mia lingua madre, che conosco molto bene e grazie alla quale posso esprimermi in maniera estremamente più formale. In Italiano, per esempio, le avrei dato del Lei, non del tu, che ritengo molto poco professionale fra persone che non si conoscono e stanno sostenendo una conversazione in pubblico. Nella mia lingua è un segno di reciproco rispetto.
Spero Lei capisca che il mondo parla molto poco inglese e che quello che a Lei sembra "al vetriolo" certifica solamente una sua mancanza di empatia nei confronti delle altrui culture.
Cordiali saluti.
> This is all to say before writing off downvoters are upset people on “the other team”
I have no "team" I just have 26 years of experience in the field and Python deployment is way worse than deploying PHP apps in 1995.
Also, language inconsistencies and a patchwork design, led to very confusing results, like C++, without the extreme power of C++.
Like Perl, without the extremely good bits of Perl.
I do not write Python as my daily job and I do not write Ruby since 2015.
Ruby is simply a better language than Python and Python 2, as a language, was better than the first 5-6 years of Python 3, because it was really a simple language where there was only one way to do stuff.
Python 3 is simply another language, that solved very few of the issues with packaging and dependency management it inherited.
While, for example, PHP in the same time frame it took to migrate Python from 2 to 3 solved a lot of the issues to the point that, if it was preinstalled. I would much prefer it to Python.
The only thing IMO that saved Python from oblivion is that Google invested a lot of money on it.
I strongly believe that the "team" you're talking about is people not wanting to hear that, for some people like me, Python sucks and that we would never use it if were not forced to.
It is what it is.
The problem for Dlang is that it never reached the popularity Ruby did.
Airbnb, Github, Shopify, Gitlab, old Twitter (and many, many others) are all written entirely in Ruby on Rails.
> one that lacks the elegance and consistency
upvoted for perfectly concise description of that language.
it is even more sad knowing that high quality alternatives for the most popular libraries exist, but inertia is simply too high.
@work I've tried to introduce Ruby to my colleagues that are very bad at programming, but good at science. They ditched it with reasons like "I don't like it" or "it's too slow" without even measuring (it is not! Shopify would have died by now). I'm still using it without them knowing and it's the reason why I'm 10x faster than everybody else to build solutions.
The other language it's the only one they "learned" at uni and keep using it for everything, even when it's the worst possible choice, management doesn't care and doesn't know the difference.
software engineering is still not engineering, unfortunately.