SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
NESCALA NOTES
  by Hung Lin @hunglin
nescala 2013
2 days event in Philadelphia
Day 1: 17 talks
Speakers from typesafe, twitter, tumblr, ...
Scala book authors: Bill Venners , Josh Suereth
Day 2: unconference
$50 entrance fee
Function Patterns for the
       Asynchronous Web
by Josh Suereth @ TypeSafe, author of Scala in Depth
The new Web
Asynchronous
Event driven
Data driven
Big data
Single page design
Composition of services
User experiences
Future
ftr {
 uue
  / D smtm ltr
   / o oeie ae
  ..
   .
}mp{rsl =
   a   eut >
  / D smtigwt rsl
   / o oehn ih eut
  ..
   .
}
Monadic Flow
dfrne(aa DRsl) Ftr[tl =ftr(tl..)
 e edrdt: beut: uueHm]  uueHm(.)
dfhnlRqet..:Ui ={
 e adeeus(.) nt
  fr{
  o
   dt < qey..
    aa - ur(.)
   hm < rne(aa
    tl - edrdt)
  }yedwietlsce,hm)
    il rtHm(okt tl
}
Join
vlues Ftr[beut =
 a sr: uueDRsl]
  qey..
  ur(.)
vlpoet:Ftr[beut =
 a rjcs uueDRsl]
  qey..
  ur(.)
vldt:Ftr[DRsl,DRsl) =
 a aa uue(beut beut]
  (sr zppoet)
  ues i rjcs



Ls[uueDRsl] - Ftr[itDRsl]
 itFtr[beut] > uueLs[beut]
The Essence of the Iterator Pattern
Jeremy Gibbons and Bruno C. d. S. Oliveira @ Oxford University Computing Laboratory

                 Monadic Map
                 Applicative Functors
                 Monadic Applicative Functors
                 ...
Cake Pattern
by Daniel Spiewak, Code Commit
Not only for Dependency
             Injection
tatUeRpstrCmoet{
 ri sreoioyopnn
  vlueRpstr:UeRpstr
  a sreoioy sreoioy

    casUeRpstr {
     ls sreoioy
      ..
      .
    }
}

tatUeSrieopnn {
 ri srevcCmoet
  ti:UeRpstrCmoet=
  hs sreoioyopnn >

    vlueSrie UeSrie
    a srevc: srevc

    casUeSrie{
     ls srevc
      ..
      .
    }
}
Traits are modules
tatUeMdl {
 ri sroue
  dflaUe(d Ln) Ue
  e odsri: og: sr
}
tatTetoue{
 ri weMdl
  dfps(srd Ln,bd:Srn)
  e otueI: og oy tig
}
tatMSLsroueetnsUeMdl {..}
 ri yQUeMdl xed sroue  .
tatTitroueetnsTetouewt UeMdl {..}
 ri wteMdl xed weMdl ih sroue  .
vluies =nwMSLsroue
 a nvre   e yQUeMdl
   wt Titroue{
   ih wteMdl }
Package is just a namespace to avoid name collision. So,
           instead import, use extends/with
             Explicit dependencies
Interesting problem #1
tatA{
 ri
  vlfo Srn
  a o: tig
}
tatBetnsA{
 ri   xed
  vlbr=fo+"ol"
  a a   o   Wrd
}
casCetnsB{
 ls   xed
  vlfo="el"
  a o   Hlo
  pitnbr
  rnl(a)
}



         solution: use def or lazy val
Interesting problem #2
tatA{
 ri
  ojc suf{
  bet tf
   ojc Fo
    bet o
   ojc Br
    bet a
   ojc Bz
    bet a
}}
tatBetnsA{
 ri   xed
  ojc ma {
  bet or
   ojc Fo
    bet o
   ojc Bz
    bet a
   ojc Br
    bet a
}}



             solution: use val
