{"id":16489258,"url":"https://github.com/suddi/portal","last_synced_at":"2026-06-08T02:32:37.120Z","repository":{"id":145874990,"uuid":"79107217","full_name":"suddi/portal","owner":"suddi","description":"Portal game in elixir, based on https://howistart.org/posts/elixir/1","archived":false,"fork":false,"pushed_at":"2017-03-18T17:22:44.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T19:12:37.450Z","etag":null,"topics":["distributed-computing","elixir","portal-game"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suddi.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-16T10:22:14.000Z","updated_at":"2017-01-16T10:23:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"dd2598ca-0c1a-46be-87a5-426baf8d39d8","html_url":"https://github.com/suddi/portal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fportal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fportal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fportal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suddi%2Fportal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suddi","download_url":"https://codeload.github.com/suddi/portal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241315703,"owners_count":19942896,"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":["distributed-computing","elixir","portal-game"],"created_at":"2024-10-11T13:43:45.119Z","updated_at":"2026-06-08T02:32:32.095Z","avatar_url":"https://github.com/suddi.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Portal\n\nPortal game in Elixir following the guide in [How I Start.](https://howistart.org/posts/elixir/1).\n\n## Usage\n\nTo open an Elixir process to communicate through:\n````sh\niex --sname room1 --cookie secret -S mix\n````\n\nA second process:\n````sh\niex --sname room2 --cookie secret -S mix\n````\n\nIn `room1`:\n````elixir\niex(room1@zenith)1\u003e Portal.shoot(:blue)\n{:ok, #PID\u003c0.118.0\u003e}\n````\n\nIn `room2`:\n````elixir\niex(room2@zenith)1\u003e Portal.Door.get({:blue, :\"room1@zenith\"})\n[]\n\niex(room2@zenith)2\u003e Portal.shoot(:orange)\n{:ok, #PID\u003c0.124.0\u003e}\n\niex(room2@zenith)3\u003e orange = {:orange, :\"room2@zenith\"}\n{:orange, :room2@zenith}\n\niex(room2@zenith)4\u003e blue = {:blue, :\"room1@zenith\"}\n{:blue, :room1@zenith}\n\niex(room2@zenith)5\u003e portal = Portal.transfer(orange, blue, [1, 2, 3, 4])\n#Portal\u003c\n  {:orange, :room2@zenith} \u003c=\u003e {:blue, :room1@zenith}\n              [1, 2, 3, 4] \u003c=\u003e []\n\u003e\n\niex(room2@zenith)6\u003e Portal.push_right(portal)\n#Portal\u003c\n  {:orange, :room2@zenith} \u003c=\u003e {:blue, :room1@zenith}\n                 [1, 2, 3] \u003c=\u003e [4]\n\u003e\n\n````\n\nIn `room1`:\n````elixir\niex(room1@zenith)2\u003e orange = {:orange, :\"room2@zenith\"}\n{:orange, :room2@zenith}\n\niex(room1@zenith)3\u003e  blue = {:blue, :\"room1@zenith\"}\n{:blue, :room1@zenith}\n\niex(room1@zenith)4\u003e Portal.Door.get(orange)\n[3, 2, 1]\n\niex(room1@zenith)5\u003e Portal.Door.get(blue)\n[4]\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuddi%2Fportal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuddi%2Fportal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuddi%2Fportal/lists"}