{"action":"created","issue":{"url":"https://api.github.com/repos/tenderlove/racc/issues/70","repository_url":"https://api.github.com/repos/tenderlove/racc","labels_url":"https://api.github.com/repos/tenderlove/racc/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/tenderlove/racc/issues/70/comments","events_url":"https://api.github.com/repos/tenderlove/racc/issues/70/events","html_url":"https://github.com/tenderlove/racc/pull/70","id":134883439,"number":70,"title":"align table value","user":{"login":"windwiny","id":45995,"avatar_url":"https://avatars.githubusercontent.com/u/45995?v=3","gravatar_id":"","url":"https://api.github.com/users/windwiny","html_url":"https://github.com/windwiny","followers_url":"https://api.github.com/users/windwiny/followers","following_url":"https://api.github.com/users/windwiny/following{/other_user}","gists_url":"https://api.github.com/users/windwiny/gists{/gist_id}","starred_url":"https://api.github.com/users/windwiny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/windwiny/subscriptions","organizations_url":"https://api.github.com/users/windwiny/orgs","repos_url":"https://api.github.com/users/windwiny/repos","events_url":"https://api.github.com/users/windwiny/events{/privacy}","received_events_url":"https://api.github.com/users/windwiny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-02-19T14:51:45Z","updated_at":"2016-02-19T17:55:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tenderlove/racc/pulls/70","html_url":"https://github.com/tenderlove/racc/pull/70","diff_url":"https://github.com/tenderlove/racc/pull/70.diff","patch_url":"https://github.com/tenderlove/racc/pull/70.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/tenderlove/racc/issues/comments/186331890","html_url":"https://github.com/tenderlove/racc/pull/70#issuecomment-186331890","issue_url":"https://api.github.com/repos/tenderlove/racc/issues/70","id":186331890,"user":{"login":"drbrain","id":9831,"avatar_url":"https://avatars.githubusercontent.com/u/9831?v=3","gravatar_id":"","url":"https://api.github.com/users/drbrain","html_url":"https://github.com/drbrain","followers_url":"https://api.github.com/users/drbrain/followers","following_url":"https://api.github.com/users/drbrain/following{/other_user}","gists_url":"https://api.github.com/users/drbrain/gists{/gist_id}","starred_url":"https://api.github.com/users/drbrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drbrain/subscriptions","organizations_url":"https://api.github.com/users/drbrain/orgs","repos_url":"https://api.github.com/users/drbrain/repos","events_url":"https://api.github.com/users/drbrain/events{/privacy}","received_events_url":"https://api.github.com/users/drbrain/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T17:55:19Z","updated_at":"2016-02-19T17:55:19Z","body":"```\r\n$ cat integer_list.rb \r\ndef old name, table\r\n  lines = table.inspect.split(/((?:\\w+, ){15})/).reject { |s| s.empty? }\r\n  \"#{name} = #{lines.join \"\\n\"}\"\r\nend\r\n\r\ndef new name, table\r\n  s = table.map { |e| \"%6s\" % e.inspect }.each_slice(10).to_a\r\n  lines = s[0..-2].map { |e| e.join(',')+',' } << s[-1].join(',')\r\n  \"#{name} = [\\n#{lines.join(\"\\n\")} ]\"\r\nend\r\n\r\nname = 'test'\r\ntable = 50.times.map { rand -500..500 }\r\n\r\nputs 'old:'\r\nputs old name, table\r\nputs\r\nputs 'new:'\r\nputs new name, table\r\n\r\n$ ruby integer_list.rb \r\nold:\r\ntest = [449, 98, -180, 252, -402, -491, -66, -422, -498, 217, 296, -177, -376, 487, -328, 81, -430, 188, -208, -213, -378, -27, 274, -35, 198, 500, -481, 37, 248, 320, -439, -63, 163, 132, 487, -497, 404, -331, 308, 418, -214, -25, -155, 383, -451, 100, -252, -117, -235, 499]\r\n\r\nnew:\r\ntest = [\r\n   449,    98,  -180,   252,  -402,  -491,   -66,  -422,  -498,   217,\r\n   296,  -177,  -376,   487,  -328,    81,  -430,   188,  -208,  -213,\r\n  -378,   -27,   274,   -35,   198,   500,  -481,    37,   248,   320,\r\n  -439,   -63,   163,   132,   487,  -497,   404,  -331,   308,   418,\r\n  -214,   -25,  -155,   383,  -451,   100,  -252,  -117,  -235,   499 ]\r\n```"}}