Live data from Hacker News

Ruby 3.2.0 is from another dimension

tomaszs2.medium.com

181–190 of 341 posts

Re: Ruby 3.2.0 is from another dimension

#181

Earlier quoted context omitted.

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

With all due respect, as someone that’s probably downvoted everything you’ve said on this thread, my reasons for doing so have nothing to do with your language preferences. Your comments are needlessly impassioned and vitriolic. I am not even remotely interested in the type of religious war discussion you are trying to foster. I can honestly say with complete confidence that I’d feel this way regardless of what langu…

> Your comments are needlessly impassioned and vitriolic

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, especially Americans, trying to speak 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. It's hyperbolic, I agree, but it's also not far from the truth. PHP was a simple FTP all the files on some host, Python projects most of the time miss or have incomplete requirements.txt, you have to reverse engineer dependencies, there are N distributions so you have something developed on Windows using Conda but the deployment server is Debian stable with pip etc. etc.

I don't think I'm saying something people never faced, but if that is the case, well, It means I am the only one and that is good news!

Add to that that, not to their fault, scientist have been sold the lie that Python "is easy" or "is the language for scientists" (I still remember in 1995 at uni when as a CS student I was working together with the Biology department on DNA sequencing and Perl was all the rage thanks to "Beginning Perl for bioinformatics" book, how much things can change in a couple of decades...)

Python is not so easy and coding something that runs in production is not the same thing of running experiments in a lab once, where "it just works" is enough.

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, broke backwards compatibility and for a decade coexisted with Python2 making everything a lot more problematic than it should have been.

Is that a language's fault? Only marginally, but I think that the way transitions are handled is one of those things that tell you a lot about how much you can trust a tool. Python failed miserably.

While, for example, PHP in the same time frame it took to migrate Python from 2 to 3 solved a lot of its problems to the point that, if it was preinstalled, I would much prefer it to Python.

Meanwhile Ruby, the real argument of this submission, arrived at version 3.2 with a new Jit that improves performance 40% in benchmarks. Not bad for a "slow language".

The only thing IMO that saved Python from oblivion is that Google invested a lot of money on it.

Briefly about the ecosystem: I've recently started using Polars in Rust and Elixir and it's a 100% replacement with better API and performance [1] than Pandas. It has also Python and Ruby bindings. Why people do not adopt it? Because inertia and status quo, of course. Which is not very "scientific" if you ask me and right now even the "Python is were all the ML/AI stuff is happening" IMO is not true anymore.

That's what I want to talk about and hear opinions, certainly I'm not interested in your opinion about me.

I'm an actual 100% mister nobody, I'm not an interesting character in the most absolute way.

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.

[1] https://h2oai.github.io/db-benchmark/

EDIT: TBF something good came out from Python: Godot GD Script, which I actually enjoy using.

Re: Ruby 3.2.0 is from another dimension

#182

Earlier quoted context omitted.

Note that the Python core team started working with the scientific community very early on, the first scientific packages (as well as additions to python for scicom like extended slices) date back to the mid 90s. GvR’s background probably helped spread the word and thus get feedback, but as often Python’s overnight success was the result of years of work.

The Python core team early on was part of the scientific community. GvR worked at CWI (Centrum voor Wiskunde en Informatica), which was a part of the particle accelerator installation that Amsterdam had once upon a time until most such research went to Switzerland and the USA. CWI has, together with NikHef (the Dutch Nuclear Phyiscs Institute) done a lot of ground breaking research over the years and was the cradle o…

Oh, I didn't realize until now that Guido worked there.

So we got at least two major contributions from the CWI. One is Python and the other one is the game of Hack. :)

Re: Ruby 3.2.0 is from another dimension

#183

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…

I also explored why Ruby is so hard to learn for people like me on my blog [1]. I totally agree with you. I had to use Ruby at work and I really struggled to grok it. I've picked up many programming languages in my career but Ruby was one of the hardest to really understand.

[1] https://wbk.one/article/a463c360/the-ruby-tutorial-i-wish-i-...

