{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/471","repository_url":"https://api.github.com/repos/WebAssembly/spec","labels_url":"https://api.github.com/repos/WebAssembly/spec/issues/471/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/spec/issues/471/comments","events_url":"https://api.github.com/repos/WebAssembly/spec/issues/471/events","html_url":"https://github.com/WebAssembly/spec/pull/471","id":228049973,"number":471,"title":"[spec] Text format","user":{"login":"rossberg-chromium","id":4247099,"avatar_url":"https://avatars3.githubusercontent.com/u/4247099?v=3","gravatar_id":"","url":"https://api.github.com/users/rossberg-chromium","html_url":"https://github.com/rossberg-chromium","followers_url":"https://api.github.com/users/rossberg-chromium/followers","following_url":"https://api.github.com/users/rossberg-chromium/following{/other_user}","gists_url":"https://api.github.com/users/rossberg-chromium/gists{/gist_id}","starred_url":"https://api.github.com/users/rossberg-chromium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossberg-chromium/subscriptions","organizations_url":"https://api.github.com/users/rossberg-chromium/orgs","repos_url":"https://api.github.com/users/rossberg-chromium/repos","events_url":"https://api.github.com/users/rossberg-chromium/events{/privacy}","received_events_url":"https://api.github.com/users/rossberg-chromium/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-11T16:27:07Z","updated_at":"2017-05-11T16:32:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/WebAssembly/spec/pulls/471","html_url":"https://github.com/WebAssembly/spec/pull/471","diff_url":"https://github.com/WebAssembly/spec/pull/471.diff","patch_url":"https://github.com/WebAssembly/spec/pull/471.patch"},"body":"This PR specifies the text format, based on earlier discussion between @binji, @lukewagner, @sunfishcode, and myself. Preview at http://webassembly.github.io/spec/\r\n\r\nThe changes relative to the .wast format currently implemented in the interpreter and other tools are the following.\r\n\r\nRemovals:\r\n\r\n- some of the more baroque forms of sugar for `if`\r\n- anything script related (assertions, invokes, etc)\r\n- (we had discussed removing the optional module name as well, but in the light of design PR #1055, we probably want to keep it?)\r\n\r\nAdditions:\r\n\r\n- \\u{...} escapes in strings (see below)\r\n- more than just one inline export (that is, you can write (func $f (export \"f1\") (export \"f2\") ...), closing a gap in the syntax)\r\n- the toplevel (module ...) is optional\r\n\r\nChanges:\r\n\r\nI took the liberty to propose one breaking change to make the syntax forward compatible with some of the future extensions that have been discussed:\r\n\r\n- non-empty block signatures must now be written (result i32), in order to generalise cleanly to function signatures\r\n\r\nUnicode:\r\n\r\n- the lexical syntax is defined in terms of Unicode characters (i.e., code points)\r\n- comments and strings may contain mostly arbitrary Unicode, the rest stays within ASCII\r\n- in strings, a Unicode character denotes its UTF-8 encoding\r\n- in strings, Unicode characters can be given explicitly with \\u{...} notation\r\n- .wat files are assumed to be encoded in UTF-8\r\n\r\nThe PR includes changes to the interpreter implementing the Unicode support (but not yet the other changes).\r\n\r\nMisc Remarks:\r\n\r\n- formatting characters: currently only the minimum set of formatting characters are allowed as white space (\\t, \\n, \\r); we could include more, e.g. the whole set of ASCII \"format effectors\" (\\b, \\v, \\f), but you quickly get into a lot of Unicode complexity if you want to go further than that\r\n\r\n- Unicode in comments: similarly, in order to avoid getting into Unicode specifics, any legal code point is currently allowed in comments; should we be more restrictive?\r\n\r\n- abbreviations: to avoid combinatorial complexity in defining the AST to map on, most syntactic sugar is specified in the form of \"abbreviations\", simple rewritings into the core syntax\r\n\r\n- inline function signatures: I tried to come up with a decent way to describe their rewriting into type indices (and the potential insertion of new type definitions) in terms of rules, but ultimately gave up; it's too cumbersome to express succinctly; so this is the one part that is left partially informal (though hopefully still unambiguous)\r\n\r\n- formatting: many of the rules do not currently fit the page width; I left them as is for now, and plan to clean up layout issues once the spec is complete, probably tweaking some layout parameters as well\r\n\r\n- PDF: currently doesn't build; due to various limitations of MathJax (such as the inability to use packages) I had to resort to some hacks for special characters that apparently don't work in proper LaTeX; will fix later\r\n\r\n- tests: lots of stuff we could write tests for, e.g. regarding the Unicode support...\r\n"},"comment":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/comments/300845064","html_url":"https://github.com/WebAssembly/spec/pull/471#issuecomment-300845064","issue_url":"https://api.github.com/repos/WebAssembly/spec/issues/471","id":300845064,"user":{"login":"jfbastien","id":298127,"avatar_url":"https://avatars0.githubusercontent.com/u/298127?v=3","gravatar_id":"","url":"https://api.github.com/users/jfbastien","html_url":"https://github.com/jfbastien","followers_url":"https://api.github.com/users/jfbastien/followers","following_url":"https://api.github.com/users/jfbastien/following{/other_user}","gists_url":"https://api.github.com/users/jfbastien/gists{/gist_id}","starred_url":"https://api.github.com/users/jfbastien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfbastien/subscriptions","organizations_url":"https://api.github.com/users/jfbastien/orgs","repos_url":"https://api.github.com/users/jfbastien/repos","events_url":"https://api.github.com/users/jfbastien/events{/privacy}","received_events_url":"https://api.github.com/users/jfbastien/received_events","type":"User","site_admin":false},"created_at":"2017-05-11T16:32:52Z","updated_at":"2017-05-11T16:32:52Z","body":"On Unicode comments: are U+2028 and U+2029 allowed?"}}
{"actor":{"display_login":"jfbastien"}}