{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/16251","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/16251/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/16251/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/16251/events","html_url":"https://github.com/JuliaLang/julia/pull/16251","id":153603071,"number":16251,"title":"RFC: Refactor indexing to use Varargs and ReshapedArrays","user":{"login":"mbauman","id":154641,"avatar_url":"https://avatars.githubusercontent.com/u/154641?v=3","gravatar_id":"","url":"https://api.github.com/users/mbauman","html_url":"https://github.com/mbauman","followers_url":"https://api.github.com/users/mbauman/followers","following_url":"https://api.github.com/users/mbauman/following{/other_user}","gists_url":"https://api.github.com/users/mbauman/gists{/gist_id}","starred_url":"https://api.github.com/users/mbauman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbauman/subscriptions","organizations_url":"https://api.github.com/users/mbauman/orgs","repos_url":"https://api.github.com/users/mbauman/repos","events_url":"https://api.github.com/users/mbauman/events{/privacy}","received_events_url":"https://api.github.com/users/mbauman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/multilinear%20algebra","name":"multilinear algebra","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-05-07T16:25:21Z","updated_at":"2016-05-12T19:32:31Z","closed_at":"2016-05-12T16:16:40Z","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/16251","html_url":"https://github.com/JuliaLang/julia/pull/16251","diff_url":"https://github.com/JuliaLang/julia/pull/16251.diff","patch_url":"https://github.com/JuliaLang/julia/pull/16251.patch"},"body":"This puts some of the amazing new infrastructure through its paces, on our way towards #14770.  Using a combination of `Vararg` and `ReshapedArrays`, we can always ensure that scalar, non-scalar, and view indexing all get indexed at an optimal dimensionality.  This is slightly more verbose than would otherwise be necessary — it explicitly defines separate methods to support the general linear indexing cases that are on their way towards deprecation.\r\n\r\nTODO:\r\n\r\n* [x] @nanosoldier `runbenchmarks(ALL)`\r\n* [ ] Bikeshed the `reshape(A, Val{N})` method.  The current ~~implementation~~ name is just a stop-gap… as I was completing this I was thinking about doing something like this:\r\n\r\n```jl\r\ntypealias Ravel{N, T} ReshapedArray{T, N}\r\n(::Ravel{N}){N}(::AbstractArray) = # do the reshaping to N dimensions\r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/218861833","html_url":"https://github.com/JuliaLang/julia/pull/16251#issuecomment-218861833","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/16251","id":218861833,"user":{"login":"timholy","id":1525481,"avatar_url":"https://avatars.githubusercontent.com/u/1525481?v=3","gravatar_id":"","url":"https://api.github.com/users/timholy","html_url":"https://github.com/timholy","followers_url":"https://api.github.com/users/timholy/followers","following_url":"https://api.github.com/users/timholy/following{/other_user}","gists_url":"https://api.github.com/users/timholy/gists{/gist_id}","starred_url":"https://api.github.com/users/timholy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timholy/subscriptions","organizations_url":"https://api.github.com/users/timholy/orgs","repos_url":"https://api.github.com/users/timholy/repos","events_url":"https://api.github.com/users/timholy/events{/privacy}","received_events_url":"https://api.github.com/users/timholy/received_events","type":"User","site_admin":false},"created_at":"2016-05-12T19:32:31Z","updated_at":"2016-05-12T19:32:31Z","body":"Where does that go wrong?\r\n\r\n(I ask because I'm in the middle of revamping `checkbounds` yet again.)"}}