SlideShare a Scribd company logo
Ruby After 18+ Months of Clojure
                                        -or-
              Functional Learnings of Clojure for Make
               Benefit of Glorious Language of Ruby*

                               (a work in progress)

                                   Brian Marick, Path11
                              brian@path11.com, @marick



                                          1    *Alternate title courtesy @infinitary
Wednesday, January 18, 2012
Ladies and Gentlemen:
              The Computer




Wednesday, January 18, 2012
Wednesday, January 18, 2012
Wednesday, January 18, 2012
Wednesday, January 18, 2012
Our Friend, the Class
                                                       g()
                                 f()

                                        width color
                                           scofield_v
                                                             h()
                                       height
                               j()

                                                       m()
                                         k()

                                               4
Wednesday, January 18, 2012
What Are Classes Good For?




                              5
Wednesday, January 18, 2012
What Are Classes Good For?




                              5
Wednesday, January 18, 2012
The Real World Has Fuzzy Categories




                              6
Wednesday, January 18, 2012
The Real World Has Fuzzy Categories




                              6
Wednesday, January 18, 2012
Classes Are For Finding Things
                                                      g()
                                f()

                                       width color
                                          scofield_v
                                                            h()
                                      height
                              j()

                                                      m()
                                        k()


                                              7
Wednesday, January 18, 2012
Classes Are For Finding Things

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

                                          8
Wednesday, January 18, 2012
Classes Are For Finding Things

          wsc                 wsc   wsc       {}   []   ()
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

                                          8
Wednesday, January 18, 2012
Classes Are For Finding Things

          wsc                 wsc   wsc       {}   []   ()
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

                                          8
Wednesday, January 18, 2012
Classes Are For Finding Things

          wsc                 wsc   wsc       {}   []   ()
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

                                          8
Wednesday, January 18, 2012
Classes Are For Finding Things

          wsc                 wsc   wsc       {}   []   ()
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

                                          8
Wednesday, January 18, 2012
Classes Are For Finding Things

          wsc                 wsc   wsc       {}   []   ()
          h                   h     h

  But hAth scWhat Cost?
   wsc
   h
       wsc w


          wsc                 wsc   wsc
          h                   h     h

          wsc                 wsc   wsc
          h                   h     h

                                          8
Wednesday, January 18, 2012
9
Wednesday, January 18, 2012
Lookup




                              10
Wednesday, January 18, 2012
Lookup




                              10
Wednesday, January 18, 2012
11
Wednesday, January 18, 2012
Lookup




                                    Copy



                              12
Wednesday, January 18, 2012
Lookup




                                   ?Copy



                              12
Wednesday, January 18, 2012
Lookup




                                   ?Copy



                              12
Wednesday, January 18, 2012
13
Wednesday, January 18, 2012
Do The Simplest Thing
             That Could
            Possibly Work




                              13
Wednesday, January 18, 2012
Active
              Record
                              14
Wednesday, January 18, 2012
Wait. What?




              Active
              Record
                                     14
Wednesday, January 18, 2012
id

                                  c
                              Lookup
                                        timeslice
                               uses




                               Copy




                              15
Wednesday, January 18, 2012
Lookup

                                         id


                                       uses
                                                   c
                                              timeslice




                               Copy




                              15
Wednesday, January 18, 2012
Lookup

                                         id


                                       uses
                                                   c
                                              timeslice




                               Copy




                              16
Wednesday, January 18, 2012
Lookup




                                     id

                                  c       timeslice
                               Copyuses




                              16
Wednesday, January 18, 2012
Lookup




                                                  id

                                     c c
                                   copy            tim
                                                 use
                                          id

                               Copy c
                               omitted_
                               animals
                                   id
                                          u ti



                                 c u ti




                              17
Wednesday, January 18, 2012
Lookup




                     copy
                          c
                    omitted_               id
                                                   id
                                                    tim
                                                  use   c
                    animals
                                   c
                                Copyid
                                           u ti



                                 c  u ti




                               17
Wednesday, January 18, 2012
Lookup



                      id
                       tim
                     use   c
                     copy
                    omitted_
                               c               id
                    animals
                                       c
                                    Copyid
                                               u ti



                                     c  u ti




                                   17
