{"action":"created","comment":{"url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/comments/33610499","id":33610499,"diff_hunk":"@@ -0,0 +1,214 @@\n+// Copyright (c) Jupyter Development Team.\n+// Distributed under the terms of the Modified BSD License.\n+\n+import moment = require('moment');\n+\n+\n+/*\n+ * Copy the contents of one object to another, recursively.\n+ *\n+ * http://stackoverflow.com/questions/12317003/something-like-jquery-extend-but-standalone\n+ */\n+export\n+function extend(target: any, source: any): any {\n+  target = target || {};\n+  for (var prop in source) {\n+    if (typeof source[prop] === 'object') {\n+      target[prop] = extend(target[prop], source[prop]);\n+    } else {\n+      target[prop] = source[prop];\n+    }\n+  }\n+  return target;\n+}\n+\n+\n+/*\n+ * Get a uuid as a string.\n+ */\n+export\n+function uuid(): string {\n+  /**\n+   * http://www.ietf.org/rfc/rfc4122.txt\n+   */\n+  var s: string[] = [];\n+  var hexDigits = \"0123456789ABCDEF\";\n+  for (var i = 0; i < 32; i++) {\n+    s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);\n+  }\n+  s[12] = \"4\";  // bits 12-15 of the time_hi_and_version field to 0010\n+  s[16] = hexDigits.substr((Number(s[16]) & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01\n+\n+  var uuid = s.join(\"\");\n+  return uuid;\n+}\n+\n+\n+/**\n+ * Join a sequence of url components with '/'.\n+ */\n+export\n+function urlPathJoin(...paths: string[]): string {\n+","path":"src/utils.ts","position":52,"original_position":52,"commit_id":"a2d1ad6540bc547961c085654e042409b56b0514","original_commit_id":"a2d1ad6540bc547961c085654e042409b56b0514","user":{"login":"sccolbert","id":137289,"avatar_url":"https://avatars.githubusercontent.com/u/137289?v=3","gravatar_id":"","url":"https://api.github.com/users/sccolbert","html_url":"https://github.com/sccolbert","followers_url":"https://api.github.com/users/sccolbert/followers","following_url":"https://api.github.com/users/sccolbert/following{/other_user}","gists_url":"https://api.github.com/users/sccolbert/gists{/gist_id}","starred_url":"https://api.github.com/users/sccolbert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sccolbert/subscriptions","organizations_url":"https://api.github.com/users/sccolbert/orgs","repos_url":"https://api.github.com/users/sccolbert/repos","events_url":"https://api.github.com/users/sccolbert/events{/privacy}","received_events_url":"https://api.github.com/users/sccolbert/received_events","type":"User","site_admin":false},"body":"unneeded blank line","created_at":"2015-06-30T19:01:23Z","updated_at":"2015-06-30T19:01:23Z","html_url":"https://github.com/jupyter/phosphor-notebook/pull/1#discussion_r33610499","pull_request_url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/comments/33610499"},"html":{"href":"https://github.com/jupyter/phosphor-notebook/pull/1#discussion_r33610499"},"pull_request":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1","id":38883606,"html_url":"https://github.com/jupyter/phosphor-notebook/pull/1","diff_url":"https://github.com/jupyter/phosphor-notebook/pull/1.diff","patch_url":"https://github.com/jupyter/phosphor-notebook/pull/1.patch","issue_url":"https://api.github.com/repos/jupyter/phosphor-notebook/issues/1","number":1,"state":"open","locked":false,"title":"Upgrade Kernel.ts","user":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"body":"- Removed use of callbacks in favor of `KernelFuture`\r\n- Removed use of `events` in favor of phosphor `Signal`\r\n- Added minimal `utils.ts` and `serialize.ts` in support of `kernel.ts`\r\n- Removed all traces of JQuery\r\n- Added private methods as appropriate\r\n- Added to `tsd.json` as required\r\n- General cleanup and style fixes\r\n- Ensured clean build of `gulp`\r\n\r\nNotes: \r\n- I intentionally removed the `comm_manager` from `kernel.ts`, to be handled in a future PR.\r\n- I will add `session.ts` in a separate PR, since that is needed to actually run the kernel.\r\n- I'd recommend reviewing `kernel.ts` as a [standalone file](https://github.com/blink1073/phosphor-notebook-1/blob/upgrade-kernel-ts/src/kernel.ts), the diff won't be very helpful.  \r\n\r\nFor discussion:\r\n- What to do about `Kernel.sendInputReply`?  Previously, it was triggered by an `event` from `outputarea.js`. `OutputArea` has no reference to any kernel objects.\r\n","created_at":"2015-06-30T14:27:14Z","updated_at":"2015-06-30T19:01:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93a181e4f7a62a157042c50553a088c18c48f231","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1/commits","review_comments_url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1/comments","review_comment_url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jupyter/phosphor-notebook/issues/1/comments","statuses_url":"https://api.github.com/repos/jupyter/phosphor-notebook/statuses/a2d1ad6540bc547961c085654e042409b56b0514","head":{"label":"blink1073:upgrade-kernel-ts","ref":"upgrade-kernel-ts","sha":"a2d1ad6540bc547961c085654e042409b56b0514","user":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"repo":{"id":38313630,"name":"phosphor-notebook-1","full_name":"blink1073/phosphor-notebook-1","owner":{"login":"blink1073","id":2096628,"avatar_url":"https://avatars.githubusercontent.com/u/2096628?v=3","gravatar_id":"","url":"https://api.github.com/users/blink1073","html_url":"https://github.com/blink1073","followers_url":"https://api.github.com/users/blink1073/followers","following_url":"https://api.github.com/users/blink1073/following{/other_user}","gists_url":"https://api.github.com/users/blink1073/gists{/gist_id}","starred_url":"https://api.github.com/users/blink1073/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blink1073/subscriptions","organizations_url":"https://api.github.com/users/blink1073/orgs","repos_url":"https://api.github.com/users/blink1073/repos","events_url":"https://api.github.com/users/blink1073/events{/privacy}","received_events_url":"https://api.github.com/users/blink1073/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blink1073/phosphor-notebook-1","description":"","fork":true,"url":"https://api.github.com/repos/blink1073/phosphor-notebook-1","forks_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/forks","keys_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/teams","hooks_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/hooks","issue_events_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/issues/events{/number}","events_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/events","assignees_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/assignees{/user}","branches_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/branches{/branch}","tags_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/tags","blobs_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/statuses/{sha}","languages_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/languages","stargazers_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/stargazers","contributors_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/contributors","subscribers_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/subscribers","subscription_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/subscription","commits_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/contents/{+path}","compare_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/merges","archive_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/downloads","issues_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/issues{/number}","pulls_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/pulls{/number}","milestones_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/milestones{/number}","notifications_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/labels{/name}","releases_url":"https://api.github.com/repos/blink1073/phosphor-notebook-1/releases{/id}","created_at":"2015-06-30T14:23:36Z","updated_at":"2015-06-30T14:23:36Z","pushed_at":"2015-06-30T18:52:14Z","git_url":"git://github.com/blink1073/phosphor-notebook-1.git","ssh_url":"git@github.com:blink1073/phosphor-notebook-1.git","clone_url":"https://github.com/blink1073/phosphor-notebook-1.git","svn_url":"https://github.com/blink1073/phosphor-notebook-1","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":"jupyter:master","ref":"master","sha":"6bb145a58b5d9a1ea17c6d3def7065079fab2909","user":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"repo":{"id":38249514,"name":"phosphor-notebook","full_name":"jupyter/phosphor-notebook","owner":{"login":"jupyter","id":7388996,"avatar_url":"https://avatars.githubusercontent.com/u/7388996?v=3","gravatar_id":"","url":"https://api.github.com/users/jupyter","html_url":"https://github.com/jupyter","followers_url":"https://api.github.com/users/jupyter/followers","following_url":"https://api.github.com/users/jupyter/following{/other_user}","gists_url":"https://api.github.com/users/jupyter/gists{/gist_id}","starred_url":"https://api.github.com/users/jupyter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jupyter/subscriptions","organizations_url":"https://api.github.com/users/jupyter/orgs","repos_url":"https://api.github.com/users/jupyter/repos","events_url":"https://api.github.com/users/jupyter/events{/privacy}","received_events_url":"https://api.github.com/users/jupyter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/jupyter/phosphor-notebook","description":"","fork":false,"url":"https://api.github.com/repos/jupyter/phosphor-notebook","forks_url":"https://api.github.com/repos/jupyter/phosphor-notebook/forks","keys_url":"https://api.github.com/repos/jupyter/phosphor-notebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jupyter/phosphor-notebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jupyter/phosphor-notebook/teams","hooks_url":"https://api.github.com/repos/jupyter/phosphor-notebook/hooks","issue_events_url":"https://api.github.com/repos/jupyter/phosphor-notebook/issues/events{/number}","events_url":"https://api.github.com/repos/jupyter/phosphor-notebook/events","assignees_url":"https://api.github.com/repos/jupyter/phosphor-notebook/assignees{/user}","branches_url":"https://api.github.com/repos/jupyter/phosphor-notebook/branches{/branch}","tags_url":"https://api.github.com/repos/jupyter/phosphor-notebook/tags","blobs_url":"https://api.github.com/repos/jupyter/phosphor-notebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jupyter/phosphor-notebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jupyter/phosphor-notebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/jupyter/phosphor-notebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jupyter/phosphor-notebook/statuses/{sha}","languages_url":"https://api.github.com/repos/jupyter/phosphor-notebook/languages","stargazers_url":"https://api.github.com/repos/jupyter/phosphor-notebook/stargazers","contributors_url":"https://api.github.com/repos/jupyter/phosphor-notebook/contributors","subscribers_url":"https://api.github.com/repos/jupyter/phosphor-notebook/subscribers","subscription_url":"https://api.github.com/repos/jupyter/phosphor-notebook/subscription","commits_url":"https://api.github.com/repos/jupyter/phosphor-notebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/jupyter/phosphor-notebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/jupyter/phosphor-notebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/jupyter/phosphor-notebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/jupyter/phosphor-notebook/contents/{+path}","compare_url":"https://api.github.com/repos/jupyter/phosphor-notebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jupyter/phosphor-notebook/merges","archive_url":"https://api.github.com/repos/jupyter/phosphor-notebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jupyter/phosphor-notebook/downloads","issues_url":"https://api.github.com/repos/jupyter/phosphor-notebook/issues{/number}","pulls_url":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls{/number}","milestones_url":"https://api.github.com/repos/jupyter/phosphor-notebook/milestones{/number}","notifications_url":"https://api.github.com/repos/jupyter/phosphor-notebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jupyter/phosphor-notebook/labels{/name}","releases_url":"https://api.github.com/repos/jupyter/phosphor-notebook/releases{/id}","created_at":"2015-06-29T13:37:35Z","updated_at":"2015-06-30T15:23:43Z","pushed_at":"2015-06-30T18:52:15Z","git_url":"git://github.com/jupyter/phosphor-notebook.git","ssh_url":"git@github.com:jupyter/phosphor-notebook.git","clone_url":"https://github.com/jupyter/phosphor-notebook.git","svn_url":"https://github.com/jupyter/phosphor-notebook","homepage":null,"size":0,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1"},"html":{"href":"https://github.com/jupyter/phosphor-notebook/pull/1"},"issue":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/issues/1"},"comments":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/jupyter/phosphor-notebook/statuses/a2d1ad6540bc547961c085654e042409b56b0514"}}}}