SlideShare a Scribd company logo
1 of 20
FooLang.js
{   Amjad Masad
    @amjad_masad
“By evoking the need for deep conceptual
 hierarchies, the automatic computer confronts us
 with a radically new intellectual challenge that
 has no precedent in our history.”

 “ I don’t know of any other technology covering a
 ratio of 10^10”

                 -Edsger Dijkstra


On the education of
Computer Science
   We need to remove the barrier to entry for
     aspiring programmers.
    Portability.
    Computer Science is an abstract science.
    Its incredibly easy to lose motivation.
    The instant gratification of seeing our programs
     run is what keeps us going.




Make it easy to start
   Instant feedback.
      Highly valuable for interactive learning and
       playing.
      People are rediscovering their power.




Interactive environments
        or REPLs
   Dreamt of a portable browser based REPL that
        is accessible from any device with a browser.
       We spent a good chunk of last year working on
        bringing a good number of programming
        languages to the browser.
        The result was http://repl.it/ about 17
        programming languages in one page in the
        browser.
       Written entirely in JavaScript under a unified
        API library called “jsrepl”.




Browser REPLs
https://github.com/replit/jsrepl


How cool is that?
   Why not do it like everyone else on the server?
       Fast, no round-trip to the server for eval.
       Security, not worry about sandboxing
        languages on the server.
       Scalability and availability.
       Can work offline.
       Hack value.




Why bother?
Turns out it’s a very good compilation target.

      “JS is the x86 of the Web”
                                                   Brendan Eich


      “We had always thought that Java’s JVM would be the
      VM of the web, but it turns out that it’s JavaScript.
      JavaScript’s parser does a more efficient job of providing
      code security than the JVM’s bytecode verifier. JavaScript
      did a better job of keeping the write once, run everywhere
      promise.”
                                                Douglas Crockford




JavaScript the accidental webVM
   CoffeeScript
       Roy
       ClojureScript
       Sync -> async (TameJS, StratifiedJS)

       Emscripten
       JSIL

    List goes on…
    https://github.com/jashkenas/coffee-script/wiki/List-of-
    languages-that-compile-to-JS




Examples
   Types
           Typed Arrays (Already landed in webkit and
            FF).
           Binary Data.
       Proper tail calls.
       Synchronous wait.
           Continuations?
           Coroutines?
           Generators?
           Proper tail calls?




Could be even better!
   Most programming languages expect stdin to
        be blocking.
       JavaScript has a blocking stdin:
        window.prompt
           It’s not available in Web Workers.
           It’s ugly and not customizable.
           So 90’s




Case study: stdin
   Essentially means instead of returning results
        from functions you just pass them to another
        function.
       Also means taking control of the call stack.
       Free to stop any operation at any time and
        continue at a later time.




Possible Solution: CPS
BF
CPS’ed
BF
Trampolined CPSed BF
“Part of the beauty of JavaScript’s event loop is
   that there’s a very clear synchronization point for
   reaching a stable state in your programs.”
                                         Dave Herman




WHY NO
COROUTINES!?
BF Using generators
   Better error messages
        Static code analysis
        Take control of the environment.
        Demo of running and debugging JavaScript in
         JavaScript




So what’s next for us?
Thank You!

More Related Content

What's hot

Node.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloudNode.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloudJimish Parekh
 
Roundup presentation
Roundup presentationRoundup presentation
Roundup presentationmattgrommes
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013Valeri Karpov
 
Nashorn, what is the whole buzz about
Nashorn, what is the whole buzz aboutNashorn, what is the whole buzz about
Nashorn, what is the whole buzz aboutMichał Gruca
 
Nashorn, what is the whole buzz about #4developers
Nashorn, what is the whole buzz about #4developersNashorn, what is the whole buzz about #4developers
Nashorn, what is the whole buzz about #4developersMichał Gruca
 
Imagination's the Limit: Microservices in Node.js
Imagination's the Limit: Microservices in Node.jsImagination's the Limit: Microservices in Node.js
Imagination's the Limit: Microservices in Node.jsEric Nograles
 
NodeJS_Presentation
NodeJS_PresentationNodeJS_Presentation
NodeJS_PresentationArpita Patel
 
Ruby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay ShanghaiRuby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay ShanghaiJackson Tian
 
Unleash and Empower Your Engineers
Unleash and Empower Your EngineersUnleash and Empower Your Engineers
Unleash and Empower Your EngineersJeff Harrell
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.jsEdy Segura
 
Architecture of web servers
Architecture of web serversArchitecture of web servers
Architecture of web serversNicolas Vanhoren
 
Why Puppet Sucks - Rob Terhaar
Why Puppet Sucks - Rob TerhaarWhy Puppet Sucks - Rob Terhaar
Why Puppet Sucks - Rob TerhaarDatadog
 
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBWeb aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBRaimonds Simanovskis
 
What the HTML? - The Holy Grail
What the HTML? - The Holy GrailWhat the HTML? - The Holy Grail
What the HTML? - The Holy GrailJames Ford
 
S&T What I know about Node 110817
S&T What I know about Node 110817S&T What I know about Node 110817
S&T What I know about Node 110817Dan Dineen
 
The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)danwrong
 

