{"action":"created","comment":{"url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/comments/69903103","id":69903103,"diff_hunk":"@@ -356,3 +356,43 @@ Base.floor{T}(::Type{T}, A::FixedArray) = map(x->floor(T, x), A)\n Base.ceil{T}( ::Type{T}, A::FixedArray) = map(x->ceil( T, x), A)\n Base.trunc{T}(::Type{T}, A::FixedArray) = map(x->trunc(T, x), A)\n Base.round{T}(::Type{T}, A::FixedArray) = map(x->round(T, x), A)\n+\n+import Base.Cartesian.@nif\n+shift(t::Tuple) = Base.tail(t)\n+unshift(t::Tuple, val) = tuple(val, t...)\n+push(t::Tuple, val) = tuple(t..., val)\n+@generated unpush{N,T}(t::NTuple{N,T}) = begin # is there a better name?\n+    Expr(:tuple, [:(t[$i]) for i in 1:N-1]...)\n+end\n+\n+@generated function deleteat{N,T,i}(x::NTuple{N,T}, ::Type{Val{i}})\n+    (1 <= i <= N) || throw(BoundsError((x,Val{i})))\n+    Expr(:tuple, [:(x[$j]) for j in deleteat!([1:N...], i)]...)\n+end\n+@generated deleteat{N,T}(x::NTuple{N,T}, i::Int) = quote\n+    (1 <= i <= N) || throw(BoundsError(x,i))\n+    @nif $N d->(i==d) d-> deleteat(x, Val{d})\n+end\n+\n+@generated insert{N,T,i}(t::NTuple{N,T}, ::Type{Val{i}}, item) = begin\n+    (1 <= i <= N+1) || throw(BoundsError())\n+    args = Any[:(t[$k]) for k in 1:N]\n+    insert!(args, i, :item)\n+    Expr(:tuple, args...)\n+end","path":"src/ops.jl","position":29,"original_position":27,"commit_id":"d29ee71ad7a5df066ff1b4d6595c146158487cb1","original_commit_id":"c6e2a430fe60f58ddd79dbc3d9ea13fcbf3936a1","user":{"login":"jw3126","id":7261506,"avatar_url":"https://avatars.githubusercontent.com/u/7261506?v=3","gravatar_id":"","url":"https://api.github.com/users/jw3126","html_url":"https://github.com/jw3126","followers_url":"https://api.github.com/users/jw3126/followers","following_url":"https://api.github.com/users/jw3126/following{/other_user}","gists_url":"https://api.github.com/users/jw3126/gists{/gist_id}","starred_url":"https://api.github.com/users/jw3126/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jw3126/subscriptions","organizations_url":"https://api.github.com/users/jw3126/orgs","repos_url":"https://api.github.com/users/jw3126/repos","events_url":"https://api.github.com/users/jw3126/events{/privacy}","received_events_url":"https://api.github.com/users/jw3126/received_events","type":"User","site_admin":false},"body":"I changed it, I guess its just a style question? ","created_at":"2016-07-07T13:13:08Z","updated_at":"2016-07-07T13:13:08Z","html_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/141#discussion_r69903103","pull_request_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141","_links":{"self":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/comments/69903103"},"html":{"href":"https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/141#discussion_r69903103"},"pull_request":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141"}}},"pull_request":{"url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141","id":76563603,"html_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/141","diff_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/141.diff","patch_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/141.patch","issue_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/141","number":141,"state":"open","locked":false,"title":"push, shift,...","user":{"login":"jw3126","id":7261506,"avatar_url":"https://avatars.githubusercontent.com/u/7261506?v=3","gravatar_id":"","url":"https://api.github.com/users/jw3126","html_url":"https://github.com/jw3126","followers_url":"https://api.github.com/users/jw3126/followers","following_url":"https://api.github.com/users/jw3126/following{/other_user}","gists_url":"https://api.github.com/users/jw3126/gists{/gist_id}","starred_url":"https://api.github.com/users/jw3126/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jw3126/subscriptions","organizations_url":"https://api.github.com/users/jw3126/orgs","repos_url":"https://api.github.com/users/jw3126/repos","events_url":"https://api.github.com/users/jw3126/events{/privacy}","received_events_url":"https://api.github.com/users/jw3126/received_events","type":"User","site_admin":false},"body":"Added push, shift, deleteat,... methods to manipulate Vecs:\r\n```\r\npush(Vec(1,2,3), 4) == Vec(1,2,3,4)\r\n```","created_at":"2016-07-07T09:21:24Z","updated_at":"2016-07-07T13:13:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"565bcbff2d7307139f56878098e5e959768ea04f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141/commits","review_comments_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141/comments","review_comment_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/141/comments","statuses_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/statuses/d29ee71ad7a5df066ff1b4d6595c146158487cb1","head":{"label":"jw3126:shiftpush","ref":"shiftpush","sha":"d29ee71ad7a5df066ff1b4d6595c146158487cb1","user":{"login":"jw3126","id":7261506,"avatar_url":"https://avatars.githubusercontent.com/u/7261506?v=3","gravatar_id":"","url":"https://api.github.com/users/jw3126","html_url":"https://github.com/jw3126","followers_url":"https://api.github.com/users/jw3126/followers","following_url":"https://api.github.com/users/jw3126/following{/other_user}","gists_url":"https://api.github.com/users/jw3126/gists{/gist_id}","starred_url":"https://api.github.com/users/jw3126/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jw3126/subscriptions","organizations_url":"https://api.github.com/users/jw3126/orgs","repos_url":"https://api.github.com/users/jw3126/repos","events_url":"https://api.github.com/users/jw3126/events{/privacy}","received_events_url":"https://api.github.com/users/jw3126/received_events","type":"User","site_admin":false},"repo":{"id":62790694,"name":"FixedSizeArrays.jl","full_name":"jw3126/FixedSizeArrays.jl","owner":{"login":"jw3126","id":7261506,"avatar_url":"https://avatars.githubusercontent.com/u/7261506?v=3","gravatar_id":"","url":"https://api.github.com/users/jw3126","html_url":"https://github.com/jw3126","followers_url":"https://api.github.com/users/jw3126/followers","following_url":"https://api.github.com/users/jw3126/following{/other_user}","gists_url":"https://api.github.com/users/jw3126/gists{/gist_id}","starred_url":"https://api.github.com/users/jw3126/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jw3126/subscriptions","organizations_url":"https://api.github.com/users/jw3126/orgs","repos_url":"https://api.github.com/users/jw3126/repos","events_url":"https://api.github.com/users/jw3126/events{/privacy}","received_events_url":"https://api.github.com/users/jw3126/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jw3126/FixedSizeArrays.jl","description":"Julia's generic FixedSizeArray implementation. Can be used for all kinds of Vector constructs","fork":true,"url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl","forks_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/forks","keys_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/teams","hooks_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/hooks","issue_events_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/issues/events{/number}","events_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/events","assignees_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/assignees{/user}","branches_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/branches{/branch}","tags_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/tags","blobs_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/languages","stargazers_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/stargazers","contributors_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/contributors","subscribers_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/subscribers","subscription_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/subscription","commits_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/contents/{+path}","compare_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/merges","archive_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/downloads","issues_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/issues{/number}","pulls_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/labels{/name}","releases_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/releases{/id}","deployments_url":"https://api.github.com/repos/jw3126/FixedSizeArrays.jl/deployments","created_at":"2016-07-07T08:46:42Z","updated_at":"2016-07-07T08:46:43Z","pushed_at":"2016-07-07T12:51:46Z","git_url":"git://github.com/jw3126/FixedSizeArrays.jl.git","ssh_url":"git@github.com:jw3126/FixedSizeArrays.jl.git","clone_url":"https://github.com/jw3126/FixedSizeArrays.jl.git","svn_url":"https://github.com/jw3126/FixedSizeArrays.jl","homepage":"","size":563,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"SimonDanisch:master","ref":"master","sha":"1e41b76a0db8566f5c5e5a573ce7a8f0674e601a","user":{"login":"SimonDanisch","id":1010467,"avatar_url":"https://avatars.githubusercontent.com/u/1010467?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonDanisch","html_url":"https://github.com/SimonDanisch","followers_url":"https://api.github.com/users/SimonDanisch/followers","following_url":"https://api.github.com/users/SimonDanisch/following{/other_user}","gists_url":"https://api.github.com/users/SimonDanisch/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonDanisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonDanisch/subscriptions","organizations_url":"https://api.github.com/users/SimonDanisch/orgs","repos_url":"https://api.github.com/users/SimonDanisch/repos","events_url":"https://api.github.com/users/SimonDanisch/events{/privacy}","received_events_url":"https://api.github.com/users/SimonDanisch/received_events","type":"User","site_admin":false},"repo":{"id":29060137,"name":"FixedSizeArrays.jl","full_name":"SimonDanisch/FixedSizeArrays.jl","owner":{"login":"SimonDanisch","id":1010467,"avatar_url":"https://avatars.githubusercontent.com/u/1010467?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonDanisch","html_url":"https://github.com/SimonDanisch","followers_url":"https://api.github.com/users/SimonDanisch/followers","following_url":"https://api.github.com/users/SimonDanisch/following{/other_user}","gists_url":"https://api.github.com/users/SimonDanisch/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonDanisch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonDanisch/subscriptions","organizations_url":"https://api.github.com/users/SimonDanisch/orgs","repos_url":"https://api.github.com/users/SimonDanisch/repos","events_url":"https://api.github.com/users/SimonDanisch/events{/privacy}","received_events_url":"https://api.github.com/users/SimonDanisch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl","description":"Julia's generic FixedSizeArray implementation. Can be used for all kinds of Vector constructs","fork":false,"url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl","forks_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/forks","keys_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/teams","hooks_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/hooks","issue_events_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/events{/number}","events_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/events","assignees_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/assignees{/user}","branches_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/branches{/branch}","tags_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/tags","blobs_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/languages","stargazers_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/stargazers","contributors_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/contributors","subscribers_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/subscribers","subscription_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/subscription","commits_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/contents/{+path}","compare_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/merges","archive_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/downloads","issues_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues{/number}","pulls_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/labels{/name}","releases_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/releases{/id}","deployments_url":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/deployments","created_at":"2015-01-10T14:50:27Z","updated_at":"2016-07-04T09:35:09Z","pushed_at":"2016-07-07T12:51:46Z","git_url":"git://github.com/SimonDanisch/FixedSizeArrays.jl.git","ssh_url":"git@github.com:SimonDanisch/FixedSizeArrays.jl.git","clone_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl.git","svn_url":"https://github.com/SimonDanisch/FixedSizeArrays.jl","homepage":"","size":575,"stargazers_count":29,"watchers_count":29,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":16,"forks":18,"open_issues":16,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141"},"html":{"href":"https://github.com/SimonDanisch/FixedSizeArrays.jl/pull/141"},"issue":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/141"},"comments":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/issues/141/comments"},"review_comments":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141/comments"},"review_comment":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/pulls/141/commits"},"statuses":{"href":"https://api.github.com/repos/SimonDanisch/FixedSizeArrays.jl/statuses/d29ee71ad7a5df066ff1b4d6595c146158487cb1"}}}}
{"actor":{"display_login":"jw3126"}}