Wednesday, January 18, 2012
Lookup



                      id
                       tim
                     use   c
                     copy
                     omitted_
                               c
                     animals
                                    Copy
              id

               c
              u ti

             id

               c
             u ti




                                   17
Wednesday, January 18, 2012
Lookup



                      id
                       tim
                     use   c
                     copy
                     omitted_
                               c
                     animals
                                    Copy
              id

               c
              u ti

             id

               c
             u ti




                                   18
Wednesday, January 18, 2012
Lookup




                               Copy




                              18
Wednesday, January 18, 2012
Lookup




                               Copy




                              19
Wednesday, January 18, 2012
Lookup




                               Copy




                              19
Wednesday, January 18, 2012
20
Wednesday, January 18, 2012
20
Wednesday, January 18, 2012
Lookup




                               Copy




                              21
Wednesday, January 18, 2012
Lookup




                               Copy




                              21
Wednesday, January 18, 2012
and...
                               22
Wednesday, January 18, 2012
and...
                               22
Wednesday, January 18, 2012
23
Wednesday, January 18, 2012
{}




                              23
Wednesday, January 18, 2012
{}




                              23
Wednesday, January 18, 2012
{}                                {}
                                             {}

                 {}

                              {}                             {}
                                        {}
                                                  {}

                 {}

                                   {}              {}

                                        24
Wednesday, January 18, 2012
25
Wednesday, January 18, 2012
25
Wednesday, January 18, 2012
26
Wednesday, January 18, 2012
27
Wednesday, January 18, 2012
27
Wednesday, January 18, 2012
Immutability




                                   28
Wednesday, January 18, 2012
Immutability




                                   28
Wednesday, January 18, 2012
Immutability




                                   28
Wednesday, January 18, 2012
Hygiene




                              29
Wednesday, January 18, 2012
Hygiene
                                “You’ve slept with everyone
                              everyone you’ve ever slept with
                                      ever slept with.”




                                      29
Wednesday, January 18, 2012
Hygiene
                                 “You’ve slept with everyone
                               everyone you’ve ever slept with
                                       ever slept with.”

                               “Your code might be infected by any
                              code that has ever touched your data.”




                                        29
Wednesday, January 18, 2012
Hygiene
                    a=
                                 “You’ve slept with everyone
                               everyone you’ve ever slept with
                                       ever slept with.”

                               “Your code might be infected by any
                              code that has ever touched your data.”




                                        29
Wednesday, January 18, 2012
Hygiene
                    a=
                                 “You’ve slept with everyone
                               everyone you’ve ever slept with
                                       ever slept with.”

                               “Your code might be infected by any
                              code that has ever touched your data.”



                                    a

                                        29
Wednesday, January 18, 2012
Hygiene
                    a=
                                 “You’ve slept with everyone
                               everyone you’ve ever slept with
                                       ever slept with.”

                               “Your code might be infected by any
                              code that has ever touched your data.”



                                    a

                                        29
Wednesday, January 18, 2012
Consequences




                                   30
Wednesday, January 18, 2012
Consequences




                                   30
Wednesday, January 18, 2012
Consequences




                                   5




                                   31
Wednesday, January 18, 2012
Consequences




                                             5




                                   32
Wednesday, January 18, 2012
Consequences




                                             5




                                   32
Wednesday, January 18, 2012
Consequences




                                             5




                                   32
Wednesday, January 18, 2012
33
Wednesday, January 18, 2012
In Short: Why Not?




                                      34
Wednesday, January 18, 2012
In Short: Why Not?
               • Removes one source of bugs




                                      34
Wednesday, January 18, 2012
In Short: Why Not?
               • Removes one source of bugs
               • Not harder than coding mutably
                • (once you’re used to it)




                                      34
Wednesday, January 18, 2012
In Short: Why Not?
               • Removes one source of bugs
               • Not harder than coding mutably
                • (once you’re used to it)
               • Knowing how to do more is better than
                     knowing how to do less




                                      34
Wednesday, January 18, 2012
Ruby




                               35
Wednesday, January 18, 2012
Ruby




                               35
Wednesday, January 18, 2012
Ruby



                              Haskell




                                 35
Wednesday, January 18, 2012
Ruby



                              Haskell




                                 35
Wednesday, January 18, 2012
Ruby



                              Haskell   Always Lazy




                                 35
