{"action":"created","issue":{"url":"https://api.github.com/repos/supercollider/supercollider/issues/3527","repository_url":"https://api.github.com/repos/supercollider/supercollider","labels_url":"https://api.github.com/repos/supercollider/supercollider/issues/3527/labels{/name}","comments_url":"https://api.github.com/repos/supercollider/supercollider/issues/3527/comments","events_url":"https://api.github.com/repos/supercollider/supercollider/issues/3527/events","html_url":"https://github.com/supercollider/supercollider/pull/3527","id":298120061,"number":3527,"title":"classlib: optimise and remove some .interpret","user":{"login":"redFrik","id":1815476,"avatar_url":"https://avatars3.githubusercontent.com/u/1815476?v=4","gravatar_id":"","url":"https://api.github.com/users/redFrik","html_url":"https://github.com/redFrik","followers_url":"https://api.github.com/users/redFrik/followers","following_url":"https://api.github.com/users/redFrik/following{/other_user}","gists_url":"https://api.github.com/users/redFrik/gists{/gist_id}","starred_url":"https://api.github.com/users/redFrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redFrik/subscriptions","organizations_url":"https://api.github.com/users/redFrik/orgs","repos_url":"https://api.github.com/users/redFrik/repos","events_url":"https://api.github.com/users/redFrik/events{/privacy}","received_events_url":"https://api.github.com/users/redFrik/received_events","type":"User","site_admin":false},"labels":[{"id":11946377,"url":"https://api.github.com/repos/supercollider/supercollider/labels/comp:%20class%20library","name":"comp: class library","color":"CFFF7D","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/supercollider/supercollider/milestones/14","html_url":"https://github.com/supercollider/supercollider/milestone/14","labels_url":"https://api.github.com/repos/supercollider/supercollider/milestones/14/labels","id":2868980,"number":14,"title":"3.10","description":"","creator":{"login":"snappizz","id":1211064,"avatar_url":"https://avatars2.githubusercontent.com/u/1211064?v=4","gravatar_id":"","url":"https://api.github.com/users/snappizz","html_url":"https://github.com/snappizz","followers_url":"https://api.github.com/users/snappizz/followers","following_url":"https://api.github.com/users/snappizz/following{/other_user}","gists_url":"https://api.github.com/users/snappizz/gists{/gist_id}","starred_url":"https://api.github.com/users/snappizz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snappizz/subscriptions","organizations_url":"https://api.github.com/users/snappizz/orgs","repos_url":"https://api.github.com/users/snappizz/repos","events_url":"https://api.github.com/users/snappizz/events{/privacy}","received_events_url":"https://api.github.com/users/snappizz/received_events","type":"User","site_admin":false},"open_issues":22,"closed_issues":21,"state":"open","created_at":"2017-10-27T05:49:07Z","updated_at":"2018-02-18T22:56:21Z","due_on":"2018-04-15T07:00:00Z","closed_at":null},"comments":4,"created_at":"2018-02-18T21:30:54Z","updated_at":"2018-02-19T13:40:32Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/supercollider/supercollider/pulls/3527","html_url":"https://github.com/supercollider/supercollider/pull/3527","diff_url":"https://github.com/supercollider/supercollider/pull/3527.diff","patch_url":"https://github.com/supercollider/supercollider/pull/3527.patch"},"body":"this PR optimise Color.fromHexString and History.unformatTime. both these were using .interpret and here they are replaced with much faster variants.\r\n\r\none caveat though that these methods now break differently...\r\n```supercollider\r\nColor.fromHexString(\"#ggg\")  //deliberate user error\r\n```\r\n\r\nwith the original .interpret method we get this cryptic error...\r\n```\r\nERROR: syntax error, unexpected NAME, expecting $end\r\n  in interpreted text\r\n  line 1 char 4:\r\n\r\n  0xgg\r\n    ^^\r\n```\r\n\r\nand while with the variant in this PR it doesn't fail but rather overflow...\r\n```supercollider\r\n-> Color(1.0666666666667, 1.0666666666667, 1.0666666666667)\r\n```\r\n\r\nand similar for History.unformatTime...\r\n\r\n```supercollider\r\nHistory.unformatTime(\"01:XY:03\")  //deliberate user error\r\n```\r\n\r\nwith original method...\r\n```\r\nERROR: Class not defined.\r\n  in interpreted text\r\n  line 1 char 2:\r\n\r\n  XY \r\n```\r\n\r\nand with this PR...\r\n```\r\n-> 3603\r\n```\r\n\r\ni think this 'soft landing' is better but people might have other opinions.\r\n"},"comment":{"url":"https://api.github.com/repos/supercollider/supercollider/issues/comments/366695921","html_url":"https://github.com/supercollider/supercollider/pull/3527#issuecomment-366695921","issue_url":"https://api.github.com/repos/supercollider/supercollider/issues/3527","id":366695921,"user":{"login":"brianlheim","id":15369640,"avatar_url":"https://avatars3.githubusercontent.com/u/15369640?v=4","gravatar_id":"","url":"https://api.github.com/users/brianlheim","html_url":"https://github.com/brianlheim","followers_url":"https://api.github.com/users/brianlheim/followers","following_url":"https://api.github.com/users/brianlheim/following{/other_user}","gists_url":"https://api.github.com/users/brianlheim/gists{/gist_id}","starred_url":"https://api.github.com/users/brianlheim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianlheim/subscriptions","organizations_url":"https://api.github.com/users/brianlheim/orgs","repos_url":"https://api.github.com/users/brianlheim/repos","events_url":"https://api.github.com/users/brianlheim/events{/privacy}","received_events_url":"https://api.github.com/users/brianlheim/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T13:40:32Z","updated_at":"2018-02-19T13:40:32Z","author_association":"OWNER","body":"doing input validation would be nothing compared to calling .interpret. producing garbage output here means that user error has to be caught later or not at all, which leads to confusion and longer debugging time"}}
{"actor":{"display_login":"brianlheim"}}