{"action":"created","issue":{"url":"https://api.github.com/repos/jcmoyer/hug/issues/22","labels_url":"https://api.github.com/repos/jcmoyer/hug/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/jcmoyer/hug/issues/22/comments","events_url":"https://api.github.com/repos/jcmoyer/hug/issues/22/events","html_url":"https://github.com/jcmoyer/hug/issues/22","id":99453476,"number":22,"title":"Event framework","user":{"login":"jcmoyer","id":1007628,"avatar_url":"https://avatars.githubusercontent.com/u/1007628?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmoyer","html_url":"https://github.com/jcmoyer","followers_url":"https://api.github.com/users/jcmoyer/followers","following_url":"https://api.github.com/users/jcmoyer/following{/other_user}","gists_url":"https://api.github.com/users/jcmoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmoyer/subscriptions","organizations_url":"https://api.github.com/users/jcmoyer/orgs","repos_url":"https://api.github.com/users/jcmoyer/repos","events_url":"https://api.github.com/users/jcmoyer/events{/privacy}","received_events_url":"https://api.github.com/users/jcmoyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jcmoyer/hug/milestones/1","html_url":"https://github.com/jcmoyer/hug/milestones/Version%201.0","labels_url":"https://api.github.com/repos/jcmoyer/hug/milestones/1/labels","id":520253,"number":1,"title":"Version 1.0","description":"Version 1.0 aims to have a complete, usable library worthy of being promoted.\r\n\r\nFollowing 1.0, all changes must be documented and breaking changes will be minimized.","creator":{"login":"jcmoyer","id":1007628,"avatar_url":"https://avatars.githubusercontent.com/u/1007628?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmoyer","html_url":"https://github.com/jcmoyer","followers_url":"https://api.github.com/users/jcmoyer/followers","following_url":"https://api.github.com/users/jcmoyer/following{/other_user}","gists_url":"https://api.github.com/users/jcmoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmoyer/subscriptions","organizations_url":"https://api.github.com/users/jcmoyer/orgs","repos_url":"https://api.github.com/users/jcmoyer/repos","events_url":"https://api.github.com/users/jcmoyer/events{/privacy}","received_events_url":"https://api.github.com/users/jcmoyer/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":9,"state":"open","created_at":"2013-12-23T21:05:21Z","updated_at":"2015-08-06T14:45:44Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-08-06T14:45:36Z","updated_at":"2015-08-07T13:58:03Z","closed_at":null,"body":"* Implement C#-style events, something like this:\r\n```lua\r\nlocal expire = event.new()\r\n\r\nexpire:subscribe(function(...)\r\n  print('expire was triggered! args:', ...)\r\nend)\r\n\r\nexpire:invoke(123, 456)\r\n```\r\n\r\n* does this need to wrapped to abstract away direct field access on objects?\r\n```lua\r\nlocal emitter = event.emitter.new({\r\n  expire = event.new()\r\n})\r\n\r\nemitter.on('expire', function()\r\n  print('expire was triggered')\r\nend)\r\n\r\nemitter:emit('expire', 123)\r\n```\r\n\r\nCurrent APIs that can be improved with events:\r\n* timer\r\n* timerpool\r\n* gamestate, statemachine, basicgame?\r\n\r\nAnd of course, having it available for games is nice too."},"comment":{"url":"https://api.github.com/repos/jcmoyer/hug/issues/comments/128706934","html_url":"https://github.com/jcmoyer/hug/issues/22#issuecomment-128706934","issue_url":"https://api.github.com/repos/jcmoyer/hug/issues/22","id":128706934,"user":{"login":"jcmoyer","id":1007628,"avatar_url":"https://avatars.githubusercontent.com/u/1007628?v=3","gravatar_id":"","url":"https://api.github.com/users/jcmoyer","html_url":"https://github.com/jcmoyer","followers_url":"https://api.github.com/users/jcmoyer/followers","following_url":"https://api.github.com/users/jcmoyer/following{/other_user}","gists_url":"https://api.github.com/users/jcmoyer/gists{/gist_id}","starred_url":"https://api.github.com/users/jcmoyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcmoyer/subscriptions","organizations_url":"https://api.github.com/users/jcmoyer/orgs","repos_url":"https://api.github.com/users/jcmoyer/repos","events_url":"https://api.github.com/users/jcmoyer/events{/privacy}","received_events_url":"https://api.github.com/users/jcmoyer/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T13:58:03Z","updated_at":"2015-08-07T13:58:03Z","body":"Initial draft in 00fb191aa6aa6865adc84474b5d019ccc4e3701f"}}