5 ms·
Quick question for the current Ruby community: I kind of moved away from Ruby right around the time Ractors were about to land and they looked really promising
by mdhb 4y ago
Quick question for the current Ruby community:
I kind of moved away from Ruby right around the time Ractors were about to land and they looked really promising.
I was just curious if they ended up delivering much in the way of change and if not what the main problems were?
- Alifatisk 4y agoRactors is still in experimental stage but I’ve played around with it and it sure offers a huge performance benefit & true concurrency
- mdhb 4y agoI assume by the fact they are still experimental that there isn’t much in the way of adoption yet?
- drchiu 4y agoI was looking into this question a few weeks ago and couldn't find any libraries I would use in typical applications (eg. background jobs, etc) implementing Ractors. There are occasional comments in GH issues discussing the possibility of implementing Ractors, but nothing material.
- Lammy 4y agoHere's one that sounds like exactly the sort of example you had in mind: https://github.com/okeeblow/DistorteD/tree/NEW%E2%80%85SENSATION/CHECKING%20YOU%20OUT https://github.com/okeeblow/DistorteD/tree/NEW%E2%80%85SENSA... Disclaimer: mine :)
- Alifatisk 4y agoNot from what I have seen, It’s kinda risky because the fact that Ractors still is in experimental stage means that there couls be major breaking changes at any time, both how you use it and internally.
- chucke 4y agoractors, due to its "no shared or immutable only memory" constraints, is fundamentally incompatible with 99% of ruby code in the wild. I don't see it getting much adoption until some of those constraints are relaxed.
- LAC-Tech 4y agoIf that constraint is relaxed, then they aren't really actors anymore, are they?
- chucke 4y agoThey would. Some of the constraints were senseless. You used to not be able to use class variables, even if they were already initialized and frozen. However, using static variables, and worse, changing them, was fine. Ruby uses a lot of pure lazy memorization. That's an aspect I'd like to see more accepted. A system that enforces rather than recommends, is a less usable system.
- t-writescode 4y agoThis can be said of most actor systems. Using actors is a fundamentally different way of programming than non-actor-based multi-threaded systems. You do have to change your paradigm; but, when I have, I've found the experience to be really wonderful.
- RussianCow 4y ago> This can be said of most actor systems. True, but other languages/platforms have better built-in support for immutable data structures and don't force you to fight the standard library to implement a share-nothing approach.
- t-writescode 4y agoYou get there pretty fast in Ruby with DryStruct; and, Ruby has .freeze, which can also be helpful.