hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.6K
active users

#ractor

1 post1 participant0 posts today

Contributed a #ruby #Ractor variant to the programming languages benchmark game: salsa.debian.org/benchmarksgam

(was an example where Ruby was slower than Python, so got interested :))

Might not be published anytime soon (as the benchark game isn't updated as often anymore, and was only recently updated), and it will also not be the fastest version, but was fun to experiment with Ractors in ruby, a way to have true parallelism is ruby.

(btw the reason ruby is slow in this test is that instantiating an object for a single character is much overhead that can't be reasoned away by the JIT-compiler I guess...

GitLabRuby k-nucleotide using by Maarten Brouwers (using Ractor) (#559) · Issues · The Computer Language Benchmarks Game / benchmarksgame · GitLab Source code Parallelism using Ractor (current fastest ruby variant is using process forking). I'd say pretty idiomatic ruby code, albeit...

Quickstart | Ractor

Link
📌 Summary: 本文介紹如何使用 Rust 的 Ractor 套件建立一個基本的演員模式 (actor model),並講解訊息傳遞的兩種方式──無回應的傳送 (cast) 和有回應的請求 (call)。透過建立簡單的“Hello world”演員,讀者學會了演員的定義、訊息類型及狀態管理,並實作一個能計算已輸出“Hello world”次數的功能。系統還包含針對詢問演員內部狀態的遠端過程呼叫 (RPC) 實現的範例。

🎯 Key Points:
- 演員可透過無回應的訊息傳送 (cast) 或有回應的請求 (call) 進行通訊,分別使用 Ractor 的訊息標記系統。
- 定義了一個基本的演員結構 MyFirstActor,並處理
PrintHelloWorld 訊息來輸出 “Hello world”。
- 演員可管理內部狀態,本文示範瞭如何計算 "Hello world" 輸出次數並用
HowManyHelloWorlds 訊息回應請求。
- 使用
call_t! 巨集簡化了 RPC 的構造過程,便於開發者進行演員訊息傳遞。

🔖 Keywords: #Ractor #演員模式 #Rust #訊息傳遞 #RPC
RactorQuickstartRactor provides a fully-supervised, tokio-friendly actor framework for Rust frameworks. It is modelled closely off of Erlang’s gen_server along with extensions such as factories and distributed clusters.

If you are looking for an #ActorFramework in #Rust, I played around with Actix, Riker.rs, and Ractor. I highly recommend #Ractor, it gets a lot right: no runtime (runs within your #Tokio runtime), supervision trees like #Erlang, and async message handlers for actors.

My only wish for it is better documentation, but the rustdocs are useable enough.

github.com/slawlor/ractor

GitHubGitHub - slawlor/ractor: Rust actor frameworkRust actor framework. Contribute to slawlor/ractor development by creating an account on GitHub.