SlideShare a Scribd company logo
1 of 24
Download to read offline
@henri_opa




         http://opalang.org
open-source
 event-based
client + server
#1
Simple
function register_in_the_room() {
   $.ajax({
       cache: false,
       type: "POST" ,
       dataType: "json" ,
       url: "/join" ,
       data: { nick: nick } ,
       error: function () {
                                         function register_in_the_room() {
           alert("connection error”);       join(nick); onConnect();
           showConnect();                }
       } ,
       success: onConnect                function get_list_of_users() {
   });                                      users = get_user_list();
}                                           showUsers(users);
function get_list_of_users() {           }
   jQuery.get("/who", {},
   function (data, status) {
      if (status != "success") return;
      showUsers(data.nicks);
   }, "json");
}
http://github.com/mattgu74/OpaTetris
http://github.com/mattgu74/OpaTetris




       600
1100
#2
Cool static
  typing
No
function createUser(username, password) {
   match (findUser(username)) {




                                                Type errors at
       case {none}:
          user =
             { username: username,




          Code
               fullname: "",
               password: Crypto.Hash.sha2
(password) };



                                                compile time?
          saveUser(user);




                                                                 Yes
       default: displayMessage(“This username
exists”);
    };
    Client.goto("/login");




                                                                       Error
Type checking


foo = 1 + "bar";
          “Types int and string are
               not compatible”
Type inference
   (almost complete)



  function foo(s) {
     String.length(s);
  }

  function bar(x, y) {
     foo(x) + y;
  }
Type inference
         (almost complete)



int function foo(string s) {
   String.length(s);
}

int function bar(string x, int y) {
   foo(x) + y;
}
element =
   <div>
      <span>{prompt({none})}</span>
      <span>{expr}
   </div>
   <div>{Calc.compute(expr)}</div>;




 Open and close tag mismatch
       <span> vs </div>
case {some: 13}:   #status = "Enter";
callback(get());
case {some: 37}:   #status = "Left";
move({lef});
case {some: 38}:   #status = "Up";
move({up});
case {some: 39}:   #status = "Right";
move({right});
        First type: { lef }
            Second type:
      { left } or { right } or
           { rightmost } or
          { up } or { down }
previous = Dom.get_content(#precaret);
#precaret = String.sub(0,
String.lenght(previous) - 1,
previous);
#postcaret += String.get(String.length
(previous) - 1, previous);



      No field ‘lenght’ found.
         Most probable field:
        length: string -> int
previous = Dom.get_content(#postcaret);
#postcaret = String.sub(1,
String.length(previous) - 1, previous);
#precaret =+ String.get(previous);




        String.get is a string
      function(int, string) but
          application uses it
          as function(string)
“Keep your eye on Opa, the
new open source language that
[...] may transform Web
development.”   Neil McAllister




“Coding in Opa is super quick
and fun. I don’t think I could
have written things faster in any
other framework.”        Alok Menghrajani
Join device: Tokyo

http://tokyo.local:8667
opalang.org
 @opalang

More Related Content

What's hot

The love child of Android and .NET: App development with Xamarin
The love child of Android and .NET: App development with XamarinThe love child of Android and .NET: App development with Xamarin
The love child of Android and .NET: App development with XamarinLorenz Cuno Klopfenstein
 
RxSwift 활용하기 - Let'Swift 2017
RxSwift 활용하기 - Let'Swift 2017RxSwift 활용하기 - Let'Swift 2017
RxSwift 활용하기 - Let'Swift 2017Wanbok Choi
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Domenic Denicola
 
Functional Reactive Programming - RxSwift
Functional Reactive Programming - RxSwiftFunctional Reactive Programming - RxSwift
Functional Reactive Programming - RxSwiftRodrigo Leite
 
AI Gaming - Azure Cognitive Services
AI Gaming - Azure Cognitive ServicesAI Gaming - Azure Cognitive Services
AI Gaming - Azure Cognitive ServicesAnweshBudhathoki
 
Nodejs mongoose
Nodejs mongooseNodejs mongoose
Nodejs mongooseFin Chen
 
JavaScript 101 - Class 1
JavaScript 101 - Class 1JavaScript 101 - Class 1
JavaScript 101 - Class 1Robert Pearce
 
PHP Object Injection Vulnerability in WordPress: an Analysis
PHP Object Injection Vulnerability in WordPress: an AnalysisPHP Object Injection Vulnerability in WordPress: an Analysis
PHP Object Injection Vulnerability in WordPress: an AnalysisPositive Hack Days
 
Swift internals
Swift internalsSwift internals
Swift internalsJung Kim
 
Mongoskin - Guilin
Mongoskin - GuilinMongoskin - Guilin
Mongoskin - GuilinJackson Tian
 
Hardened JavaScript
Hardened JavaScriptHardened JavaScript
Hardened JavaScriptKrisKowal2
 
On Functional Programming - A Clojurian Perspective
On Functional Programming - A Clojurian PerspectiveOn Functional Programming - A Clojurian Perspective
On Functional Programming - A Clojurian Perspectivelooselytyped
 
JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery PresentationSony Jain
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript TutorialBui Kiet
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !Matheus Marabesi
 

What's hot (20)

The love child of Android and .NET: App development with Xamarin
The love child of Android and .NET: App development with XamarinThe love child of Android and .NET: App development with Xamarin
The love child of Android and .NET: App development with Xamarin
 
Q
QQ
Q
 
RxSwift 활용하기 - Let'Swift 2017
RxSwift 활용하기 - Let'Swift 2017RxSwift 활용하기 - Let'Swift 2017
RxSwift 활용하기 - Let'Swift 2017
 
Ast transformations
Ast transformationsAst transformations
Ast transformations
 
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
Callbacks, Promises, and Coroutines (oh my!): Asynchronous Programming Patter...
 
Functional Reactive Programming - RxSwift
Functional Reactive Programming - RxSwiftFunctional Reactive Programming - RxSwift
Functional Reactive Programming - RxSwift
 
AI Gaming - Azure Cognitive Services
AI Gaming - Azure Cognitive ServicesAI Gaming - Azure Cognitive Services
AI Gaming - Azure Cognitive Services
 
Scala on Your Phone
Scala on Your PhoneScala on Your Phone
Scala on Your Phone
 
Nodejs mongoose
Nodejs mongooseNodejs mongoose
Nodejs mongoose
 
JavaScript 101 - Class 1
JavaScript 101 - Class 1JavaScript 101 - Class 1
JavaScript 101 - Class 1
 
PHP Object Injection Vulnerability in WordPress: an Analysis
PHP Object Injection Vulnerability in WordPress: an AnalysisPHP Object Injection Vulnerability in WordPress: an Analysis
PHP Object Injection Vulnerability in WordPress: an Analysis
 
Web 11 | AJAX + JSON + PHP
Web 11 | AJAX + JSON + PHPWeb 11 | AJAX + JSON + PHP
Web 11 | AJAX + JSON + PHP
 
Swift internals
Swift internalsSwift internals
Swift internals
 
Mongoskin - Guilin
Mongoskin - GuilinMongoskin - Guilin
Mongoskin - Guilin
 
Rakudo
RakudoRakudo
Rakudo
 
Hardened JavaScript
Hardened JavaScriptHardened JavaScript
Hardened JavaScript
 
On Functional Programming - A Clojurian Perspective
On Functional Programming - A Clojurian PerspectiveOn Functional Programming - A Clojurian Perspective
On Functional Programming - A Clojurian Perspective
 
JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery Presentation
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
 
TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !TDC2015 Porto Alegre - Automate everything with Phing !
TDC2015 Porto Alegre - Automate everything with Phing !
 

Viewers also liked

Outline Update Thesis One v05
Outline Update Thesis One v05Outline Update Thesis One v05
Outline Update Thesis One v05MCHLSLBR
 
Eva buriánová prezentace
Eva buriánová   prezentaceEva buriánová   prezentace
Eva buriánová prezentaceevaburianova
 
Innovation slidesV01
Innovation slidesV01Innovation slidesV01
Innovation slidesV01MCHLSLBR
 
Selling your ambulatory surgery center (part 3 of 4)
Selling your ambulatory surgery center (part 3 of 4)Selling your ambulatory surgery center (part 3 of 4)
Selling your ambulatory surgery center (part 3 of 4)Ambulatory Alliances
 
Km教育訓練用簡報
Km教育訓練用簡報Km教育訓練用簡報
Km教育訓練用簡報chloe0723
 
Remember When... A glance at past print ads
Remember When... A glance at past print adsRemember When... A glance at past print ads
Remember When... A glance at past print adsBarbara Lay
 
самопрезентация
самопрезентациясамопрезентация
самопрезентацияjuliaegorova72
 
Cliente: Johnson&Johnson | Tema: Convenção de Trade Marketing
Cliente: Johnson&Johnson | Tema: Convenção de Trade MarketingCliente: Johnson&Johnson | Tema: Convenção de Trade Marketing
Cliente: Johnson&Johnson | Tema: Convenção de Trade MarketingRicardo Padoveze
 
', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.
', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.
', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.Paula (פולה) Siton (סיטון)
 
Llistes preinscripció 15 16 definitives
Llistes preinscripció 15 16 definitivesLlistes preinscripció 15 16 definitives
Llistes preinscripció 15 16 definitivesCfa Paul
 
Directed Research Final Presentation
Directed Research Final PresentationDirected Research Final Presentation
Directed Research Final PresentationMCHLSLBR
 
Portfolio part 2.2.2
Portfolio part 2.2.2Portfolio part 2.2.2
Portfolio part 2.2.2Jody88
 
Innovation current
Innovation currentInnovation current
Innovation currentMCHLSLBR
 

Viewers also liked (20)

Matriz
MatrizMatriz
Matriz
 
Outline Update Thesis One v05
Outline Update Thesis One v05Outline Update Thesis One v05
Outline Update Thesis One v05
 
Eva buriánová prezentace
Eva buriánová   prezentaceEva buriánová   prezentace
Eva buriánová prezentace
 
Innovation slidesV01
Innovation slidesV01Innovation slidesV01
Innovation slidesV01
 
KEORGANISASIAN
KEORGANISASIANKEORGANISASIAN
KEORGANISASIAN
 
AWS Lambda
AWS LambdaAWS Lambda
AWS Lambda
 
Selling your ambulatory surgery center (part 3 of 4)
Selling your ambulatory surgery center (part 3 of 4)Selling your ambulatory surgery center (part 3 of 4)
Selling your ambulatory surgery center (part 3 of 4)
 
Review
ReviewReview
Review
 
Km教育訓練用簡報
Km教育訓練用簡報Km教育訓練用簡報
Km教育訓練用簡報
 
Remember When... A glance at past print ads
Remember When... A glance at past print adsRemember When... A glance at past print ads
Remember When... A glance at past print ads
 
самопрезентация
самопрезентациясамопрезентация
самопрезентация
 
Cliente: Johnson&Johnson | Tema: Convenção de Trade Marketing
Cliente: Johnson&Johnson | Tema: Convenção de Trade MarketingCliente: Johnson&Johnson | Tema: Convenção de Trade Marketing
Cliente: Johnson&Johnson | Tema: Convenção de Trade Marketing
 
Bab 2
Bab 2Bab 2
Bab 2
 
', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.
', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.
', הכנת פרזנטציה עסקית, טיפים למצגת עסקית אפקטיבית.
 
Llistes preinscripció 15 16 definitives
Llistes preinscripció 15 16 definitivesLlistes preinscripció 15 16 definitives
Llistes preinscripció 15 16 definitives
 
Directed Research Final Presentation
Directed Research Final PresentationDirected Research Final Presentation
Directed Research Final Presentation
 
Business
BusinessBusiness
Business
 
Presentation3
Presentation3Presentation3
Presentation3
 
Portfolio part 2.2.2
Portfolio part 2.2.2Portfolio part 2.2.2
Portfolio part 2.2.2
 
Innovation current
Innovation currentInnovation current
Innovation current
 

Similar to Opa presentation at GamesJs

async/await in Swift
async/await in Swiftasync/await in Swift
async/await in SwiftPeter Friese
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.jsWebsecurify
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Jonas Bonér
 
Pragmatic Real-World Scala
Pragmatic Real-World ScalaPragmatic Real-World Scala
Pragmatic Real-World Scalaparag978978
 
Taming that client side mess with Backbone.js
Taming that client side mess with Backbone.jsTaming that client side mess with Backbone.js
Taming that client side mess with Backbone.jsJarod Ferguson
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsTypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsAlfonso Peletier
 
JavaScript and the AST
JavaScript and the ASTJavaScript and the AST
JavaScript and the ASTJarrod Overson
 
Clean & Typechecked JS
Clean & Typechecked JSClean & Typechecked JS
Clean & Typechecked JSArthur Puthin
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5arajivmordani
 

Similar to Opa presentation at GamesJs (20)

async/await in Swift
async/await in Swiftasync/await in Swift
async/await in Swift
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Security Challenges in Node.js
Security Challenges in Node.jsSecurity Challenges in Node.js
Security Challenges in Node.js
 
Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)Pragmatic Real-World Scala (short version)
Pragmatic Real-World Scala (short version)
 
