{"action":"created","comment":{"url":"https://api.github.com/repos/auth0/blog/pulls/comments/42002694","id":42002694,"diff_hunk":"@@ -0,0 +1,141 @@\n+---\n+layout: post\n+title: \"7 Things You Should Know About WebAssembly\"\n+description: \"Learn about WebAssembly, the future of the web\"\n+date: 2015-10-15 09:00\n+author: \n+  name: Sebastián Peyrott\n+  url: https://twitter.com/speyrott?lang=en\n+  mail: speyrott@auth0.com\n+  avatar: https://en.gravatar.com/userimage/92476393/001c9ddc5ceb9829b6aaf24f5d28502a.png?size=200\n+design:\n+  bg_color: \"#415156\"\n+  image: https://cdn.auth0.com/blog/refresh-token/tokens.png\n+  image_size: \"120%\"\n+  image_bg_color: \"#B6C5CA\"\n+  blog_series: false\n+tags: \n+- webassembly\n+- web assembly\n+- wasm\n+- wast\n+- asm.js\n+- nacl\n+- pnacl\n+- javascript\n+- emscripten\n+- llvm\n+---\n+\n+In this post we will explore 7 key facts about *WebAssembly*, one of the biggest changes the web will experience in the coming years. Will it meet the expectations? Read on!\n+\n+-----\n+\n+## Introduction\n+If you are not familiar with the concepts behind compiled languages, the following might not make much sense. For a great introduction to some of the concepts discussed in this post, read this excellent [post by Peter Bright from ArsTechnica](http://arstechnica.com/information-technology/2015/06/the-web-is-getting-its-bytecode-webassembly/) or the [announcement post from Brendan Eich in his personal blog](https://brendaneich.com/2015/06/from-asm-js-to-webassembly/).\n+\n+For the purposes of this post, here is a short glossary:\n+\n+- **Source code:** what a developer writes.\n+- **Compiler:** an application that turns source code to assembly, bytecode or machine code (what other apps or hardware run).\n+- **Assembly:** a low-level source-like language specific to a machine or application.\n+- **Bytecode:** a low-level binary representation of code that can be run by other applications.\n+- **Machine code:** a binery representation of code that can be run directly by hardware.\n+\n+WebAssembly aims to be the *bytecode* for the web. Here is how a developer would use WebAssembly in the future:\n+\n+1. Develop an app (write the *source code* in any language that can be compiled to WebAssembly).\n+2. Use a *compiler* to turn the *source code* into WebAssembly *bytecode* (and potentially *assembly-code* if required).\n+3. Load the *bytecode* in a browser and run it.\n+\n+## Fact 1: WebAssembly is not the end of JavaScript\n+It's been said before and it will be said again: **JavaScript is here to stay**. Thanks to the growth of the web, JavaScript has become a **lingua-franca** among developers and tool vendors. This will not change due to WebAssembly. WebAssembly is meant to fill a place JavaScript has been forced to occupy up to now: a **low-level code-representation to serve as a compiler target**. As more and more languages and platforms begin to target the web, more stress is put on JavaScript and browser vendors to provide missing features that are much needed. Some of these features **do not play well** with the already complex semantics of JavaScript. WebAssembly is the right answer:\n+\n+- Designed as a compiler target from the get go\n+- Supported by all major browser vendors\n+- Potentially diverging from JavaScript semantics as much as needed\n+\n+WebAssembly is the much needed **complement** to JavaScript for the web.\n+\n+## Fact 2: Web Assembly is being developed by the teams behind asm.js and (P)NaCl\n+If you have been following the development of the web the last few years you know WebAssembly is aiming at a difficult goal: providing a unified compilation target for languages that do not map easily to JavaScript. Not only is it **difficult from a technical point of view**, but also **hard from a standards point of view**. The web is not controlled by any single vendor, so every change must be a **joint effort**. Fortunately, the teams behind WebAssembly know this. At Mozilla, a group of hardcore developers tried to provide an answer in the form of **asm.js**: a subset of JavaScript meant to serve as a compiler target. On the other side, Google worked on **Native Client (NaCl)** and **Portable Native Client (PNaCl)**, a binary format for the web based on LLVM. As much as these solutions worked, they **did not provide a satisfactory answer** to all of the problems. It is from this experience that Web Assembly was born: a **joint effort aiming at providing a cross-browser compiler target**. The future looks bright for WebAssembly.","path":"_posts/2015-10-15-7-things-you-should-know-about-web-assembly.markdown","position":61,"original_position":61,"commit_id":"3942bc581a239c290c1730256117aba785d3d58a","original_commit_id":"3942bc581a239c290c1730256117aba785d3d58a","user":{"login":"diegopoza","id":604869,"avatar_url":"https://avatars.githubusercontent.com/u/604869?v=3","gravatar_id":"","url":"https://api.github.com/users/diegopoza","html_url":"https://github.com/diegopoza","followers_url":"https://api.github.com/users/diegopoza/followers","following_url":"https://api.github.com/users/diegopoza/following{/other_user}","gists_url":"https://api.github.com/users/diegopoza/gists{/gist_id}","starred_url":"https://api.github.com/users/diegopoza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diegopoza/subscriptions","organizations_url":"https://api.github.com/users/diegopoza/orgs","repos_url":"https://api.github.com/users/diegopoza/repos","events_url":"https://api.github.com/users/diegopoza/events{/privacy}","received_events_url":"https://api.github.com/users/diegopoza/received_events","type":"User","site_admin":false},"body":"We are repeating this phrase in the conclusion: \"The future looks bright for WebAssembly\". I think we could remove it from here.","created_at":"2015-10-14T14:46:15Z","updated_at":"2015-10-14T14:46:15Z","html_url":"https://github.com/auth0/blog/pull/107#discussion_r42002694","pull_request_url":"https://api.github.com/repos/auth0/blog/pulls/107","_links":{"self":{"href":"https://api.github.com/repos/auth0/blog/pulls/comments/42002694"},"html":{"href":"https://github.com/auth0/blog/pull/107#discussion_r42002694"},"pull_request":{"href":"https://api.github.com/repos/auth0/blog/pulls/107"}}},"pull_request":{"url":"https://api.github.com/repos/auth0/blog/pulls/107","id":47582936,"html_url":"https://github.com/auth0/blog/pull/107","diff_url":"https://github.com/auth0/blog/pull/107.diff","patch_url":"https://github.com/auth0/blog/pull/107.patch","issue_url":"https://api.github.com/repos/auth0/blog/issues/107","number":107,"state":"open","locked":false,"title":"WebAssembly post draft.","user":{"login":"sebadoom","id":773367,"avatar_url":"https://avatars.githubusercontent.com/u/773367?v=3","gravatar_id":"","url":"https://api.github.com/users/sebadoom","html_url":"https://github.com/sebadoom","followers_url":"https://api.github.com/users/sebadoom/followers","following_url":"https://api.github.com/users/sebadoom/following{/other_user}","gists_url":"https://api.github.com/users/sebadoom/gists{/gist_id}","starred_url":"https://api.github.com/users/sebadoom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sebadoom/subscriptions","organizations_url":"https://api.github.com/users/sebadoom/orgs","repos_url":"https://api.github.com/users/sebadoom/repos","events_url":"https://api.github.com/users/sebadoom/events{/privacy}","received_events_url":"https://api.github.com/users/sebadoom/received_events","type":"User","site_admin":false},"body":"WebAssembly post draft. Full text, missing potential example (there's one taken from the docs, should we add another one with a simple C++ hello world?), missing icon. RFC.\r\n\r\n![8 things you should know about webassembly](https://cloud.githubusercontent.com/assets/773367/10467138/7a8b3de0-71ce-11e5-8a88-6b7b7af0e638.png)\r\n","created_at":"2015-10-13T20:19:06Z","updated_at":"2015-10-14T14:46:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7eb9716f58df364668a365b8137f23f524806de","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/auth0/blog/pulls/107/commits","review_comments_url":"https://api.github.com/repos/auth0/blog/pulls/107/comments","review_comment_url":"https://api.github.com/repos/auth0/blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/auth0/blog/issues/107/comments","statuses_url":"https://api.github.com/repos/auth0/blog/statuses/3942bc581a239c290c1730256117aba785d3d58a","head":{"label":"auth0:webasm","ref":"webasm","sha":"3942bc581a239c290c1730256117aba785d3d58a","user":{"login":"auth0","id":2824157,"avatar_url":"https://avatars.githubusercontent.com/u/2824157?v=3","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"repo":{"id":7830124,"name":"blog","full_name":"auth0/blog","owner":{"login":"auth0","id":2824157,"avatar_url":"https://avatars.githubusercontent.com/u/2824157?v=3","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/auth0/blog","description":"auth0 blog","fork":false,"url":"https://api.github.com/repos/auth0/blog","forks_url":"https://api.github.com/repos/auth0/blog/forks","keys_url":"https://api.github.com/repos/auth0/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auth0/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auth0/blog/teams","hooks_url":"https://api.github.com/repos/auth0/blog/hooks","issue_events_url":"https://api.github.com/repos/auth0/blog/issues/events{/number}","events_url":"https://api.github.com/repos/auth0/blog/events","assignees_url":"https://api.github.com/repos/auth0/blog/assignees{/user}","branches_url":"https://api.github.com/repos/auth0/blog/branches{/branch}","tags_url":"https://api.github.com/repos/auth0/blog/tags","blobs_url":"https://api.github.com/repos/auth0/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auth0/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auth0/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/auth0/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auth0/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/auth0/blog/languages","stargazers_url":"https://api.github.com/repos/auth0/blog/stargazers","contributors_url":"https://api.github.com/repos/auth0/blog/contributors","subscribers_url":"https://api.github.com/repos/auth0/blog/subscribers","subscription_url":"https://api.github.com/repos/auth0/blog/subscription","commits_url":"https://api.github.com/repos/auth0/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/auth0/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/auth0/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/auth0/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/auth0/blog/contents/{+path}","compare_url":"https://api.github.com/repos/auth0/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auth0/blog/merges","archive_url":"https://api.github.com/repos/auth0/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auth0/blog/downloads","issues_url":"https://api.github.com/repos/auth0/blog/issues{/number}","pulls_url":"https://api.github.com/repos/auth0/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/auth0/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/auth0/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auth0/blog/labels{/name}","releases_url":"https://api.github.com/repos/auth0/blog/releases{/id}","created_at":"2013-01-25T22:57:37Z","updated_at":"2015-10-07T18:10:51Z","pushed_at":"2015-10-14T04:16:35Z","git_url":"git://github.com/auth0/blog.git","ssh_url":"git@github.com:auth0/blog.git","clone_url":"https://github.com/auth0/blog.git","svn_url":"https://github.com/auth0/blog","homepage":"https://auth0.com/blog","size":17824,"stargazers_count":10,"watchers_count":10,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":6,"forks":11,"open_issues":6,"watchers":10,"default_branch":"master"}},"base":{"label":"auth0:master","ref":"master","sha":"223e83a32bd75a5fde8e71373a7191d1e0473c00","user":{"login":"auth0","id":2824157,"avatar_url":"https://avatars.githubusercontent.com/u/2824157?v=3","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"repo":{"id":7830124,"name":"blog","full_name":"auth0/blog","owner":{"login":"auth0","id":2824157,"avatar_url":"https://avatars.githubusercontent.com/u/2824157?v=3","gravatar_id":"","url":"https://api.github.com/users/auth0","html_url":"https://github.com/auth0","followers_url":"https://api.github.com/users/auth0/followers","following_url":"https://api.github.com/users/auth0/following{/other_user}","gists_url":"https://api.github.com/users/auth0/gists{/gist_id}","starred_url":"https://api.github.com/users/auth0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/auth0/subscriptions","organizations_url":"https://api.github.com/users/auth0/orgs","repos_url":"https://api.github.com/users/auth0/repos","events_url":"https://api.github.com/users/auth0/events{/privacy}","received_events_url":"https://api.github.com/users/auth0/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/auth0/blog","description":"auth0 blog","fork":false,"url":"https://api.github.com/repos/auth0/blog","forks_url":"https://api.github.com/repos/auth0/blog/forks","keys_url":"https://api.github.com/repos/auth0/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/auth0/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/auth0/blog/teams","hooks_url":"https://api.github.com/repos/auth0/blog/hooks","issue_events_url":"https://api.github.com/repos/auth0/blog/issues/events{/number}","events_url":"https://api.github.com/repos/auth0/blog/events","assignees_url":"https://api.github.com/repos/auth0/blog/assignees{/user}","branches_url":"https://api.github.com/repos/auth0/blog/branches{/branch}","tags_url":"https://api.github.com/repos/auth0/blog/tags","blobs_url":"https://api.github.com/repos/auth0/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/auth0/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/auth0/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/auth0/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/auth0/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/auth0/blog/languages","stargazers_url":"https://api.github.com/repos/auth0/blog/stargazers","contributors_url":"https://api.github.com/repos/auth0/blog/contributors","subscribers_url":"https://api.github.com/repos/auth0/blog/subscribers","subscription_url":"https://api.github.com/repos/auth0/blog/subscription","commits_url":"https://api.github.com/repos/auth0/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/auth0/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/auth0/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/auth0/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/auth0/blog/contents/{+path}","compare_url":"https://api.github.com/repos/auth0/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/auth0/blog/merges","archive_url":"https://api.github.com/repos/auth0/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/auth0/blog/downloads","issues_url":"https://api.github.com/repos/auth0/blog/issues{/number}","pulls_url":"https://api.github.com/repos/auth0/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/auth0/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/auth0/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/auth0/blog/labels{/name}","releases_url":"https://api.github.com/repos/auth0/blog/releases{/id}","created_at":"2013-01-25T22:57:37Z","updated_at":"2015-10-07T18:10:51Z","pushed_at":"2015-10-14T04:16:35Z","git_url":"git://github.com/auth0/blog.git","ssh_url":"git@github.com:auth0/blog.git","clone_url":"https://github.com/auth0/blog.git","svn_url":"https://github.com/auth0/blog","homepage":"https://auth0.com/blog","size":17824,"stargazers_count":10,"watchers_count":10,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":6,"forks":11,"open_issues":6,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/auth0/blog/pulls/107"},"html":{"href":"https://github.com/auth0/blog/pull/107"},"issue":{"href":"https://api.github.com/repos/auth0/blog/issues/107"},"comments":{"href":"https://api.github.com/repos/auth0/blog/issues/107/comments"},"review_comments":{"href":"https://api.github.com/repos/auth0/blog/pulls/107/comments"},"review_comment":{"href":"https://api.github.com/repos/auth0/blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/auth0/blog/pulls/107/commits"},"statuses":{"href":"https://api.github.com/repos/auth0/blog/statuses/3942bc581a239c290c1730256117aba785d3d58a"}}}}