{"action":"created","issue":{"url":"https://api.github.com/repos/go-interpreter/wagon/issues/13","repository_url":"https://api.github.com/repos/go-interpreter/wagon","labels_url":"https://api.github.com/repos/go-interpreter/wagon/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/go-interpreter/wagon/issues/13/comments","events_url":"https://api.github.com/repos/go-interpreter/wagon/issues/13/events","html_url":"https://github.com/go-interpreter/wagon/pull/13","id":242398230,"number":13,"title":"Small fixes to wasm + new validate package","user":{"login":"vibhavp","id":2142872,"avatar_url":"https://avatars2.githubusercontent.com/u/2142872?v=4","gravatar_id":"","url":"https://api.github.com/users/vibhavp","html_url":"https://github.com/vibhavp","followers_url":"https://api.github.com/users/vibhavp/followers","following_url":"https://api.github.com/users/vibhavp/following{/other_user}","gists_url":"https://api.github.com/users/vibhavp/gists{/gist_id}","starred_url":"https://api.github.com/users/vibhavp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vibhavp/subscriptions","organizations_url":"https://api.github.com/users/vibhavp/orgs","repos_url":"https://api.github.com/users/vibhavp/repos","events_url":"https://api.github.com/users/vibhavp/events{/privacy}","received_events_url":"https://api.github.com/users/vibhavp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-07-12T14:23:22Z","updated_at":"2017-08-01T18:58:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/go-interpreter/wagon/pulls/13","html_url":"https://github.com/go-interpreter/wagon/pull/13","diff_url":"https://github.com/go-interpreter/wagon/pull/13.diff","patch_url":"https://github.com/go-interpreter/wagon/pull/13.patch"},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/go-interpreter/wagon/13)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/go-interpreter/wagon/issues/comments/319464428","html_url":"https://github.com/go-interpreter/wagon/pull/13#issuecomment-319464428","issue_url":"https://api.github.com/repos/go-interpreter/wagon/issues/13","id":319464428,"user":{"login":"vibhavp","id":2142872,"avatar_url":"https://avatars2.githubusercontent.com/u/2142872?v=4","gravatar_id":"","url":"https://api.github.com/users/vibhavp","html_url":"https://github.com/vibhavp","followers_url":"https://api.github.com/users/vibhavp/followers","following_url":"https://api.github.com/users/vibhavp/following{/other_user}","gists_url":"https://api.github.com/users/vibhavp/gists{/gist_id}","starred_url":"https://api.github.com/users/vibhavp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vibhavp/subscriptions","organizations_url":"https://api.github.com/users/vibhavp/orgs","repos_url":"https://api.github.com/users/vibhavp/repos","events_url":"https://api.github.com/users/vibhavp/events{/privacy}","received_events_url":"https://api.github.com/users/vibhavp/received_events","type":"User","site_admin":false},"created_at":"2017-08-01T18:58:34Z","updated_at":"2017-08-01T18:58:34Z","body":"\n\n\n\nReview status: 6 of 11 files reviewed at latest revision, 17 unresolved discussions.\n\n---\n\n*[validate/error.go, line 1 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSfuNPsXIk2vdI41r8:-KqU1zcRVM2ep1H3cUM7:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/error.go#L1)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nplease add a license header.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/error.go, line 11 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSqO0RKouGHb7bNhmL:-KqU2-tAOHdVCUwuVNiW:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/error.go#L11)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nfrom a user's perspective, this type is called `validate.ValidateError`.\nwhy not just call it `Error`. it would remove some stuttering: `validate.Error`.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/error.go, line 21 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSr7V7RIXAi5-pNVrY:-KqU2CWrRmcu7sefqqQ-:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/error.go#L21)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\n`s/stack underflow/validate: stack underflow/`\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/error.go, line 52 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSrMpO5ypmAfiPlWNE:-KqU2DGygZcIHYVtVQsp:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/error.go#L52)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nto match what is usually done in tests, I would rename `Expected` into `Wanted`.\nand put `Got` before `Wanted`.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/error.go, line 57 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSiKEzSYU3DuYJZF-B:-KqU2EKj29IGu0f407ls:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/error.go#L57)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nno need to explicitly call `.String()`, let `fmt.Sprintf` use the `Stringer` interface. do this instead:\n```go\nreturn fmt.Sprintf(\"invalid type. got %s, want %s\", e.Got, e.Expected)\n```\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/operand.go, line 1 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSnYQ0QEpqvjlGYPkJ:-KqU2F2hALR56wr_hmss:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/operand.go#L1)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nplease add a license header.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/validate.go, line 1 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSnarY63lRraZCrXe_:-KqU2FcsldxE3PSg0THL:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/validate.go#L1)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nplease add a license header.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/validate.go, line 44 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSo6P1TYeSUftr5LRz:-KqU2GIeEB3l5Ak8lAR-:b-7ume3i) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/validate.go#L44)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nit's not clear to me why we do this.\nis it a debugging leftover ?\n</blockquote></details>\n\nYep, forgot to remove it.\n\n---\n\n*[validate/validate.go, line 47 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSs8VG_7sU1cPM3lW5:-KqU2aOnNn4ielGggZ3X:b-hyj23c) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/validate.go#L47)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nyou should also probably return that error (and possibly \"decorate\" it) if that error is not `nil` (and not `io.EOF`.)\n</blockquote></details>\n\nYep, although error decoration is already done inside the loop in VerifyModule.\n\n---\n\n*[validate/validate.go, line 301 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSq8o0oJAtfAno3k1i:-KqU6cqGFfD3yDzj5-Ao:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/validate.go#L301)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\ncould you note in the comment what are these remaining checks?\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/validate.go, line 323 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSq0UQJ7hQHZ8X0VJw:-KqU2kN2XBym329X9rR3:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/validate.go#L323)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\ntypo: `poppoed`\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/validate.go, line 338 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSomKCVbW87AjdPp9l:-KqU3zmRtwqzu6PNH94C:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/validate.go#L338)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nplease document this exported method.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/vm.go, line 1 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSpj-XfoUIWKod3S3N:-KqU2nR-4m_4qUj2TL52:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/vm.go#L1)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nplease add a license header.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/vm.go, line 19 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSp7jicLb-jMZu_vfr:-KqU3-QqjOoTz6vPg3rt:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/vm.go#L19)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nI would just call it `code`.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/vm.go, line 47 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqStlUyWbAODMXogdZ1:-KqU3vkA_PehjaHQPivj:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/vm.go#L47)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nthat's fine for the moment (we don't really know the perf bottlenecks) but please put a TODO to use the direct, reflection-less `binary.LittleEndian.Uint32` method.\n</blockquote></details>\n\nDone.\n\n---\n\n*[validate/vm.go, line 52 at r3](https://reviewable.io:443/reviews/go-interpreter/wagon/13#-KqSu7qpwDlk5EKF6Hn5:-KqU3wb53MYTc_i0-2sL:b-896fix) ([raw file](https://github.com/go-interpreter/wagon/blob/5dd541c0b11d5c4547c00b44707eaf0de291391f/validate/vm.go#L52)):*\n<details><summary><i>Previously, sbinet (Sebastien Binet) wrote…</i></summary><blockquote>\n\nthat's fine for the moment (we don't really know the perf bottlenecks) but please put a TODO to use the direct, reflection-less `binary.LittleEndian.Uint64` method.\n</blockquote></details>\n\nDone.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/go-interpreter/wagon/13)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"vibhavp"}}