{"action":"created","comment":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/comments/30678325","id":30678325,"diff_hunk":"@@ -2,45 +2,40 @@\n \n For our second project, let’s look at a classic concurrency problem. It’s\n called ‘the dining philosophers’. It was originally conceived by Dijkstra in\n-1965, but we’ll use the version from [this paper][paper] by Tony Hoare in 1985.\n-\n-[paper]: http://www.usingcsp.com/cspbook.pdf\n-\n-> In ancient times, a wealthy philanthropist endowed a College to accommodate\n-> five eminent philosophers. Each philosopher had a room in which she could\n-> engage in her professional activity of thinking; there was also a common\n-> dining room, furnished with a circular table, surrounded by five chairs, each\n-> labelled by the name of the philosopher who was to sit in it. They sat\n-> anticlockwise around the table. To the left of each philosopher there was\n-> laid a golden fork, and in the centre stood a large bowl of spaghetti, which\n-> was constantly replenished. A philosopher was expected to spend most of her\n-> time thinking; but when she felt hungry, she went to the dining room, sat down\n-> in her own chair, picked up her own fork on her left, and plunged it into the\n-> spaghetti. But such is the tangled nature of spaghetti that a second fork is\n-> required to carry it to the mouth. The philosopher therefore had also to pick\n-> up the fork on her right. When she was finished she would put down both her\n-> forks, get up from her chair, and continue thinking. Of course, a fork can be\n-> used by only one philosopher at a time. If the other philosopher wants it, she\n-> just has to wait until the fork is available again.\n+1965, and has been used as an example of the use of concurrency primitives in\n+many influential works since then.\n+\n+Plato, Hypatia, Lao, Simone, and Audre are professors of philosophy at a\n+university.  As philosophers, they spend most of their time in their offices","path":"src/doc/trpl/dining-philosophers.md","position":28,"original_position":28,"commit_id":"bdb2ffd17786d695226a9fbf3b376315c6d62a2f","original_commit_id":"bdb2ffd17786d695226a9fbf3b376315c6d62a2f","user":{"login":"oli-obk","id":332036,"avatar_url":"https://avatars.githubusercontent.com/u/332036?v=3","gravatar_id":"","url":"https://api.github.com/users/oli-obk","html_url":"https://github.com/oli-obk","followers_url":"https://api.github.com/users/oli-obk/followers","following_url":"https://api.github.com/users/oli-obk/following{/other_user}","gists_url":"https://api.github.com/users/oli-obk/gists{/gist_id}","starred_url":"https://api.github.com/users/oli-obk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oli-obk/subscriptions","organizations_url":"https://api.github.com/users/oli-obk/orgs","repos_url":"https://api.github.com/users/oli-obk/repos","events_url":"https://api.github.com/users/oli-obk/events{/privacy}","received_events_url":"https://api.github.com/users/oli-obk/received_events","type":"User","site_admin":false},"body":"extra space after the `.`","created_at":"2015-05-20T07:58:40Z","updated_at":"2015-05-20T07:58:40Z","html_url":"https://github.com/rust-lang/rust/pull/25640#discussion_r30678325","pull_request_url":"https://api.github.com/repos/rust-lang/rust/pulls/25640","_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments/30678325"},"html":{"href":"https://github.com/rust-lang/rust/pull/25640#discussion_r30678325"},"pull_request":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25640"}}},"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/25640","id":35800331,"html_url":"https://github.com/rust-lang/rust/pull/25640","diff_url":"https://github.com/rust-lang/rust/pull/25640.diff","patch_url":"https://github.com/rust-lang/rust/pull/25640.patch","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/25640","number":25640,"state":"open","locked":false,"title":"Dining philosophers rephrasing","user":{"login":"lambda","id":37398,"avatar_url":"https://avatars.githubusercontent.com/u/37398?v=3","gravatar_id":"","url":"https://api.github.com/users/lambda","html_url":"https://github.com/lambda","followers_url":"https://api.github.com/users/lambda/followers","following_url":"https://api.github.com/users/lambda/following{/other_user}","gists_url":"https://api.github.com/users/lambda/gists{/gist_id}","starred_url":"https://api.github.com/users/lambda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambda/subscriptions","organizations_url":"https://api.github.com/users/lambda/orgs","repos_url":"https://api.github.com/users/lambda/repos","events_url":"https://api.github.com/users/lambda/events{/privacy}","received_events_url":"https://api.github.com/users/lambda/received_events","type":"User","site_admin":false},"body":"The dining philosophers problem setup is quoted from C. A. R. Hoare's\r\n\"Communicating Sequential Processes.\"  This is not the paper in which\r\nthe problem originated, nor does the example use the solution from\r\nHoare's paper.  Furthermore, the quoted example uses forks and pasta,\r\nand it doesn't make much sense to need two forks to eat; the formulation\r\nof this problem that I am most familiar with uses chopsticks, which\r\nmakes much more sense.\r\n\r\nIn addition, the quoted example uses male pronouns, the rest of the\r\narticle uses singular \"they\", and refers to the philosophers with just\r\nnumbers at first, but then goes on to use five Western European male\r\nphilosophers.\r\n\r\nSince the particular quotation is not essential, the use of forks is not\r\nparticularly sensible, and to increase the diversity of philosophers,\r\nsimply rewrite the statement of the problem with original text.  Use the\r\nappropriate pronouns for the philosophers referred to, but continue to\r\nuse singular \"they\" when talking about an unspecified philosopher.","created_at":"2015-05-20T05:58:19Z","updated_at":"2015-05-20T07:58:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"90e55015722c950481aac2e197ce2902d22ead47","assignee":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang/rust/pulls/25640/commits","review_comments_url":"https://api.github.com/repos/rust-lang/rust/pulls/25640/comments","review_comment_url":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/25640/comments","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/bdb2ffd17786d695226a9fbf3b376315c6d62a2f","head":{"label":"lambda:dining-philosophers-rephrasing","ref":"dining-philosophers-rephrasing","sha":"bdb2ffd17786d695226a9fbf3b376315c6d62a2f","user":{"login":"lambda","id":37398,"avatar_url":"https://avatars.githubusercontent.com/u/37398?v=3","gravatar_id":"","url":"https://api.github.com/users/lambda","html_url":"https://github.com/lambda","followers_url":"https://api.github.com/users/lambda/followers","following_url":"https://api.github.com/users/lambda/following{/other_user}","gists_url":"https://api.github.com/users/lambda/gists{/gist_id}","starred_url":"https://api.github.com/users/lambda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambda/subscriptions","organizations_url":"https://api.github.com/users/lambda/orgs","repos_url":"https://api.github.com/users/lambda/repos","events_url":"https://api.github.com/users/lambda/events{/privacy}","received_events_url":"https://api.github.com/users/lambda/received_events","type":"User","site_admin":false},"repo":{"id":24796648,"name":"rust","full_name":"lambda/rust","owner":{"login":"lambda","id":37398,"avatar_url":"https://avatars.githubusercontent.com/u/37398?v=3","gravatar_id":"","url":"https://api.github.com/users/lambda","html_url":"https://github.com/lambda","followers_url":"https://api.github.com/users/lambda/followers","following_url":"https://api.github.com/users/lambda/following{/other_user}","gists_url":"https://api.github.com/users/lambda/gists{/gist_id}","starred_url":"https://api.github.com/users/lambda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lambda/subscriptions","organizations_url":"https://api.github.com/users/lambda/orgs","repos_url":"https://api.github.com/users/lambda/repos","events_url":"https://api.github.com/users/lambda/events{/privacy}","received_events_url":"https://api.github.com/users/lambda/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lambda/rust","description":"a safe, concurrent, practical language","fork":true,"url":"https://api.github.com/repos/lambda/rust","forks_url":"https://api.github.com/repos/lambda/rust/forks","keys_url":"https://api.github.com/repos/lambda/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lambda/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lambda/rust/teams","hooks_url":"https://api.github.com/repos/lambda/rust/hooks","issue_events_url":"https://api.github.com/repos/lambda/rust/issues/events{/number}","events_url":"https://api.github.com/repos/lambda/rust/events","assignees_url":"https://api.github.com/repos/lambda/rust/assignees{/user}","branches_url":"https://api.github.com/repos/lambda/rust/branches{/branch}","tags_url":"https://api.github.com/repos/lambda/rust/tags","blobs_url":"https://api.github.com/repos/lambda/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lambda/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lambda/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/lambda/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lambda/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/lambda/rust/languages","stargazers_url":"https://api.github.com/repos/lambda/rust/stargazers","contributors_url":"https://api.github.com/repos/lambda/rust/contributors","subscribers_url":"https://api.github.com/repos/lambda/rust/subscribers","subscription_url":"https://api.github.com/repos/lambda/rust/subscription","commits_url":"https://api.github.com/repos/lambda/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/lambda/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/lambda/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/lambda/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/lambda/rust/contents/{+path}","compare_url":"https://api.github.com/repos/lambda/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lambda/rust/merges","archive_url":"https://api.github.com/repos/lambda/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lambda/rust/downloads","issues_url":"https://api.github.com/repos/lambda/rust/issues{/number}","pulls_url":"https://api.github.com/repos/lambda/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/lambda/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/lambda/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lambda/rust/labels{/name}","releases_url":"https://api.github.com/repos/lambda/rust/releases{/id}","created_at":"2014-10-04T17:44:00Z","updated_at":"2014-10-04T17:41:20Z","pushed_at":"2015-05-20T07:55:51Z","git_url":"git://github.com/lambda/rust.git","ssh_url":"git@github.com:lambda/rust.git","clone_url":"https://github.com/lambda/rust.git","svn_url":"https://github.com/lambda/rust","homepage":"http://www.rust-lang.org","size":290381,"stargazers_count":0,"watchers_count":0,"language":null,"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":"rust-lang:master","ref":"master","sha":"720735b9430f7ff61761f54587b82dab45317938","user":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":724712,"name":"rust","full_name":"rust-lang/rust","owner":{"login":"rust-lang","id":5430905,"avatar_url":"https://avatars.githubusercontent.com/u/5430905?v=3","gravatar_id":"","url":"https://api.github.com/users/rust-lang","html_url":"https://github.com/rust-lang","followers_url":"https://api.github.com/users/rust-lang/followers","following_url":"https://api.github.com/users/rust-lang/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang/subscriptions","organizations_url":"https://api.github.com/users/rust-lang/orgs","repos_url":"https://api.github.com/users/rust-lang/repos","events_url":"https://api.github.com/users/rust-lang/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rust-lang/rust","description":"A safe, concurrent, practical language.","fork":false,"url":"https://api.github.com/repos/rust-lang/rust","forks_url":"https://api.github.com/repos/rust-lang/rust/forks","keys_url":"https://api.github.com/repos/rust-lang/rust/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang/rust/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang/rust/teams","hooks_url":"https://api.github.com/repos/rust-lang/rust/hooks","issue_events_url":"https://api.github.com/repos/rust-lang/rust/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang/rust/events","assignees_url":"https://api.github.com/repos/rust-lang/rust/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang/rust/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang/rust/tags","blobs_url":"https://api.github.com/repos/rust-lang/rust/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang/rust/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang/rust/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang/rust/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang/rust/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang/rust/languages","stargazers_url":"https://api.github.com/repos/rust-lang/rust/stargazers","contributors_url":"https://api.github.com/repos/rust-lang/rust/contributors","subscribers_url":"https://api.github.com/repos/rust-lang/rust/subscribers","subscription_url":"https://api.github.com/repos/rust-lang/rust/subscription","commits_url":"https://api.github.com/repos/rust-lang/rust/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang/rust/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang/rust/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang/rust/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang/rust/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang/rust/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang/rust/merges","archive_url":"https://api.github.com/repos/rust-lang/rust/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang/rust/downloads","issues_url":"https://api.github.com/repos/rust-lang/rust/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang/rust/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang/rust/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang/rust/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang/rust/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang/rust/releases{/id}","created_at":"2010-06-16T20:39:03Z","updated_at":"2015-05-20T07:48:28Z","pushed_at":"2015-05-20T07:55:56Z","git_url":"git://github.com/rust-lang/rust.git","ssh_url":"git@github.com:rust-lang/rust.git","clone_url":"https://github.com/rust-lang/rust.git","svn_url":"https://github.com/rust-lang/rust","homepage":"http://www.rust-lang.org","size":661194,"stargazers_count":11556,"watchers_count":11556,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2213,"mirror_url":null,"open_issues_count":2056,"forks":2213,"open_issues":2056,"watchers":11556,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25640"},"html":{"href":"https://github.com/rust-lang/rust/pull/25640"},"issue":{"href":"https://api.github.com/repos/rust-lang/rust/issues/25640"},"comments":{"href":"https://api.github.com/repos/rust-lang/rust/issues/25640/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25640/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang/rust/pulls/25640/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang/rust/statuses/bdb2ffd17786d695226a9fbf3b376315c6d62a2f"}}}}