Live data from Hacker News

Ruby 3.2.0 is from another dimension

tomaszs2.medium.com

281–290 of 341 posts

Re: Ruby 3.2.0 is from another dimension

#281
post #37

Earlier quoted context omitted.

> Maybe like blockchain, once the AI/ML fantasy hype dies down Two minutes of silence for the poor sods who still thinks that AI/ML is pure hype. (Granted, there is hype. But there is much real stuff.) And, also, blockchain and ML/AI are nothing similar, except for Twitter bottom-feeders trying to milk each. AI/ML already has real applications with hundreds of millions of dollars actual value created. And just like C…

>AI/ML already has real applications with hundreds of millions of dollars actual value created. Hundreds of billions a year probably (and that may be low) if you count online advertising and large consumer facing sites in general. If you turned off the ML behind Facebook/Google/Netflix/Amazon then you'd be lucky to only lose 50% revenue based on my personal experience of adding ML on top of such products.

That's a handful of companies. I'm not talking about them (and they also use many other languages in addition to Python).

I said, "there are so many more jobs for another popular language", and I was clearly speaking of the broad job market... not a few big players.

Re: Ruby 3.2.0 is from another dimension

#282
post #188

Earlier quoted context omitted.

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…

What's Elixir without Phoenix?

Elixir is Erlang/BEAM VM, and Phoenix is a small (but awesome) thing in comparison.

Elixir has first class access to an incredibly rich (and battled-hardened) network/distributed ecosystem... if you need it. I know there are major voip companies who build on it, and of course Discord is famous for what they were able to do efficiently with it. These are all outside the realm of Phoenix.

That's not to say Phoenix isn't significant. I think it will definitely be a bridge that pulls Ruby (and the few willing Python) devs over to Elixir. It got me, and I built a successful project in it a few years ago.

Re: Ruby 3.2.0 is from another dimension

#283

Earlier quoted context omitted.

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

> "I go make shoppings"

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.

Re: Ruby 3.2.0 is from another dimension

#284

Earlier quoted context omitted.

>once the AI/ML fantasy hype dies Sure. Once all of online advertising, search (web, ecommerce, specialized sites, etc.), image editing, spell checking, recommendations (streaming, ecommerce, email, marketing, etc.) and a hundred other things cease to exist. Or more broadly once every large consumer facing company decides, for whatever reason, that it'd prefer to make significantly less money. People talking about th…

What percentage of companies (including startups) that use Python are using anything more than Django/Flask/sqlalchemy and the usual network modules? I did not say that AI/ML is not useful. But I'm quite sure that some (many) of the companies using Python are not doing any of that - even if they say on their pitch deck that they are or will.

I'm not sure why you're focused on startups so much when a minority of engineers work at them. Python is also used heavily for data analytics, data science and data engineering which aren't AI/ML and likely much more common at startups.

Re: Ruby 3.2.0 is from another dimension

#285

Earlier quoted context omitted.

By who? I always have to stare at list comprehensions very closely to understand operation being done. The source of the data is in the middle, where it should logically come first. The filter is at the end, where logically it should come after the source. The mapping is at the start, where logically it should come at the end. I find the monadic, additive style of Ruby much easier to understand: 10.times.select { |x|…

> By who? By the Python developers and its wider community. As Python doesn't have anonymous function blocks in the same way as Ruby (only lambda expressions), tutorials, lessons and the Python docs steer users toward list comprehensions instead. I'm not saying the ruby syntax is not elegant (it is), I'm saying in Python list comprehensions are recommended over filter/map functions. On the composable front, personall…

You're effectively saying something like: Canadians prefer Canada. What about the rest of the world?

Once you start adding more "and" to the if-statement in the list comprehension, it becomes a mess. Breaking them down to smaller chunks is required because comprehensions are messy. You are doing smaller chunks due to a shortcoming of comprehensions. Chaining is nice option to have, especially when the chained functions are straight forward.

Re: Ruby 3.2.0 is from another dimension

#286

Earlier quoted context omitted.

>AI/ML already has real applications with hundreds of millions of dollars actual value created. Hundreds of billions a year probably (and that may be low) if you count online advertising and large consumer facing sites in general. If you turned off the ML behind Facebook/Google/Netflix/Amazon then you'd be lucky to only lose 50% revenue based on my personal experience of adding ML on top of such products.

That's a handful of companies. I'm not talking about them (and they also use many other languages in addition to Python). I said, "there are so many more jobs for another popular language", and I was clearly speaking of the broad job market... not a few big players.

>I said, "there are so many more jobs for another popular language", and I was clearly speaking of the broad job market... not a few big players.

Most every large company uses AI/ML to actually drive revenue and the number of engineers they'll hire dwarfs all the small startups put together.

To you question however looking at the latest recruitment thread on HN there's roughly twice as much Python as Ruby. About 30% of the Python work is Data/ML related at first glance. So 40% more companies are hiring for Python versus Ruby pure backend right now. I'm not sure how a 40% difference is such a catastrophic difference.

Python is popular because most every large company uses it nowadays and not because a bunch of non-name startups are using it slightly more often than Ruby.

Re: Ruby 3.2.0 is from another dimension

#287
post #5

What's status of static typing checking ?

A disaster so far. We tried using Sorbet for a component and we hit ab edgecase where we had to completely remove it. There is a lot of undocumented stuff, conflict between the right tooling and specifically for Sorbet, the lack of structural typing for a language like Ruby (you know, duck typing), makes it very unsuitable, nowhere near Typescript.

When we tested, there was barely an experimental type checker for RBS, that was 1 year ago.

Overall, we tried, had to bail out and stick to YARD. Horrible experience.

Re: Ruby 3.2.0 is from another dimension

#288

Earlier quoted context omitted.

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

Yeah indentation in Python can be problematic - I've run into problems from time to time.

The issue with Ruby specifically (which doesn't exist in other common languages that have bracket- or keyword-delimited blocks) is that non-keywords can start blocks. So it's difficult for an editor to determine the likely matches, and it's even harder for a human. That's my vague recollection of the problem that I ran into numerous times, though it was about a decade ago.

Re: Ruby 3.2.0 is from another dimension

#289
post #108

Earlier quoted context omitted.

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

I had over million euro of machinery stop because a rarely reached branch had one line with one less space due to missing linter run. Apparently Python 3 still doesn't fully parse and validate code on load, or somehow it made a valid if nonsense AST out of that.

Sure, Python has a variation of the same problem.

Re: Ruby 3.2.0 is from another dimension

#290
post #269

Earlier quoted context omitted.

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

> 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 :( Put "runtime macros/matchit.vim" into your .vimrc. Or for even better support add the matchup plugin. https://github.com/andymass/vim-matchup

I'm not a vim user, but I think the problem with Ruby here is that it's not begin/end. It's anything that evaluates to an iterable/end.
Post reply on HN