Pragmatic Real-World Scala
Pragmatic Real-World ScalaPragmatic Real-World Scala
Pragmatic Real-World Scala
 
Taming that client side mess with Backbone.js
Taming that client side mess with Backbone.jsTaming that client side mess with Backbone.js
Taming that client side mess with Backbone.js
 
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemWprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
Wprowadzenie do technologii Big Data / Intro to Big Data Ecosystem
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
Php & my sql
Php & my sqlPhp & my sql
Php & my sql
 
Clean coding-practices
Clean coding-practicesClean coding-practices
Clean coding-practices
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsTypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
 
Socket.io
Socket.ioSocket.io
Socket.io
 
Anti patterns
Anti patternsAnti patterns
Anti patterns
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
Coding Ajax
Coding AjaxCoding Ajax
Coding Ajax
 
Nantes Jug - Java 7
Nantes Jug - Java 7Nantes Jug - Java 7
Nantes Jug - Java 7
 
JavaScript and the AST
JavaScript and the ASTJavaScript and the AST
JavaScript and the AST
 
Clean & Typechecked JS
Clean & Typechecked JSClean & Typechecked JS
Clean & Typechecked JS
 
The Beauty Of Java Script V5a
The Beauty Of Java Script V5aThe Beauty Of Java Script V5a
The Beauty Of Java Script V5a
 
