{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/26326","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/26326/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/26326/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/26326/events","html_url":"https://github.com/JuliaLang/julia/issues/26326","id":302366775,"number":26326,"title":"A function to resize vectors in front?","user":{"login":"oschulz","id":546147,"avatar_url":"https://avatars2.githubusercontent.com/u/546147?v=4","gravatar_id":"","url":"https://api.github.com/users/oschulz","html_url":"https://github.com/oschulz","followers_url":"https://api.github.com/users/oschulz/followers","following_url":"https://api.github.com/users/oschulz/following{/other_user}","gists_url":"https://api.github.com/users/oschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/oschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oschulz/subscriptions","organizations_url":"https://api.github.com/users/oschulz/orgs","repos_url":"https://api.github.com/users/oschulz/repos","events_url":"https://api.github.com/users/oschulz/events{/privacy}","received_events_url":"https://api.github.com/users/oschulz/received_events","type":"User","site_admin":false},"labels":[{"id":62693664,"url":"https://api.github.com/repos/JuliaLang/julia/labels/arrays","name":"arrays","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-03-05T16:25:32Z","updated_at":"2018-03-05T21:33:13Z","closed_at":null,"author_association":"NONE","body":"AFAIK we're currently lacking a function to resize a vector in front (well, except for the internals like `Base._growbeg!`).\r\n\r\n* At the back of a vector, we have: `push!`, `pop!` and `resize!`.\r\n* At the front of a vector, we have: `pushfirst!` and `popfirst!`.\r\n\r\nThis is lacking in symmetry. :-) Could we add `Base.resizefirst!`?\r\n\r\nSymmetry aside, it may also come in quite handy in some applications - I ran into this when I wanted to implement resizing in front for `ElasticArray` (some use cases will need it): I really don't want to use `ccall(:jl_array_grow_beg, ...)`, if avoidable, and there's no generic name in Base to overload for the resulting function. Or maybe I just missed it?"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/370573716","html_url":"https://github.com/JuliaLang/julia/issues/26326#issuecomment-370573716","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/26326","id":370573716,"user":{"login":"oschulz","id":546147,"avatar_url":"https://avatars2.githubusercontent.com/u/546147?v=4","gravatar_id":"","url":"https://api.github.com/users/oschulz","html_url":"https://github.com/oschulz","followers_url":"https://api.github.com/users/oschulz/followers","following_url":"https://api.github.com/users/oschulz/following{/other_user}","gists_url":"https://api.github.com/users/oschulz/gists{/gist_id}","starred_url":"https://api.github.com/users/oschulz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oschulz/subscriptions","organizations_url":"https://api.github.com/users/oschulz/orgs","repos_url":"https://api.github.com/users/oschulz/repos","events_url":"https://api.github.com/users/oschulz/events{/privacy}","received_events_url":"https://api.github.com/users/oschulz/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T21:33:13Z","updated_at":"2018-03-05T21:33:13Z","author_association":"NONE","body":"> splice! can do that. It's true that its name is not entirely obvious though.\r\n\r\nBut splice just removes a single element (in an arbitrary location) right?"}}
{"actor":{"display_login":"oschulz"}}