GitHub PullRequestReviewCommentEvent at 2014-08-08 17:36:09
Repository: raft
Actor: mwhittaker
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mwhittaker/raft/pulls/comments/16005352","id":16005352,"diff_hunk":"@@ -1,3 +1,24 @@\n+use std::os;\n+\n+pub mod server;\n+pub mod client;\n+\n+fn usage() {\n+    println!(\"raft (client|server)\");\n+}\n+\n fn main() {\n-    println!(\"Hello, world!\");\n+    let args = os::args();\n+\n+    if args.len() < 2 {\n+        usage();\n+        os::set_exit_status(1);\n+        return;\n+    }\n+\n+    match args[1].as_slice() {","path":"src/main.rs","position":20,"original_position":20,"commit_id":"4ffed5d107ef9e88d950fce54f79abb9321dbca5","original_commit_id":"4ffed5d107ef9e88d950fce54f79abb9321dbca5","user":{"login":"mwhittaker","id":3654277,"avatar_url":"https://avatars.githubusercontent.com/u/3654277?v=2","gravatar_id":"5b01215610fb0a7be2212e2a7953da0c","url":"https://api.github.com/users/mwhittaker","html_url":"https://github.com/mwhittaker","followers_url":"https://api.github.com/users/mwhittaker/followers","following_url":"https://api.github.com/users/mwhittaker/following{/other_user}","gists_url":"https://api.github.com/users/mwhittaker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhittaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhittaker/subscriptions","organizations_url":"https://api.github.com/users/mwhittaker/orgs","repos_url":"https://api.github.com/users/mwhittaker/repos","events_url":"https://api.github.com/users/mwhittaker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhittaker/received_events","type":"User","site_admin":false},"body":"No good reason besides the fact that it's more convenient. It'll make less sense when raft is bigger than a handful of lines.","created_at":"2014-08-08T17:36:09Z","updated_at":"2014-08-08T17:36:09Z","html_url":"https://github.com/mwhittaker/raft/pull/4#discussion_r16005352","pull_request_url":"https://api.github.com/repos/mwhittaker/raft/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/mwhittaker/raft/pulls/comments/16005352"},"html":{"href":"https://github.com/mwhittaker/raft/pull/4#discussion_r16005352"},"pull_request":{"href":"https://api.github.com/repos/mwhittaker/raft/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/mwhittaker/raft/pulls/4","id":19510007,"html_url":"https://github.com/mwhittaker/raft/pull/4","diff_url":"https://github.com/mwhittaker/raft/pull/4.diff","patch_url":"https://github.com/mwhittaker/raft/pull/4.patch","issue_url":"https://api.github.com/repos/mwhittaker/raft/issues/4","number":4,"state":"open","title":"Added basic printing server.","user":{"login":"mwhittaker","id":3654277,"avatar_url":"https://avatars.githubusercontent.com/u/3654277?v=2","gravatar_id":"5b01215610fb0a7be2212e2a7953da0c","url":"https://api.github.com/users/mwhittaker","html_url":"https://github.com/mwhittaker","followers_url":"https://api.github.com/users/mwhittaker/followers","following_url":"https://api.github.com/users/mwhittaker/following{/other_user}","gists_url":"https://api.github.com/users/mwhittaker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhittaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhittaker/subscriptions","organizations_url":"https://api.github.com/users/mwhittaker/orgs","repos_url":"https://api.github.com/users/mwhittaker/repos","events_url":"https://api.github.com/users/mwhittaker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhittaker/received_events","type":"User","site_admin":false},"body":"I'm still getting the hang of communicating over the network in rust. Heck, I'm still getting used to rust. I'm starting off raft with a basic client/server. This implements a server that prints the messages line by line that it receives.\r\n\r\nTo test it out, you can use telnet. For example, in one shell run:\r\n\r\n    $ raft server\r\n\r\nand in another shell run:\r\n\r\n    $ telnet localhost 9999\r\n\r\nthen type away.","created_at":"2014-08-08T05:36:42Z","updated_at":"2014-08-08T17:36:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c1fed7b3b85ef71cb69ff085895aae90a45bb0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mwhittaker/raft/pulls/4/commits","review_comments_url":"https://api.github.com/repos/mwhittaker/raft/pulls/4/comments","review_comment_url":"https://api.github.com/repos/mwhittaker/raft/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mwhittaker/raft/issues/4/comments","statuses_url":"https://api.github.com/repos/mwhittaker/raft/statuses/4ffed5d107ef9e88d950fce54f79abb9321dbca5","head":{"label":"mwhittaker:client-server","ref":"client-server","sha":"4ffed5d107ef9e88d950fce54f79abb9321dbca5","user":{"login":"mwhittaker","id":3654277,"avatar_url":"https://avatars.githubusercontent.com/u/3654277?v=2","gravatar_id":"5b01215610fb0a7be2212e2a7953da0c","url":"https://api.github.com/users/mwhittaker","html_url":"https://github.com/mwhittaker","followers_url":"https://api.github.com/users/mwhittaker/followers","following_url":"https://api.github.com/users/mwhittaker/following{/other_user}","gists_url":"https://api.github.com/users/mwhittaker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhittaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhittaker/subscriptions","organizations_url":"https://api.github.com/users/mwhittaker/orgs","repos_url":"https://api.github.com/users/mwhittaker/repos","events_url":"https://api.github.com/users/mwhittaker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhittaker/received_events","type":"User","site_admin":false},"repo":{"id":21059202,"name":"raft","full_name":"mwhittaker/raft","owner":{"login":"mwhittaker","id":3654277,"avatar_url":"https://avatars.githubusercontent.com/u/3654277?v=2","gravatar_id":"5b01215610fb0a7be2212e2a7953da0c","url":"https://api.github.com/users/mwhittaker","html_url":"https://github.com/mwhittaker","followers_url":"https://api.github.com/users/mwhittaker/followers","following_url":"https://api.github.com/users/mwhittaker/following{/other_user}","gists_url":"https://api.github.com/users/mwhittaker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhittaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhittaker/subscriptions","organizations_url":"https://api.github.com/users/mwhittaker/orgs","repos_url":"https://api.github.com/users/mwhittaker/repos","events_url":"https://api.github.com/users/mwhittaker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhittaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwhittaker/raft","description":"Raft Consensus Algorithm","fork":false,"url":"https://api.github.com/repos/mwhittaker/raft","forks_url":"https://api.github.com/repos/mwhittaker/raft/forks","keys_url":"https://api.github.com/repos/mwhittaker/raft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwhittaker/raft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwhittaker/raft/teams","hooks_url":"https://api.github.com/repos/mwhittaker/raft/hooks","issue_events_url":"https://api.github.com/repos/mwhittaker/raft/issues/events{/number}","events_url":"https://api.github.com/repos/mwhittaker/raft/events","assignees_url":"https://api.github.com/repos/mwhittaker/raft/assignees{/user}","branches_url":"https://api.github.com/repos/mwhittaker/raft/branches{/branch}","tags_url":"https://api.github.com/repos/mwhittaker/raft/tags","blobs_url":"https://api.github.com/repos/mwhittaker/raft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwhittaker/raft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwhittaker/raft/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwhittaker/raft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwhittaker/raft/statuses/{sha}","languages_url":"https://api.github.com/repos/mwhittaker/raft/languages","stargazers_url":"https://api.github.com/repos/mwhittaker/raft/stargazers","contributors_url":"https://api.github.com/repos/mwhittaker/raft/contributors","subscribers_url":"https://api.github.com/repos/mwhittaker/raft/subscribers","subscription_url":"https://api.github.com/repos/mwhittaker/raft/subscription","commits_url":"https://api.github.com/repos/mwhittaker/raft/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwhittaker/raft/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwhittaker/raft/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwhittaker/raft/issues/comments/{number}","contents_url":"https://api.github.com/repos/mwhittaker/raft/contents/{+path}","compare_url":"https://api.github.com/repos/mwhittaker/raft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwhittaker/raft/merges","archive_url":"https://api.github.com/repos/mwhittaker/raft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwhittaker/raft/downloads","issues_url":"https://api.github.com/repos/mwhittaker/raft/issues{/number}","pulls_url":"https://api.github.com/repos/mwhittaker/raft/pulls{/number}","milestones_url":"https://api.github.com/repos/mwhittaker/raft/milestones{/number}","notifications_url":"https://api.github.com/repos/mwhittaker/raft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwhittaker/raft/labels{/name}","releases_url":"https://api.github.com/repos/mwhittaker/raft/releases{/id}","created_at":"2014-06-21T03:19:31Z","updated_at":"2014-07-19T21:31:09Z","pushed_at":"2014-08-08T05:35:08Z","git_url":"git://github.com/mwhittaker/raft.git","ssh_url":"git@github.com:mwhittaker/raft.git","clone_url":"https://github.com/mwhittaker/raft.git","svn_url":"https://github.com/mwhittaker/raft","homepage":null,"size":360,"stargazers_count":0,"watchers_count":0,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"mwhittaker:master","ref":"master","sha":"1a36bf1ff2421ea8e4672eced3dd6f3daa34cd35","user":{"login":"mwhittaker","id":3654277,"avatar_url":"https://avatars.githubusercontent.com/u/3654277?v=2","gravatar_id":"5b01215610fb0a7be2212e2a7953da0c","url":"https://api.github.com/users/mwhittaker","html_url":"https://github.com/mwhittaker","followers_url":"https://api.github.com/users/mwhittaker/followers","following_url":"https://api.github.com/users/mwhittaker/following{/other_user}","gists_url":"https://api.github.com/users/mwhittaker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhittaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhittaker/subscriptions","organizations_url":"https://api.github.com/users/mwhittaker/orgs","repos_url":"https://api.github.com/users/mwhittaker/repos","events_url":"https://api.github.com/users/mwhittaker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhittaker/received_events","type":"User","site_admin":false},"repo":{"id":21059202,"name":"raft","full_name":"mwhittaker/raft","owner":{"login":"mwhittaker","id":3654277,"avatar_url":"https://avatars.githubusercontent.com/u/3654277?v=2","gravatar_id":"5b01215610fb0a7be2212e2a7953da0c","url":"https://api.github.com/users/mwhittaker","html_url":"https://github.com/mwhittaker","followers_url":"https://api.github.com/users/mwhittaker/followers","following_url":"https://api.github.com/users/mwhittaker/following{/other_user}","gists_url":"https://api.github.com/users/mwhittaker/gists{/gist_id}","starred_url":"https://api.github.com/users/mwhittaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwhittaker/subscriptions","organizations_url":"https://api.github.com/users/mwhittaker/orgs","repos_url":"https://api.github.com/users/mwhittaker/repos","events_url":"https://api.github.com/users/mwhittaker/events{/privacy}","received_events_url":"https://api.github.com/users/mwhittaker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mwhittaker/raft","description":"Raft Consensus Algorithm","fork":false,"url":"https://api.github.com/repos/mwhittaker/raft","forks_url":"https://api.github.com/repos/mwhittaker/raft/forks","keys_url":"https://api.github.com/repos/mwhittaker/raft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mwhittaker/raft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mwhittaker/raft/teams","hooks_url":"https://api.github.com/repos/mwhittaker/raft/hooks","issue_events_url":"https://api.github.com/repos/mwhittaker/raft/issues/events{/number}","events_url":"https://api.github.com/repos/mwhittaker/raft/events","assignees_url":"https://api.github.com/repos/mwhittaker/raft/assignees{/user}","branches_url":"https://api.github.com/repos/mwhittaker/raft/branches{/branch}","tags_url":"https://api.github.com/repos/mwhittaker/raft/tags","blobs_url":"https://api.github.com/repos/mwhittaker/raft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mwhittaker/raft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mwhittaker/raft/git/refs{/sha}","trees_url":"https://api.github.com/repos/mwhittaker/raft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mwhittaker/raft/statuses/{sha}","languages_url":"https://api.github.com/repos/mwhittaker/raft/languages","stargazers_url":"https://api.github.com/repos/mwhittaker/raft/stargazers","contributors_url":"https://api.github.com/repos/mwhittaker/raft/contributors","subscribers_url":"https://api.github.com/repos/mwhittaker/raft/subscribers","subscription_url":"https://api.github.com/repos/mwhittaker/raft/subscription","commits_url":"https://api.github.com/repos/mwhittaker/raft/commits{/sha}","git_commits_url":"https://api.github.com/repos/mwhittaker/raft/git/commits{/sha}","comments_url":"https://api.github.com/repos/mwhittaker/raft/comments{/number}","issue_comment_url":"https://api.github.com/repos/mwhittaker/raft/issues/comments/{number}","contents_url":"https://api.github.com/repos/mwhittaker/raft/contents/{+path}","compare_url":"https://api.github.com/repos/mwhittaker/raft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mwhittaker/raft/merges","archive_url":"https://api.github.com/repos/mwhittaker/raft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mwhittaker/raft/downloads","issues_url":"https://api.github.com/repos/mwhittaker/raft/issues{/number}","pulls_url":"https://api.github.com/repos/mwhittaker/raft/pulls{/number}","milestones_url":"https://api.github.com/repos/mwhittaker/raft/milestones{/number}","notifications_url":"https://api.github.com/repos/mwhittaker/raft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mwhittaker/raft/labels{/name}","releases_url":"https://api.github.com/repos/mwhittaker/raft/releases{/id}","created_at":"2014-06-21T03:19:31Z","updated_at":"2014-07-19T21:31:09Z","pushed_at":"2014-08-08T05:35:08Z","git_url":"git://github.com/mwhittaker/raft.git","ssh_url":"git@github.com:mwhittaker/raft.git","clone_url":"https://github.com/mwhittaker/raft.git","svn_url":"https://github.com/mwhittaker/raft","homepage":null,"size":360,"stargazers_count":0,"watchers_count":0,"language":"VimL","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mwhittaker/raft/pulls/4"},"html":{"href":"https://github.com/mwhittaker/raft/pull/4"},"issue":{"href":"https://api.github.com/repos/mwhittaker/raft/issues/4"},"comments":{"href":"https://api.github.com/repos/mwhittaker/raft/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/mwhittaker/raft/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/mwhittaker/raft/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mwhittaker/raft/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/mwhittaker/raft/statuses/4ffed5d107ef9e88d950fce54f79abb9321dbca5"}}}}