Suche senden
Hochladen
Vampire methods
•
Als PPT, PDF herunterladen
•
1 gefällt mir
•
2,338 views
Eric Torreborre
Folgen
Presentated at ScalaSyd on Wednesday, October 9th
Weniger lesen
Mehr lesen
Technologie
Lifestyle
Sport
Melden
Teilen
Melden
Teilen
1 von 26
Jetzt herunterladen
Empfohlen
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á
Empfohlen
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
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Weitere ähnliche Inhalte
Mehr von 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
Mehr von 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
Kürzlich hochgeladen
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
Delhi Call girls
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Antenna Manufacturer Coco
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
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 2024
Rafal Los
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
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
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
Enterprise Knowledge
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
Enterprise Knowledge
Kürzlich hochgeladen
(20)
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
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 2024
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
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…
Jetzt herunterladen