Wednesday, January 18, 2012
Ruby      Mostly Eager




                              Haskell   Always Lazy




                                 35
Wednesday, January 18, 2012
Some Lazy Ruby




                                    36
Wednesday, January 18, 2012
Some Lazy Ruby




                                    37
Wednesday, January 18, 2012
Some Lazy Ruby




                   Only a few special Ruby operators are lazy




                                       37
Wednesday, January 18, 2012
And Why Not?




                                   38
Wednesday, January 18, 2012
And Why Not?




                                   39
Wednesday, January 18, 2012
a=




                              40
Wednesday, January 18, 2012
a=




                              40
Wednesday, January 18, 2012
a=



                              a
                                       a




                                  40
Wednesday, January 18, 2012
a=



                              a
                                       a




                                  40
Wednesday, January 18, 2012
a=



                              a
                                       a




                                  40
Wednesday, January 18, 2012
a=



                              a
                                       a




                                  40
Wednesday, January 18, 2012
One
                                            Less
                                           Thing
                                  a=
                                             to
                                           Worry
                                           About
                              a
                                       a




                                  40
Wednesday, January 18, 2012
41
Wednesday, January 18, 2012
a=



                              a
                                             a




                                   free(a)



                                  42
Wednesday, January 18, 2012
a=



                              a
                                       a




                                  42
Wednesday, January 18, 2012
a=



                              a
                                       a




                                  43
Wednesday, January 18, 2012
44
Wednesday, January 18, 2012
OMG!!! As Big
                               As Garbage
                              Collection???




                                    44
Wednesday, January 18, 2012
OMG!!! As Big
                               As Garbage
                              Collection???
            Calculations
             You Trace
           Through Time


                                    44
Wednesday, January 18, 2012
OMG!!! As Big
                               As Garbage
                              Collection???
            Calculations                 Resources You
             You Trace                     Consume
           Through Time                   As Needed


                                    44
Wednesday, January 18, 2012
Lazy Sequences




                                    45
Wednesday, January 18, 2012
Lazy Sequences




                                    45
Wednesday, January 18, 2012
Lazy Sequences




                                    45
Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                           Don’t Like




                              46
Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                           Don’t Like




                                          How to
                                         Make the
                                         Next One




                              46
Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                           Don’t Like




                                          How to
                                         Make the
                                         Next One




                              46
Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                             Don’t Like


                                   Which
                                    Ones

                                            How to
                                           Make the
                                           Next One




                              46
Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                             Don’t Like


                                   Which
                                    Ones

                                            How to
                                           Make the
                                           Next One




                              46
Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                                  Like




Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                                  Like




Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                                   Like




                                         How to
                                        Make the
                                        Next One




Wednesday, January 18, 2012
What You Get With Lazy Sequences
                                                   Like




                                         How to
                                        Make the
                                        Next One
                       Which
                        Ones


Wednesday, January 18, 2012
github.com/marick/stunted




                                         Google groups:
                                           rubyfoopers




                              48
Wednesday, January 18, 2012
object.f(2, 3, 4)


                              def Float, Integer ...
                               def Integer, Float
                                    f.(2.0, 2)




                                        49
Wednesday, January 18, 2012
github.com/marick/stunted
                              Google groups:
                                rubyfoopers



              Expressiveness
                Efficiency
                  Gems




                                               50
Wednesday, January 18, 2012

More Related Content

Recently uploaded

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
ShivajiThube2
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 

