title
WebAssembly and the Death of JavaScript
description
For more than 20 years JavaScript has been the only 'native' language of the web. That's all changed with the release of WebAssembly. This talk will look at what WebAssembly is, why it matters and crucially what it means for JavaScript and the future of web development. JavaScript brought interactivity to the web more than 20 years ago, and despite numerous challengers, it is still the only language supported by browser. However, as those 20 years have passed we've moved from adding a little interactivity to largely static sites, to creating complex JavaScript-heavy single page applications. Throughout this journey, the way we use JavaScript itself has also changed. Gone are the days of writing simple code snippets that are run directly in the browser. Nowadays we transpile, minify, tree-shake and more, treating the JavaScript virtual machine as a compilation target.
The problem is, JavaScript isn't a very good compilation target, because it simply wasn't designed to be one.
Born out of asm.js, a somewhat crazy concept dreamt up by Mozilla, WebAssembly was designed from the ground-up as an efficient compilation target for the web. It promises smaller payloads, rapid parsing and validation and consistent performance ... and it's ready to use, right now!
This talk will look at what's wrong with the way we are using JavaScript today and why we need WebAssembly. It will delve into the internals, giving a quick tour of the WebAssembly instruction set, memory and security model, before moving on to the more practical aspects of using it with Rust, C++ and JavaScript. Finally we'll do some crystal-ball gazing and see what the future of this rapidly evolving technology might hold.
Talk by Colin Eberhardt at the JS Monthly London Meetup.
Recorded by Pusher.com.
Pusher's channel: https://www.youtube.com/channel/UCoyqucxoFXDFnh3khD0rjUg
--
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://medium.freecodecamp.org
detail
{'title': 'WebAssembly and the Death of JavaScript', 'heatmap': [{'end': 772.669, 'start': 720.886, 'weight': 1}, {'end': 2394.786, 'start': 2375.79, 'weight': 0.761}], 'summary': "Explores the potential of webassembly to replace javascript, comparing their efficiency and discussing webassembly's adoption by major browsers, node.js, and w3c. it also delves into webassembly's features, performance, challenges, and its potential impact on languages like rust, providing insights from performance tests and surveys.", 'chapters': [{'end': 129.091, 'segs': [{'end': 62.702, 'src': 'embed', 'start': 0.229, 'weight': 0, 'content': [{'end': 6.058, 'text': "I'm talking to you today about WebAssembly and asking the question is this going to be the death of JavaScript??", 'start': 0.229, 'duration': 5.829}, {'end': 10.666, 'text': 'And yeah, might not be the best meetup to ask a question like that.', 'start': 6.82, 'duration': 3.846}, {'end': 12.929, 'text': "If you feel like throwing something at me, that's fine.", 'start': 10.866, 'duration': 2.063}, {'end': 14.051, 'text': 'Just wait till the end.', 'start': 13.25, 'duration': 0.801}, {'end': 15.012, 'text': "That's all cool.", 'start': 14.251, 'duration': 0.761}, {'end': 19.57, 'text': "So I'm going to start off in typical fashion with a brief history of the web.", 'start': 16.587, 'duration': 2.983}, {'end': 23.495, 'text': 'And I know the web is a complex set of technologies.', 'start': 19.791, 'duration': 3.704}, {'end': 25.377, 'text': "I'm mostly going to be looking at JavaScript.", 'start': 23.555, 'duration': 1.822}, {'end': 29.722, 'text': 'And, as I think most people who have worked with JavaScript for a while know,', 'start': 25.738, 'duration': 3.984}, {'end': 33.707, 'text': 'the language itself was invented in a very short space of time by a chap called Brendan Eich.', 'start': 29.722, 'duration': 3.985}, {'end': 35.469, 'text': 'He invented it in just 10 days.', 'start': 34.187, 'duration': 1.282}, {'end': 40.313, 'text': 'Back in 1995, the web was a very, very different place.', 'start': 37.631, 'duration': 2.682}, {'end': 46.438, 'text': "It wasn't the kind of dynamic single-page app, React-type environment that we know right now.", 'start': 40.713, 'duration': 5.725}, {'end': 48.879, 'text': 'It was mostly static pages.', 'start': 46.498, 'duration': 2.381}, {'end': 55.704, 'text': 'the occasional form and JavaScript was there to just add a little bit of interactivity on top of an otherwise pretty static web.', 'start': 48.879, 'duration': 6.825}, {'end': 58.979, 'text': 'Since then, other languages have come along.', 'start': 56.897, 'duration': 2.082}, {'end': 62.702, 'text': 'Java applets, ActiveX, Flash, you might have used some of these.', 'start': 59.299, 'duration': 3.403}], 'summary': "Webassembly challenges javascript's dominance with its speed and flexibility, posing the question of its potential to replace javascript in web development.", 'duration': 62.473, 'max_score': 0.229, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug229.jpg'}], 'start': 0.229, 'title': 'Webassembly and javascript', 'summary': 'Discusses the evolution of javascript, its current extensive usage, and raises the question of whether webassembly will replace javascript, with an example of a react app containing 79,000 lines of javascript.', 'chapters': [{'end': 129.091, 'start': 0.229, 'title': 'Webassembly and javascript', 'summary': 'Discusses the evolution of javascript, its current extensive usage, and raises the question of whether webassembly will replace javascript, with an example of a react app containing 79,000 lines of javascript.', 'duration': 128.862, 'highlights': ["JavaScript's evolution: JavaScript was originally created for adding interactivity to static web pages, but its usage has evolved to encompass build tools and extensive codebases like the 79,000 lines found in a new React app.", "WebAssembly's potential impact: The discussion raises the question of whether WebAssembly will replace JavaScript, considering the extensive usage of JavaScript and the changing web environment.", "History of the web and JavaScript: The chapter provides a brief history of the web, focusing on JavaScript's rapid creation in 1995 and its evolution to support dynamic single-page applications."]}], 'duration': 128.862, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug229.jpg', 'highlights': ["JavaScript's evolution: JavaScript was originally created for adding interactivity to static web pages, but its usage has evolved to encompass build tools and extensive codebases like the 79,000 lines found in a new React app.", "WebAssembly's potential impact: The discussion raises the question of whether WebAssembly will replace JavaScript, considering the extensive usage of JavaScript and the changing web environment.", "History of the web and JavaScript: The chapter provides a brief history of the web, focusing on JavaScript's rapid creation in 1995 and its evolution to support dynamic single-page applications."]}, {'end': 461.124, 'segs': [{'end': 190.081, 'src': 'embed', 'start': 146.616, 'weight': 0, 'content': [{'end': 152.24, 'text': 'it would be served over HTTP and exactly the code that you had written would be executed within the browser.', 'start': 146.616, 'duration': 5.624}, {'end': 155.161, 'text': "That doesn't happen very often these days.", 'start': 153.34, 'duration': 1.821}, {'end': 160.443, 'text': 'Typically, the code that you write will be transpiled, it will be minified, it will be bundled,', 'start': 155.401, 'duration': 5.042}, {'end': 163.644, 'text': 'it will go through all kinds of really quite advanced transformations.', 'start': 160.443, 'duration': 3.201}, {'end': 167.805, 'text': 'And by the time it lands in your browser, it will look a bit like a garbled mess.', 'start': 163.944, 'duration': 3.861}, {'end': 173.587, 'text': "And that's led a few people to consider JavaScript to be the assembly language of the web.", 'start': 168.565, 'duration': 5.022}, {'end': 178.849, 'text': "It's a compilation target, as well as the language we use to write our applications.", 'start': 173.927, 'duration': 4.922}, {'end': 188.981, 'text': "But this is where the problems start to surface, because JavaScript actually isn't a very good assembly language.", 'start': 180.114, 'duration': 8.867}, {'end': 190.081, 'text': "And it's no surprise.", 'start': 189.221, 'duration': 0.86}], 'summary': 'Javascript is often transpiled, bundled, and considered the assembly language of the web, leading to complexity.', 'duration': 43.465, 'max_score': 146.616, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug146616.jpg'}, {'end': 406.132, 'src': 'embed', 'start': 383.183, 'weight': 2, 'content': [{'end': 393.368, 'text': "So they're not against the JavaScript language itself, But the situation we've found ourselves is a weird quirk of history.", 'start': 383.183, 'duration': 10.185}, {'end': 396.089, 'text': 'So that brings me on to WebAssembly.', 'start': 394.688, 'duration': 1.401}, {'end': 400.33, 'text': 'If you look at the WebAssembly specification, the WebAssembly website,', 'start': 396.409, 'duration': 3.921}, {'end': 406.132, 'text': 'they describe it as a new portable size and load time efficient format suitable for compilation to the web.', 'start': 400.33, 'duration': 5.802}], 'summary': 'Webassembly is a new, efficient format for web compilation.', 'duration': 22.949, 'max_score': 383.183, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug383183.jpg'}, {'end': 451.457, 'src': 'embed', 'start': 427.239, 'weight': 3, 'content': [{'end': 433.363, 'text': "I'll give you a quick illustration of what it is, and hopefully that will help you understand some of the design goals of WebAssembly.", 'start': 427.239, 'duration': 6.124}, {'end': 437.506, 'text': 'so asmjs was a a bit of an experiment.', 'start': 434.404, 'duration': 3.102}, {'end': 442.95, 'text': 'it was actually a bit of a wacky idea that was created by mozilla, i think, around about five years ago,', 'start': 437.506, 'duration': 5.444}, {'end': 451.457, 'text': 'and at that point in time there were various other plug-in like technologies being considered in the standard plug-in model.', 'start': 442.95, 'duration': 8.507}], 'summary': 'Webassembly aims to improve on asm.js, an experimental technology created by mozilla around 5 years ago.', 'duration': 24.218, 'max_score': 427.239, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug427239.jpg'}], 'start': 129.131, 'title': 'Javascript and webassembly', 'summary': "Highlights the evolution of javascript and its role as a compilation target, addressing its challenges and the optimization efforts. it also discusses webassembly as a solution to javascript's inefficiency, emphasizing its design goals and relation to asm.js, and its impact on execution speed, load time, and interaction time within the browser.", 'chapters': [{'end': 262.784, 'start': 129.131, 'title': 'Javascript: the changing landscape', 'summary': 'Highlights the evolution of javascript usage, from its simplicity in the past to its current complex transformations, and discusses its role as a compilation target and its challenges as an assembly language, ultimately addressing its execution within browsers and the optimization efforts to enhance performance.', 'duration': 133.653, 'highlights': ["JavaScript's usage has evolved from simplicity to complex transformations JavaScript has shifted from simple execution to undergoing transpilation, minification, and bundling, resulting in a more complex deployment process.", 'JavaScript considered as the assembly language of the web Due to the complex transformations and the garbled appearance of code in browsers, some have likened JavaScript to an assembly language, serving as a compilation target.', "Challenges of JavaScript as an assembly language JavaScript's inadequacy as an assembly language is highlighted, stemming from its original design not intended for compilation and the challenges it presents as a compilation target.", 'Execution of JavaScript within browsers The process of parsing code into an abstract syntax tree, generating byte code, and utilizing an interpreter is outlined, along with the optimization efforts within the runtime to enhance execution.']}, {'end': 461.124, 'start': 263.384, 'title': 'Webassembly: a new compilation target', 'summary': 'Discusses the inefficiency of javascript as a compilation target, highlighting the impact on execution speed, load time, and interaction time within the browser. it also introduces webassembly as a solution to these problems, emphasizing its design goals and relation to asm.js.', 'duration': 197.74, 'highlights': ["WebAssembly was designed to solve the problems of JavaScript's inefficiency, particularly in terms of execution speed, load time, and interaction time within the browser. WebAssembly aims to address the issues of parse time, compile time, and optimize time in JavaScript, impacting the application's execution and interactivity.", 'The team that created WebAssembly recognized the historical quirk of JavaScript being the only natively supported programming language for web platforms, leading to the development of WebAssembly as a new portable and efficient format suitable for compilation to the web. WebAssembly was developed in response to the historical accident of JavaScript being the sole natively supported language for web platforms, emphasizing its goal as a portable and efficient format for web compilation.', "ASM.js, although not widely known, played a significant role in the history of WebAssembly, as it was an experiment by Mozilla to address the inefficiencies of plug-in model technologies at the time. ASM.js, an experiment by Mozilla, was a precursor to WebAssembly and aimed to address the inefficiencies of plug-in model technologies, laying the groundwork for WebAssembly's design goals."]}], 'duration': 331.993, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug129131.jpg', 'highlights': ["JavaScript's usage has evolved from simplicity to complex transformations, undergoing transpilation, minification, and bundling.", 'JavaScript is considered as the assembly language of the web, serving as a compilation target.', "WebAssembly was designed to solve the problems of JavaScript's inefficiency, particularly in terms of execution speed, load time, and interaction time within the browser.", 'ASM.js, an experiment by Mozilla, was a precursor to WebAssembly and aimed to address the inefficiencies of plug-in model technologies.']}, {'end': 1038.021, 'segs': [{'end': 486.239, 'src': 'embed', 'start': 461.704, 'weight': 3, 'content': [{'end': 469.929, 'text': "Whereas the Mozilla team came up with this slightly crazy idea of why don't we create this sort of virtual runtime that sits within the JavaScript virtual machine?", 'start': 461.704, 'duration': 8.225}, {'end': 473.951, 'text': "So they said okay, we need memory, so we'll just have an array that can be our memory.", 'start': 470.189, 'duration': 3.762}, {'end': 479.775, 'text': "We need instructions, so we'll create effectively patterns within our JavaScript that represent those instructions.", 'start': 474.211, 'duration': 5.564}, {'end': 486.239, 'text': "So I'll quickly illustrate what it is, and then show you why that is a great demonstration of a slightly better way of doing things.", 'start': 480.275, 'duration': 5.964}], 'summary': 'Mozilla team created a virtual runtime with memory and instructions within javascript for a better way of doing things.', 'duration': 24.535, 'max_score': 461.704, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug461704.jpg'}, {'end': 613.691, 'src': 'embed', 'start': 584.752, 'weight': 1, 'content': [{'end': 589.556, 'text': 'It parses it into an abstract syntax tree, but then immediately it spots the patterns.', 'start': 584.752, 'duration': 4.804}, {'end': 599.684, 'text': 'It effectively reads the ASM.js assembly language and immediately is able to push it right up to quite a highly optimized version of the code,', 'start': 589.696, 'duration': 9.988}, {'end': 604.722, 'text': 'skipping some of the quite time-consuming interpreter steps and optimization steps.', 'start': 599.684, 'duration': 5.038}, {'end': 608.208, 'text': 'So as you can imagine, this is quite a neat idea.', 'start': 606.087, 'duration': 2.121}, {'end': 613.691, 'text': 'But I think ASM.js was only ever put together as a technical proof of concept.', 'start': 608.268, 'duration': 5.423}], 'summary': 'The asm.js assembly language optimizes code, skipping time-consuming steps, serving as a technical proof of concept.', 'duration': 28.939, 'max_score': 584.752, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug584752.jpg'}, {'end': 696.89, 'src': 'embed', 'start': 653.396, 'weight': 0, 'content': [{'end': 659.102, 'text': 'ASM.js pointed people towards a different and interesting approach to solving this problem,', 'start': 653.396, 'duration': 5.706}, {'end': 661.545, 'text': 'which was quite different to the standard sort of plug-in model.', 'start': 659.102, 'duration': 2.443}, {'end': 666.33, 'text': 'As a result, the WebAssembly working group was formed, and it was formed in 2015,', 'start': 662.245, 'duration': 4.085}, {'end': 670.694, 'text': 'with representation from all the main browser vendors and a bunch of others.', 'start': 666.33, 'duration': 4.364}, {'end': 681.059, 'text': 'Quite impressively, within the space of two years, they managed to design their MVP scope for WebAssembly and get it released in the wild.', 'start': 672.276, 'duration': 8.783}, {'end': 687.121, 'text': 'In November last year, it was turned on in all major browsers without the need for flags.', 'start': 681.679, 'duration': 5.442}, {'end': 688.541, 'text': "It's officially out there in the wild.", 'start': 687.161, 'duration': 1.38}, {'end': 691.743, 'text': "It's also in Node version 8 and beyond.", 'start': 688.802, 'duration': 2.941}, {'end': 696.89, 'text': 'Just earlier this month, W3C published their first public draft as well.', 'start': 693.163, 'duration': 3.727}], 'summary': "Webassembly was released in all major browsers within two years of its formation, and also incorporated in node version 8 and w3c's first public draft.", 'duration': 43.494, 'max_score': 653.396, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug653396.jpg'}, {'end': 772.669, 'src': 'heatmap', 'start': 720.886, 'weight': 1, 'content': [{'end': 725.029, 'text': 'So switching to code, this is obviously where it all goes horribly wrong.', 'start': 720.886, 'duration': 4.143}, {'end': 729.79, 'text': "So I'm going to start with a very, very simple example.", 'start': 727.75, 'duration': 2.04}, {'end': 732.671, 'text': 'This is a function that adds two numbers together.', 'start': 730.07, 'duration': 2.601}, {'end': 739.793, 'text': "And even though this is VS code, that's actually C, which is horrible and dirty and makes me want to wash my hands.", 'start': 733.091, 'duration': 6.702}, {'end': 740.734, 'text': 'But there you go.', 'start': 740.194, 'duration': 0.54}, {'end': 742.034, 'text': "There's an add function.", 'start': 741.054, 'duration': 0.98}, {'end': 747.316, 'text': "And what happens is with my build, my tool chain, I'm not going to go into too much detail about that.", 'start': 742.494, 'duration': 4.822}, {'end': 750.738, 'text': 'My tool chain is compiling that into WebAssembly.', 'start': 747.976, 'duration': 2.762}, {'end': 754.479, 'text': 'And there are two distinct formats that you can use to view your WebAssembly.', 'start': 751.298, 'duration': 3.181}, {'end': 760.603, 'text': 'The obvious one is, oh, tiny, tiny, is in hex.', 'start': 755.38, 'duration': 5.223}, {'end': 764.725, 'text': 'So the output of WebAssembly is a binary format.', 'start': 760.983, 'duration': 3.742}, {'end': 772.669, 'text': 'So again, recalling how JavaScript is processed by your browser, it no longer has to parse the characters into an abstract syntax tree.', 'start': 764.785, 'duration': 7.884}], 'summary': 'Code compiles c into webassembly with two distinct formats, hex and binary.', 'duration': 51.783, 'max_score': 720.886, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug720886.jpg'}, {'end': 944.41, 'src': 'embed', 'start': 914.708, 'weight': 4, 'content': [{'end': 917.15, 'text': 'creating an API layer and invoking it from JavaScript.', 'start': 914.708, 'duration': 2.442}, {'end': 919.471, 'text': "At the moment, it's relatively challenging to do that.", 'start': 917.37, 'duration': 2.101}, {'end': 925.255, 'text': 'One of the reasons for doing that is that WebAssembly has a very small number of built-in types.', 'start': 920.312, 'duration': 4.943}, {'end': 927.537, 'text': "It only has four types, and they're all numeric.", 'start': 925.315, 'duration': 2.222}, {'end': 929.998, 'text': "So it's got two floating points and two integer types.", 'start': 927.817, 'duration': 2.181}, {'end': 936.644, 'text': 'What that means is if you want to do something with something a little bit more advanced like strings, it gets quite complicated.', 'start': 930.899, 'duration': 5.745}, {'end': 944.41, 'text': 'So my next little demo is just something which returns a simple string from my WebAssembly function and renders it from JavaScript.', 'start': 936.924, 'duration': 7.486}], 'summary': 'Challenging to use api layer with webassembly due to limited built-in types, only 4 numeric types.', 'duration': 29.702, 'max_score': 914.708, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug914708.jpg'}], 'start': 461.704, 'title': "Mozilla's asm.js and webassembly transition", 'summary': "Discusses mozilla's creation of asm.js for better javascript execution by representing instructions within javascript, and the transition to webassembly, highlighting its quick adoption in major browsers, node.js, and w3c, as well as the challenges of dealing with limited data types like strings.", 'chapters': [{'end': 545.688, 'start': 461.704, 'title': "Mozilla's asm.js for better javascript execution", 'summary': "Discusses mozilla's creation of asm.js, a virtual runtime within javascript vm, using patterns within javascript to represent instructions, and reassigning arguments and type hints for better javascript execution.", 'duration': 83.984, 'highlights': ["Mozilla team's creation of ASM.js as a virtual runtime within JavaScript VM using patterns within JavaScript to represent instructions", 'Reassigning arguments and providing type hints in ASM.js code for better JavaScript execution', 'Illustration of ASM.js code and its use in compiling C functions for standard Fibonacci calculation']}, {'end': 1038.021, 'start': 546.028, 'title': 'Asm.js and webassembly overview', 'summary': "Discusses the transition from asm.js to webassembly, highlighting asm.js's optimization benefits for javascript and the quick adoption of webassembly in major browsers, node.js, and w3c, as well as the challenges of dealing with limited data types like strings in webassembly.", 'duration': 491.993, 'highlights': ["WebAssembly was released in major browsers and Node.js within two years of its MVP scope design, without the need for flags, and was also published as a public draft by W3C. WebAssembly's rapid adoption in major browsers, Node.js, and W3C demonstrated its quick advancement and widespread support within a short timeframe.", "ASM.js pointed towards a different approach to solving browser execution challenges, leading to the formation of the WebAssembly working group in 2015 with representation from major browser vendors and others. ASM.js's influence led to the formation of the WebAssembly working group, showcasing a shift in approach to addressing browser execution challenges and garnering support from key industry players.", "ASM.js demonstrated optimization benefits for JavaScript, allowing it to be pushed into a highly optimized version of the code, skipping time-consuming interpreter and optimization steps when recognized by the browser. ASM.js's optimization capabilities were evident as it enabled JavaScript to be quickly and efficiently processed into a highly optimized code version, bypassing time-consuming steps, when recognized by the browser.", "WebAssembly's challenge lies in dealing with a limited number of built-in types, specifically four numeric types, making it complex to handle more advanced data types like strings. WebAssembly's limitation with only four numeric types presents challenges in handling advanced data types like strings, complicating the development process when dealing with non-numeric data."]}], 'duration': 576.317, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug461704.jpg', 'highlights': ["WebAssembly's rapid adoption in major browsers, Node.js, and W3C demonstrated its quick advancement and widespread support within a short timeframe.", 'ASM.js demonstrated optimization benefits for JavaScript, allowing it to be pushed into a highly optimized version of the code, skipping time-consuming interpreter and optimization steps when recognized by the browser.', "ASM.js's influence led to the formation of the WebAssembly working group, showcasing a shift in approach to addressing browser execution challenges and garnering support from key industry players.", "Mozilla team's creation of ASM.js as a virtual runtime within JavaScript VM using patterns within JavaScript to represent instructions", "WebAssembly's challenge lies in dealing with a limited number of built-in types, specifically four numeric types, making it complex to handle more advanced data types like strings."]}, {'end': 1466.422, 'segs': [{'end': 1078.205, 'src': 'embed', 'start': 1038.461, 'weight': 0, 'content': [{'end': 1042.923, 'text': "And that's by all means not an exhaustive demonstration of WebAssembly,", 'start': 1038.461, 'duration': 4.462}, {'end': 1051.607, 'text': 'but hopefully it gives you a bit of a feel for how you use a WebAssembly module from within JavaScript and some of the current limitations that there are.', 'start': 1042.923, 'duration': 8.684}, {'end': 1053.828, 'text': 'So a little bit more on the WebAssembly architecture.', 'start': 1051.847, 'duration': 1.981}, {'end': 1055.889, 'text': 'So WebAssembly itself is a stack machine.', 'start': 1054.088, 'duration': 1.801}, {'end': 1058.89, 'text': 'As I mentioned, it has four built-in types, 67 instructions.', 'start': 1055.949, 'duration': 2.941}, {'end': 1063.713, 'text': "Importantly, it's designed to support streaming compilation.", 'start': 1060.871, 'duration': 2.842}, {'end': 1068.957, 'text': "So there are some features that are specific to WebAssembly which reflect the context it's used within.", 'start': 1063.994, 'duration': 4.963}, {'end': 1074.001, 'text': 'For the vast majority of use cases, your code is being streamed over HTTP.', 'start': 1069.778, 'duration': 4.223}, {'end': 1078.205, 'text': 'So it makes sense that WebAssembly can be compiled in a streaming fashion.', 'start': 1074.242, 'duration': 3.963}], 'summary': 'Webassembly is a stack machine with 4 types, 67 instructions, and supports streaming compilation over http.', 'duration': 39.744, 'max_score': 1038.461, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1038461.jpg'}, {'end': 1246.176, 'src': 'embed', 'start': 1204.498, 'weight': 2, 'content': [{'end': 1209.24, 'text': 'And, most importantly, the paper that was published by the WebAssembly team.', 'start': 1204.498, 'duration': 4.742}, {'end': 1219.406, 'text': 'the accepted sort of general feeling is that WebAssembly should be around about 20% to 30% faster at runtime execution than JavaScript.', 'start': 1209.24, 'duration': 10.166}, {'end': 1225.746, 'text': "But because JavaScript is really quite fast, there isn't that much of a performance gain to be made.", 'start': 1220.222, 'duration': 5.524}, {'end': 1233.312, 'text': 'Where they expect WebAssembly to beat JavaScript significantly is the parse time and the initial compilation time.', 'start': 1226.167, 'duration': 7.145}, {'end': 1239.157, 'text': 'So the time to interact with WebAssembly should theoretically be a lot less than with JavaScript.', 'start': 1233.512, 'duration': 5.645}, {'end': 1246.176, 'text': 'So in the future, one of the things I mentioned was that WebAssembly was developed over a really quite short space of time.', 'start': 1241.069, 'duration': 5.107}], 'summary': 'Webassembly should be 20-30% faster than javascript, with significant gains in parse and compilation time.', 'duration': 41.678, 'max_score': 1204.498, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1204498.jpg'}, {'end': 1299.371, 'src': 'embed', 'start': 1268.12, 'weight': 4, 'content': [{'end': 1270.942, 'text': "So some of the things that it doesn't have at the moment is a garbage collector.", 'start': 1268.12, 'duration': 2.822}, {'end': 1273.664, 'text': "And I'll explain why that's a bit of a pain later on.", 'start': 1271.182, 'duration': 2.482}, {'end': 1279.671, 'text': 'In the future, it will also have threading support, a thing called host bindings, which is a way..', 'start': 1274.765, 'duration': 4.906}, {'end': 1284.096, 'text': 'As I showed you, the interface between JavaScript and WebAssembly is a little complicated at the moment,', 'start': 1279.671, 'duration': 4.425}, {'end': 1287.9, 'text': "and if you want to start doing DOM manipulation from WebAssembly, that's hard.", 'start': 1284.096, 'duration': 3.804}, {'end': 1290.684, 'text': 'With host bindings in the future, that will become a lot easier.', 'start': 1288.141, 'duration': 2.543}, {'end': 1299.371, 'text': 'So one of the final things I want to look at is WebAssembly language support and what some people are actually doing with the language.', 'start': 1293.106, 'duration': 6.265}], 'summary': 'Webassembly lacks garbage collector, but will have threading support and host bindings in the future, simplifying dom manipulation.', 'duration': 31.251, 'max_score': 1268.12, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1268120.jpg'}, {'end': 1346.473, 'src': 'embed', 'start': 1320.67, 'weight': 5, 'content': [{'end': 1325.294, 'text': 'People are going to be using other languages and treating WebAssembly as a compilation target.', 'start': 1320.67, 'duration': 4.624}, {'end': 1330.599, 'text': "So I'm going to quickly look at the different languages and their current level of support.", 'start': 1325.754, 'duration': 4.845}, {'end': 1333.64, 'text': 'So the first one is C or C++.', 'start': 1332.199, 'duration': 1.441}, {'end': 1338.545, 'text': 'And this is the very first language that gains WebAssembly support.', 'start': 1334.001, 'duration': 4.544}, {'end': 1341.588, 'text': "And again, that's due to its heritage from ASM.js.", 'start': 1338.786, 'duration': 2.802}, {'end': 1346.473, 'text': "There's a tool called MScripten that you can use to compile C to WebAssembly.", 'start': 1342.189, 'duration': 4.284}], 'summary': 'Webassembly is gaining support from c/c++ due to asm.js heritage, with mscripten as a tool for compilation.', 'duration': 25.803, 'max_score': 1320.67, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1320670.jpg'}], 'start': 1038.461, 'title': 'Webassembly features and performance', 'summary': 'Introduces webassembly as a stack machine with 4 built-in types, 67 instructions, and support for streaming compilation over http, designed for fast processing and simple validation rules. it also discusses the performance comparison of webassembly and javascript using a mandelbrot rendering test, finding that webassembly is initially slower but can be optimized to be slightly faster than javascript and explores future features and language support for webassembly.', 'chapters': [{'end': 1118.076, 'start': 1038.461, 'title': 'Introduction to webassembly', 'summary': 'Introduces webassembly as a stack machine with 4 built-in types, 67 instructions, and support for streaming compilation over http, designed for fast processing and simple validation rules.', 'duration': 79.615, 'highlights': ['The chapter introduces WebAssembly as a stack machine with 4 built-in types, 67 instructions, and support for streaming compilation over HTTP, designed for fast processing and simple validation rules.', 'WebAssembly is designed to support streaming compilation for fast processing and parallel compilation on multiple threads, making it very fast.', "It has some very simple validation rules, ensuring security, and can be processed in serial as it's streamed in."]}, {'end': 1466.422, 'start': 1118.116, 'title': 'Webassembly performance and language support', 'summary': 'Discusses the performance comparison of webassembly and javascript using a mandelbrot rendering test, finding that webassembly is initially slower but can be optimized to be slightly faster than javascript, and explores future features and language support for webassembly.', 'duration': 348.306, 'highlights': ['The performance comparison of WebAssembly and JavaScript using a Mandelbrot rendering test shows that WebAssembly is initially slower but can be optimized to be slightly faster than JavaScript. JavaScript is only about 20% slower than native performance in rendering a Mandelbrot, and through optimizations, WebAssembly can be made slightly faster than JavaScript.', 'The general expectation is that WebAssembly should be around 20% to 30% faster at runtime execution than JavaScript, with the potential for significant gains in parse time and initial compilation time. According to the paper published by the WebAssembly team, it is expected that WebAssembly should be around 20% to 30% faster at runtime execution than JavaScript, and it should significantly reduce the parse time and initial compilation time.', 'WebAssembly was developed over a short time, initially released as an MVP with a small set of features, and plans to release new features in the future, including garbage collector, threading support, and host bindings. The current WebAssembly release is very much an MVP with plans for releasing new features over the coming years, including garbage collector, threading support, and host bindings to simplify interaction with JavaScript and DOM manipulation.', 'WebAssembly language support is discussed, detailing the support for languages such as C/C++, JavaScript core (JSC), and practical use cases of WebAssembly, with many people still experimenting with the technology. The chapter discusses the support for languages like C/C++ and JSC for WebAssembly, and mentions that practical use cases of WebAssembly are still in the experimental stage.']}], 'duration': 427.961, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1038461.jpg', 'highlights': ['WebAssembly is designed as a stack machine with 4 built-in types, 67 instructions, and support for streaming compilation over HTTP, ensuring fast processing and simple validation rules.', 'WebAssembly supports streaming compilation for fast processing and parallel compilation on multiple threads, making it very fast.', 'The performance comparison of WebAssembly and JavaScript using a Mandelbrot rendering test shows that WebAssembly is initially slower but can be optimized to be slightly faster than JavaScript.', 'WebAssembly should be around 20% to 30% faster at runtime execution than JavaScript, with potential significant gains in parse time and initial compilation time.', 'WebAssembly was initially released as an MVP with plans to release new features in the future, including garbage collector, threading support, and host bindings.', 'The chapter discusses the support for languages like C/C++ and JSC for WebAssembly, and mentions that practical use cases of WebAssembly are still in the experimental stage.']}, {'end': 1810.379, 'segs': [{'end': 1558.453, 'src': 'embed', 'start': 1487.347, 'weight': 0, 'content': [{'end': 1491.568, 'text': 'either perhaps AWS in a Lambda function or perhaps within the browser.', 'start': 1487.347, 'duration': 4.221}, {'end': 1494.612, 'text': 'So we help them take their C++ code,', 'start': 1492.128, 'duration': 2.484}, {'end': 1504.845, 'text': 'compile it to WebAssembly and use exactly the same code to parse their packets of data and deliver their high frequency data to the web.', 'start': 1494.612, 'duration': 10.233}, {'end': 1507.329, 'text': "So that's something that we were able to achieve with WebAssembly.", 'start': 1505.106, 'duration': 2.223}, {'end': 1512.217, 'text': 'Oh, that should say C Sharp.', 'start': 1510.736, 'duration': 1.481}, {'end': 1512.838, 'text': "That's a mistake.", 'start': 1512.318, 'duration': 0.52}, {'end': 1516.161, 'text': "Anyway, so C, C++, that's the story.", 'start': 1513.218, 'duration': 2.943}, {'end': 1518.163, 'text': 'Java and C Sharp.', 'start': 1516.502, 'duration': 1.661}, {'end': 1525.611, 'text': "these ones are a little bit more challenging because, as I'm sure you're aware, Java and C Sharp are languages that both rely on garbage collection,", 'start': 1518.163, 'duration': 7.448}, {'end': 1530.155, 'text': 'whereas C C++ you manually manage the lifecycle of your objects.', 'start': 1525.611, 'duration': 4.544}, {'end': 1536.9, 'text': "And because WebAssembly doesn't have garbage collection yet, that means it's quite a problem.", 'start': 1530.936, 'duration': 5.964}, {'end': 1540.362, 'text': "it's quite a challenge to take Java and C-sharp code and compile it to WebAssembly.", 'start': 1536.9, 'duration': 3.462}, {'end': 1549.787, 'text': "There's an experimental project called Blazor that's become an official, I think, ASP.NET experiment which uses Mono.", 'start': 1541.122, 'duration': 8.665}, {'end': 1555.111, 'text': 'some of you may be aware of Mono as a way to run Java and C-sharp within WebAssembly.', 'start': 1549.787, 'duration': 5.324}, {'end': 1558.453, 'text': "And what they're doing is they're experimenting with a couple of different ways of doing it.", 'start': 1555.371, 'duration': 3.082}], 'summary': 'Webassembly enables c++ code to parse high frequency data for web delivery, while java and c sharp present challenges due to garbage collection and manual object lifecycle management.', 'duration': 71.106, 'max_score': 1487.347, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1487347.jpg'}, {'end': 1645.594, 'src': 'embed', 'start': 1616.639, 'weight': 4, 'content': [{'end': 1621.34, 'text': "I'd like my JavaScript to parse more quickly, to be optimized immediately.", 'start': 1616.639, 'duration': 4.701}, {'end': 1626.841, 'text': 'So there are a lot of people trying to find creative ways to compile JavaScript to WebAssembly.', 'start': 1621.66, 'duration': 5.181}, {'end': 1629.923, 'text': 'and obviously there are even more challenges there.', 'start': 1627.441, 'duration': 2.482}, {'end': 1632.084, 'text': 'so, firstly, you need a garbage collector.', 'start': 1629.923, 'duration': 2.161}, {'end': 1636.147, 'text': "secondly, it's not statically typed, so you've got typing as a bit of an issue.", 'start': 1632.084, 'duration': 4.063}, {'end': 1640.59, 'text': "there are a couple of projects that i've been keeping an eye on that are trying to tackle this.", 'start': 1636.147, 'duration': 4.443}, {'end': 1645.594, 'text': 'first is called walt, which is a javascript-like syntax for webassembly.', 'start': 1640.59, 'duration': 5.004}], 'summary': 'Efforts to optimize javascript parsing include exploring webassembly and addressing challenges, such as garbage collection and typing issues.', 'duration': 28.955, 'max_score': 1616.639, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1616639.jpg'}, {'end': 1730.241, 'src': 'embed', 'start': 1702.653, 'weight': 5, 'content': [{'end': 1711.055, 'text': "But what I've done is I've taken D3 force layout and taken all of the algorithmic code and rewritten it using TypeScript and compiled it to WebAssembly.", 'start': 1702.653, 'duration': 8.402}, {'end': 1712.596, 'text': 'So, basically,', 'start': 1711.555, 'duration': 1.041}, {'end': 1722.059, 'text': "the standard sort of n-body algorithm and the kind of Hooke's law spring concepts are all being computed here within WebAssembly using TypeScript.", 'start': 1712.596, 'duration': 9.463}, {'end': 1730.241, 'text': "And it was quite an interesting experiment for me to see how easy it is to take a JavaScript application that wasn't written in TypeScript,", 'start': 1722.499, 'duration': 7.742}], 'summary': 'Converted d3 force layout algorithm to typescript and compiled to webassembly for efficient computation.', 'duration': 27.588, 'max_score': 1702.653, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1702653.jpg'}, {'end': 1797.388, 'src': 'embed', 'start': 1773.972, 'weight': 3, 'content': [{'end': 1781.777, 'text': 'If you ever have a look at the sort of metrics, Stack Overflow does a survey every year, and they do quite a lot of data analysis.', 'start': 1773.972, 'duration': 7.805}, {'end': 1786.46, 'text': 'And Rust seems to be a programming language that makes people really, really, really happy.', 'start': 1782.198, 'duration': 4.262}, {'end': 1788.402, 'text': "So it's a modern language.", 'start': 1786.821, 'duration': 1.581}, {'end': 1789.903, 'text': "It's a very, very popular language.", 'start': 1788.582, 'duration': 1.321}, {'end': 1793.205, 'text': "Significantly here, it doesn't require a garbage collector.", 'start': 1790.683, 'duration': 2.522}, {'end': 1797.388, 'text': "It's got quite an interesting memory model that has the concept of ownership.", 'start': 1793.505, 'duration': 3.883}], 'summary': "Rust, a modern language, is popular and makes people very happy, as shown by the stack overflow survey data. it doesn't require a garbage collector and has an interesting memory model based on ownership.", 'duration': 23.416, 'max_score': 1773.972, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1773972.jpg'}], 'start': 1468.283, 'title': 'Webassembly challenges and solutions', 'summary': "Delves into using webassembly for high-frequency data delivery, challenges in compiling java and c-sharp, and solutions such as walt, assembly script, and rust as a modern language without a garbage collector, backed by data from stack overflow's survey.", 'chapters': [{'end': 1598.236, 'start': 1468.283, 'title': 'Webassembly for high frequency data', 'summary': 'Discusses the use of webassembly to compile c++ code for high-frequency data delivery to the web, while also highlighting challenges in compiling java and c-sharp code due to the absence of garbage collection in webassembly.', 'duration': 129.953, 'highlights': ['WebAssembly used to compile C++ code for high frequency data delivery to the web WebAssembly was employed to compile C++ code, enabling the delivery of high-frequency data to the web, catering to the needs of algorithmic trading and distribution logic.', 'Challenges in compiling Java and C-sharp due to absence of garbage collection in WebAssembly Compiling Java and C-sharp code to WebAssembly poses challenges as these languages rely on garbage collection, unlike C and C++, requiring manual management of object lifecycles.', "Blazor project experimenting with ways to run Java and C-sharp within WebAssembly The Blazor project, utilizing Mono's WebAssembly support, is experimenting with interpreted mode and ahead-of-time compilation to run Java and C-sharp code within WebAssembly, offering potential for single-page application frameworks."]}, {'end': 1810.379, 'start': 1599.775, 'title': 'Webassembly and javascript', 'summary': "Discusses the challenges of compiling javascript to webassembly, including the need for a garbage collector and the typing issue. it also explores projects such as walt and assembly script, as well as the use of rust as a modern language without a garbage collector, which makes people happy according to stack overflow's survey.", 'duration': 210.604, 'highlights': ["Rust's popularity and unique memory model Rust is gaining popularity and is known for its unique memory model, with the concept of ownership, making it easy to reason about memory and clean up memory.", 'Challenges of compiling JavaScript to WebAssembly Compiling JavaScript to WebAssembly poses challenges such as the need for a garbage collector and the typing issue, with projects like Walt and Assembly Script attempting to tackle these challenges.', 'Experiment of compiling D3 force layout to WebAssembly using TypeScript The speaker conducted an experiment by rewriting the algorithmic code of D3 force layout using TypeScript and compiling it to WebAssembly, demonstrating the potential of compiling JavaScript applications to WebAssembly.']}], 'duration': 342.096, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1468283.jpg', 'highlights': ['WebAssembly used to compile C++ code for high frequency data delivery to the web', 'Challenges in compiling Java and C-sharp due to absence of garbage collection in WebAssembly', 'Blazor project experimenting with ways to run Java and C-sharp within WebAssembly', "Rust's popularity and unique memory model", 'Challenges of compiling JavaScript to WebAssembly', 'Experiment of compiling D3 force layout to WebAssembly using TypeScript']}, {'end': 2397.908, 'segs': [{'end': 1837.588, 'src': 'embed', 'start': 1811.567, 'weight': 0, 'content': [{'end': 1817.893, 'text': 'So within Rust, what they did was they used the Emscripten tool chain and are actually investing time in creating some better tool chains.', 'start': 1811.567, 'duration': 6.326}, {'end': 1825.901, 'text': "And I found this quote actually from someone within the Rust community who says, we're poised to be the language of choice for WebAssembly.", 'start': 1818.714, 'duration': 7.187}, {'end': 1829.004, 'text': "And the reason for that is it's a much loved language.", 'start': 1826.521, 'duration': 2.483}, {'end': 1834.749, 'text': "And because it doesn't need a garbage collector, it's actually in a great position for being compiled to WebAssembly right now.", 'start': 1829.224, 'duration': 5.525}, {'end': 1837.588, 'text': 'So I had a bit of a play with it myself.', 'start': 1835.706, 'duration': 1.882}], 'summary': 'Rust aims to be the preferred language for webassembly due to its popularity and efficient compilation without a garbage collector.', 'duration': 26.021, 'max_score': 1811.567, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1811567.jpg'}, {'end': 1991.09, 'src': 'embed', 'start': 1959.389, 'weight': 1, 'content': [{'end': 1961.65, 'text': 'And, as you can see here, the WebAssembly performance.', 'start': 1959.389, 'duration': 2.261}, {'end': 1967.273, 'text': 'I know the text is a bit small there at the bottom, but the WebAssembly performance is these little blue clusters.', 'start': 1961.65, 'duration': 5.623}, {'end': 1968.934, 'text': 'So a couple of observations.', 'start': 1967.813, 'duration': 1.121}, {'end': 1975.479, 'text': 'The first one is clearly WebAssembly is quite a bit faster, in the order of two to three times faster.', 'start': 1968.994, 'duration': 6.485}, {'end': 1979.001, 'text': 'But another interesting aspect here is the JavaScript performance.', 'start': 1975.939, 'duration': 3.062}, {'end': 1981.043, 'text': "You'll see quite a spread in performance.", 'start': 1979.021, 'duration': 2.022}, {'end': 1984.946, 'text': 'And that is because, again, of the nature of the way that JavaScript is executed.', 'start': 1981.443, 'duration': 3.503}, {'end': 1991.09, 'text': 'It goes through multiple tiers of optimization, where it might be optimized and then de-optimized.', 'start': 1985.346, 'duration': 5.744}], 'summary': "Webassembly is 2-3 times faster than javascript, with a visible performance spread due to javascript's multi-tier optimization.", 'duration': 31.701, 'max_score': 1959.389, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1959389.jpg'}, {'end': 2071.213, 'src': 'embed', 'start': 2043.789, 'weight': 2, 'content': [{'end': 2051.936, 'text': 'So my prediction for 2018 is, as you can imagine, lots more creativity, mostly coming out of languages like Rust,', 'start': 2043.789, 'duration': 8.147}, {'end': 2054.138, 'text': "but we're also seeing a lot of creativity with C Sharp.", 'start': 2051.936, 'duration': 2.202}, {'end': 2061.004, 'text': 'I have a feeling the Swift community are going to be very, very keen on this, because Swift has a lot of common attributes with Rust.', 'start': 2054.697, 'duration': 6.307}, {'end': 2062.525, 'text': "It's a modern language.", 'start': 2061.324, 'duration': 1.201}, {'end': 2071.213, 'text': "it's quite a pleasant language to use and also, using automatic reference counting, it's got a memory model that's quite compatible with WebAssembly.", 'start': 2062.525, 'duration': 8.688}], 'summary': 'Prediction for 2018: more creativity in rust and c sharp, with potential impact on swift and webassembly.', 'duration': 27.424, 'max_score': 2043.789, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug2043789.jpg'}, {'end': 2191.043, 'src': 'embed', 'start': 2165.652, 'weight': 3, 'content': [{'end': 2174.355, 'text': 'As a result, C-Sharp and Java, some of the languages that require a garbage collector, will become first-class citizens of the WebAssembly ecosystem.', 'start': 2165.652, 'duration': 8.703}, {'end': 2178.817, 'text': "I think we're also going to start seeing WASM UI frameworks.", 'start': 2175.056, 'duration': 3.761}, {'end': 2189.202, 'text': "So we're going to start seeing UI frameworks that are entirely written as WebAssembly and geared towards perhaps C-sharp or Java developers.", 'start': 2178.857, 'duration': 10.345}, {'end': 2191.043, 'text': "And we're already starting to see that.", 'start': 2189.502, 'duration': 1.541}], 'summary': 'C# and java will become first-class citizens of webassembly, leading to the emergence of wasm ui frameworks.', 'duration': 25.391, 'max_score': 2165.652, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug2165652.jpg'}, {'end': 2314.446, 'src': 'embed', 'start': 2285.066, 'weight': 4, 'content': [{'end': 2286.807, 'text': "they're going to be wanting to get some of that as well.", 'start': 2285.066, 'duration': 1.741}, {'end': 2297.117, 'text': 'My gut feeling is that the JavaScript language itself will start to move towards some of the TypeScript concepts to allow WebAssembly compilation.', 'start': 2287.992, 'duration': 9.125}, {'end': 2300.939, 'text': "If you've been following the way that TypeScript has evolved over time,", 'start': 2297.597, 'duration': 3.342}, {'end': 2306.402, 'text': 'TypeScript has deliberately stayed on a relatively convergent path with the JavaScript language itself.', 'start': 2300.939, 'duration': 5.463}, {'end': 2309.143, 'text': 'I have a feeling that some of these features typing,', 'start': 2306.862, 'duration': 2.281}, {'end': 2314.446, 'text': 'for example might become a first class feature of JavaScript in order to allow us to compile to WebAssembly.', 'start': 2309.143, 'duration': 5.303}], 'summary': 'Javascript may adopt typescript concepts for webassembly compilation, incorporating features like typing.', 'duration': 29.38, 'max_score': 2285.066, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug2285066.jpg'}, {'end': 2397.908, 'src': 'heatmap', 'start': 2375.79, 'weight': 0.761, 'content': [{'end': 2383.296, 'text': 'I think the ubiquity of the web will increase, or the ubiquity of JavaScript and WebAssembly will increase and move more onto the desktop.', 'start': 2375.79, 'duration': 7.506}, {'end': 2388.781, 'text': 'So yeah, that pretty much brings me to the end, WebAssembly and the death of JavaScript.', 'start': 2384.938, 'duration': 3.843}, {'end': 2394.786, 'text': "And I'm gonna say, no, it's not gonna die, but I think it's got a real fight on its hands.", 'start': 2389.021, 'duration': 5.765}, {'end': 2397.908, 'text': 'And if you disagree, you can start throwing things at me right now.', 'start': 2395.246, 'duration': 2.662}], 'summary': "Webassembly will increase on desktop, but javascript won't die easily.", 'duration': 22.118, 'max_score': 2375.79, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug2375790.jpg'}], 'start': 1811.567, 'title': 'Rust and webassembly', 'summary': "Discusses rust's potential as the preferred language for webassembly due to its lack of a garbage collector, and the impact of webassembly on javascript, highlighting its performance boost and potential use in various languages, with predictions for 2018, 2019, and beyond.", 'chapters': [{'end': 1893.666, 'start': 1811.567, 'title': 'Rust and webassembly', 'summary': "Discusses rust's potential as the preferred language for webassembly due to its lack of a garbage collector and the growing investment in better tool chains, as evidenced by the development of a chip 8 emulator and practical applications by mozilla.", 'duration': 82.099, 'highlights': ['Rust is positioned to be the language of choice for WebAssembly due to its lack of a garbage collector, making it suitable for compilation to WebAssembly right now.', 'Investment in creating better tool chains for Rust, as exemplified by the development of a Chip 8 emulator for playing arcade games and experimenting with emulators.', "Practical and useful applications of Rust and WebAssembly, particularly driven by Mozilla, showcasing the real-world impact of the language's capabilities."]}, {'end': 2397.908, 'start': 1894.81, 'title': "Webassembly's impact on javascript", 'summary': 'Discusses the impact of webassembly on javascript, highlighting its performance boost, potential use in various languages, and its role in shaping the future of web development, with predictions for 2018, 2019, and beyond.', 'duration': 503.098, 'highlights': ["WebAssembly provides a significant performance boost compared to JavaScript, with an observed speed improvement of two to three times, making it a compelling choice for performance-critical tasks. The comparison between WebAssembly and JavaScript performance shows that WebAssembly is two to three times faster, offering predictability, as opposed to JavaScript's unpredictable runtime performance.", 'Predictions for 2018 include an increase in creativity and usage of WebAssembly, particularly in languages like Rust and C Sharp, as well as the integration of WebAssembly support in tools like Webpack. The prediction for 2018 involves a surge in creativity and utilization of WebAssembly, especially in languages such as Rust and C Sharp. Additionally, the integration of WebAssembly support in Webpack version 4 is anticipated to drive its adoption.', "Anticipated developments in 2019 include the introduction of garbage collection, host binding, threading, and the rise of UI frameworks tailored for languages like C-Sharp and Java, as well as the potential reduction of JavaScript's dominance. Expected advancements in 2019 encompass the introduction of garbage collection, host binding, threading, and the emergence of UI frameworks designed for languages like C-Sharp and Java. Moreover, a potential decline in JavaScript's dominance is foreseen.", "The future outlook for 2020 and beyond involves the challenge to JavaScript's sole dominance in web development, the possibility of compiling JavaScript directly to WebAssembly, and the projected evolution of JavaScript towards supporting WebAssembly compilation. The future outlook for 2020 and beyond entails the potential challenge to JavaScript's exclusive position in web development, the prospect of compiling JavaScript directly to WebAssembly, and the projected evolution of JavaScript to facilitate WebAssembly compilation."]}], 'duration': 586.341, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/3LWgbjVWLug/pics/3LWgbjVWLug1811567.jpg', 'highlights': ['Rust is positioned to be the language of choice for WebAssembly due to its lack of a garbage collector, making it suitable for compilation to WebAssembly right now.', 'WebAssembly provides a significant performance boost compared to JavaScript, with an observed speed improvement of two to three times, making it a compelling choice for performance-critical tasks.', 'Predictions for 2018 include an increase in creativity and usage of WebAssembly, particularly in languages like Rust and C Sharp, as well as the integration of WebAssembly support in tools like Webpack.', "Anticipated developments in 2019 include the introduction of garbage collection, host binding, threading, and the rise of UI frameworks tailored for languages like C-Sharp and Java, as well as the potential reduction of JavaScript's dominance.", "The future outlook for 2020 and beyond involves the challenge to JavaScript's sole dominance in web development, the possibility of compiling JavaScript directly to WebAssembly, and the projected evolution of JavaScript towards supporting WebAssembly compilation."]}], 'highlights': ["WebAssembly's rapid adoption in major browsers, Node.js, and W3C demonstrated its quick advancement and widespread support within a short timeframe.", "WebAssembly's potential impact: The discussion raises the question of whether WebAssembly will replace JavaScript, considering the extensive usage of JavaScript and the changing web environment.", 'WebAssembly is designed as a stack machine with 4 built-in types, 67 instructions, and support for streaming compilation over HTTP, ensuring fast processing and simple validation rules.', 'Rust is positioned to be the language of choice for WebAssembly due to its lack of a garbage collector, making it suitable for compilation to WebAssembly right now.', 'The performance comparison of WebAssembly and JavaScript using a Mandelbrot rendering test shows that WebAssembly is initially slower but can be optimized to be slightly faster than JavaScript.']}