{"id":13578532,"url":"https://github.com/stetre/moonagents","last_synced_at":"2026-02-11T08:54:17.972Z","repository":{"id":90017922,"uuid":"165818842","full_name":"stetre/moonagents","owner":"stetre","description":"Reactive state machines in Lua","archived":false,"fork":false,"pushed_at":"2022-02-06T12:16:18.000Z","size":239,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-05T16:46:10.367Z","etag":null,"topics":["concurrency","fsm","lua","sdl"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stetre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-01-15T09:03:56.000Z","updated_at":"2023-02-10T20:56:59.000Z","dependencies_parsed_at":"2023-03-17T19:01:05.474Z","dependency_job_id":null,"html_url":"https://github.com/stetre/moonagents","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonagents","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonagents/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonagents/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonagents/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stetre","download_url":"https://codeload.github.com/stetre/moonagents/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393050,"owners_count":20931803,"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":["concurrency","fsm","lua","sdl"],"created_at":"2024-08-01T15:01:31.539Z","updated_at":"2026-02-11T08:54:17.855Z","avatar_url":"https://github.com/stetre.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"## MoonAgents: Reactive state machines in Lua\n\nMoonAgents is a Lua module for event-driven concurrent programming.\n\nIt is designed after the concurrency model of the\n[ITU-T Specification and Description Language (SDL)](http://en.wikipedia.org/wiki/Specification_and_Description_Language) and provides functions for the implementation of systems composed of concurrent,\nreactive and intercommunicating finite state machines (*'agents'*).\n\nMoonAgents runs on GNU/Linux and on Windows (MSYS2/MinGW) and requires \n[Lua](http://www.lua.org/) (\u003e=5.3).\n\n_Author:_ _[Stefano Trettel](https://www.linkedin.com/in/stetre)_\n\n(_Note: MoonAgents is derived from [LunaSDL](https://github.com/stetre/lunasdl), which it supersedes, and which is now discontinued. The major differences with LunaSDL are listed in the [design notes](./design-notes.md) document.)_\n\n[![Lua logo](./doc/powered-by-lua.gif)](http://www.lua.org/)\n\n#### License\n\nMIT/X11 license (same as Lua). See [LICENSE](./LICENSE).\n\n#### Documentation\n\nSee the [Reference Manual](https://stetre.github.io/moonagents/doc/index.html).\n\n#### Getting and installing\n\nSetup the build environment as described [here](https://github.com/stetre/moonlibs), then:\n\n```sh\n$ git clone https://github.com/stetre/moonagents\n$ cd moonagents\nmoonagents$ make\nmoonagents$ sudo make install\n```\n\n#### Examples\n\nThe example below creates an agent that gives the traditional salute with a little delay\n(using a timer) and then stops.\n\nOther examples can be found in the **examples/** directory of this repo.\n\n```lua\n-- Hello World application - hello.lua\n\nlocal moonagents = require(\"moonagents\")\n\n-- Create the system agent, from the script 'agent.lua':\nlocal system = moonagents.create_system(\"HelloSystem\",\"agent\")\n\n-- Enter the event loop:\nwhile moonagents.trigger() do end\n```\n\n```lua\n-- Agent script - agent.lua\n\nlocal delay = 1.2 -- seconds\nlocal T = moonagents.timer(delay,\"T_EXPIRED\")\n\nlocal function Start()\n   print(\"Please, wait \"..delay..\" seconds ...\")\n   moonagents.timer_start(T)\n   moonagents.next_state(\"Waiting\")\nend\n\nlocal function TExpired()\n   print(\"... Hello World!\")\n   moonagents.stop()\nend\n\nmoonagents.start_transition(Start)\nmoonagents.transition(\"Waiting\", \"T_EXPIRED\", TExpired)\n```\n\nThe script can be executed at the shell prompt with the standard Lua interpreter:\n\n```shell\n$ lua hello.lua\n```\n\nSee the `examples/` directory.\n\n#### See also\n\n* [MoonLibs - Graphics and Audio Lua Libraries](https://github.com/stetre/moonlibs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstetre%2Fmoonagents","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstetre%2Fmoonagents","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstetre%2Fmoonagents/lists"}