{"action":"created","issue":{"url":"https://api.github.com/repos/racket/pict/issues/10","labels_url":"https://api.github.com/repos/racket/pict/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/racket/pict/issues/10/comments","events_url":"https://api.github.com/repos/racket/pict/issues/10/events","html_url":"https://github.com/racket/pict/pull/10","id":115164908,"number":10,"title":"Auto convert pict-convertibles to picts","user":{"login":"florence","id":1413610,"avatar_url":"https://avatars.githubusercontent.com/u/1413610?v=3","gravatar_id":"","url":"https://api.github.com/users/florence","html_url":"https://github.com/florence","followers_url":"https://api.github.com/users/florence/followers","following_url":"https://api.github.com/users/florence/following{/other_user}","gists_url":"https://api.github.com/users/florence/gists{/gist_id}","starred_url":"https://api.github.com/users/florence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florence/subscriptions","organizations_url":"https://api.github.com/users/florence/orgs","repos_url":"https://api.github.com/users/florence/repos","events_url":"https://api.github.com/users/florence/events{/privacy}","received_events_url":"https://api.github.com/users/florence/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-11-04T22:34:18Z","updated_at":"2016-01-06T20:13:48Z","closed_at":"2016-01-06T20:13:48Z","pull_request":{"url":"https://api.github.com/repos/racket/pict/pulls/10","html_url":"https://github.com/racket/pict/pull/10","diff_url":"https://github.com/racket/pict/pull/10.diff","patch_url":"https://github.com/racket/pict/pull/10.patch"},"body":"This PR allows anything that is `pict-convertible?` to be used where a `pict` can be used. It also adds a lot of tests for this library.\r\n\r\nThe changes have not made it to the documentation yet. I would like code/design review before that.\r\n\r\nList of changes:\r\n\r\n- Wrap the `pict` struct info to provide versions of the accessors that automatically convert `pict-convertible?`s.\r\n- Stop exporting `set-pict-width!` and friends.\r\n- Add several explicit pict conversions to make some things fast, and to have them behave in the expected behavior.\r\n- Add a new property for `pict`s that will allow uses to define how their `pict-convertible?` struct is compared to `pict`s (that may have been converted from the same struct). This is to allow things like `pin-arrow-lines` to behave in an intuitive manner when finding things that have been converted form the same `pict-convertible?` struct. By default this property is implemented by storing the original `pict-convertible?` in an extra field, and checking `eq?`ness.\r\n- Add a large randomized test suite to test these changes.\r\n\r\nI've tested the speed using the framework in [stamourv/contract-benchmarks](https://github.com/stamourv/contract-benchmarks) for checking slideshow benchmarks. I see about a 10% slowdown between the current git HEAD and this PR. I can attempt to make this better if that seems too high."},"comment":{"url":"https://api.github.com/repos/racket/pict/issues/comments/169447070","html_url":"https://github.com/racket/pict/pull/10#issuecomment-169447070","issue_url":"https://api.github.com/repos/racket/pict/issues/10","id":169447070,"user":{"login":"florence","id":1413610,"avatar_url":"https://avatars.githubusercontent.com/u/1413610?v=3","gravatar_id":"","url":"https://api.github.com/users/florence","html_url":"https://github.com/florence","followers_url":"https://api.github.com/users/florence/followers","following_url":"https://api.github.com/users/florence/following{/other_user}","gists_url":"https://api.github.com/users/florence/gists{/gist_id}","starred_url":"https://api.github.com/users/florence/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florence/subscriptions","organizations_url":"https://api.github.com/users/florence/orgs","repos_url":"https://api.github.com/users/florence/repos","events_url":"https://api.github.com/users/florence/events{/privacy}","received_events_url":"https://api.github.com/users/florence/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T20:13:48Z","updated_at":"2016-01-06T20:13:48Z","body":"Merged at b95113d"}}