The Beauty of Java Script
The Beauty of Java ScriptThe Beauty of Java Script
The Beauty of Java Script
 

Recently uploaded

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 

Recently uploaded (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 

Opa presentation at GamesJs

  • 1. @henri_opa http://opalang.org
  • 2.
  • 5. function register_in_the_room() { $.ajax({ cache: false, type: "POST" , dataType: "json" , url: "/join" , data: { nick: nick } , error: function () { function register_in_the_room() { alert("connection error”); join(nick); onConnect(); showConnect(); } } , success: onConnect function get_list_of_users() { }); users = get_user_list(); } showUsers(users); function get_list_of_users() { } jQuery.get("/who", {}, function (data, status) { if (status != "success") return; showUsers(data.nicks); }, "json"); }
  • 6.
  • 9.
  • 10. 1100
  • 11. #2 Cool static typing
  • 12. No function createUser(username, password) { match (findUser(username)) { Type errors at case {none}: user = { username: username, Code fullname: "", password: Crypto.Hash.sha2 (password) }; compile time? saveUser(user); Yes default: displayMessage(“This username exists”); }; Client.goto("/login"); Error
  • 13. Type checking foo = 1 + "bar"; “Types int and string are not compatible”
  • 14. Type inference (almost complete) function foo(s) { String.length(s); } function bar(x, y) { foo(x) + y; }
  • 15. Type inference (almost complete) int function foo(string s) { String.length(s); } int function bar(string x, int y) { foo(x) + y; }
  • 16. element = <div> <span>{prompt({none})}</span> <span>{expr} </div> <div>{Calc.compute(expr)}</div>; Open and close tag mismatch <span> vs </div>
  • 17. case {some: 13}: #status = "Enter"; callback(get()); case {some: 37}: #status = "Left"; move({lef}); case {some: 38}: #status = "Up"; move({up}); case {some: 39}: #status = "Right"; move({right}); First type: { lef } Second type: { left } or { right } or { rightmost } or { up } or { down }
  • 18. previous = Dom.get_content(#precaret); #precaret = String.sub(0, String.lenght(previous) - 1, previous); #postcaret += String.get(String.length (previous) - 1, previous); No field ‘lenght’ found. Most probable field: length: string -> int
  • 19. previous = Dom.get_content(#postcaret); #postcaret = String.sub(1, String.length(previous) - 1, previous); #precaret =+ String.get(previous); String.get is a string function(int, string) but application uses it as function(string)
  • 20.
  • 21.
  • 22. “Keep your eye on Opa, the new open source language that [...] may transform Web development.” Neil McAllister “Coding in Opa is super quick and fun. I don’t think I could have written things faster in any other framework.” Alok Menghrajani