Live data from Hacker News

Ruby 3.2.0 is from another dimension

tomaszs2.medium.com

51–60 of 341 posts

Re: Ruby 3.2.0 is from another dimension

#51

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…

How is "I don't like it" not a good reason for not using something? Ruby in science is the path of most resistance; if your work isn't already hard enough, here's a way to make it harder. That's because everyone is using Python. Think of it like writing scientific papers in English even though you like Esperanto better. Everyone uses English, so you have to too. That's Python's current state.

> How is "I don't like it" not a good reason for not using something?

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

[1] https://github.com/elixir-nx/axon

edit: formatting

Re: Ruby 3.2.0 is from another dimension

#52

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…

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…

One aspect in which Ruby is much more consistent than Python:

    sorted(arr)
    arr.sort()
versus

    arr.sort
    arr.sort!

Re: Ruby 3.2.0 is from another dimension

#53
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…

> * Ruby was created as a personal, hobby project; Python was created while Guido worked in research institutions, and it helped Python gain recognition in academia environment

As a data point, I remember interviewing for an internship in a research institution doing some work on medical images around 2002/2003 and the supervisor telling me that Python was the lingua franca in this domain (from a research and POC development perspective).

Re: Ruby 3.2.0 is from another dimension

#54

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…

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…

As someone who loves both Python and Ruby, and uses them both daily, I really though they were referring to JavaScript (with node/deno et all).

Re: Ruby 3.2.0 is from another dimension

#55
>The new JIT compiler based on ground breaking Basic Block Versioning already gives some exciting results

>This novel approach lazily generates type-specialized versions of basic blocks on-the-fly while propagating context-dependent type information.

Does anyone know how it is different from tracing JIT compilers?

Re: Ruby 3.2.0 is from another dimension

#56
post #29

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…

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.

Re: Ruby 3.2.0 is from another dimension

#57

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…

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

Re: Ruby 3.2.0 is from another dimension

#59

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…

I'm sorry, I agree it is a beautiful language.

But Ruby is slow. Performance matters. In a world when everything seems to run in cloud servers, efficiency matters.

If you can have 20 times more simultaneous users in the same cloud server by using a different tech stack, there's no reason to keep using Ruby.

For the record, I also think Python is generally slow, but it has improved in the latest version, and the important libraries for Python are written in C++.

Re: Ruby 3.2.0 is from another dimension

#60

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…

When I looked at Python vs Ruby many years ago, I found the opposite: Why does Python have (special) functions like len() and map(), instead of 'properly' supporting both OOP (len should just be a method on objects) and/or FP (support multi-line lambdas so I can actually use map/filter etc). I never understood how this can be considered consistent at all, and those IMHO language design warts made me look into Ruby at…

map() and filter() being functions means you can run them on any object that implements __iter__(). To make them methods they'd have to be added to each individual type that might want to use them. IIRC Ruby does that using mixins but that takes up a lot of room in the namespace of each type and makes it a little harder to figure out where the methods come from.

The justification for len() is thinner: Guido van Rossum thinks it looks better, and it enforces a consistent name with a consistent meaning (you don't get length methods with different names, or with the right name but strange behavior). Under the hood it just calls obj.__len__(), so it's only the notation that's not OOP.

There are no multi-line lambdas because nobody could come up with an indentation-based syntax for them that Guido van Rossum was happy with.

In short: none of them improved, all of them have reasons, some of those reasons are bad.

Post reply on HN