Live data from Hacker News

Ruby 3.2.0 is from another dimension

tomaszs2.medium.com

71–80 of 341 posts

Re: Ruby 3.2.0 is from another dimension

#71
post #45

Earlier quoted context omitted.

the "too slow argument" is normally based on old internet opinions and benchmarks.. ruby today is pretty fast. In the company that I work, we do a lot of system programming using ruby, web development, etc.. It came to substitute perl around 2005, and we still using it successfully today. When we need something really, really fast, specially including parallel processing and etc, we just use jruby.

To think I'd live to see the day the JVM is regarded as "really, really fast". 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.

The java based ruby, removes the GIL, which provides us real multithreading.

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.

Re: Ruby 3.2.0 is from another dimension

#72

Ruby is my favorite language, and often it is a joy to use because of its combined attributes of brevity, expressive power, and feature consistency. It's disappointing that there are so many more jobs for another popular language - one that lacks the elegance and consistency but which has a larger ecosystem. As far as I know, the only well known reason for a company to choose Ruby is if they want Rails (and obviously…

Ruby was a day late and a dollar short. "Established language X, but cleaner and more elegant" has never succeeded on its own and never will; if you want people to switch languages then you have to have a clear selling point that language X doesn't do.

(Also if you ask me Ruby never was cleaner and more elegant than Python in the first place, at least in the ways that matter; there are definitely things it does better, but if one of your language's selling points is scripting style use then there are limits to the value of consistency)

Re: Ruby 3.2.0 is from another dimension

#73

Earlier quoted context omitted.

> the other comparatively-unpleasant language > 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 lik…

In what situation is python the worst possible choice, while ruby which is very similar to it is the best possible choice? Unless you're doing some clever ruby metaprogramming type stuff which is totally impossible in python.

> In what situation is python the worst possible choice, while ruby which is very similar to it is the best possible choice?

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.

Re: Ruby 3.2.0 is from another dimension

#74
post #46

Earlier quoted context omitted.

You are obviously referring to Python and so I would like to note a few things. (I have nothing against Ruby) > Ruby ... its combined attributes of brevity, expressive power, and feature consistency. > [Python] lacks the elegance and consistency First I would argue Python is very consistent in its design, it aims to only have one obvious way to do things and so it's easy to guess how apis will work. It also aims for…

I explored this topic a while ago on my blog [0] In essence, I don't think it has anything to do with elegance, syntax, or "easiness". It's more about timing + origin + corporate adoption: * Python was created in Europe, Ruby was created in Japan - when Ruby gained more recognition in English-speaking world (~2004), Python has already been present and used worldwide for a decade * Ruby was created as a personal, hobb…

Be that as it may, what does it matter? You are chronicling ancient history at this point. These languages are more alike than they are different.

Or at least they are similar enough that one pulled ahead and subsumed the other. Like a twin eating his brother in the womb. Maybe it could have gone the other way and we would have ended up pretty much in the same place. Or maybe it is a case of worse is better. But not that much worse/better frankly and here we are. Salivating over rust. ;)

Re: Ruby 3.2.0 is from another dimension

#75
post #56
post #29

Earlier quoted context omitted.

Python gained traction because of Google (Google used it initially then Guido worked for them for a decade+, vs. Matz at Heroku/salesforce) and then because it's the easiest way to use ML libs. That's it. It's slower than Ruby, has worse package management and less consistent syntax but if you want to use Tensorflow, PyTorch, etc..., it's the default.

> It's slower than Ruby. Any reference/numbers to back this up ? Just genuinely curious about this.

Basically any benchmark that uses just the language. Throw some loops and maths in there.

It doesn't really matter though, both languages are used typically for scripting. But just shows it's not really about the "language", it's about the ecosystem.

Re: Ruby 3.2.0 is from another dimension

#76

Earlier quoted context omitted.

> one that lacks the elegance and consistency but which has a larger ecosystem. ... and decent first party docs, actual code modules rather than “execute every source file in the global namespace”, a first party Windows build, etc., etc., etc. If the Ruby community can't acknowledge the real things holding it back compared to other available options, well, that makes it that much harder to catch up.

They did apparently manage to make their interpreter figure out where mismatched "end" statements are most likely to be, which was one several serious pain points for me with the language. I don't think the execution model you mention, which results in the absurdity of C style transitive includes polluting the global namespace, will ever be changed though.

> They did apparently manage to make their interpreter figure out where mismatched "end" statements are most likely to be, which was one several serious pain points for me with the language.

Searching for a mismatched/missing _end_ is preferable to having a line or block get accidentally unindented and end up still "working" (running) while producing very confusing results.

Moving blocks of code in Python requires great care, especially since the editor cannot reasonably guess which scope level the paste should go into.

Also, the lack of an _end_ or bracket as with other languages means the editor cannot visually assist with identifying block boundaries. To be fair though, my vim-memory of using % to bounce between start/end brackets doesn't work in Ruby because of the begin/end words instead of matched symbols :(. However, RubyMine does show the beginning of the block as an unobtrusive popup at the top of the window when your cursor is on the _end_ keyword. That's super handy when there are several blocks closing in succession.

Re: Ruby 3.2.0 is from another dimension

#78
post #70

Earlier quoted context omitted.

Revisionist history. Python was huge before Google even existed.

??? Python was huge in the 90's? News to me. No one I knew knew about it until like 2010.

LOL, you and your friends have been living under a rock. I have been using Python since (at most) 2002.

Re: Ruby 3.2.0 is from another dimension

#80
post #66

Earlier quoted context omitted.

> the other comparatively-unpleasant language > 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 lik…

I think Dlang is better than the other languages mentioned in this thread, but I know almost no one uses it. It is what it is.

I agree with your statement.

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.

Post reply on HN