abstract override
 tatTat {
  ri riA
     dfmto1l Ls[tig) Ls[tig
      e ehd(: itSrn]: itSrn]
 }

 tatTat etnsTat {
  ri riB xed riA
     oerd dfmto1l Ls[tig)=l: "riB
      vrie e ehd(: itSrn]   + tat"
 }

  tatTat etnsTat {
   ri riC xed riA
      asrc oerd dfmto1l Ls[tig)=sprm
       btat vrie e ehd(: itSrn] ue.e
to1l : "riC
 hd() + tat"
  }

 casCas {
  ls lsA
     ti:Tat =
      hs riA >
          dfso( {pitnmto1Ls(Cas") }
           e hw)  rnl(ehd(it"lsA))
 }
Advanced Stream Processing
Programming + Math
Finagle
scala.collection.approximate
Play! 2 Framework
Dependency management
Day 2: Unconference
      typeclass
      unapply
      ScalaTest
      and a lot more
precog
8 people attended
gave 5 talks
Audax @ nescala 2014
   more people attend
   give talks (Lift, ScalaTest, ...)
   projects @ unconference

Weitere ähnliche Inhalte

Was ist angesagt?

Building modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaBuilding modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaAlexander Gyoshev
 
Swift - Krzysztof Skarupa
Swift -  Krzysztof SkarupaSwift -  Krzysztof Skarupa
Swift - Krzysztof SkarupaSunscrapers
 
Purely Functional Data Structures ex3.3 leftist heap
Purely Functional Data Structures ex3.3 leftist heapPurely Functional Data Structures ex3.3 leftist heap
Purely Functional Data Structures ex3.3 leftist heapTetsuro Nagae
 
The Ring programming language version 1.8 book - Part 28 of 202
The Ring programming language version 1.8 book - Part 28 of 202The Ring programming language version 1.8 book - Part 28 of 202
The Ring programming language version 1.8 book - Part 28 of 202Mahmoud Samir Fayed
 
Linked list without animation
Linked list without animationLinked list without animation
Linked list without animationLovelyn Rose
 
Pivorak Clojure by Dmytro Bignyak
Pivorak Clojure by Dmytro BignyakPivorak Clojure by Dmytro Bignyak
Pivorak Clojure by Dmytro BignyakPivorak MeetUp
 
東急Ruby会議向け「rubyの細かい話」
東急Ruby会議向け「rubyの細かい話」東急Ruby会議向け「rubyの細かい話」
東急Ruby会議向け「rubyの細かい話」Masaya TARUI
 
3. basic data structures(2)
3. basic data structures(2)3. basic data structures(2)
3. basic data structures(2)Hongjun Jang
 
Short intro to the Rust language
Short intro to the Rust languageShort intro to the Rust language
Short intro to the Rust languageGines Espada
 
Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#priya Nithya
 
Itroroduction to R language
Itroroduction to R languageItroroduction to R language
Itroroduction to R languagechhabria-nitesh
 
Reconsidering tracing in Ceph - Mohamad Gebai
Reconsidering tracing in Ceph - Mohamad GebaiReconsidering tracing in Ceph - Mohamad Gebai
Reconsidering tracing in Ceph - Mohamad GebaiCeph Community
 
Data structure
Data structureData structure
Data structureMarkustec
 
Mpmc unit-string manipulation
Mpmc unit-string manipulationMpmc unit-string manipulation
Mpmc unit-string manipulationxyxz
 
The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212Mahmoud Samir Fayed
 

Was ist angesagt? (20)

Building modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and javaBuilding modern web apps with html5, javascript, and java
Building modern web apps with html5, javascript, and java
 
Swift - Krzysztof Skarupa
Swift -  Krzysztof SkarupaSwift -  Krzysztof Skarupa
Swift - Krzysztof Skarupa
 
Purely Functional Data Structures ex3.3 leftist heap
Purely Functional Data Structures ex3.3 leftist heapPurely Functional Data Structures ex3.3 leftist heap
Purely Functional Data Structures ex3.3 leftist heap
 
The Ring programming language version 1.8 book - Part 28 of 202
The Ring programming language version 1.8 book - Part 28 of 202The Ring programming language version 1.8 book - Part 28 of 202
The Ring programming language version 1.8 book - Part 28 of 202
 
Linked list without animation
Linked list without animationLinked list without animation
Linked list without animation
 
Pivorak Clojure by Dmytro Bignyak
Pivorak Clojure by Dmytro BignyakPivorak Clojure by Dmytro Bignyak
Pivorak Clojure by Dmytro Bignyak
 
東急Ruby会議向け「rubyの細かい話」
東急Ruby会議向け「rubyの細かい話」東急Ruby会議向け「rubyの細かい話」
東急Ruby会議向け「rubyの細かい話」
 
Format String
Format StringFormat String
Format String
 
3. basic data structures(2)
3. basic data structures(2)3. basic data structures(2)
3. basic data structures(2)
 
Short intro to the Rust language
Short intro to the Rust languageShort intro to the Rust language
Short intro to the Rust language
 
Linked list
Linked listLinked list
Linked list
 
Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#Creating a Name seperator Custom Control using C#
Creating a Name seperator Custom Control using C#
 
Itroroduction to R language
Itroroduction to R languageItroroduction to R language
Itroroduction to R language
 
Reconsidering tracing in Ceph - Mohamad Gebai
Reconsidering tracing in Ceph - Mohamad GebaiReconsidering tracing in Ceph - Mohamad Gebai
Reconsidering tracing in Ceph - Mohamad Gebai
 
Data structure
Data structureData structure
Data structure
 
Rust言語紹介
Rust言語紹介Rust言語紹介
Rust言語紹介
 
MP in Clojure
MP in ClojureMP in Clojure
MP in Clojure
 
Mpmc unit-string manipulation
Mpmc unit-string manipulationMpmc unit-string manipulation
Mpmc unit-string manipulation
 
Collection Core Concept
Collection Core ConceptCollection Core Concept
Collection Core Concept
 
The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212The Ring programming language version 1.10 book - Part 28 of 212
The Ring programming language version 1.10 book - Part 28 of 212
 

Andere mochten auch (9)

Invoke dynamics
Invoke dynamicsInvoke dynamics
Invoke dynamics
 
Scala magic
Scala magicScala magic
Scala magic
 
Nio nio2
Nio nio2Nio nio2
Nio nio2
 
Jdk(java) 7 - 5. invoke-dynamic
Jdk(java) 7 - 5. invoke-dynamicJdk(java) 7 - 5. invoke-dynamic
Jdk(java) 7 - 5. invoke-dynamic
 
Implicit Explicit Scala
Implicit Explicit ScalaImplicit Explicit Scala
Implicit Explicit Scala
 
Implicit Implicit Scala
Implicit Implicit ScalaImplicit Implicit Scala
Implicit Implicit Scala
 
Lunch_and_Learn_20150603
Lunch_and_Learn_20150603Lunch_and_Learn_20150603
Lunch_and_Learn_20150603
 
NE Scala 2016 roundup
NE Scala 2016 roundupNE Scala 2016 roundup
NE Scala 2016 roundup
 
Project Coin
Project CoinProject Coin
Project Coin
 

Ähnlich wie nescala 2013

JavaScript Design Patterns
JavaScript Design PatternsJavaScript Design Patterns
JavaScript Design PatternsDerek Brown
 
Lambdas myths-and-mistakes
Lambdas myths-and-mistakesLambdas myths-and-mistakes
Lambdas myths-and-mistakesRichardWarburton
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)jaxLondonConference
 
SecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play FrameworkSecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play Frameworkjaliss
 
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best PracticesJohannes Hoppe
 
Java 8 - project lambda
Java 8 - project lambdaJava 8 - project lambda
Java 8 - project lambdaIvar Østhus
 
talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013ericupnorth
 
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingCS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingEelco Visser
 
Declare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingDeclare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingEelco Visser
 
time_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdftime_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdfSrinivasaReddyPolamR
 
Clojurescript up and running
Clojurescript up and runningClojurescript up and running
Clojurescript up and runningTimo Sulg
 
Addressing Scenario
Addressing ScenarioAddressing Scenario
Addressing ScenarioTara Hardin
 
Scala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowScala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowLightbend
 
C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0Yaser Zhian
 
Deep Learning and TensorFlow
Deep Learning and TensorFlowDeep Learning and TensorFlow
Deep Learning and TensorFlowOswald Campesato
 

Ähnlich wie nescala 2013 (20)

JavaScript Design Patterns
JavaScript Design PatternsJavaScript Design Patterns
JavaScript Design Patterns
 
Lambdas myths-and-mistakes
Lambdas myths-and-mistakesLambdas myths-and-mistakes
Lambdas myths-and-mistakes
 
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
Lambda Expressions: Myths and Mistakes - Richard Warburton (jClarity)
 
SecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play FrameworkSecureSocial - Authentication for Play Framework
SecureSocial - Authentication for Play Framework
 
JavaFX, because you're worth it
JavaFX, because you're worth itJavaFX, because you're worth it
JavaFX, because you're worth it
 
Metarhia KievJS 22-Feb-2018
Metarhia KievJS 22-Feb-2018Metarhia KievJS 22-Feb-2018
Metarhia KievJS 22-Feb-2018
 
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
2013-02-21 - .NET UG Rhein-Neckar: JavaScript Best Practices
 
Java 8 - project lambda
Java 8 - project lambdaJava 8 - project lambda
Java 8 - project lambda
 
C++11
C++11C++11
C++11
 
Diving deep into twig
Diving deep into twigDiving deep into twig
Diving deep into twig
 
talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013talk at Virginia Bioinformatics Institute, December 5, 2013
talk at Virginia Bioinformatics Institute, December 5, 2013
 
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term RewritingCS4200 2019 | Lecture 5 | Transformation by Term Rewriting
CS4200 2019 | Lecture 5 | Transformation by Term Rewriting
 
Summary of C++17 features
Summary of C++17 featuresSummary of C++17 features
Summary of C++17 features
 
Declare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term RewritingDeclare Your Language: Transformation by Strategic Term Rewriting
Declare Your Language: Transformation by Strategic Term Rewriting
 
time_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdftime_complexity_list_02_04_2024_22_pages.pdf
time_complexity_list_02_04_2024_22_pages.pdf
 
Clojurescript up and running
Clojurescript up and runningClojurescript up and running
Clojurescript up and running
 
Addressing Scenario
Addressing ScenarioAddressing Scenario
Addressing Scenario
 
Scala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowScala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To Know
 
C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0C++11 - A Change in Style - v2.0
C++11 - A Change in Style - v2.0
 
Deep Learning and TensorFlow
Deep Learning and TensorFlowDeep Learning and TensorFlow
Deep Learning and TensorFlow
 

nescala 2013

  • 1. NESCALA NOTES by Hung Lin @hunglin
  • 2. nescala 2013 2 days event in Philadelphia Day 1: 17 talks Speakers from typesafe, twitter, tumblr, ... Scala book authors: Bill Venners , Josh Suereth Day 2: unconference $50 entrance fee
  • 3. Function Patterns for the Asynchronous Web by Josh Suereth @ TypeSafe, author of Scala in Depth
  • 4. The new Web Asynchronous Event driven Data driven Big data Single page design Composition of services User experiences
  • 5. Future ftr { uue / D smtm ltr / o oeie ae .. . }mp{rsl = a eut > / D smtigwt rsl / o oehn ih eut .. . }
  • 6. Monadic Flow dfrne(aa DRsl) Ftr[tl =ftr(tl..) e edrdt: beut: uueHm] uueHm(.) dfhnlRqet..:Ui ={ e adeeus(.) nt fr{ o dt < qey.. aa - ur(.) hm < rne(aa tl - edrdt) }yedwietlsce,hm) il rtHm(okt tl }
  • 7. Join vlues Ftr[beut = a sr: uueDRsl] qey.. ur(.) vlpoet:Ftr[beut = a rjcs uueDRsl] qey.. ur(.) vldt:Ftr[DRsl,DRsl) = a aa uue(beut beut] (sr zppoet) ues i rjcs Ls[uueDRsl] - Ftr[itDRsl] itFtr[beut] > uueLs[beut]
  • 8. The Essence of the Iterator Pattern Jeremy Gibbons and Bruno C. d. S. Oliveira @ Oxford University Computing Laboratory Monadic Map Applicative Functors Monadic Applicative Functors ...
  • 9. Cake Pattern by Daniel Spiewak, Code Commit
  • 10. Not only for Dependency Injection tatUeRpstrCmoet{ ri sreoioyopnn vlueRpstr:UeRpstr a sreoioy sreoioy casUeRpstr { ls sreoioy .. . } } tatUeSrieopnn { ri srevcCmoet ti:UeRpstrCmoet= hs sreoioyopnn > vlueSrie UeSrie a srevc: srevc casUeSrie{ ls srevc .. . } }
  • 11. Traits are modules tatUeMdl { ri sroue dflaUe(d Ln) Ue e odsri: og: sr } tatTetoue{ ri weMdl dfps(srd Ln,bd:Srn) e otueI: og oy tig } tatMSLsroueetnsUeMdl {..} ri yQUeMdl xed sroue . tatTitroueetnsTetouewt UeMdl {..} ri wteMdl xed weMdl ih sroue . vluies =nwMSLsroue a nvre e yQUeMdl wt Titroue{ ih wteMdl }
  • 12. Package is just a namespace to avoid name collision. So, instead import, use extends/with Explicit dependencies
  • 13. Interesting problem #1 tatA{ ri vlfo Srn a o: tig } tatBetnsA{ ri xed vlbr=fo+"ol" a a o Wrd } casCetnsB{ ls xed vlfo="el" a o Hlo pitnbr rnl(a) } solution: use def or lazy val
  • 14. Interesting problem #2 tatA{ ri ojc suf{ bet tf ojc Fo bet o ojc Br bet a ojc Bz bet a }} tatBetnsA{ ri xed ojc ma { bet or ojc Fo bet o ojc Bz bet a ojc Br bet a }} solution: use val
  • 15. abstract override tatTat { ri riA dfmto1l Ls[tig) Ls[tig e ehd(: itSrn]: itSrn] } tatTat etnsTat { ri riB xed riA oerd dfmto1l Ls[tig)=l: "riB vrie e ehd(: itSrn] + tat" } tatTat etnsTat { ri riC xed riA asrc oerd dfmto1l Ls[tig)=sprm btat vrie e ehd(: itSrn] ue.e to1l : "riC hd() + tat" } casCas { ls lsA ti:Tat = hs riA > dfso( {pitnmto1Ls(Cas") } e hw) rnl(ehd(it"lsA)) }
  • 22. Day 2: Unconference typeclass unapply ScalaTest and a lot more
  • 24. Audax @ nescala 2014 more people attend give talks (Lift, ScalaTest, ...) projects @ unconference