{"action":"created","issue":{"url":"https://api.github.com/repos/amethyst/rfcs/issues/9","repository_url":"https://api.github.com/repos/amethyst/rfcs","labels_url":"https://api.github.com/repos/amethyst/rfcs/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/amethyst/rfcs/issues/9/comments","events_url":"https://api.github.com/repos/amethyst/rfcs/issues/9/events","html_url":"https://github.com/amethyst/rfcs/pull/9","id":386329833,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MDk5NjUw","number":9,"title":"[RFC] State Separation","user":{"login":"udoprog","id":111092,"node_id":"MDQ6VXNlcjExMTA5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/111092?v=4","gravatar_id":"","url":"https://api.github.com/users/udoprog","html_url":"https://github.com/udoprog","followers_url":"https://api.github.com/users/udoprog/followers","following_url":"https://api.github.com/users/udoprog/following{/other_user}","gists_url":"https://api.github.com/users/udoprog/gists{/gist_id}","starred_url":"https://api.github.com/users/udoprog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/udoprog/subscriptions","organizations_url":"https://api.github.com/users/udoprog/orgs","repos_url":"https://api.github.com/users/udoprog/repos","events_url":"https://api.github.com/users/udoprog/events{/privacy}","received_events_url":"https://api.github.com/users/udoprog/received_events","type":"User","site_admin":false},"labels":[{"id":1118390986,"node_id":"MDU6TGFiZWwxMTE4MzkwOTg2","url":"https://api.github.com/repos/amethyst/rfcs/labels/RFC:%20Proposed","name":"RFC: Proposed","color":"fcbdec","default":false},{"id":1155031631,"node_id":"MDU6TGFiZWwxMTU1MDMxNjMx","url":"https://api.github.com/repos/amethyst/rfcs/labels/Team:%20Engine","name":"Team: Engine","color":"393fdd","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-11-30T20:00:02Z","updated_at":"2018-12-10T17:45:59Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/amethyst/rfcs/pulls/9","html_url":"https://github.com/amethyst/rfcs/pull/9","diff_url":"https://github.com/amethyst/rfcs/pull/9.diff","patch_url":"https://github.com/amethyst/rfcs/pull/9.patch"},"body":"Here is the RFC to replace amethyst/amethyst#1199\r\n\r\nRelated to amethyst/amethyst#1152 (About the simplicity issue)\r\n\r\nThis started it's life as a [working prototype implementation](https://github.com/amethyst/amethyst/compare/master...udoprog:enum-state-machine) of what is being proposed.\r\n\r\n[Rendered](https://github.com/udoprog/rfcs/blob/state-separation/rfcs/0000-state-separation.md)"},"comment":{"url":"https://api.github.com/repos/amethyst/rfcs/issues/comments/445906223","html_url":"https://github.com/amethyst/rfcs/pull/9#issuecomment-445906223","issue_url":"https://api.github.com/repos/amethyst/rfcs/issues/9","id":445906223,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTkwNjIyMw==","user":{"login":"jojolepro","id":4755185,"node_id":"MDQ6VXNlcjQ3NTUxODU=","avatar_url":"https://avatars2.githubusercontent.com/u/4755185?v=4","gravatar_id":"","url":"https://api.github.com/users/jojolepro","html_url":"https://github.com/jojolepro","followers_url":"https://api.github.com/users/jojolepro/followers","following_url":"https://api.github.com/users/jojolepro/following{/other_user}","gists_url":"https://api.github.com/users/jojolepro/gists{/gist_id}","starred_url":"https://api.github.com/users/jojolepro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jojolepro/subscriptions","organizations_url":"https://api.github.com/users/jojolepro/orgs","repos_url":"https://api.github.com/users/jojolepro/repos","events_url":"https://api.github.com/users/jojolepro/events{/privacy}","received_events_url":"https://api.github.com/users/jojolepro/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T17:45:59Z","updated_at":"2018-12-10T17:45:59Z","author_association":"MEMBER","body":"Here's my proposal for a more data-driven pushdown FSM\r\n\r\n![image](https://user-images.githubusercontent.com/4755185/49750217-552ba980-fc78-11e8-8f91-b3a6383ad343.png)\r\n\r\nShould I open a separate rfc or should this be discussed here?\r\n\r\nShort explanation: Instead of deciding at runtime which event triggers which state transition, they are all determined in advanced as data.\r\n\r\nFor example, the `MyEvent::Play` user event triggers a transition from StateA to StateB using `Push`.\r\nIn the `State`, you can just return `Option<MyEvent>` instead of the complex `Trans` type.\r\n\r\nThis only works if states aren't depending on runtime data (same as this PR).\r\n\r\nIt would fit well within this PR I think. Systems could trigger the state transitions by emitting the events into the TransCallback (which would now accept the `MyEvent` user type, and not `Trans`). Events would only have an effect if you are in the starting state of the transition (A -> B, you need to be in A to go to B). This means that Systems wouldn't need to be aware of which state you are currently in, while still being able to trigger state transitions.\r\n\r\nThis solves my concern with this pr, and should answer what @Xaeroxe asked.\r\n\r\nAlso we have way less `Box` like this :D"}}
{"actor":{"display_login":"jojolepro"}}