Re: Ruby 3.2.0 is from another dimension

#184

Earlier quoted context omitted.

Django might be better but Ruby as a language is way better thought out than Python. Python feels like it's cobbled together compared to Ruby. There is a certain elegance with the language, that is hard to find elsewhere.

I disagree. I perceive no difference in elegance between the two languages nor a particular “cobbled together” aspect to Python.

I use Python every day and I like it. However, functional semantics are not elegant at all IMO. Using list() and map() all over the place is not cool, and like many others say, list comprehensions, though concise, are not always that readable (and I say this as someone who reads and writes plenty of them). Lambdas are not great, either.

In Django in particular, async feels like an afterthought, compared to other frameworks where it's first class.

Re: Ruby 3.2.0 is from another dimension

#185
post #176
post #131

Earlier quoted context omitted.

Yes, like all JITs by definition. The actual memory increase depends heavily on the app size so I could quote some figures but it would likely be irrelevant to you.

So not much to shout about given that Ruby's memory usage isn't great to begin with?

Depends what you are after and what you are constrained by.

Some people might be struggling with memory usage and may not see it as worth it, but for others who may have some extra RAM sitting around, it might come as a free perf increase.

As for memory usage, proper use of CoW can reduce it dramatically: https://github.com/Shopify/pitchfork/blob/master/benchmark/R...

Re: Ruby 3.2.0 is from another dimension

#186
post #85

Earlier quoted context omitted.

It's a convention, quite a nice one, but not all libraries are consistent and it does have different meanings too (! is sometimes used for "raise an error instead of returning a boolean"). In the Python case, `list.sort()` operates on the object, so you can kind of expect it to do mutation (but there's no convention / guarantee). Though it only makes sense as a function that the list object itself implements. `sorted…

> it does have different meanings too the meaning is the same high level: it has side effects, being it a destructive update, an in place operation or throwing an exception. > `sorted` is a general function that gives you a sorted list from any iterable iterable in Python is a very loose concept though. And it's not very consistent too sorted("gheliabciou") ['a', 'b', 'c', 'e', 'g', 'h', 'i', 'i', 'l', 'o', 'u'] you…

Lots of objects don't have a natural way to return a sorted version of themselves, especially inplace (what's the reverse sort of a range, for example). You get the same in Ruby, as you've just demonstrated. Sorting into a list is the only thing that makes sense in all cases.

In that way `sorted` _is_ totally consistent - it always takes an iterable and returns a list of the elements. If we can't agree on that then I don't think there's much of a discussion to be had here.

Re: Ruby 3.2.0 is from another dimension

#187

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…

> I would argue Python is very consistent in its design, it aims to only have one obvious way to do things

This argument is dead the second one stumbles upon the string interpolation/formatting situation. Or the list comprehensions, ew.

Re: Ruby 3.2.0 is from another dimension

#188

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…

Rails is quite the double-edged sword, too. Even putting aside the controversial close ties to DHH (which is a hell of an exception to be making), the dominating presence of Rails within the Ruby ecosystem means that any Ruby-adjacent project either becomes a Rails-adjacent project (and possibly gets absorbed into Rails itself) or fades into irrelevance. It makes expanding the language into non-web framework domains really challenging.

It appears the Elixir community has observed this pattern and has learned from it; time will tell whether that lovely language can build enough popularity to overcome its relative niche status.

(Context: Ruby is my primary programming language; I rotate clients fairly frequently; nobody doesn’t use Rails.)

Re: Ruby 3.2.0 is from another dimension

#189

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…

IMO Ruby the language is a great enabler. The Ruby ecosystem is the real selling point.

It's the most productive ecosystem out there because of the sheer level of polish that exists within the Gem ecosystem and the Aspect Oriented Programming capabilities that make it so easy to plug and layer functionality from them.

Combine that with this relentless commitment to Developer Experience and it's a tremendous enabler. No other language and ecosystem that I know of enables so few people to accomplish so much, so fast, so well.

Post reply on HN