Live data from Hacker News

Ruby 4.0.0

ruby-lang.org

101–110 of 197 posts

Re: Ruby 4.0.0

#101
post #79

Happy bday ruby! For the usual doomsdaysayers saying "ruby can't X so I left it for Y", when X is typing, RBS is becoming the accepted standard (now that sorbet supports it),and RBS inline notation next to signature/code too (for peeps complaining about separate files); when X is LSP, ruby-lsp is the standard and already supports "go to definition" (its major hole for a long time), and its plugin architecture allows…

It’s just inferior to Python, nobody is making a more complex argument than that. Why ever use Ruby when there’s a virtually identical system that’s faster with a bigger community.

Ruby is a lot less awful than Python in my opinion. That is of course a very subjective opinion. The only reason I write more Python than Ruby is that ruby lacks the libraries I need.

Somewhere along the line Python got all the momentum, and ruby got none and now python is better if you just want to get shit done.

But man. I wish it was the other way around. I have one code snippet that summarises what I dislike about python:

    if input() == "dynamic scope?":
        defined = "happyhappy"
    print(defined)
    
Seeing that I understand why I see yuck in just about every corner of python.

Edit: in ruby it also works, but the variable is at least always defined.

Re: Ruby 4.0.0

#102
post #87

Earlier quoted context omitted.

Fairly hardcore rubyist here. Ruby-lsp is excellent. But in no way is RBS becoming standard. Maybe it will, I don’t know. But adoption is very, very low as of today. Rbs-inline is just someone’s pet project and has very little activity (though it does appear that the person who wrote it is trying to implement it directly into Rbs now, which would be great) Personally I can’t see any comment based typing system gainin…

As long as Matz is firmly against, inline typing should never be a part of Ruby. I started working on a large Rails codebase that adopted Sorbet and it is nothing but an impediment to progress.

I think it will need to be a strong 3rd party that basically gives it the Typescript treatment.

Adds type annotations to the core language syntax. The compiler does type checking, strips the annotations, and outputs plain Ruby.

Re: Ruby 4.0.0

#103

Earlier quoted context omitted.

> Python is one of the Lingua Franca of scientific, data, and most importantly, ai communities You mean it's the most used frontend for all the C and C++ libraries that are used for scientific computing, data and AI.

Semantics.

Literally all those libraries are usable with Ruby. Libtorch, BLAS, LAPACK, Tensorflow, etc...

Re: Ruby 4.0.0

#104

Ruby 4.0's parallel execution improvements are a game-changer for the ecosystem. The ruby::Box feature addresses one of the biggest pain points - GIL limitations - while maintaining Ruby's elegance. What's particularly exciting is how this positions Ruby for modern workloads. With proper parallelism, Ruby apps can finally compete with Go and Node.js in concurrent scenarios without sacrificing developer happiness. The…

> "With proper parallelism, Ruby apps can finally compete with Go and Node.js in concurrent scenarios without sacrificing developer happiness"

In theory, maybie. Parallelism support isn't a boolean though as there's a lot of additional factors at play. Just as one example, late stage Visual Basic also got parallelism support, but it really didn't help the overall positioning of the the language among its peers.

Re: Ruby 4.0.0

#105
post #79

Happy bday ruby! For the usual doomsdaysayers saying "ruby can't X so I left it for Y", when X is typing, RBS is becoming the accepted standard (now that sorbet supports it),and RBS inline notation next to signature/code too (for peeps complaining about separate files); when X is LSP, ruby-lsp is the standard and already supports "go to definition" (its major hole for a long time), and its plugin architecture allows…

It’s just inferior to Python, nobody is making a more complex argument than that. Why ever use Ruby when there’s a virtually identical system that’s faster with a bigger community.

A lot of times 2-3 lines of Ruby needs 5-8 lines in Python.

Re: Ruby 4.0.0

#106
post #79

Happy bday ruby! For the usual doomsdaysayers saying "ruby can't X so I left it for Y", when X is typing, RBS is becoming the accepted standard (now that sorbet supports it),and RBS inline notation next to signature/code too (for peeps complaining about separate files); when X is LSP, ruby-lsp is the standard and already supports "go to definition" (its major hole for a long time), and its plugin architecture allows…

It’s just inferior to Python, nobody is making a more complex argument than that. Why ever use Ruby when there’s a virtually identical system that’s faster with a bigger community.

Python is great and I love writing glue in it, but Ruby is just a better designed language and ecosystem overall.

Re: Ruby 4.0.0

#107
post #17

I haven't looked at Ruby for a long time. I've moved away due to the lack of typing. Any degree of typing would be helpful. Does it support typing yet?

We have been adding Sorbet typing to our Rails application and it is a positive enhancement. It’s not like Ruby becomes Haskell. But it does provide a good deal of additional saftey, less testing, LSP integration is good, and it is gradual. There is a performance hit but we found it to be quite small and not an issue. But there are area of our application that use Grape and it is too meta for Sorbet so we don’t try a…

> It’s not like Ruby becomes Haskell.

Well, maybe next time.

Re: Ruby 4.0.0

#108
post #28

Have they improved tooling? I've yet to get any lsp working on windows

IMO programming on windows is just asking for punishment. Unless it’s a Microsoft language, you’re so much better off on Linux or macOS.

That’s cool if you can, but the majority of business desktops/laptops runs Windows. Hard to gain enterprise traction when it’s hard to run tools on your local machine

Re: Ruby 4.0.0

#109
post #87

Earlier quoted context omitted.

Fairly hardcore rubyist here. Ruby-lsp is excellent. But in no way is RBS becoming standard. Maybe it will, I don’t know. But adoption is very, very low as of today. Rbs-inline is just someone’s pet project and has very little activity (though it does appear that the person who wrote it is trying to implement it directly into Rbs now, which would be great) Personally I can’t see any comment based typing system gainin…

As long as Matz is firmly against, inline typing should never be a part of Ruby. I started working on a large Rails codebase that adopted Sorbet and it is nothing but an impediment to progress.

I work in a large Sorbet codebase (though it isn't a Rails one) and it's a huge boon IMO. The number of tests we don't need to write because of Sorbet is really nice.

It does occasionally require structuring your code differently, but I find the type-system-encouraged approach often gives a more elegant and harder-to-misuse interface in the end.

Re: Ruby 4.0.0

#110
If I remember correctly, the namespaces feature (now released as Ruby::Box) had some pretty severe performance penalties (possibly even for code that doesn't use it?).

Does anyone know if that's been improved?

Post reply on HN