{"action":"created","comment":{"url":"https://api.github.com/repos/apache/thrift/pulls/comments/64133311","id":64133311,"diff_hunk":"@@ -51,14 +51,44 @@ class Main {\n     private static var targetPort : Int = 9090;\n \n     static function main() {\n-        #if ! (flash || js)\n+\n+        #if ! (flash || js || phpwebserver)\n         try {\n               ParseArgs();\n         } catch (e : String) {\n             trace(e);\n             trace(GetHelp());\n             return;\n         }\n+\n+        #elseif  phpwebserver","path":"tutorial/haxe/src/Main.hx","position":15,"original_position":15,"commit_id":"4e3420291e792f2caf58750e7225efbdfa6ec7de","original_commit_id":"4e3420291e792f2caf58750e7225efbdfa6ec7de","user":{"login":"Jens-G","id":5834733,"avatar_url":"https://avatars.githubusercontent.com/u/5834733?v=3","gravatar_id":"","url":"https://api.github.com/users/Jens-G","html_url":"https://github.com/Jens-G","followers_url":"https://api.github.com/users/Jens-G/followers","following_url":"https://api.github.com/users/Jens-G/following{/other_user}","gists_url":"https://api.github.com/users/Jens-G/gists{/gist_id}","starred_url":"https://api.github.com/users/Jens-G/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jens-G/subscriptions","organizations_url":"https://api.github.com/users/Jens-G/orgs","repos_url":"https://api.github.com/users/Jens-G/repos","events_url":"https://api.github.com/users/Jens-G/events{/privacy}","received_events_url":"https://api.github.com/users/Jens-G/received_events","type":"User","site_admin":false},"body":"I would like to have all those \"//remap trace to error log\" sections reafctored into a dedicated method. As it is now, it bloats the main() method with stuff that definitely belongs onto a different level of abstraction. The main method serves two purposes: parsing args (or similar) to set up the system, then start the right program mode. Aside from some added root level error handling, that's it and that should be it. Anything else belongs into either the first part, or the second.\r\n\r\nConsidereing the fact that we seem to need the same code over and over again for PHP (see your own README changes), why don't we put the stuff it into a library utility function, preventing the need for further copy+paste programming? ","created_at":"2016-05-21T11:44:52Z","updated_at":"2016-05-21T11:44:52Z","html_url":"https://github.com/apache/thrift/pull/1013#discussion_r64133311","pull_request_url":"https://api.github.com/repos/apache/thrift/pulls/1013","_links":{"self":{"href":"https://api.github.com/repos/apache/thrift/pulls/comments/64133311"},"html":{"href":"https://github.com/apache/thrift/pull/1013#discussion_r64133311"},"pull_request":{"href":"https://api.github.com/repos/apache/thrift/pulls/1013"}}},"pull_request":{"url":"https://api.github.com/repos/apache/thrift/pulls/1013","id":70728742,"html_url":"https://github.com/apache/thrift/pull/1013","diff_url":"https://github.com/apache/thrift/pull/1013.diff","patch_url":"https://github.com/apache/thrift/pull/1013.patch","issue_url":"https://api.github.com/repos/apache/thrift/issues/1013","number":1013,"state":"open","locked":false,"title":"THRIFT-3833 haxe http php server implementation (embeding into php web server)","user":{"login":"oprudkyi","id":3018472,"avatar_url":"https://avatars.githubusercontent.com/u/3018472?v=3","gravatar_id":"","url":"https://api.github.com/users/oprudkyi","html_url":"https://github.com/oprudkyi","followers_url":"https://api.github.com/users/oprudkyi/followers","following_url":"https://api.github.com/users/oprudkyi/following{/other_user}","gists_url":"https://api.github.com/users/oprudkyi/gists{/gist_id}","starred_url":"https://api.github.com/users/oprudkyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oprudkyi/subscriptions","organizations_url":"https://api.github.com/users/oprudkyi/orgs","repos_url":"https://api.github.com/users/oprudkyi/repos","events_url":"https://api.github.com/users/oprudkyi/events{/privacy}","received_events_url":"https://api.github.com/users/oprudkyi/received_events","type":"User","site_admin":false},"body":"- support of TSimpleServer.runOnce (run till input EOF)\r\n- TWrappingServerTransport wraps TTransport into TServerTransport\r\n- README.md - notes about integration into PHP web server\r\n- tests\r\n- update tutorial with http support\r\n  - make tutorialserver_php_http\r\n  - make tutorialclient_http","created_at":"2016-05-19T16:54:11Z","updated_at":"2016-05-21T11:44:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ad6d86fbbba3f050491190aefb8e7c6f6be4f91","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/thrift/pulls/1013/commits","review_comments_url":"https://api.github.com/repos/apache/thrift/pulls/1013/comments","review_comment_url":"https://api.github.com/repos/apache/thrift/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/thrift/issues/1013/comments","statuses_url":"https://api.github.com/repos/apache/thrift/statuses/4e3420291e792f2caf58750e7225efbdfa6ec7de","head":{"label":"oprudkyi:THRIFT-3833","ref":"THRIFT-3833","sha":"4e3420291e792f2caf58750e7225efbdfa6ec7de","user":{"login":"oprudkyi","id":3018472,"avatar_url":"https://avatars.githubusercontent.com/u/3018472?v=3","gravatar_id":"","url":"https://api.github.com/users/oprudkyi","html_url":"https://github.com/oprudkyi","followers_url":"https://api.github.com/users/oprudkyi/followers","following_url":"https://api.github.com/users/oprudkyi/following{/other_user}","gists_url":"https://api.github.com/users/oprudkyi/gists{/gist_id}","starred_url":"https://api.github.com/users/oprudkyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oprudkyi/subscriptions","organizations_url":"https://api.github.com/users/oprudkyi/orgs","repos_url":"https://api.github.com/users/oprudkyi/repos","events_url":"https://api.github.com/users/oprudkyi/events{/privacy}","received_events_url":"https://api.github.com/users/oprudkyi/received_events","type":"User","site_admin":false},"repo":{"id":59041777,"name":"thrift","full_name":"oprudkyi/thrift","owner":{"login":"oprudkyi","id":3018472,"avatar_url":"https://avatars.githubusercontent.com/u/3018472?v=3","gravatar_id":"","url":"https://api.github.com/users/oprudkyi","html_url":"https://github.com/oprudkyi","followers_url":"https://api.github.com/users/oprudkyi/followers","following_url":"https://api.github.com/users/oprudkyi/following{/other_user}","gists_url":"https://api.github.com/users/oprudkyi/gists{/gist_id}","starred_url":"https://api.github.com/users/oprudkyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oprudkyi/subscriptions","organizations_url":"https://api.github.com/users/oprudkyi/orgs","repos_url":"https://api.github.com/users/oprudkyi/repos","events_url":"https://api.github.com/users/oprudkyi/events{/privacy}","received_events_url":"https://api.github.com/users/oprudkyi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/oprudkyi/thrift","description":"Mirror of Apache Thrift","fork":true,"url":"https://api.github.com/repos/oprudkyi/thrift","forks_url":"https://api.github.com/repos/oprudkyi/thrift/forks","keys_url":"https://api.github.com/repos/oprudkyi/thrift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oprudkyi/thrift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oprudkyi/thrift/teams","hooks_url":"https://api.github.com/repos/oprudkyi/thrift/hooks","issue_events_url":"https://api.github.com/repos/oprudkyi/thrift/issues/events{/number}","events_url":"https://api.github.com/repos/oprudkyi/thrift/events","assignees_url":"https://api.github.com/repos/oprudkyi/thrift/assignees{/user}","branches_url":"https://api.github.com/repos/oprudkyi/thrift/branches{/branch}","tags_url":"https://api.github.com/repos/oprudkyi/thrift/tags","blobs_url":"https://api.github.com/repos/oprudkyi/thrift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oprudkyi/thrift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oprudkyi/thrift/git/refs{/sha}","trees_url":"https://api.github.com/repos/oprudkyi/thrift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oprudkyi/thrift/statuses/{sha}","languages_url":"https://api.github.com/repos/oprudkyi/thrift/languages","stargazers_url":"https://api.github.com/repos/oprudkyi/thrift/stargazers","contributors_url":"https://api.github.com/repos/oprudkyi/thrift/contributors","subscribers_url":"https://api.github.com/repos/oprudkyi/thrift/subscribers","subscription_url":"https://api.github.com/repos/oprudkyi/thrift/subscription","commits_url":"https://api.github.com/repos/oprudkyi/thrift/commits{/sha}","git_commits_url":"https://api.github.com/repos/oprudkyi/thrift/git/commits{/sha}","comments_url":"https://api.github.com/repos/oprudkyi/thrift/comments{/number}","issue_comment_url":"https://api.github.com/repos/oprudkyi/thrift/issues/comments{/number}","contents_url":"https://api.github.com/repos/oprudkyi/thrift/contents/{+path}","compare_url":"https://api.github.com/repos/oprudkyi/thrift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oprudkyi/thrift/merges","archive_url":"https://api.github.com/repos/oprudkyi/thrift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oprudkyi/thrift/downloads","issues_url":"https://api.github.com/repos/oprudkyi/thrift/issues{/number}","pulls_url":"https://api.github.com/repos/oprudkyi/thrift/pulls{/number}","milestones_url":"https://api.github.com/repos/oprudkyi/thrift/milestones{/number}","notifications_url":"https://api.github.com/repos/oprudkyi/thrift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oprudkyi/thrift/labels{/name}","releases_url":"https://api.github.com/repos/oprudkyi/thrift/releases{/id}","deployments_url":"https://api.github.com/repos/oprudkyi/thrift/deployments","created_at":"2016-05-17T16:55:33Z","updated_at":"2016-05-17T16:55:38Z","pushed_at":"2016-05-19T18:38:28Z","git_url":"git://github.com/oprudkyi/thrift.git","ssh_url":"git@github.com:oprudkyi/thrift.git","clone_url":"https://github.com/oprudkyi/thrift.git","svn_url":"https://github.com/oprudkyi/thrift","homepage":"","size":17218,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"apache:master","ref":"master","sha":"9549b25c77587b29be4e0b5c258221a4ed85d37a","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":310611,"name":"thrift","full_name":"apache/thrift","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/thrift","description":"Mirror of Apache Thrift","fork":false,"url":"https://api.github.com/repos/apache/thrift","forks_url":"https://api.github.com/repos/apache/thrift/forks","keys_url":"https://api.github.com/repos/apache/thrift/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/thrift/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/thrift/teams","hooks_url":"https://api.github.com/repos/apache/thrift/hooks","issue_events_url":"https://api.github.com/repos/apache/thrift/issues/events{/number}","events_url":"https://api.github.com/repos/apache/thrift/events","assignees_url":"https://api.github.com/repos/apache/thrift/assignees{/user}","branches_url":"https://api.github.com/repos/apache/thrift/branches{/branch}","tags_url":"https://api.github.com/repos/apache/thrift/tags","blobs_url":"https://api.github.com/repos/apache/thrift/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/thrift/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/thrift/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/thrift/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/thrift/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/thrift/languages","stargazers_url":"https://api.github.com/repos/apache/thrift/stargazers","contributors_url":"https://api.github.com/repos/apache/thrift/contributors","subscribers_url":"https://api.github.com/repos/apache/thrift/subscribers","subscription_url":"https://api.github.com/repos/apache/thrift/subscription","commits_url":"https://api.github.com/repos/apache/thrift/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/thrift/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/thrift/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/thrift/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/thrift/contents/{+path}","compare_url":"https://api.github.com/repos/apache/thrift/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/thrift/merges","archive_url":"https://api.github.com/repos/apache/thrift/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/thrift/downloads","issues_url":"https://api.github.com/repos/apache/thrift/issues{/number}","pulls_url":"https://api.github.com/repos/apache/thrift/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/thrift/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/thrift/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/thrift/labels{/name}","releases_url":"https://api.github.com/repos/apache/thrift/releases{/id}","deployments_url":"https://api.github.com/repos/apache/thrift/deployments","created_at":"2009-09-18T08:00:17Z","updated_at":"2016-05-21T00:10:55Z","pushed_at":"2016-05-20T18:07:18Z","git_url":"git://github.com/apache/thrift.git","ssh_url":"git@github.com:apache/thrift.git","clone_url":"https://github.com/apache/thrift.git","svn_url":"https://github.com/apache/thrift","homepage":"","size":23523,"stargazers_count":2643,"watchers_count":2643,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1585,"mirror_url":"git://git.apache.org/thrift.git","open_issues_count":102,"forks":1585,"open_issues":102,"watchers":2643,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/thrift/pulls/1013"},"html":{"href":"https://github.com/apache/thrift/pull/1013"},"issue":{"href":"https://api.github.com/repos/apache/thrift/issues/1013"},"comments":{"href":"https://api.github.com/repos/apache/thrift/issues/1013/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/thrift/pulls/1013/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/thrift/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/thrift/pulls/1013/commits"},"statuses":{"href":"https://api.github.com/repos/apache/thrift/statuses/4e3420291e792f2caf58750e7225efbdfa6ec7de"}}}}
{"actor":{"display_login":"Jens-G"}}