What's hot (20)

Node.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloudNode.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloud
 
Continuous operations in AWS
Continuous operations in AWSContinuous operations in AWS
Continuous operations in AWS
 
Roundup presentation
Roundup presentationRoundup presentation
Roundup presentation
 
MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013MEAN Stack - Google Developers Live 10/03/2013
MEAN Stack - Google Developers Live 10/03/2013
 
Nashorn, what is the whole buzz about
Nashorn, what is the whole buzz aboutNashorn, what is the whole buzz about
Nashorn, what is the whole buzz about
 
Nashorn, what is the whole buzz about #4developers
Nashorn, what is the whole buzz about #4developersNashorn, what is the whole buzz about #4developers
Nashorn, what is the whole buzz about #4developers
 
Imagination's the Limit: Microservices in Node.js
Imagination's the Limit: Microservices in Node.jsImagination's the Limit: Microservices in Node.js
Imagination's the Limit: Microservices in Node.js
 
NodeJS_Presentation
NodeJS_PresentationNodeJS_Presentation
NodeJS_Presentation
 
Ruby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay ShanghaiRuby vs Node ShiningRay Shanghai
Ruby vs Node ShiningRay Shanghai
 
Forseti driven javascript
Forseti driven javascriptForseti driven javascript
Forseti driven javascript
 
Unleash and Empower Your Engineers
Unleash and Empower Your EngineersUnleash and Empower Your Engineers
Unleash and Empower Your Engineers
 
Introduction to Node.js
Introduction to Node.jsIntroduction to Node.js
Introduction to Node.js
 
Nodejs
NodejsNodejs
Nodejs
 
Architecture of web servers
Architecture of web serversArchitecture of web servers
Architecture of web servers
 
Why Puppet Sucks - Rob Terhaar
Why Puppet Sucks - Rob TerhaarWhy Puppet Sucks - Rob Terhaar
Why Puppet Sucks - Rob Terhaar
 
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DBWeb aplikāciju izstrāde ar Ruby on Rails un Oracle DB
Web aplikāciju izstrāde ar Ruby on Rails un Oracle DB
 
Javascript
JavascriptJavascript
Javascript
 
What the HTML? - The Holy Grail
What the HTML? - The Holy GrailWhat the HTML? - The Holy Grail
What the HTML? - The Holy Grail
 
S&T What I know about Node 110817
S&T What I know about Node 110817S&T What I know about Node 110817
S&T What I know about Node 110817
 
The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)The Mysteries Of JavaScript-Fu (@media SF Edition)
The Mysteries Of JavaScript-Fu (@media SF Edition)
 

Viewers also liked

Generación electrónica mirtha 01
Generación electrónica mirtha 01Generación electrónica mirtha 01
Generación electrónica mirtha 01javiercovis
 
Engaged Scholarship Joining the Conversation
Engaged Scholarship Joining the ConversationEngaged Scholarship Joining the Conversation
Engaged Scholarship Joining the ConversationJeff Knapp
 
Speak up wpwvc acrl 2012-06-01
Speak up wpwvc acrl 2012-06-01Speak up wpwvc acrl 2012-06-01
Speak up wpwvc acrl 2012-06-01Jeff Knapp
 

Viewers also liked (7)

Modelos de motos
Modelos de motosModelos de motos
Modelos de motos
 
Generación electrónica mirtha 01
Generación electrónica mirtha 01Generación electrónica mirtha 01
Generación electrónica mirtha 01
 
HOME
HOMEHOME
HOME
 
