{"action":"opened","number":154,"pull_request":{"url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/154","id":35619570,"html_url":"https://github.com/johnmccutchan/ecmascript_simd/pull/154","diff_url":"https://github.com/johnmccutchan/ecmascript_simd/pull/154.diff","patch_url":"https://github.com/johnmccutchan/ecmascript_simd/pull/154.patch","issue_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues/154","number":154,"state":"open","locked":false,"title":"Utils","user":{"login":"bnjbvr","id":1180019,"avatar_url":"https://avatars.githubusercontent.com/u/1180019?v=3","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"body":"As a long overdue, here is the start of a utility library using SIMD.js, as an example of what can be done with SIMD.js. It contains the previously deleted \"zero\" attribute, and the \"clamp\" method deleted in my previous pull request. As a matter of fact, this pull request depends on the merge of the clamp removal PR.\r\n\r\nThere are different possible approaches for this utilities library: the one presented in this patch (use a global object, SIMDUtil, on which we implant the new methods, to prevent possible future namespace issues), or adding methods to the global SIMD object itself (which would have the previously mentioned issue), or having pure functions that take the SIMD object and other arguments (e.g. `function float32x4Clamp(SIMD, v, min, max)` or simply `function float32x4Clamp(v, min, max)`) -- but this last one lacks symmetry with the SIMD global object, in my opinion. Of course, as this is just a start, everybody can add useful utility functions later or change the ones already present in this file.\r\n\r\n@sunfishcode, @johnmccutchan, @PeterJensen, what do you think?","created_at":"2015-05-18T10:18:10Z","updated_at":"2015-05-18T10:18:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/154/commits","review_comments_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/154/comments","review_comment_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues/154/comments","statuses_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/statuses/65baeed1f4b2037b9780c14c34ab176597eebf99","head":{"label":"bnjbvr:utils","ref":"utils","sha":"65baeed1f4b2037b9780c14c34ab176597eebf99","user":{"login":"bnjbvr","id":1180019,"avatar_url":"https://avatars.githubusercontent.com/u/1180019?v=3","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"repo":{"id":23616354,"name":"ecmascript_simd","full_name":"bnjbvr/ecmascript_simd","owner":{"login":"bnjbvr","id":1180019,"avatar_url":"https://avatars.githubusercontent.com/u/1180019?v=3","gravatar_id":"","url":"https://api.github.com/users/bnjbvr","html_url":"https://github.com/bnjbvr","followers_url":"https://api.github.com/users/bnjbvr/followers","following_url":"https://api.github.com/users/bnjbvr/following{/other_user}","gists_url":"https://api.github.com/users/bnjbvr/gists{/gist_id}","starred_url":"https://api.github.com/users/bnjbvr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bnjbvr/subscriptions","organizations_url":"https://api.github.com/users/bnjbvr/orgs","repos_url":"https://api.github.com/users/bnjbvr/repos","events_url":"https://api.github.com/users/bnjbvr/events{/privacy}","received_events_url":"https://api.github.com/users/bnjbvr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bnjbvr/ecmascript_simd","description":"SIMD numeric type for EcmaScript","fork":true,"url":"https://api.github.com/repos/bnjbvr/ecmascript_simd","forks_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/forks","keys_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/teams","hooks_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/hooks","issue_events_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/issues/events{/number}","events_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/events","assignees_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/assignees{/user}","branches_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/branches{/branch}","tags_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/tags","blobs_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/git/refs{/sha}","trees_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/statuses/{sha}","languages_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/languages","stargazers_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/stargazers","contributors_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/contributors","subscribers_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/subscribers","subscription_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/subscription","commits_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/commits{/sha}","git_commits_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/git/commits{/sha}","comments_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/comments{/number}","issue_comment_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/issues/comments{/number}","contents_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/contents/{+path}","compare_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/merges","archive_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/downloads","issues_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/issues{/number}","pulls_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/pulls{/number}","milestones_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/milestones{/number}","notifications_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/labels{/name}","releases_url":"https://api.github.com/repos/bnjbvr/ecmascript_simd/releases{/id}","created_at":"2014-09-03T10:34:30Z","updated_at":"2015-03-24T15:44:12Z","pushed_at":"2015-05-18T10:10:21Z","git_url":"git://github.com/bnjbvr/ecmascript_simd.git","ssh_url":"git@github.com:bnjbvr/ecmascript_simd.git","clone_url":"https://github.com/bnjbvr/ecmascript_simd.git","svn_url":"https://github.com/bnjbvr/ecmascript_simd","homepage":null,"size":1084,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"johnmccutchan:master","ref":"master","sha":"07e2713e0c9ea19feb0732d5bd84770c87310d79","user":{"login":"johnmccutchan","id":224266,"avatar_url":"https://avatars.githubusercontent.com/u/224266?v=3","gravatar_id":"","url":"https://api.github.com/users/johnmccutchan","html_url":"https://github.com/johnmccutchan","followers_url":"https://api.github.com/users/johnmccutchan/followers","following_url":"https://api.github.com/users/johnmccutchan/following{/other_user}","gists_url":"https://api.github.com/users/johnmccutchan/gists{/gist_id}","starred_url":"https://api.github.com/users/johnmccutchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnmccutchan/subscriptions","organizations_url":"https://api.github.com/users/johnmccutchan/orgs","repos_url":"https://api.github.com/users/johnmccutchan/repos","events_url":"https://api.github.com/users/johnmccutchan/events{/privacy}","received_events_url":"https://api.github.com/users/johnmccutchan/received_events","type":"User","site_admin":false},"repo":{"id":9133414,"name":"ecmascript_simd","full_name":"johnmccutchan/ecmascript_simd","owner":{"login":"johnmccutchan","id":224266,"avatar_url":"https://avatars.githubusercontent.com/u/224266?v=3","gravatar_id":"","url":"https://api.github.com/users/johnmccutchan","html_url":"https://github.com/johnmccutchan","followers_url":"https://api.github.com/users/johnmccutchan/followers","following_url":"https://api.github.com/users/johnmccutchan/following{/other_user}","gists_url":"https://api.github.com/users/johnmccutchan/gists{/gist_id}","starred_url":"https://api.github.com/users/johnmccutchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnmccutchan/subscriptions","organizations_url":"https://api.github.com/users/johnmccutchan/orgs","repos_url":"https://api.github.com/users/johnmccutchan/repos","events_url":"https://api.github.com/users/johnmccutchan/events{/privacy}","received_events_url":"https://api.github.com/users/johnmccutchan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johnmccutchan/ecmascript_simd","description":"SIMD numeric type for EcmaScript","fork":false,"url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd","forks_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/forks","keys_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/teams","hooks_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/hooks","issue_events_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues/events{/number}","events_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/events","assignees_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/assignees{/user}","branches_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/branches{/branch}","tags_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/tags","blobs_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/git/refs{/sha}","trees_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/statuses/{sha}","languages_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/languages","stargazers_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/stargazers","contributors_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/contributors","subscribers_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/subscribers","subscription_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/subscription","commits_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/commits{/sha}","git_commits_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/git/commits{/sha}","comments_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/comments{/number}","issue_comment_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues/comments{/number}","contents_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/contents/{+path}","compare_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/merges","archive_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/downloads","issues_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues{/number}","pulls_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls{/number}","milestones_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/milestones{/number}","notifications_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/labels{/name}","releases_url":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/releases{/id}","created_at":"2013-03-31T17:32:34Z","updated_at":"2015-05-16T12:12:31Z","pushed_at":"2015-05-18T10:02:58Z","git_url":"git://github.com/johnmccutchan/ecmascript_simd.git","ssh_url":"git@github.com:johnmccutchan/ecmascript_simd.git","clone_url":"https://github.com/johnmccutchan/ecmascript_simd.git","svn_url":"https://github.com/johnmccutchan/ecmascript_simd","homepage":null,"size":4169,"stargazers_count":268,"watchers_count":268,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":16,"forks":31,"open_issues":16,"watchers":268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/154"},"html":{"href":"https://github.com/johnmccutchan/ecmascript_simd/pull/154"},"issue":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues/154"},"comments":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/johnmccutchan/ecmascript_simd/statuses/65baeed1f4b2037b9780c14c34ab176597eebf99"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":120,"deletions":103,"changed_files":5}}