Live data from Hacker News

Ruby 3.0 Preview 1

ruby-lang.org

11–20 of 207 posts

Re: Ruby 3.0 Preview 1

#12
Does message passing mean it copies objects you send between threads / fibers, rather than sharing memory?

JavaScript has a similar pattern with Workers, and it makes concurrency for hot code impractical. Serializing/deserializing objects is a lot slower than just not doing that. In JavaScript’s case, you can also use SharedArrayBuffer, but Safari hasn’t re-enabled it.

Re: Ruby 3.0 Preview 1

#13

I really wish Ruby would grow up and deprecate method_missing

> I really wish Ruby would grow up and deprecate method_missing

method_missing is a deliberate and principled part of a message-passing approach to object orientated programming that gives you powerful options for composition and delegation.

You can say you don't prefer this style of programming, but it's not well-informed to say it's down to immaturity or ignorance of alternatives on their part.

Re: Ruby 3.0 Preview 1

#15

I love Ruby and great to see Ruby love on hacker news. Just curious on how popular it is in the hacker news community ?

> Just curious on how popular it is in the hacker news community ?

Seems to be well represented by successful companies here.

https://www.ycombinator.com/topcompanies/

Re: Ruby 3.0 Preview 1

#17
>Rightward assignment statement is added. >fib(10) => x

This is exactly the kind of stuff I hated when I had to work with ruby in my last gig and why I will never accept a job using it again - soo many pointless and inconsistent ways to do the same thing ... they have method aliases for collection operations like map/filter in standard library ! .NET went with non-standard SQL-like names (select/where) and I'm not a fan but at least they made their choice and stuck with it. And it's inconsistent all over the place - like '!' postfix means "operation mutates the object" in std lib BUT in rails it means the operation will raise an exception and not return an error code.

Now they add a pointless operator that means completely different thing in other languages to throw off even more people.

It's just a hell of a language to maintain someone else's code in.

Re: Ruby 3.0 Preview 1

#18
post #8

Earlier quoted context omitted.

puma, the default webserver when using rails, is most-likely what would be using ractors

Here's schneems, a Puma maintainer, talking about Ractor, Rails, and Puma https://old.reddit.com/r/ruby/comments/ivasiq/we_made_puma_f...

>The biggest issue with ractor support as it stands today would really be getting ALL the libraries any given app uses to support the ractor design.

I wonder if this will create a chicken-egg situation. Without significant Ractor adoption it will be hard to get libraries to adapt. Without essential pieces like Puma supporting (and benefiting from) Ractor there is less reason to for apps to use Ractor.

I am reminded of the difficulties faced by Rubinius, which if I understand correctly, was hampered by too many MRI-compatible libraries not working to get people to switch.

Re: Ruby 3.0 Preview 1

#19
post #12

Does message passing mean it copies objects you send between threads / fibers, rather than sharing memory? JavaScript has a similar pattern with Workers, and it makes concurrency for hot code impractical. Serializing/deserializing objects is a lot slower than just not doing that. In JavaScript’s case, you can also use SharedArrayBuffer, but Safari hasn’t re-enabled it.

IIUC Yes. Although there are some cases where it can share immutable objects or pass ownership.

However you can always just open a shared memory region and write bytes back and forth. You don't get ruby types but if you are worried about performance that probably isn't much of a concern.

Re: Ruby 3.0 Preview 1

#20
So now there are basically no dynamically typed languages left. There's Scheme, JavaScript, what else? All languages nowadays are converging to TypeScript/Rust. It's kind of sad.
Post reply on HN