GitHub PullRequestReviewCommentEvent at 2014-08-27 23:01:12
Repository: chapel
Actor: sungeunchoi
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/16810885","id":16810885,"diff_hunk":"@@ -1510,7 +1527,99 @@ module ChapelArray {\n     }\n \n   }  // record _array\n+\n+  // promototion for associative array addition doesn't really make sense. instead,\n+  // we really just want a union\n+  proc +(a :_array, b: _array) where (a._value.type == b._value.type) && isAssociativeArr(a) {\n+    return a | b;\n+  }\n+\n+  proc +=(ref a :_array, b: _array) where (a._value.type == b._value.type) && isAssociativeArr(a) {\n+    a |= b;\n+  }\n+\n+  proc |(a :_array, b: _array) where (a._value.type == b._value.type) && isAssociativeArr(a) {\n+    var newDom : a.domain.type;\n+    var ret : [newDom] a._value.eltType;","path":"modules/internal/ChapelArray.chpl","position":53,"original_position":53,"commit_id":"eebf80a5cd5f24f9b92d31886269904d204913df","original_commit_id":"eebf80a5cd5f24f9b92d31886269904d204913df","user":{"login":"sungeunchoi","id":4294511,"avatar_url":"https://avatars.githubusercontent.com/u/4294511?v=2","gravatar_id":"ec4b306fb630dc2f22ba960135543cfd","url":"https://api.github.com/users/sungeunchoi","html_url":"https://github.com/sungeunchoi","followers_url":"https://api.github.com/users/sungeunchoi/followers","following_url":"https://api.github.com/users/sungeunchoi/following{/other_user}","gists_url":"https://api.github.com/users/sungeunchoi/gists{/gist_id}","starred_url":"https://api.github.com/users/sungeunchoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sungeunchoi/subscriptions","organizations_url":"https://api.github.com/users/sungeunchoi/orgs","repos_url":"https://api.github.com/users/sungeunchoi/repos","events_url":"https://api.github.com/users/sungeunchoi/events{/privacy}","received_events_url":"https://api.github.com/users/sungeunchoi/received_events","type":"User","site_admin":false},"body":"I believe you can just use `a.eltType` here (and below).","created_at":"2014-08-27T23:01:12Z","updated_at":"2014-08-27T23:01:12Z","html_url":"https://github.com/chapel-lang/chapel/pull/226#discussion_r16810885","pull_request_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/226","_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/16810885"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/226#discussion_r16810885"},"pull_request":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/226"}}},"pull_request":{"url":"https://api.github.com/repos/chapel-lang/chapel/pulls/226","id":20336614,"html_url":"https://github.com/chapel-lang/chapel/pull/226","diff_url":"https://github.com/chapel-lang/chapel/pull/226.diff","patch_url":"https://github.com/chapel-lang/chapel/pull/226.patch","issue_url":"https://api.github.com/repos/chapel-lang/chapel/issues/226","number":226,"state":"open","locked":false,"title":"Set operations for associative domains and arrays","user":{"login":"benharsh","id":1883119,"avatar_url":"https://avatars.githubusercontent.com/u/1883119?v=2","gravatar_id":"f2a7ce21223ddf096d37e31e5bac1322","url":"https://api.github.com/users/benharsh","html_url":"https://github.com/benharsh","followers_url":"https://api.github.com/users/benharsh/followers","following_url":"https://api.github.com/users/benharsh/following{/other_user}","gists_url":"https://api.github.com/users/benharsh/gists{/gist_id}","starred_url":"https://api.github.com/users/benharsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benharsh/subscriptions","organizations_url":"https://api.github.com/users/benharsh/orgs","repos_url":"https://api.github.com/users/benharsh/repos","events_url":"https://api.github.com/users/benharsh/events{/privacy}","received_events_url":"https://api.github.com/users/benharsh/received_events","type":"User","site_admin":false},"body":"This patch provides standard set operations on associative domains and arrays:\r\nunion : \\+ or |\r\ndifference : \\-\r\nintersection : &\r\nsymmetric difference : ^\r\n\r\nThe op= variations are also supported for each operation.\r\n\r\nAlso provided is a 'subset' function for associative domains.\r\n\r\nWhile much of this is new functionality, a significant difference this patch implements is that operations like '+' on associative arrays are no longer promoted. For example:\r\n\r\n// before\r\nvar r = assocA + assocB; // r is a default rectangular array of A and B's values.\r\n\r\n// after\r\nvar r = assocA + assocB; // r is an associative array composed of the indices in both A and B.\r\n\r\nThe new functionality is much more useful in the context of adding two associative arrays together.\r\n\r\n- [ ] Passes parallel testing","created_at":"2014-08-26T20:55:15Z","updated_at":"2014-08-27T23:01:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8137d670db1d8eb711555e92ae6270d29c4e915b","assignee":{"login":"sungeunchoi","id":4294511,"avatar_url":"https://avatars.githubusercontent.com/u/4294511?v=2","gravatar_id":"ec4b306fb630dc2f22ba960135543cfd","url":"https://api.github.com/users/sungeunchoi","html_url":"https://github.com/sungeunchoi","followers_url":"https://api.github.com/users/sungeunchoi/followers","following_url":"https://api.github.com/users/sungeunchoi/following{/other_user}","gists_url":"https://api.github.com/users/sungeunchoi/gists{/gist_id}","starred_url":"https://api.github.com/users/sungeunchoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sungeunchoi/subscriptions","organizations_url":"https://api.github.com/users/sungeunchoi/orgs","repos_url":"https://api.github.com/users/sungeunchoi/repos","events_url":"https://api.github.com/users/sungeunchoi/events{/privacy}","received_events_url":"https://api.github.com/users/sungeunchoi/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/226/commits","review_comments_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/226/comments","review_comment_url":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/{number}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/issues/226/comments","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/eebf80a5cd5f24f9b92d31886269904d204913df","head":{"label":"benharsh:sets","ref":"sets","sha":"eebf80a5cd5f24f9b92d31886269904d204913df","user":{"login":"benharsh","id":1883119,"avatar_url":"https://avatars.githubusercontent.com/u/1883119?v=2","gravatar_id":"f2a7ce21223ddf096d37e31e5bac1322","url":"https://api.github.com/users/benharsh","html_url":"https://github.com/benharsh","followers_url":"https://api.github.com/users/benharsh/followers","following_url":"https://api.github.com/users/benharsh/following{/other_user}","gists_url":"https://api.github.com/users/benharsh/gists{/gist_id}","starred_url":"https://api.github.com/users/benharsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benharsh/subscriptions","organizations_url":"https://api.github.com/users/benharsh/orgs","repos_url":"https://api.github.com/users/benharsh/repos","events_url":"https://api.github.com/users/benharsh/events{/privacy}","received_events_url":"https://api.github.com/users/benharsh/received_events","type":"User","site_admin":false},"repo":{"id":21908961,"name":"chapel","full_name":"benharsh/chapel","owner":{"login":"benharsh","id":1883119,"avatar_url":"https://avatars.githubusercontent.com/u/1883119?v=2","gravatar_id":"f2a7ce21223ddf096d37e31e5bac1322","url":"https://api.github.com/users/benharsh","html_url":"https://github.com/benharsh","followers_url":"https://api.github.com/users/benharsh/followers","following_url":"https://api.github.com/users/benharsh/following{/other_user}","gists_url":"https://api.github.com/users/benharsh/gists{/gist_id}","starred_url":"https://api.github.com/users/benharsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benharsh/subscriptions","organizations_url":"https://api.github.com/users/benharsh/orgs","repos_url":"https://api.github.com/users/benharsh/repos","events_url":"https://api.github.com/users/benharsh/events{/privacy}","received_events_url":"https://api.github.com/users/benharsh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benharsh/chapel","description":"a Productive Parallel Programming Language","fork":true,"url":"https://api.github.com/repos/benharsh/chapel","forks_url":"https://api.github.com/repos/benharsh/chapel/forks","keys_url":"https://api.github.com/repos/benharsh/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benharsh/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benharsh/chapel/teams","hooks_url":"https://api.github.com/repos/benharsh/chapel/hooks","issue_events_url":"https://api.github.com/repos/benharsh/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/benharsh/chapel/events","assignees_url":"https://api.github.com/repos/benharsh/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/benharsh/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/benharsh/chapel/tags","blobs_url":"https://api.github.com/repos/benharsh/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benharsh/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benharsh/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/benharsh/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benharsh/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/benharsh/chapel/languages","stargazers_url":"https://api.github.com/repos/benharsh/chapel/stargazers","contributors_url":"https://api.github.com/repos/benharsh/chapel/contributors","subscribers_url":"https://api.github.com/repos/benharsh/chapel/subscribers","subscription_url":"https://api.github.com/repos/benharsh/chapel/subscription","commits_url":"https://api.github.com/repos/benharsh/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/benharsh/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/benharsh/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/benharsh/chapel/issues/comments/{number}","contents_url":"https://api.github.com/repos/benharsh/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/benharsh/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benharsh/chapel/merges","archive_url":"https://api.github.com/repos/benharsh/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benharsh/chapel/downloads","issues_url":"https://api.github.com/repos/benharsh/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/benharsh/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/benharsh/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/benharsh/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benharsh/chapel/labels{/name}","releases_url":"https://api.github.com/repos/benharsh/chapel/releases{/id}","created_at":"2014-07-16T16:46:13Z","updated_at":"2014-07-17T21:30:32Z","pushed_at":"2014-08-27T21:48:54Z","git_url":"git://github.com/benharsh/chapel.git","ssh_url":"git@github.com:benharsh/chapel.git","clone_url":"https://github.com/benharsh/chapel.git","svn_url":"https://github.com/benharsh/chapel","homepage":"http://chapel.cray.com/","size":245278,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"chapel-lang:master","ref":"master","sha":"5707263e6c33ce2718e04f17f975033bfe4156b4","user":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=2","gravatar_id":null,"url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":21663285,"name":"chapel","full_name":"chapel-lang/chapel","owner":{"login":"chapel-lang","id":7597261,"avatar_url":"https://avatars.githubusercontent.com/u/7597261?v=2","gravatar_id":null,"url":"https://api.github.com/users/chapel-lang","html_url":"https://github.com/chapel-lang","followers_url":"https://api.github.com/users/chapel-lang/followers","following_url":"https://api.github.com/users/chapel-lang/following{/other_user}","gists_url":"https://api.github.com/users/chapel-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/chapel-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chapel-lang/subscriptions","organizations_url":"https://api.github.com/users/chapel-lang/orgs","repos_url":"https://api.github.com/users/chapel-lang/repos","events_url":"https://api.github.com/users/chapel-lang/events{/privacy}","received_events_url":"https://api.github.com/users/chapel-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chapel-lang/chapel","description":"a Productive Parallel Programming Language","fork":false,"url":"https://api.github.com/repos/chapel-lang/chapel","forks_url":"https://api.github.com/repos/chapel-lang/chapel/forks","keys_url":"https://api.github.com/repos/chapel-lang/chapel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chapel-lang/chapel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chapel-lang/chapel/teams","hooks_url":"https://api.github.com/repos/chapel-lang/chapel/hooks","issue_events_url":"https://api.github.com/repos/chapel-lang/chapel/issues/events{/number}","events_url":"https://api.github.com/repos/chapel-lang/chapel/events","assignees_url":"https://api.github.com/repos/chapel-lang/chapel/assignees{/user}","branches_url":"https://api.github.com/repos/chapel-lang/chapel/branches{/branch}","tags_url":"https://api.github.com/repos/chapel-lang/chapel/tags","blobs_url":"https://api.github.com/repos/chapel-lang/chapel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chapel-lang/chapel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chapel-lang/chapel/git/refs{/sha}","trees_url":"https://api.github.com/repos/chapel-lang/chapel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chapel-lang/chapel/statuses/{sha}","languages_url":"https://api.github.com/repos/chapel-lang/chapel/languages","stargazers_url":"https://api.github.com/repos/chapel-lang/chapel/stargazers","contributors_url":"https://api.github.com/repos/chapel-lang/chapel/contributors","subscribers_url":"https://api.github.com/repos/chapel-lang/chapel/subscribers","subscription_url":"https://api.github.com/repos/chapel-lang/chapel/subscription","commits_url":"https://api.github.com/repos/chapel-lang/chapel/commits{/sha}","git_commits_url":"https://api.github.com/repos/chapel-lang/chapel/git/commits{/sha}","comments_url":"https://api.github.com/repos/chapel-lang/chapel/comments{/number}","issue_comment_url":"https://api.github.com/repos/chapel-lang/chapel/issues/comments/{number}","contents_url":"https://api.github.com/repos/chapel-lang/chapel/contents/{+path}","compare_url":"https://api.github.com/repos/chapel-lang/chapel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chapel-lang/chapel/merges","archive_url":"https://api.github.com/repos/chapel-lang/chapel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chapel-lang/chapel/downloads","issues_url":"https://api.github.com/repos/chapel-lang/chapel/issues{/number}","pulls_url":"https://api.github.com/repos/chapel-lang/chapel/pulls{/number}","milestones_url":"https://api.github.com/repos/chapel-lang/chapel/milestones{/number}","notifications_url":"https://api.github.com/repos/chapel-lang/chapel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chapel-lang/chapel/labels{/name}","releases_url":"https://api.github.com/repos/chapel-lang/chapel/releases{/id}","created_at":"2014-07-09T18:15:54Z","updated_at":"2014-08-22T22:31:36Z","pushed_at":"2014-08-27T22:40:34Z","git_url":"git://github.com/chapel-lang/chapel.git","ssh_url":"git@github.com:chapel-lang/chapel.git","clone_url":"https://github.com/chapel-lang/chapel.git","svn_url":"https://github.com/chapel-lang/chapel","homepage":"http://chapel.cray.com/","size":310379,"stargazers_count":29,"watchers_count":29,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":23,"mirror_url":null,"open_issues_count":8,"forks":23,"open_issues":8,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/226"},"html":{"href":"https://github.com/chapel-lang/chapel/pull/226"},"issue":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/226"},"comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/chapel-lang/chapel/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/chapel-lang/chapel/statuses/eebf80a5cd5f24f9b92d31886269904d204913df"}}}}