Ejercicio 26
Ejercicio 26Ejercicio 26
Ejercicio 26
 
Engaged Scholarship Joining the Conversation
Engaged Scholarship Joining the ConversationEngaged Scholarship Joining the Conversation
Engaged Scholarship Joining the Conversation
 
Speak up wpwvc acrl 2012-06-01
Speak up wpwvc acrl 2012-06-01Speak up wpwvc acrl 2012-06-01
Speak up wpwvc acrl 2012-06-01
 
Modelos de carros
Modelos de carrosModelos de carros
Modelos de carros
 

Similar to Foolangjs

Step by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For BeginnersStep by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For Beginnerscalltutors
 
Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?jbandi
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014jbandi
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyBishan Singh
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteChristian Heilmann
 
Powerful tools for building web solutions
Powerful tools for building web solutionsPowerful tools for building web solutions
Powerful tools for building web solutionsAndrea Tino
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsSpike Brehm
 
Dconrails Gecco Presentation
Dconrails Gecco PresentationDconrails Gecco Presentation
Dconrails Gecco PresentationJuan J. Merelo
 
Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?martinlippert
 
Universal Applications with Universal JavaScript
Universal Applications with Universal JavaScriptUniversal Applications with Universal JavaScript
Universal Applications with Universal JavaScriptThomas Joseph
 
Java Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemJava Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemWill Iverson
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the restgeorge.james
 
Designing nlp-js-extension
Designing nlp-js-extensionDesigning nlp-js-extension
Designing nlp-js-extensionAlain Lompo
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornMaxime Najim
 
Minko - Build WebGL applications with C++ and asm.js
Minko - Build WebGL applications with C++ and asm.jsMinko - Build WebGL applications with C++ and asm.js
Minko - Build WebGL applications with C++ and asm.jsMinko3D
 
Node.js #digpen presentation
Node.js #digpen presentationNode.js #digpen presentation
Node.js #digpen presentationGOSS Interactive
 
Groovy - Why and Where?
Groovy  - Why and Where?Groovy  - Why and Where?
Groovy - Why and Where?Naresha K
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise ApplicationsDaniel Oh
 

Similar to Foolangjs (20)

Coffee script throwdown
Coffee script throwdownCoffee script throwdown
Coffee script throwdown
 
Step by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For BeginnersStep by Step Guide on Essay Format in APA For Beginners
Step by Step Guide on Essay Format in APA For Beginners
 
Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?Java & JavaScript: Best Friends?
Java & JavaScript: Best Friends?
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014
 
Node Security: The Good, Bad & Ugly
Node Security: The Good, Bad & UglyNode Security: The Good, Bad & Ugly
Node Security: The Good, Bad & Ugly
 
Quo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynoteQuo vadis, JavaScript? Devday.pl keynote
Quo vadis, JavaScript? Devday.pl keynote
 
Powerful tools for building web solutions
Powerful tools for building web solutionsPowerful tools for building web solutions
Powerful tools for building web solutions
 
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript AppsIn Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
In Pursuit of the Holy Grail: Building Isomorphic JavaScript Apps
 
Dconrails Gecco Presentation
Dconrails Gecco PresentationDconrails Gecco Presentation
Dconrails Gecco Presentation
 
Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?Browser and Cloud - The Future of IDEs?
Browser and Cloud - The Future of IDEs?
 
Universal Applications with Universal JavaScript
Universal Applications with Universal JavaScriptUniversal Applications with Universal JavaScript
Universal Applications with Universal JavaScript
 
Java Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky ProblemJava Tools and Techniques for Solving Tricky Problem
Java Tools and Techniques for Solving Tricky Problem
 
Web Development Environments: Choose the best or go with the rest
Web Development Environments:  Choose the best or go with the restWeb Development Environments:  Choose the best or go with the rest
Web Development Environments: Choose the best or go with the rest
 
Designing nlp-js-extension
Designing nlp-js-extensionDesigning nlp-js-extension
Designing nlp-js-extension
 
Isomorphic JavaScript with Nashorn
Isomorphic JavaScript with NashornIsomorphic JavaScript with Nashorn
Isomorphic JavaScript with Nashorn
 
Minko - Build WebGL applications with C++ and asm.js
Minko - Build WebGL applications with C++ and asm.jsMinko - Build WebGL applications with C++ and asm.js
Minko - Build WebGL applications with C++ and asm.js
 
