The video for this talk can be found here:https://channel9.msdn.com/Blogs/raw-tech/Getting-started-with-Emscripten--Transpiling-C--C-to-JavaScript--HTML5
I cover how to transpile code from C/C++ to HTML5/JS using Emscripten, an open source compiler tool from Mozilla and Alon Zakai.
Data Management and Streaming Strategies in Drakensang OnlineAndre Weissflog
One of my older presentations from the Browser Games Forum 2011 about how we're managing data size optimizations and streaming in Drakensang Online. Absolute asset size number are about 3x..4x bigger today, since the game has grown a lot since 2011.
Multiplatform C++ on the Web with EmscriptenChad Austin
IMVU is using Emscripten to bring its multiplatform C++ codebase to web browsers with HTML5 and WebGL. See how Emscripten works, how to use, and what you can expect.
Porting and Maintaining your C++ Game on Android without losing your mindBeMyApp
Presentation from David Wingrove & Katie Merrill from Golden Hammer Software http://www.goldenhammersoftware.com/
From the Barcelona Android User Group meetup: http://www.meetup.com/Barcelona-Android-User-Group/events/166734982/
Docker Amsterdam Summer meetup, August 2014: using Docker at Cloud9 IDE
This talk showcases how we use Docker at c9.io, and highlights some of the challenged we faced in adopting docker for our use case.
Data Management and Streaming Strategies in Drakensang OnlineAndre Weissflog
One of my older presentations from the Browser Games Forum 2011 about how we're managing data size optimizations and streaming in Drakensang Online. Absolute asset size number are about 3x..4x bigger today, since the game has grown a lot since 2011.
Multiplatform C++ on the Web with EmscriptenChad Austin
IMVU is using Emscripten to bring its multiplatform C++ codebase to web browsers with HTML5 and WebGL. See how Emscripten works, how to use, and what you can expect.
Porting and Maintaining your C++ Game on Android without losing your mindBeMyApp
Presentation from David Wingrove & Katie Merrill from Golden Hammer Software http://www.goldenhammersoftware.com/
From the Barcelona Android User Group meetup: http://www.meetup.com/Barcelona-Android-User-Group/events/166734982/
Docker Amsterdam Summer meetup, August 2014: using Docker at Cloud9 IDE
This talk showcases how we use Docker at c9.io, and highlights some of the challenged we faced in adopting docker for our use case.
An absolute beginners guide to node.js . Done for a presentation at college. The presentation contains data from various sources ,sources are noted at the end slide. please inform me any mistakes ,since at that time i was in a bit of hurry :)
Microsoft is working hard to modernize the .NET Platform. There are great new frameworks and tools coming, such as .NET Core and ASP.NET Core. The amount of new things is overwhelming, with multiple .NET Platforms (.NET Framework, Unified Windows Platform, .NET Core), multiple runtimes (CoreCLR, CLR, CoreRT), multiple compilers (Roslyn, RyuJIT, .NET Native and LLILC) and much more. This session will bring you up to speed on all this new Microsoft technology, focusing on .NET Core.
But, we will also take a look at the first framework implementation on top op .NET Core for the Web: ASP.NET Core 1.0. You will learn about ASP.NET Core 1.0 and how it is different from ASP.NET 4.6. This will include Visual Studio 2015 support, cross-platform ASP.NET Core and command-line tooling for working with ASP.NET Core and .NET Core projects.
After this session you know where Microsoft is heading in the near future. Be prepared for a new .NET Platform.
3 Things Everyone Knows About Node JS That You Don'tF5 Buddy
Node.js is server side javascript. Here the complete presentation on Node JS with the 3 Things which everyone knows about Node JS and installation process of it. https://www.f5buddy.com
An absolute beginners guide to node.js . Done for a presentation at college. The presentation contains data from various sources ,sources are noted at the end slide. please inform me any mistakes ,since at that time i was in a bit of hurry :)
Microsoft is working hard to modernize the .NET Platform. There are great new frameworks and tools coming, such as .NET Core and ASP.NET Core. The amount of new things is overwhelming, with multiple .NET Platforms (.NET Framework, Unified Windows Platform, .NET Core), multiple runtimes (CoreCLR, CLR, CoreRT), multiple compilers (Roslyn, RyuJIT, .NET Native and LLILC) and much more. This session will bring you up to speed on all this new Microsoft technology, focusing on .NET Core.
But, we will also take a look at the first framework implementation on top op .NET Core for the Web: ASP.NET Core 1.0. You will learn about ASP.NET Core 1.0 and how it is different from ASP.NET 4.6. This will include Visual Studio 2015 support, cross-platform ASP.NET Core and command-line tooling for working with ASP.NET Core and .NET Core projects.
After this session you know where Microsoft is heading in the near future. Be prepared for a new .NET Platform.
3 Things Everyone Knows About Node JS That You Don'tF5 Buddy
Node.js is server side javascript. Here the complete presentation on Node JS with the 3 Things which everyone knows about Node JS and installation process of it. https://www.f5buddy.com
This talk is about creating Node.js interfaces for native libraries written in C or C++. It starts with various situations in which you need to build native addons and the common problems in doing that. I'll discuss the reference provided by the new N-API (Node-API) that helps mantainers to support a wide variety of Node.js releases without needing recompilation or abstraction layers. With all these tools and knowledge I'll show you how to build some addons from scratch and how to convert existing addons using the new N-API. The last part is related to future developments about addons.
Node.js Native AddOns from zero to hero - Nicola Del Gobbo - Codemotion Rome ...Codemotion
This talk is about creating Node.js interfaces for native libraries written in C or C++. It starts with various situations in which you need to build native addons and the common problems in doing that. I'll discuss the reference provided by the new N-API (Node-API) that helps mantainers to support a wide variety of Node.js releases without needing recompilation or abstraction layers. With all these tools and knowledge I'll show you how to build some addons from scratch and how to convert existing addons using the new N-API. The last part is related to future developments about addons.
Given at zendcon 2007 unconference. My first "talk" ever given. Had a live demo. Note that although some of the information here is still pertinent, a lot is now outdated and most of the links no longer work. This is here for archival reasons
Stealing Chromium: Embedding HTML5 with the Servo Browser Engine (LinuxCon NA...Samsung Open Source Group
Mike Blumenkrantz (Senior Engineer, Samsung Open Source Group), and Lars Bergstrom (Mozilla Research) share their research and implementation of HTML5 within the Servo Browser Engine.
This is a presentation on Google Web Toolkit given at Devfest 2009 in Buenos Aires Argentina on Nov 17, 2009 by Google Developer Advocate, Chris Schalk
In this session you will learn:
Introduction to Java
History of Java
Salient Features of Java
Setting up Environment for Java development
Object Oriented Programming Concepts
For more information: https://www.mindsmapped.com/courses/software-development/become-a-java-developer-hands-on-training/
In this core java training session, you will learn get introduction to Java. Topics covered in this session are:
• History of Java – A Programmer’s Perspective
• Salient Features of Java
• Major Java Editions
For more information about this course visit on this link: https://www.mindsmapped.com/courses/software-development/learn-java-fundamentals-hands-on-training-on-core-java-concepts/
What do the terms serverless, containers, and virtual machines mean? Which should I use to build my app? The answer (as always) is "it depends." In this session learn the tradeoffs between these different approaches, whether you're building your app from scratch or want to move an existing web or mobile application to the cloud. We'll discuss open source tools such as Kubernetes, Istio, and Knative, and we'll discuss Google Cloud Platform tools like Compute Engine, Google Kubernetes Engine (GKE), App Engine, and Cloud Functions.
Developing games for consoles as an indie in 2019David Voyles
I've given this talk several times across the world, and it's largely about the intricate parts of releasing a title in 2019. It covers everything from engines/tools, ESRB & PEGI certifications, and how to build a brand.
I gave this talk during Philly Code Camp 2018.2.
The resources mentioned can be found here: http://www.davevoyles.com/2018/02/11/getting-started-data-science-machine-learning-python/
How to win a hackathon - Penn APps 2015David Voyles
I'll show you how I won hackathons at two Fortune 50 companies (Comcast & Microsoft), as well as point you towards a number of resources, such as free Azure passes, and GitHub repositories to assist you.
How to build and deploy an ASP.NET applicaton.
This entire series can be found here: http://www.davevoyles.com/slides-and-code-for-my-asp-net-presentation/
Running, improving & maintaining a site in the real worldDavid Voyles
How to build and deploy an ASP.NET applicaton. This talk covers how to scale your applications using Azure
This entire series can be found here: http://www.davevoyles.com/slides-and-code-for-my-asp-net-presentation/
Building web front ends using single page applicationsDavid Voyles
How to build and deploy an ASP.NET applicaton.
This entire series can be found here: http://www.davevoyles.com/slides-and-code-for-my-asp-net-presentation/
Web standards and Visual Studio web toolsDavid Voyles
How to build and deploy an ASP.NET applicaton.
This entire series can be found here: http://www.davevoyles.com/slides-and-code-for-my-asp-net-presentation/
Joe Healy - How to set up your DreamSpark accountDavid Voyles
Tech Evangelist Joe Healy (http://www.devfish.net/) put together an excellent slide deck on the benefits of being a publisher on Microsoft platforms, and how Microsoft is working with students.
Using prime[31] to connect your unity game to azure mobile servicesDavid Voyles
Using prime[31] to connect your unity game to azure mobile services. More info at my blog: http://davevoyles.azurewebsites.net/prime31-azure-plugin-win8-wp8-unity-games-part-3/
An Introdouction to Venture Capital and Microsoft VenturesDavid Voyles
A high level overview of the services that Microsoft Ventures provides, what they are looking for, and how you can apply.
Also includes what VC is, how to get started with it, and what VCs are looking for.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
2. JavaScript is standards-based and the only
language that runs in all web browsers
You can run only JavaScript in browsers, but you can
write in another language - if you compile it to
JavaScript
7. Why now?
Plugins outside of HTML5 standards have not received
widespread adoption for both technical and non-technical
reasons
8. Besides, they are on their way out
No plugins for iOS devices, Google nixes NPAPI, etc.
9. This is great for the web! Standards!
JavaScript is a standard, so why not compile to that?
10. Example: gaming on the web
Experience w/ typical games:
• Go to platform-specific store, log in, find game, purchase,
download, install, patch, play
Experience w/ web games:
• www.DaveVoyles.com (Launches the game!)
11. JS then vs JS now
Then: JS began as a slow interpreted language
12. JS then vs JS now
Implicit, statically typed code in JS, just like the competition
13. JS then vs JS now
Now: Asm.js – highly optimized, performant subset of JS
20. What about other libraries?
SDL & OpenGL are implemented viaWeb APIs,
same with musl (Linux)
• Bullet
• Box2D
• Python
• Lua
• Ruby
• zlib
21. Not without its limitations
•64-bit integer math will not work
•No multithreading with shared state
•No Direct3D support, only OpenGL
22. Debugging
This is a problem in general with compiling for
the web. Source maps can help, but browsers do
have more work to do to make debugging
compiled code a smoother experience.
Start with your compiled code.
25. Performance
LLVM
• types & operations map
~1:1 to CPU
• RAII offers Predictability
JS
• virtual machine (VM)
• just in time (JIT) compilers
w/ type profiling
• garbage collection
• Etc.
29. Security concerns (cont’d)
The JS stack is managed and unobservable/unmodifiable by
executing code.
Compiled C++ is immune to some types of buffer overflow attacks
Can be beneficial, though….
30. More speed
Loads in LLVM IR become reads from typed array
(binary data in the browser) in JS, which become reads in
machine code.
31. Why do this?
• Download just parts of the app, stream the rest
• Ex: Star Citizen: 100GB+Vs.Age ofAscent: 50Mb
• Circumvent app stores
• Want to push updates? Just update your web app
• No more 1 week waiting period, iOS
• Distribution through sources other than curated
app stores
• Release apps on your website
35. Generating code
The target file name extension defines the output type to
be generated:
<name> .js : JavaScript.
<name> .html : HTML + separate JavaScript file
(<name>.js). (Having the separate JavaScript file improves
page load time.)
<name> .bc : LLVM bitcode (default).
36. Porting process
emcc is a drop-in replacement for gcc or clang
In many cases, you can use your normal build
system, plug in emcc
37. Porting process
emcc is a drop-in replacement for gcc or clang
In many cases, you can use your normal build
system, plug in emcc
38. Connecting C / C++ and JS
Call compiled C++ classes from JavaScript using bindings created with:
• Embind orWebIDL-Binder
Call compiled C functions from normal JavaScript:
• Using ccall or cwrap.
• Using direct function calls (faster but more complicated).
Call JavaScript functions from C/C++:
• Using emscripten_run_script().
• Using EM_ASM() (faster).
• Using a C API implemented in JavaScript.
• As function pointers from C.
• Using the Embind val class.
39. Why not just turn your JavaScript
code into asm.js?
Run-time type checking takes time.
40. Why not just turn your JavaScript
code into asm.js?
In statically typed languages, such as C, the
compiler knows the type of each object when it
is being compiled.
41. Offline experience
• IndexedDB
• Local database of records, holding simple values and
hierarchical objects
• AppCache
• Offline browsing, stores content on the disk instead of
network
• Service Workers
• Coming soon
45. Unity WebGL Benchmarks
• In benchmarks which stressWebGL rendering performance (Particles,
Asteroid Field), Edge performs best of all tested browsers.
• When you are mostly GPU-bound, you can expect WebGL to perform
very similar to native code.
• In some areas,WebGL will actually outperform native code
significantly. (Mandlebrot & Cryptohash)
• Native code can still be several times faster thanWebGL for areas
heavily optimized to use multi-threading and/or SIMD, such as the 3D
physics tests.
46. Case study: Owlchemy Labs
• 200+ levels
• 300 assets can be spawned a runtime
• 38 full length songs
• 1 million lines of JavaScript
• WebGL build (With Unity engine!) = 68.8Mb
• PC build = 192 Mb
49. What goes in must come out
When you build a WebGL project, Unity will create a folder with
the following files:
• index.html file that embeds your content in a web page.
• JavaScript file containing the code for your player.
• .mem file containing a binary image to initialize the heap
memory for your player.
• .data file containing the asset data and scenes.
• some supporting JavaScript files to initialize and load the
player.
50. Some missing features
• Networking other thanWWW class (a WebSockets plug-in is
available)
• Support for WebCam and Microphone access
• Threads
• Any .NET features requiring dynamic code generation
• Runtime generation of Substance textures
51. Conclusion
The advantages of porting C/C++ to JavaScript are
clear:
• Often a smaller package size
• Easily demo or share projects on the web
• Reuse existing code
52.
53. References
Thank you to Alon Zakai (@Kripken)and his
wonderful work on the project!
• http://twvideo01.ubm-
us.net/o1/vault/gdconline12/Presentations/Emscripten%20(pt%201).pdf
• https://www.reddit.com/r/programming/comments/2k3b4j/alon_zakai_emscripten_and_as
mjs_cs_role_in_the/http://llvm.org/devmtg/2013-11/slides/Zakai-Emscripten.pdf
• http://llvm.org/devmtg/2013-11/slides/Zakai-Emscripten.pdf
Editor's Notes
The Low Level Virtual Machine (LLVM) is a library that is used to construct, optimize and produce intermediate and/or binary machine code.
It can be used as a compiler framework, where you provide the "front end" – Clang- (parser and lexer) and the "back end" (code that converts LLVM's representation to actual machine code).
Starting in 2005, Apple has made extensive use of LLVM in a number of commercial systems,[6] including theiPhone development kit and Xcode 3.1GLSL, and others.
Subset of JavaScript, largely led by Mozilla, and specifically Alon Zakai and Luke Wagner
The principal benefit of asm.js over whole new technologies like NaCl and PNaCl is that it works today: existing JavaScript engines already optimize this style of code quite well.Plan is to keep optimizing JIT compilers, but JIT compilers have less predictable performance based on complicated heuristics. The asm.js model provides a model closer to C/C++ by eliminating dynamic type guards, boxed values, and garbage collection.
- Box Values: data structures that are minimal wrappers around primitive types*. Boxed values are typically stored as pointers to objects on the heap.
Emscripten is an LLVM based project that compiles C and C++ into highly performant JavaScript in the asm.js format. In short: near native speeds, using C and C++, inside of the browser. Even better, emscripten converts OpenGL, a desktop graphics API, into WebGL, which is the web variant of that API.
JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data. As you already know, Array objects grow and shrink dynamically and can have any JavaScript value. JavaScript engines perform optimizations so that these arrays are fast.
JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data. As you already know, Array objects grow and shrink dynamically and can have any JavaScript value. JavaScript engines perform optimizations so that these arrays are fast.
This operator allows inserting expressions that produce side effects into places where an expression that evaluates to undefined is desired.
The void operator is often used merely to obtain the undefined primitive value, usually using "void(0)" (which is equivalent to "void 0"). In these cases, the global variable undefined can be used instead (assuming it has not been assigned to a non-default value).
Emscripten mplements C++ exceptions using JS exceptions, JS VM provides stack unwinding
Perf depends on the speed of JS exceptions
We build for a 32-bit target, because 64-bit integers cannot all fit in doubles (but 32-bit ones can)
Resource Acquisition Is Initialization (RAII) is a programming idiom used in several object-oriented languages, most prominently C++, where it originated, but also D, Ada, Vala, and Rust.
n RAII, holding a resource is tied to object lifetime: resource allocation (acquisition) is done during object creation (specifically initialization), by the constructor, while resource deallocation (release) is done during object destruction, by thedestructor. If objects are destroyed properly, resource leaks do not occur.
Having a single build does prevent some optimizations, though
Applications must ship their own system libraries.
Emscripten "fakes" a filesystem to make porting easy.
Applications must ship their own system libraries.
Emscripten "fakes" a filesystem to make porting easy.
JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data. A Typed Array is a slab of memory with a typed view into it, much like how arrays work in C. Because a Typed Array is backed by raw memory, the JavaScript engine can pass the memory directly to native libraries without having to painstakingly convert the data to a native representation. As a result, typed arrays perform a lot better than JavaScript arrays for passing data to WebGL and other APIs dealing with binary data.
Typed array views act like single-type arrays to a segment of an ArrayBuffer. There are views for all the usual numeric types, with self-descriptive names like Float32Array, Float64Array, Int32Array and Uint8Array.
This is a pretty common question. The one I hear most though is “who would want to download a 60MB website? And you’re right — 60mb for a website is massive!
But I suppose the same people who are downloading gigabytes worth of video content from YouTube and Netflix each day are those same people.
Jonas Echterhoff pointed out that in Untiy, streaming assets is already possibly by using AssetBundles. Alternatively, you can try this Asset Store package, which repackages the WebGL build data, so that scenes in your build are split across multiple files, and your content can start once the first scene is loaded.
CanIUse.com
I know what you’re thinking. “This is great, but if there isn’t any sort of interoperability between my C++ and JavaScript, then this isn’t very useful.” Fortunately, there is!
JavaScript can’t really be compiled to asm.js and offer much of a benefit, because of its dynamic nature. It’s the same problem as when trying to compile it to C or even to native code – a VM with it would be necessary to take care of those non-static aspects. You could write asm.js by hand, however.
To better understand this, it is important to comprehend why asm.js offers a performance benefit at all; or why statically-typed languages perform better than dynamically-typed ones. One reason is “run-time type checking takes time,” and a more thought out answer would include the enhanced feasibility of optimizing statically-typed code. A final perk of going from a statically typed language such as C is the fact that the compiler knows the type of each object when it is being compiled.
JavaScript can’t really be compiled to asm.js and offer much of a benefit, because of its dynamic nature. It’s the same problem as when trying to compile it to C or even to native code – a VM with it would be necessary to take care of those non-static aspects. You could write asm.js by hand, however.
To better understand this, it is important to comprehend why asm.js offers a performance benefit at all; or why statically-typed languages perform better than dynamically-typed ones. One reason is “run-time type checking takes time,” and a more thought out answer would include the enhanced feasibility of optimizing statically-typed code. A final perk of going from a statically typed language such as C is the fact that the compiler knows the type of each object when it is being compiled.
It would be wise to have a mix of local and remote content for your app. Technologies like IndexedDB, localStorage, and AppCache, which are supported by Microsoft Edge, allow for this. A number of browsers support all of these technologies as well, including Firefox and Chrome. A local page can be kept in your app package that can still provide a basic offline experience. Finally, Service Workers are a useful option for offline caching, too. Matt Gaunt has a fantastic article on Service Workers.
http://beta.unity3d.com/jonas/WebGLBenchmark/
http://beta.unity3d.com/jonas/WebGLBenchmark/
http://beta.unity3d.com/jonas/benchmark2015/
http://blogs.unity3d.com/2015/12/15/updated-webgl-benchmark-results/#comment-239858
Here are the overall scores of the different browsers running the benchmark suite on an Windows 10 machine with a 3.3.GHz i7 CPU and an Nvidia GTX 960 GPU
some common performance-enhancing techniques, like multi-threading and SIMD, are not available yet; and we are relying on a completely new scripting runtime, IL2Cpp, to run user script code. So we need to find out: Will it be fast enough to play games?
This is the case for tests which rely a lot on script performance (Mandelbrot and CryptoHash, both implement their algorithms in C#).
The team at Owlchemy labs converted their game Aaaaa! In 2014 and put together a great postmortem about the process. Using the pre-alpha version of the WebGL exporter in June of last year, they were able to take all of their C# code and turn it into one JavaScript file which was more than 1 million lines of code long!
Not just for games.Architecture too. Dozens of these online.Unreal Engine 4 -> HTML5
Source: Brendan Eich
Many of these slides were compiled from information I’ve gathered from Alon Zakai’s presentations online, but in powerpoint and video form.