{"id":18014817,"url":"https://github.com/zevv/actors","last_synced_at":"2025-06-27T14:05:51.410Z","repository":{"id":63633050,"uuid":"568098744","full_name":"zevv/actors","owner":"zevv","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-14T14:57:44.000Z","size":727,"stargazers_count":30,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-27T14:05:08.434Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-19T12:57:24.000Z","updated_at":"2025-05-31T05:31:34.000Z","dependencies_parsed_at":"2023-12-23T17:07:44.130Z","dependency_job_id":"b0e2c738-d35d-43cc-abf0-211dd991064b","html_url":"https://github.com/zevv/actors","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zevv/actors","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Factors","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Factors/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Factors/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Factors/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zevv","download_url":"https://codeload.github.com/zevv/actors/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zevv%2Factors/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262270389,"owners_count":23285162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-30T04:11:13.342Z","updated_at":"2025-06-27T14:05:51.382Z","avatar_url":"https://github.com/zevv.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nThis is an experimental project to create a threaded, share-nothing actor based\nframework on top of CPS\n\nThis is all very much at an alpha stage; APIs are not likely to stay stable,\nnames of stuff might change, etc.\n\n## Limitations\n\nAt this time, actors do not work with Nim's `orc` memory management; be sure\nto compile with `--mm:arc`.\n\n## Introduction\n\nThe Actors library provides a platform for building applications with massive\nconcurrency, without burdening the users with the pain and suffering of \"old\nschool\" threading primitives like locks, wait conditions, semaphores, etc.\n\nActors are built on two basic primitives:\n\n- \"Processes\": an actor process provides a separate flow of execution. The term\n  \"process\" is not to be confused with an operating-system process; instead,\n  Processes are lightweight and have a small memory footprint (hundreds of\n  bytes), are fast to create and terminate, and the scheduling overhead is\n  slow. Processes are closely related to goroutines in the Go programming\n  language, or processes in Erlang/Elixir.\n\n- \"Messages\": Every process comes with a mailbox which can be used by other\n  processes to send messages. Messages are Nim objects that can contain any\n  kind of data, and can be sent from one process to another. The current\n  implementation sends messages by moving the data between threads instead of\n  copying, and is thus fast and low overhead.\n\n\n## Quickstart\n\nThis section explains the bare necessities to get started with actors. It will\nbriefly explain the parts and concepts of the library, and show simple examples\non how to use them.\n\n\n### The pool, and your first process\n\nThe actors library has a small runtime that manages the processes and messages,\nwhich is called a \"pool\"; The pool spawns a number of OS threads to do the\nwork, and manages and schedules the actor processes. The `hatch()` function can\nnow be used to create new processes; (`hatch` is analogue to the `go` statement\nin Golang or `spawn` in Elixir)\n\n```\nproc hello() {.actor.} =\n  echo \"hello\"\n\nlet pool = newPool()\nlet pid = pool.hatch hello()\npool.join()\n\n```\n\nIn the above example a new process is spawned (\"hatched\"), with `proc hello()`\nas its entry point. Note that the proc is marked with the `{.actor.}` pragma.\nThe pool will run in the background until `join()` is called; this will wait\nfor all the actors to terminate and clean up all the resources used.\n\n\n\n\n### Valgrind\n\nTo make the library aware of being run with helgrind, the program needs to be\nbuilt with `-d:usesValgrind`, otherwise false positives could be reported.\n\n\n### More to come\n\nSure.\n\n\n\n\n\n\nActors communicate by sending and receiving messages; a message can be sent to\nanother process with the `send()` proc.\n\n  \n## References\n\nReferences and further reading:\n\n- https://en.wikipedia.org/wiki/Actor_model\n- https://www.erlang.org/doc/reference_manual/processes.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevv%2Factors","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzevv%2Factors","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzevv%2Factors/lists"}