Node.js #digpen presentation
Node.js #digpen presentationNode.js #digpen presentation
Node.js #digpen presentation
 
Node.JS briefly introduced
Node.JS briefly introducedNode.JS briefly introduced
Node.JS briefly introduced
 
Groovy - Why and Where?
Groovy  - Why and Where?Groovy  - Why and Where?
Groovy - Why and Where?
 
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications[RHFSeoul2017]6 Steps to Transform Enterprise Applications
[RHFSeoul2017]6 Steps to Transform Enterprise Applications
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Foolangjs

  • 1. FooLang.js { Amjad Masad @amjad_masad
  • 2. “By evoking the need for deep conceptual hierarchies, the automatic computer confronts us with a radically new intellectual challenge that has no precedent in our history.” “ I don’t know of any other technology covering a ratio of 10^10” -Edsger Dijkstra On the education of Computer Science
  • 3. We need to remove the barrier to entry for aspiring programmers.  Portability.  Computer Science is an abstract science.  Its incredibly easy to lose motivation.  The instant gratification of seeing our programs run is what keeps us going. Make it easy to start
  • 4. Instant feedback.  Highly valuable for interactive learning and playing.  People are rediscovering their power. Interactive environments or REPLs
  • 5. Dreamt of a portable browser based REPL that is accessible from any device with a browser.  We spent a good chunk of last year working on bringing a good number of programming languages to the browser.  The result was http://repl.it/ about 17 programming languages in one page in the browser.  Written entirely in JavaScript under a unified API library called “jsrepl”. Browser REPLs
  • 7. Why not do it like everyone else on the server?  Fast, no round-trip to the server for eval.  Security, not worry about sandboxing languages on the server.  Scalability and availability.  Can work offline.  Hack value. Why bother?
  • 8. Turns out it’s a very good compilation target. “JS is the x86 of the Web” Brendan Eich “We had always thought that Java’s JVM would be the VM of the web, but it turns out that it’s JavaScript. JavaScript’s parser does a more efficient job of providing code security than the JVM’s bytecode verifier. JavaScript did a better job of keeping the write once, run everywhere promise.” Douglas Crockford JavaScript the accidental webVM
  • 9. CoffeeScript  Roy  ClojureScript  Sync -> async (TameJS, StratifiedJS)  Emscripten  JSIL List goes on… https://github.com/jashkenas/coffee-script/wiki/List-of- languages-that-compile-to-JS Examples
  • 10. Types  Typed Arrays (Already landed in webkit and FF).  Binary Data.  Proper tail calls.  Synchronous wait.  Continuations?  Coroutines?  Generators?  Proper tail calls? Could be even better!
  • 11. Most programming languages expect stdin to be blocking.  JavaScript has a blocking stdin: window.prompt  It’s not available in Web Workers.  It’s ugly and not customizable.  So 90’s Case study: stdin
  • 12. Essentially means instead of returning results from functions you just pass them to another function.  Also means taking control of the call stack.  Free to stop any operation at any time and continue at a later time. Possible Solution: CPS
  • 13. BF
  • 15.
  • 17. “Part of the beauty of JavaScript’s event loop is that there’s a very clear synchronization point for reaching a stable state in your programs.” Dave Herman WHY NO COROUTINES!?
  • 19. Better error messages  Static code analysis  Take control of the environment.  Demo of running and debugging JavaScript in JavaScript So what’s next for us?

Editor's Notes

  1. Hi. I’m Amjad Masad. I work at Codecademy and we build our educational platform on top of the web platform. I’m going to start this talk by talking about why I think computer science education needs to be rethought.And then talk about our attempt at doing that and how we use JavaScript mainly to do that.
  2. Dijkstra had some thoughts on teaching computer science. Even though he was completely pessimistic and I don’t agree with him on the solutions he offered. But I think he explained the problem really well. [SAY QUOTES]He wrote a paper which he called “On the cruelty of teaching computer science” which both these quotes come from.He talks about how we should approach computer science as a whole new different thing which he calls “Radical Novelty” and try to approach it with a blank mind and refuse to link it to what's familiar to us.I think we indeed have a problem and a huge one. Why else would we need a ridiculous programming task like fizzbuzz to weed out the non-programmers of the computer science graduates applying to jobs which happens to be 99%.Approaching computer science like any other discipline and use the text book approach is in my opinion completely wrong. We should try to come up and experiment with new ways of teaching programming that is both intuitive and not misleading to the student.And to do that I think we should look into ourselves. Because the answer is buried somewhere deep down in us programmers.
  3. You know how when you’re learning a new technology, framework or library you just look for the getting started part. At least I do.When you’re writing documentation for your library or framework you also put in a getting started section.This is sort of like possession is nine-tenth of the law. I think it’s human nature. Getting started and seeing yourself actually dabbling in whatever your trying to learn gives the motivation to keep going and learning.So lets make it easy and frictionless to start.The initial hurdle of installing the environment is the barrier to entry for most aspiring programmers. We must jumpstart the learning process by presenting students with a portable and bootstrapped environment. They shouldn’t have to install anything. They shouldn’t have to be dulled by much reading and instructions.Computer science is a highly abstract science and programming is an intellectual act. Talking about programs without experiencing them first hand is like talking about magic without practicing it.I would be skeptical and I will lose interest and motivation really fast.It is very easy to loose motivation while working through a huge dull text book.Remember the first time you saw your program run. The thrill of seeing the computer obey your commands. Seeing your thought process manifest in the computer?This thrill is what we need to capitalize on. We need let the students experience and internalize this thrill to keep them going even at times when it feels too hard.
  4. Which brings me to the concept of the REPL. And I mean it in both the traditional read-eval-print-loop and in the broader sense which Any environment that can present you with means to provide it input and for it in turn to provide you instant result for that input and then the ability to repeat the operation.REPLs in the broad sense are arguably the best tool for learning a new programming language or environment.My first interaction with a REPL was the LOGO programming language and it was great I played for days.The difference between REPLs over the traditional way of studying, thinking and then writing programs is playfulness.LOGO got it right and now I think Scratch is doing a great job.The programmer should be always be in a state of play. She should not be afraid of making errors or break it. In short Experimentation is king.Lately it seems that people are rediscovering that. It started with the Bret Vector’s inventing on principle talk which in essence is a glorified REPL. And it followed by Chris Granger’s LightTable.Which I’m a big fan of.However this isn’t a new thing. This is something the smalltalk and the lisp people have had for decades now.
  5. 2 years ago I started teaching myself different programming languages. I didn’t have a laptop and had experienced first hand the problem of installing and setting the development environment on different machines.So I started dreaming of a web-based browser REPL that is accessible from anywhere and has one simple goal. Being a highly accessible REPL.The project was in the intersection of my newly found love for JavaScript and programming languages. And its not like I was a compiler hacker. So I and my friend Max spent a substantial amount of time researching and playing around with interpreters.Finally we ended up writing interpreters for esoteric languages and reusing existing interpreters for other languages with some patching. However that wasn’t enough. We needed practical languages, languages people used on day to day basis. Namely Python, Ruby, Lua etc.At first we foolishly thought we could actually write and maintain these interpreters. Until one day I stumbled upon a very cool project called emscripten by AlonAzakai of Mozilla.Which we used to translate the native interpreters written in C / C++ to JavaScript.We did all that under a unified API open source library which we called jsrepl.
  6. Pushing the boundaries of what browsers can do. We managed to open many issues and provide many test cases for V8 and SpiderMonkey developers.
  7. CoffeeScript borrows some nice convenience features from python and ruby and provides beautiful syntax.Roy brings some features from static functional languages to javascriptClojureScriptClojure to JavaScriptSync to async compilers. I can’t keep track of these. Write sync looking async code in JS.LLVM to JavaScript compiler.JSIL Microsoft IL to JavaScript compiler.https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS
  8. Luckily the TC39 committee which is responsible for the standardization of JS has the VM aspect of the language in mind.Typed Arrays and binary data are both essential features in a VM. Actually emscripten and in turn repl.it uses Typed Arrays if the running browser has it to emulate the Heap. Which has huge performance gains.Proper tail calls could allow compilers to emulate GOTO by using functions instead of labels. Browsers are a non-blocking environment and there is no obvious way to wait synchronously for an asynchronous event. However many programming languages aren’t designed for this kind of environment.Continuations, corotine, even generators are obvious solutions to that problem.But also going back to the second point proper tail calls with some effort could sort of solve that problem.
  9. Much smarter people have commented on this and said that crazy control flow features will never make it in JS because it would break the execution model. (RUN TO COMPLETION).