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

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
[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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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
 

Recently uploaded (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 

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