Your SlideShare is downloading. ×
0
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
JavaScript: The Machine Language of the Ambient Computing Era
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

JavaScript: The Machine Language of the Ambient Computing Era

2,798

Published on

Keynote Presentation at Front-Trends 2013 …

Keynote Presentation at Front-Trends 2013
Warsaw, Poland
April 5, 2013

We are well into the transition away from PC centric computing. But the new order isn't just about mobile phones and tables. It's about all of us living in a world that is augments by the ambient presence of billions of computing devices. And they're all going to be programming using JavaScript! Well, at least a lot of them will be. In this presentation I'll be discussing how JavaScript is changing the world, and how the world is changing JavaScript..

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,798
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • From this perspective, I think we’ve only had two computing era so for.The first era of computing started with in invention of stored program computer in the late 1940’s and really began to take of in the mid-1950’s. The first computers were large and expensive and could only be bought and operated by the largest private and government enterprises. Much of the focus of the early computing industry was on discovering how computers could be used to improve organization efficiency. The payback from such improvements were necessary to justify the great expensing of acquiring, programming, and operating such machine. Many such uses were found and by the late 1970’s virtually every enterprise with more than a few dozen employees either had an in-house computer or were making extensive use of external computing services. The first Era of computing was about were made corporations more efficient.Starting in the late 1970s the use of computer began to shift to supporting individual tasks. People would go to “their” computer and use it to accomplish some task. Note that the end of a computing era doesn’t means that we stop using computer for that era’s goals. Those uses continue on into the new era. A new era is about as shift in the primary focus and use cases of computing. So, if we are really entering a new computing era there must be a new focus for coputing. It must be empower something new. What is it?
  • Be a better language for writing:complex applications;libraries (including the DOM) shared by those applications;code generators targeting the new edition.Testable specification and implementations.Improve interoperation, adopting de facto standards where possible.Keep versioning as simple and linear as possible.Support a statically verifiable, object-capability secure subset.
  • Transcript

    • 1. JavaScript: The Machine Language ofthe Ambient Computing EraTalk, by Allen Wirfs-BrockMozilla Research FellowProject Editor, Ecma-262 (The JavaScript Standard)@awbjsFront-trends 2013, Warsaw 2011, April 25, 2013We are well into the transition away from PC centric computing. But the new order isnt justabout mobile phones and tables. Its about all of us living in a world that is augments by theambient presence of billions of computing devices. And theyre all going to be programmingusing JavaScript! Well, at least a lot of them will be. In this presentation Ill be discussing howJavaScript is changing the world, and how the world is changing JavaScript..
    • 2. The Rise and Fall of Personal Computinghttp://www.asymco.com/2012/01/17/the-rise-and-fall-of-personal-computing/
    • 3. A New Era of Computing?1950 1960 2000 2010 2020199019801970SocietalImpactCorporate ComputingPersonal ComputingComputersempower/enhanceenterprise tasksComputersempower/enhanceindividuals’ tasks AmbientComputingComputersempower/enhance
    • 4. Every Computing Era Has aDominant Application Platforms• Corporate Computing Era: IBM Mainframes• Personal Conmputing Era: Microsoft/Intel PC• Ambient Computing Era: The Web is the Platform?Created by Market Demand,“Good Enough” Technical Foundation,and Superior Business Execution
    • 5. Each Computing Era has had CanonicalProgramming Languages• Corporate Computing Era – COBOL/Fortran• Personal Computing Era – C/C++ family• Ambient Computing Era – JavaScript ??
    • 6. Why JavaScript?The economics of ubiquity. It’s already there Widest reach Lowest risk Write libraries and apps once Single knowledge and skill set http://odetocode.com/Blogs/scott/archive/2009/03/18/signs-that-your-javascript-skills-need-updating.aspxBecause “Worse is Better”Dick Grabrielhttp://www.dreamsongs.com/WorseIsBetter.htmlIs it even possible to replace it?
    • 7. The Web Is the PlatformRenderingLayoutStylingNetwork LocalstorageUserInputLanguage RuntimeHTML CSS SVGJavaScriptFrameworks and LibrariesThe WebApplicationPlatform
    • 8. Firefox OS on Raspberry Pihttp://www.philipp-wagner.com/ffos-for-rpi/manual/index.htmlhttp://www.philipp-wagner.com/blog/2013/04/firefox-os-for-raspberry-pi-now-available/http://www.philipp-wagner.com/ffos-for-rpi/download/rpi-b2g-image-raspberrypi-20130411092136.rootfs.rpi-sdimg.bz2
    • 9. But what about…Answer: Functionality and Performance
    • 10. MultitouchAccelerometerCamerasSpeakerMicrophoneBluetoothHardware Keys Light SensorNFCUSB AccessVibration MotorProximity SensorGyroFunctionality
    • 11. Communications APIsBluetoothMobile ConnectionNetwork ConnectionNetwork StatsTCO SocketTelephonyWebSMSWiFi InfoPush NotificationNFCWebRTCHardwareAccess APIsAmbient Light SensorBattery StatusCameraPointer LockProximityScreen OrientationVibrationWebFMGeoLocationUSBAlarmApp ManagementIdle PermissionsTime/ClockWebPaymentDevice StorageContactsCalandarApp Services APIs
    • 12. Performance: Parallel JSData parallelism for JavaScript• Goal: exploit multiple-cores, vector instructions, GPUs• Design based upon Intel’s “Rivertrail” prototype• On standardization track• Experimental implementation now in Firefox Nightlyhttp://wiki.ecmascript.org/doku.php?id=strawman:data_parallelism
    • 13. Parallel JS Examplefunction averageSavingsAterAge(peopleData, age) {age = +age;var peeps = new ParallelArray(peopleData);var pop = peeps.filter(function(person) {return person.age>age});var totalSavings =pop.reduce(function(subtotal,person) {return subtotal+person.savings});return totalSavings / pop.size;}
    • 14. • Subset of JavaScript thatapproximates a classic VonNeumann computer• asm.js code executesidentically on any Javascriptengine• But a JS engine mayrecognize asm.js code andoptimize for it.• asmjs.org• https://wiki.mozilla.org/Javascript:SpiderMonkey:OdinMonkeyasm.js – C level Performance
    • 15. C++ to JavaScriptC++sourcecodeClang: C++CompilerFront-endLLVMBitcodeLLVMOptimizerJavaScript(asm.js)sourcecodeJavaScriptEngine (asm.jsaware)JavaScript(asm.js)sourcecodeDevelopment TimeApp Run TimeEmscrptenBetterLLVMBitcode
    • 16. Source: Alon Zakai (@kripken)http://kripken.github.com/mloc_emscripten_talk
    • 17. Why not a web bytecode engine?asm.js code is just YAIR(Yet Another Intermediate Representation)function strlen(ptr) {ptr = ptr|0;var curr = 0;curr = ptr;while (MEM8[curr]|0 != 0) {curr = (curr + 1)|0;}return (curr - ptr)|0;}func strlenparam ptr, int32local curr, int32, ptrlabel loopindex8 indx, heap, currread next, indxbne next, exitadd curr, curr, 1goto looplabel exitsub tmp, curr, ptrreturn sub
    • 18. What is ECMAScript?• ECMAScript is the name of theinternational standard that definesJavaScript• Developed by Technical Committee 39(TC-39) of Ecma International• Issued as a Ecma-262 and ISO/IEC16262• Not part of W3CGoogle Mozilla Microsoft WebkitV8 SpiderMonkey Chakra JSCoreJavaScript Implementations
    • 19. ECMAScript 6 (and beyond)Goalshttp://wiki.ecmascript.org/doku.php?id=harmony:harmony1. Be a better language for:A. complex applications;B. libraries (including the DOM) shared bythose applications;C. code generators targeting the new edition.2. …
    • 20. What Kind of Language IsJavaScript?• Functional?• Object-oriented?• Class-based?• Prototype-based?• Permissive?• Secure?Photo by crazybarefootpoet @ flickr (CC BY-NC-SA 2.0)
    • 21. ECMAScript 6Functional Programming• Arrow functions• Comprehensions• Generators• Tail callsObject-oriented Programming• Class declarations• Concise methods syntax• Super calls• Subclassable built-insES6Feature complete draft December 2013Approved Standard December 2014ES6 Schedule:
    • 22. Arrow Functionsvar pop = peeps.filter(function(person) {return person.age>age});var pop = peeps.filter(person => person.age>age);Becomes:
    • 23. var self = this;var pop = peeps.filter(function(person) {return person.age>self.age});Arrow FunctionsBecomes:var pop = peeps.filter(person => person.age>this.age);
    • 24. Classes Today//define Employee as a subclass of Personfunction Employee(name,id) {Person.call(name);this.id = id;}Employee.prototype=Object.create(Person.prototype);Object.defineProperty(Employee.prototype, “constructor”,{value:Employee,enumerable:false,configurable: true});Employee.__proto__ = Person;Employee.prototype.hire = function() {…};Employee.prototype.fire = function () {…};…
    • 25. Classes in ES6//ES6 define Employee as subclass of Personclass Employee extends Person {constructor(name,id) {super(name);this.id = id;}hire () {…}fire () {…}…}
    • 26. Classes Today vs ES6//define Employee as subclass of Personfunction Employee(name,id) {Person.call(name);this.id = id;}Employee.prototype=Object.create(Person.prototype);Object.defineProperty(Employee.prototype, “constructor”,{value:Employee,enumerable:false,configurable: true});Employee.__proto__ = Person;Employee.prototype.hire = function() {…};Employee.prototype.fire = function () {…};…//ES6 define Employee as subclass of Personclass Employee extends Person {constructor(name,id) {super(name);this.id = id;}hire () {…}fire () {…}…}
    • 27. The Rise and Fall of Personal Computinghttp://www.asymco.com/2012/01/17/the-rise-and-fall-of-personal-computing/
    • 28. The Rise and Fall of Ambient Computing2005 2008 2011 2014 2017 2020 2023 2026 2029 2032 2035 2038 2041 2044 2047 2050
    • 29. We’re all collectively creatinga new era of computing.Enjoy it!Own it!
    • 30. WarsawSaturday, June 1, 2013Apply to attendhttp://bit.ly/FxOSAppWorkshop-applyMore infohttps://hacks.mozilla.org/2013/03/firefox-os-app-workshops/• For skilled JavaScript/HTML5 Developers• Turn your site or webapp into a Firefox OS App• Take home a phone!

    ×