Live data from Hacker News

Ruby 3.2.0 is from another dimension

tomaszs2.medium.com

221–230 of 341 posts

Re: Ruby 3.2.0 is from another dimension

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

I think the timing was the most important factor.

Perl was everywhere (on Linux/Unix). Then Python came along an offered enough net benefit over Perl that it really started to displace it, and became the defacto scripting language that you would reach for when creating programs on Linux/Unix.

Ruby has some niceties over python, but doesn't provide enough of a net benefit over it for that same kind of displacement to happen.

Re: Ruby 3.2.0 is from another dimension

#222
post #164
post #46

Earlier quoted context omitted.

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…

I think you're spot on. Ruby actually gained wider appeal only when it gained visibility in the US (via rails). Being present in the markets which drive adoption matters more than being consistent, which python isn't ("one way of doing things" is mostly a meme nowadays, everyone touching python knows it's fake).

PHP got popular coz it could get barely code-literate HTML/CSS web designer to write a dynamic app, and host it easily

Ruby got popular coz Rails could get barely code-literate graduate to write CRUD app and so it was cheap (famous 15 minutes to blog tutorial) for companies.

JS got popular coz, well you ain't got fucking choice on frontend and having your then-frontend JS/HTML/CSS designer be able to also do backend is, well, again, easy and cheap.

There is clear pattern here...

Re: Ruby 3.2.0 is from another dimension

#223
Love both languages. However, by the time I discovered Ruby, around 2010, I had already invested a lot of time in Python - and the Python ecosystem was already leaps and bounds ahead when it came to numerical and analysis-related libraries. But Ruby had an elegance to it and expressiveness which was a welcome change from Python and other commonly-used languages at the time. I think a lot of people had similar experiences but were already invested in a tool which came with a large collection of ready-made and tested add-ons.

Re: Ruby 3.2.0 is from another dimension

#224

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…

Ruby is typically brief and clear.

I work in Python now, and I often have to use 5-7 lines for what would have been 2-4 in Ruby. Because you have to clutter the Python with trivial details, not because the Ruby code is "magic".

Re: Ruby 3.2.0 is from another dimension

#225
post #217

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 woudn't exactly call it consistent and design decisions are questionable. Even the article-mentioned def foo(*) bar(*) end is some needless nonsensical bloat, who on earth complained "oh, saying def foo(a) is so 90s, we need to have option to replace it with symbol used for multiplication or pointers in some cases!" It's mediocre language that happened to have some then-popular web framework written in

Well there is also:

  def foo(*rest)
    bar(*rest)
  end

if that helps? What would you prefer instead of the asterisk?

Re: Ruby 3.2.0 is from another dimension

#226
post #206

Earlier quoted context omitted.

Language design is a hard problem. You have to make so many compromises to get it to the point where it works for a large variety of use cases that the degree of ugliness is almost directly proportional to the breadth of application and adoption. The only languages that manage to stay clean are the ones that nobody uses. I don't think that's avoidable. Mistakes made early on have a habit of compounding over time and…

On that we very much agree. I think it's definitely worth considering what could / can be done better, but people often argue deeply about things that aren't really a massive deal. You've pointed out examples that are much more interesting than "should __len__() have been called len()". Certainly makes one appreciate Guido's stewardship in keeping the language fairly clean but applicable to large number of use cases…

Yes, I think he did an amazing job. Being the maintainer of a popular open source project is the most thankless job and if the project is a language or an operating system doubly so. Every Tom, Dick & Harriet that has ever opened a CS book will have an opinion and dealing with all that over the years in a courteous way really adds up.

Re: Ruby 3.2.0 is from another dimension

#227

Earlier quoted context omitted.

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/filter are considered inferior in Python to list comprehensions. res = [x**2 for x in range(10) if x != 5]

That's an utter mess of control flow right here. Read it left to right ? Wrong. Right to left ? wrong.

Looking at it makes me miss Perl oneliners

Re: Ruby 3.2.0 is from another dimension

#228
post #70

Earlier quoted context omitted.

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

Can I assume the '85' in your username indicates a birth year? Zope was a Python project from the late 90s, and had quite a bit of attention and traction in the early cms/publishing days. That brought Python attention, and certainly gave it some mindshare in the late 90s.

I remember it existing back then and near-nobody caring

Re: Ruby 3.2.0 is from another dimension

#229
post #45

Earlier quoted context omitted.

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 an…

Well, Ruby 3 has Ractors which is still in experimental stage but offers true multicore processing.

It's quiet fun to play around with actually, to see all your cores being utilized.

Re: Ruby 3.2.0 is from another dimension

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

I think Python was conveniently there when teaching was looking to switch away from Java. Each wave of students exiting their institutions with a Python background made Python more popular in the field.
Post reply on HN