(评论)
(comments)

原始链接: https://news.ycombinator.com/item?id=43451281

Mike Perham 的 "Ratomic" 库,为 Ruby 的 Ractor 提供了可变数据结构,正在 Hacker News 上引起关注。一位评论者重点提到了一篇 Jean撰写的相关文章(byroot.github.io),该文章讨论了共享数据结构(如队列和并发映射)对于使 Ractor 能够用于完整应用程序的必要性,并提到了 C 扩展能够使其类型可移动的重要性。Atomics 包含 Ractor 安全版本的队列和映射。另一位评论者表达了兴奋之情,并指出他们刚刚阅读了激发该库灵感的文章,并希望有这样的资源,强调了 Atomics 的及时性和价值。这些讨论表明,Ruby 社区对 Ractor 的兴趣和开发正在日益增长。


原文
Hacker News new | past | comments | ask | show | jobs | submit login
Ratomic: Provides Mutable data structures for use with Ruby's Ractors (github.com/mperham)
7 points by ksec 3 hours ago | hide | past | favorite | 2 comments










Probably worth linking to https://byroot.github.io/ruby/performance/2025/02/27/whats-t... in which Jean goes into further detail about some of nuances that go into building these types of data structures.

In particular it is mentioned

"For Ractors to be viable to run a full-on application in, Ruby would need to provide at least a few basic data structures that would be shareable across ractors, so that we can implement useful constructs like connection pools.

Perhaps some Ractor::Queue, maybe even some Ractor::ConcurrentMap, and more importantly, C extensions would need to be able to make their types movable."

Which we see in Mike's library he has started work on a Queue and a Map.

I haven't fully wrapped my head around all the nuances to using Ractors nor have I tried to do anything with them yet. But its encouraging to see the discussion around them ramping up



Wow awesome. I read the article that inspired this yesterday and thought to myself, "wow, a library of Ractor-safe data structures would be awesome" (and even left a comment: https://news.ycombinator.com/item?id=43477929) and now here we are.






Join us for AI Startup School this June 16-17 in San Francisco!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact



Search:
联系我们 contact @ memedata.com