Recently uploaded (20)

Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
JEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questionsJEE1_This_section_contains_FOUR_ questions
JEE1_This_section_contains_FOUR_ questions
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Ruby after 18+ months of Clojure

  • 1. Ruby After 18+ Months of Clojure -or- Functional Learnings of Clojure for Make Benefit of Glorious Language of Ruby* (a work in progress) Brian Marick, Path11 brian@path11.com, @marick 1 *Alternate title courtesy @infinitary Wednesday, January 18, 2012
  • 2. Ladies and Gentlemen: The Computer Wednesday, January 18, 2012
  • 6. Our Friend, the Class g() f() width color scofield_v h() height j() m() k() 4 Wednesday, January 18, 2012
  • 7. What Are Classes Good For? 5 Wednesday, January 18, 2012
  • 8. What Are Classes Good For? 5 Wednesday, January 18, 2012
  • 9. The Real World Has Fuzzy Categories 6 Wednesday, January 18, 2012
  • 10. The Real World Has Fuzzy Categories 6 Wednesday, January 18, 2012
  • 11. Classes Are For Finding Things g() f() width color scofield_v h() height j() m() k() 7 Wednesday, January 18, 2012
  • 12. Classes Are For Finding Things wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8 Wednesday, January 18, 2012
  • 13. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8 Wednesday, January 18, 2012
  • 14. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8 Wednesday, January 18, 2012
  • 15. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8 Wednesday, January 18, 2012
  • 16. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8 Wednesday, January 18, 2012
  • 17. Classes Are For Finding Things wsc wsc wsc {} [] () h h h But hAth scWhat Cost? wsc h wsc w wsc wsc wsc h h h wsc wsc wsc h h h 8 Wednesday, January 18, 2012
  • 19. Lookup 10 Wednesday, January 18, 2012
  • 20. Lookup 10 Wednesday, January 18, 2012
  • 22. Lookup Copy 12 Wednesday, January 18, 2012
  • 23. Lookup ?Copy 12 Wednesday, January 18, 2012
  • 24. Lookup ?Copy 12 Wednesday, January 18, 2012
  • 26. Do The Simplest Thing That Could Possibly Work 13 Wednesday, January 18, 2012
  • 27. Active Record 14 Wednesday, January 18, 2012
  • 28. Wait. What? Active Record 14 Wednesday, January 18, 2012
  • 29. id c Lookup timeslice uses Copy 15 Wednesday, January 18, 2012
  • 30. Lookup id uses c timeslice Copy 15 Wednesday, January 18, 2012
  • 31. Lookup id uses c timeslice Copy 16 Wednesday, January 18, 2012
  • 32. Lookup id c timeslice Copyuses 16 Wednesday, January 18, 2012
  • 33. Lookup id c c copy tim use id Copy c omitted_ animals id u ti c u ti 17 Wednesday, January 18, 2012
  • 34. Lookup copy c omitted_ id id tim use c animals c Copyid u ti c u ti 17 Wednesday, January 18, 2012
  • 35. Lookup id tim use c copy omitted_ c id animals c Copyid u ti c u ti 17 Wednesday, January 18, 2012
  • 36. Lookup id tim use c copy omitted_ c animals Copy id c u ti id c u ti 17 Wednesday, January 18, 2012
  • 37. Lookup id tim use c copy omitted_ c animals Copy id c u ti id c u ti 18 Wednesday, January 18, 2012
  • 38. Lookup Copy 18 Wednesday, January 18, 2012
  • 39. Lookup Copy 19 Wednesday, January 18, 2012
  • 40. Lookup Copy 19 Wednesday, January 18, 2012
  • 43. Lookup Copy 21 Wednesday, January 18, 2012
  • 44. Lookup Copy 21 Wednesday, January 18, 2012
  • 45. and... 22 Wednesday, January 18, 2012
  • 46. and... 22 Wednesday, January 18, 2012
  • 48. {} 23 Wednesday, January 18, 2012
  • 49. {} 23 Wednesday, January 18, 2012
  • 50. {} {} {} {} {} {} {} {} {} {} {} 24 Wednesday, January 18, 2012
  • 56. Immutability 28 Wednesday, January 18, 2012
  • 57. Immutability 28 Wednesday, January 18, 2012
  • 58. Immutability 28 Wednesday, January 18, 2012
  • 59. Hygiene 29 Wednesday, January 18, 2012
  • 60. Hygiene “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” 29 Wednesday, January 18, 2012
  • 61. Hygiene “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” 29 Wednesday, January 18, 2012
  • 62. Hygiene a= “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” 29 Wednesday, January 18, 2012
  • 63. Hygiene a= “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” a 29 Wednesday, January 18, 2012
  • 64. Hygiene a= “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” a 29 Wednesday, January 18, 2012
  • 65. Consequences 30 Wednesday, January 18, 2012
  • 66. Consequences 30 Wednesday, January 18, 2012
  • 67. Consequences 5 31 Wednesday, January 18, 2012
  • 68. Consequences 5 32 Wednesday, January 18, 2012
  • 69. Consequences 5 32 Wednesday, January 18, 2012
  • 70. Consequences 5 32 Wednesday, January 18, 2012
  • 72. In Short: Why Not? 34 Wednesday, January 18, 2012
  • 73. In Short: Why Not? • Removes one source of bugs 34 Wednesday, January 18, 2012
  • 74. In Short: Why Not? • Removes one source of bugs • Not harder than coding mutably • (once you’re used to it) 34 Wednesday, January 18, 2012
  • 75. In Short: Why Not? • Removes one source of bugs • Not harder than coding mutably • (once you’re used to it) • Knowing how to do more is better than knowing how to do less 34 Wednesday, January 18, 2012
  • 76. Ruby 35 Wednesday, January 18, 2012
  • 77. Ruby 35 Wednesday, January 18, 2012
  • 78. Ruby Haskell 35 Wednesday, January 18, 2012
  • 79. Ruby Haskell 35 Wednesday, January 18, 2012
  • 80. Ruby Haskell Always Lazy 35 Wednesday, January 18, 2012
  • 81. Ruby Mostly Eager Haskell Always Lazy 35 Wednesday, January 18, 2012
  • 82. Some Lazy Ruby 36 Wednesday, January 18, 2012
  • 83. Some Lazy Ruby 37 Wednesday, January 18, 2012
  • 84. Some Lazy Ruby Only a few special Ruby operators are lazy 37 Wednesday, January 18, 2012
  • 85. And Why Not? 38 Wednesday, January 18, 2012
  • 86. And Why Not? 39 Wednesday, January 18, 2012
  • 87. a= 40 Wednesday, January 18, 2012
  • 88. a= 40 Wednesday, January 18, 2012
  • 89. a= a a 40 Wednesday, January 18, 2012
  • 90. a= a a 40 Wednesday, January 18, 2012
  • 91. a= a a 40 Wednesday, January 18, 2012
  • 92. a= a a 40 Wednesday, January 18, 2012
  • 93. One Less Thing a= to Worry About a a 40 Wednesday, January 18, 2012
  • 95. a= a a free(a) 42 Wednesday, January 18, 2012
  • 96. a= a a 42 Wednesday, January 18, 2012
  • 97. a= a a 43 Wednesday, January 18, 2012
  • 99. OMG!!! As Big As Garbage Collection??? 44 Wednesday, January 18, 2012
  • 100. OMG!!! As Big As Garbage Collection??? Calculations You Trace Through Time 44 Wednesday, January 18, 2012
  • 101. OMG!!! As Big As Garbage Collection??? Calculations Resources You You Trace Consume Through Time As Needed 44 Wednesday, January 18, 2012
  • 102. Lazy Sequences 45 Wednesday, January 18, 2012
  • 103. Lazy Sequences 45 Wednesday, January 18, 2012
  • 104. Lazy Sequences 45 Wednesday, January 18, 2012
  • 105. What You Get With Lazy Sequences Don’t Like 46 Wednesday, January 18, 2012
  • 106. What You Get With Lazy Sequences Don’t Like How to Make the Next One 46 Wednesday, January 18, 2012
  • 107. What You Get With Lazy Sequences Don’t Like How to Make the Next One 46 Wednesday, January 18, 2012
  • 108. What You Get With Lazy Sequences Don’t Like Which Ones How to Make the Next One 46 Wednesday, January 18, 2012
  • 109. What You Get With Lazy Sequences Don’t Like Which Ones How to Make the Next One 46 Wednesday, January 18, 2012
  • 110. What You Get With Lazy Sequences Like Wednesday, January 18, 2012
  • 111. What You Get With Lazy Sequences Like Wednesday, January 18, 2012
  • 112. What You Get With Lazy Sequences Like How to Make the Next One Wednesday, January 18, 2012
  • 113. What You Get With Lazy Sequences Like How to Make the Next One Which Ones Wednesday, January 18, 2012
  • 114. github.com/marick/stunted Google groups: rubyfoopers 48 Wednesday, January 18, 2012
  • 115. object.f(2, 3, 4) def Float, Integer ... def Integer, Float f.(2.0, 2) 49 Wednesday, January 18, 2012
  • 116. github.com/marick/stunted Google groups: rubyfoopers Expressiveness Efficiency Gems 50 Wednesday, January 18, 2012