Enviar pesquisa
Carregar
Vampire methods
•
Transferir como PPT, PDF
•
1 gostou
•
2,338 visualizações
Eric Torreborre
Seguir
Presentated at ScalaSyd on Wednesday, October 9th
Leia menos
Leia mais
Tecnologia
Estilo de vida
Esportes
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 26
Baixar agora
Recomendados
Cucaruba!
Cucaruba!
Matt Yoho
How would you describe Swift in three words?
How would you describe Swift in three words?
Colin Eberhardt
Reusable View Components in Rails
Reusable View Components in Rails
Harun Pathan
Catch and Throw in Ruby
Catch and Throw in Ruby
Rubizza
Valentines Day
Valentines Day
margarieca
Valentine's Day!
Valentine's Day!
Andreza Vieira
St valentine´s day
St valentine´s day
karenrosero30
Valentine's Day
Valentine's Day
Patrícia Piquiá
Recomendados
Cucaruba!
Cucaruba!
Matt Yoho
How would you describe Swift in three words?
How would you describe Swift in three words?
Colin Eberhardt
Reusable View Components in Rails
Reusable View Components in Rails
Harun Pathan
Catch and Throw in Ruby
Catch and Throw in Ruby
Rubizza
Valentines Day
Valentines Day
margarieca
Valentine's Day!
Valentine's Day!
Andreza Vieira
St valentine´s day
St valentine´s day
karenrosero30
Valentine's Day
Valentine's Day
Patrícia Piquiá
wire-all-the-things-lambda-days-2023.pdf
wire-all-the-things-lambda-days-2023.pdf
Eric Torreborre
The many faces of modularity
The many faces of modularity
Eric Torreborre
What haskell taught us when we were not looking
What haskell taught us when we were not looking
Eric Torreborre
Wire once, rewire twice! (Haskell exchange-2018)
Wire once, rewire twice! (Haskell exchange-2018)
Eric Torreborre
Pratical eff-functional-conf
Pratical eff-functional-conf
Eric Torreborre
Specs2, from starters to dessert and... a look in the kitchen
Specs2, from starters to dessert and... a look in the kitchen
Eric Torreborre
Streaming, effects and beautiful folds: a winning trilogy
Streaming, effects and beautiful folds: a winning trilogy
Eric Torreborre
Pratical eff-scalaitaly-2017
Pratical eff-scalaitaly-2017
Eric Torreborre
Pratical eff monad at Scaladays Chicago
Pratical eff monad at Scaladays Chicago
Eric Torreborre
Pratical eff
Pratical eff
Eric Torreborre
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
Eric Torreborre
Easy di-slideshare
Easy di-slideshare
Eric Torreborre
Data generation, the hard parts
Data generation, the hard parts
Eric Torreborre
Origami, a monadic fold library for Scala
Origami, a monadic fold library for Scala
Eric Torreborre
Datatypes for the real world
Datatypes for the real world
Eric Torreborre
Specs2 3.4
Specs2 3.4
Eric Torreborre
DSLs with fold algebras
DSLs with fold algebras
Eric Torreborre
Specs2 whirlwind tour at Scaladays 2014
Specs2 whirlwind tour at Scaladays 2014
Eric Torreborre
Epic success \/ failure, refactoring to *real* FP
Epic success \/ failure, refactoring to *real* FP
Eric Torreborre
Specs2 whirlwind-tour
Specs2 whirlwind-tour
Eric Torreborre
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Mais conteúdo relacionado
Mais de Eric Torreborre
wire-all-the-things-lambda-days-2023.pdf
wire-all-the-things-lambda-days-2023.pdf
Eric Torreborre
The many faces of modularity
The many faces of modularity
Eric Torreborre
What haskell taught us when we were not looking
What haskell taught us when we were not looking
Eric Torreborre
Wire once, rewire twice! (Haskell exchange-2018)
Wire once, rewire twice! (Haskell exchange-2018)
Eric Torreborre
Pratical eff-functional-conf
Pratical eff-functional-conf
Eric Torreborre
Specs2, from starters to dessert and... a look in the kitchen
Specs2, from starters to dessert and... a look in the kitchen
Eric Torreborre
Streaming, effects and beautiful folds: a winning trilogy
Streaming, effects and beautiful folds: a winning trilogy
Eric Torreborre
Pratical eff-scalaitaly-2017
Pratical eff-scalaitaly-2017
Eric Torreborre
Pratical eff monad at Scaladays Chicago
Pratical eff monad at Scaladays Chicago
Eric Torreborre
Pratical eff
Pratical eff
Eric Torreborre
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
Eric Torreborre
Easy di-slideshare
Easy di-slideshare
Eric Torreborre
Data generation, the hard parts
Data generation, the hard parts
Eric Torreborre
Origami, a monadic fold library for Scala
Origami, a monadic fold library for Scala
Eric Torreborre
Datatypes for the real world
Datatypes for the real world
Eric Torreborre
Specs2 3.4
Specs2 3.4
Eric Torreborre
DSLs with fold algebras
DSLs with fold algebras
Eric Torreborre
Specs2 whirlwind tour at Scaladays 2014
Specs2 whirlwind tour at Scaladays 2014
Eric Torreborre
Epic success \/ failure, refactoring to *real* FP
Epic success \/ failure, refactoring to *real* FP
Eric Torreborre
Specs2 whirlwind-tour
Specs2 whirlwind-tour
Eric Torreborre
Mais de Eric Torreborre
(20)
wire-all-the-things-lambda-days-2023.pdf
wire-all-the-things-lambda-days-2023.pdf
The many faces of modularity
The many faces of modularity
What haskell taught us when we were not looking
What haskell taught us when we were not looking
Wire once, rewire twice! (Haskell exchange-2018)
Wire once, rewire twice! (Haskell exchange-2018)
Pratical eff-functional-conf
Pratical eff-functional-conf
Specs2, from starters to dessert and... a look in the kitchen
Specs2, from starters to dessert and... a look in the kitchen
Streaming, effects and beautiful folds: a winning trilogy
Streaming, effects and beautiful folds: a winning trilogy
Pratical eff-scalaitaly-2017
Pratical eff-scalaitaly-2017
Pratical eff monad at Scaladays Chicago
Pratical eff monad at Scaladays Chicago
Pratical eff
Pratical eff
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
Easy di-slideshare
Easy di-slideshare
Data generation, the hard parts
Data generation, the hard parts
Origami, a monadic fold library for Scala
Origami, a monadic fold library for Scala
Datatypes for the real world
Datatypes for the real world
Specs2 3.4
Specs2 3.4
DSLs with fold algebras
DSLs with fold algebras
Specs2 whirlwind tour at Scaladays 2014
Specs2 whirlwind tour at Scaladays 2014
Epic success \/ failure, refactoring to *real* FP
Epic success \/ failure, refactoring to *real* FP
Specs2 whirlwind-tour
Specs2 whirlwind-tour
Último
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
naman860154
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
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Paola De la Torre
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
Principled Technologies
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Último
(20)
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
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...
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Vampire methods
1.
Vampire Methods ScalaSyd
2.
Can you do
this?
3.
@xeno_by jumps in
4.
Kittens!
5.
Kittens! Generate a local
class!
6.
Local CatMatcher
7.
Paradise plugin Just for
quasi-quotes
8.
Local CatMatcher
9.
Batman
10.
Local CatMatcher http://stackoverflow.com/questions/18480707/method-cannot- be-accessed-in-macro-generated-class Don’t forget
the {}!
11.
Real incremental recompilation
12.
Let’s dive
13.
Grab the Cat TypeTag
not accessible in a macro!
14.
Wash the Cat
15.
Inception matcher Builder pattern Matcher
methods // CatMatcher
16.
Inception matcher Cat matcher Internal
state
17.
Inception matcher new constraint
=> new matcher function name/age/kitten methods list of c.Expr[_]
18.
Mirror, mirror structural type
=> reflection :-( // age // matchA[Cat].age(6) // Int
19.
Yo, I heard
you like macros No structural type!
20.
Yo, I heard
you like macros Annotation code // @fieldMatcherBody(expected => cat.age must_== expected) // val expected = 6 // cat.age must_== expected
21.
Yo, I heard
you like macros extract parameter/body
22.
Transformers // 6 // `prefix`
represents an equivalent of // `this` for normal instance methods // body: // CatMatcher.this.addMatcher((_:Cat).age must_== arg)
23.
Transformers http://stackoverflow.com/questions/18523871/use-this-in-a- generated-macro-method
24.
Transformers -Yrangepos
25.
Can you do
this? YES !!!
26.
Thank you! If you
followed that far…
Baixar agora