SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Tomorrow’s Programming
   Languages Today




   Joshua Wehner, Unspace
  @jaw6, joshua@unspace.ca
A story

‣ About a year ago...
‣ Working in Amsterdam
‣ Innovation Factory
‣ Sam Aaron
  (@samaaron)
All About Ioke
‣ Sounds like Eye-Oh-Key
‣ Ola Bini: JRuby Core,
  ThoughtWorks

‣ Dynamic, strongly typed
‣ Hosted on the JVM
‣ Inspired by Io, Smalltalk,
  Self, Lisp

‣ Prototype-based,
                               http://github.com/olabini/ioke/
  homoiconic
                                   http://olabini.com/blog/
Can your language do this?
RPS = Origin mimic do(
  Player = Origin mimic
  Field = Origin mimic

  Field pass = macro(
    RPS Player with(name: call message name asText, field: self))

 scores = {} withDefault(0)

 Player throws = macro(
   field plays << (self name => call message next name)
   call message -> call message next next
 )

 win = method(p,
   scores[p key] += 1
   "#{p key} wins" println)

 draw = method("Draw" println)

 play = macro(
   field = Field with(plays: [])
   call arguments[0] evaluateOn(field)
   p1 = field plays[0]
   p2 = field plays[1]

    case([p1 value, p2 value],
Rock Paper Scissors.ik
    RPS play(
      Carlos throws paper
      Ola throws rock
    )

    RPS play(
      Carlos throws scissors
      Ola throws rock
    )

    RPS play(
      Carlos throws scissors
      Ola throws scissors
    )
Rock Paper Scissors.rb
RPS.play {
  Sam throws paper
  Ola shoots rock
}

RPS.play {
  Sam throws paper
  Ola shoots scissors
}

RPS.play {
  Sam throws rock
  Ola shoots rock
}
Rock Paper Scissors.rb
                        def method_missing(method_name, object=nil)
                          if [:paper, :rock, :scissors].include? method_name
                            method_name.to_s
RPS.play {                elsif RPS.playing_with?(method_name)
  Sam throws paper          RPS.play_as(Player.new(:name => method_name.to_s))
  Ola shoots rock         elsif [:throws, :shoots].include?(method_name)
                            RPS.play_with(object)
}
                          else
                            method_name.to_s
RPS.play {                end
  Sam throws paper      end

  Ola shoots scissors
}

RPS.play {
  Sam throws rock
  Ola shoots rock
}
Don’t try this at home
def method_missing(method_name, object=nil)
  if [:paper, :rock, :scissors].include? method_name
    method_name.to_s
  elsif RPS.playing_with?(method_name)
    RPS.play_as(Player.new(:name => method_name.to_s))
  elsif [:throws, :shoots].include?(method_name)
    RPS.play_with(object)
  else
    method_name.to_s
  end
end
The shape of things to come
; set segment register:       play = macro(
mov     ax, 0b800h            field = Field with(plays: [])
mov     ds, ax                call arguments[0] evaluateOn(field)
                              p1 = field plays[0]
; print "hello world"         p2 = field plays[1]
; first byte is ascii code, second byte is color code.
mov [02h], 'h'                case([p1 value, p2 value],
mov [04h], 'e'                  [:paper, :rock], win(p1),
mov [06h], 'l'                  [:rock, :scissors], win(p1),
mov [08h], 'l'                  [:scissors, :paper], win(p1),
mov [0ah], 'o'                  [:rock, :paper], win(p2),
mov [0ch], ','                  [:paper, :scissors], win(p2),
mov [0eh], 'w'                  [:scissors, :rock], win(p2),
mov [10h], 'o'                  else, draw)
mov [12h], 'r'
mov [14h], 'l'
mov [16h], 'd'
mov [18h], '!'
[Hal open:[Doors getByLocation:podbay]]
   HAL.open(Door.find(:all, :podbay))
     Open the pod bay doors, Hal.
Hal, could you open those doors?
Open the doors in the pod area, Hal.
   Open the pod bay doors, Hal.
`Twas brillig, and the slithy
toves
  Did gyre and gimble in the
wabe:
All mimsy were the borogoves,
  And the mome raths
outgrabe.
"Beware the Jabberwock, my
son!
  The jaws that bite, the claws
that catch!
Beware the Jubjub bird, and
shun
  The frumious Bandersnatch!"
He took his vorpal sword in
hand:
  Long time the manxome foe
he sought --
So rested he by the Tumtum
tree,
Language is tricky
‣ Until the police arrest the drug dealers control the street.
‣ The complex houses married and single students and
  their families.

‣ The cotton clothing is usually made of grows in
  Mississippi.
Sub Shop DSL
                         rye, size:regular,
I’d like a ham and
                          +cheese, +ham,
cheese on rye, extra
                          ++mayo,
mayo, hold the pickles
                          --pickles
Cucumber.rb
# language: en
Feature: Addition
 In order to avoid silly mistakes
 As a math idiot
 I want to be told the sum of two numbers

 Scenario Outline: Add two numbers
  Given I have entered <input_1> into the calculator
  And I have entered <input_2> into the calculator
  When I press <button>
  Then the result should be <output> on the screen

 Examples:
  | input_1 | input_2 | button | output |
  | 20     | 30    | add | 50      |
  |2      |5     | add | 7      |
  |0      | 40    | add | 40      |
Nobody says this
“It was better writing ...
      NSString = @"String here";
      for(i=0;i<=array.size();i++)

than writing ...
          string = 'String here'
         for widget in container
for our project.”
Language is #4,891
• “It’s what the client demanded
  requested”

• “It’s on the ‘approved` list”
• Works with other library/API
• It works with what we have already
Bright, Shiny Future
‣ JVM: Ioke, JRuby,
  Clojure, Scala

‣ CLR: Ioke, IronRuby,
  IronScheme, IronLisp

‣ Perl6/Parrot
Oh, Nothing Much, Just
Inventing New Languages
Credit where due
Buck Rogers Toys - http://www.bergintoys.com/sp_vehicles/2005-
 Feb/index.html - Trinity College Library - http://www.flickr.com/
   photos/ec-jpr/3493900135/ - Jabberwocky by Lewis Carroll -
 http://www.jabberwocky.com/carroll/jabber/jabberwocky.html -
        Soup Nazi / Hope by ThePeoplesCube.com - http://
   thepeoplescube.com/red/viewtopic.php?t=1884 - Garden Path
     Sentences by Fun-With-Words.com - http://www.fun-with-
words.com/ambiguous_garden_path.html - “Defendius door chain”
  by Art Lebedev studio - http://www.artlebedev.com/everything/
 defendius/ - “Perils of Modern Science” by travis76/Threadless -
          http://www.threadless.com/submission/104911/
Perils_of_Modern_Science/showmore,designs - “Seven Wheel Drive”

                        Thanks, Sam!

Weitere ähnliche Inhalte

Was ist angesagt?

PFDS 8.4.1
PFDS 8.4.1PFDS 8.4.1
PFDS 8.4.1
rf0444
 
Happy Go Programming Part 1
Happy Go Programming Part 1Happy Go Programming Part 1
Happy Go Programming Part 1
Lin Yo-An
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with it
Flavien Raynaud
 

Was ist angesagt? (20)

Kotlin For Android - Functions (part 3 of 7)
Kotlin For Android - Functions (part 3 of 7)Kotlin For Android - Functions (part 3 of 7)
Kotlin For Android - Functions (part 3 of 7)
 
Turtle Graphics in Groovy
Turtle Graphics in GroovyTurtle Graphics in Groovy
Turtle Graphics in Groovy
 
ProgrammingwithGOLang
ProgrammingwithGOLangProgrammingwithGOLang
ProgrammingwithGOLang
 
Linux basics by Raj Miraje
Linux basics by Raj MirajeLinux basics by Raj Miraje
Linux basics by Raj Miraje
 
Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?Is Haskell an acceptable Perl?
Is Haskell an acceptable Perl?
 
PFDS 8.4.1
PFDS 8.4.1PFDS 8.4.1
PFDS 8.4.1
 
ES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript SkillsES6 - Level up your JavaScript Skills
ES6 - Level up your JavaScript Skills
 
Rakudo
RakudoRakudo
Rakudo
 
Why Kotlin is your next language?
Why Kotlin is your next language? Why Kotlin is your next language?
Why Kotlin is your next language?
 
Happy Go Programming Part 1
Happy Go Programming Part 1Happy Go Programming Part 1
Happy Go Programming Part 1
 
How to write rust instead of c and get away with it
How to write rust instead of c and get away with itHow to write rust instead of c and get away with it
How to write rust instead of c and get away with it
 
Let's fly to the Kotlin Island. Just an introduction to Kotlin
Let's fly to the Kotlin Island. Just an introduction to KotlinLet's fly to the Kotlin Island. Just an introduction to Kotlin
Let's fly to the Kotlin Island. Just an introduction to Kotlin
 
Stupid Awesome Python Tricks
Stupid Awesome Python TricksStupid Awesome Python Tricks
Stupid Awesome Python Tricks
 
Functional pe(a)rls: Huey's zipper
Functional pe(a)rls: Huey's zipperFunctional pe(a)rls: Huey's zipper
Functional pe(a)rls: Huey's zipper
 
Queue in swift
Queue in swiftQueue in swift
Queue in swift
 
龍華大學前端技術分享 Part1
龍華大學前端技術分享 Part1龍華大學前端技術分享 Part1
龍華大學前端技術分享 Part1
 
Perl 5.10
Perl 5.10Perl 5.10
Perl 5.10
 
Python легко и просто. Красиво решаем повседневные задачи
Python легко и просто. Красиво решаем повседневные задачиPython легко и просто. Красиво решаем повседневные задачи
Python легко и просто. Красиво решаем повседневные задачи
 
Are we ready to Go?
Are we ready to Go?Are we ready to Go?
Are we ready to Go?
 
2014 11-12 sbsm032rstatsprogramming.key
2014 11-12 sbsm032rstatsprogramming.key2014 11-12 sbsm032rstatsprogramming.key
2014 11-12 sbsm032rstatsprogramming.key
 

Ähnlich wie Joshua Wehner - Tomorrows Programming Languages Today

Ruby 入門 第一次就上手
Ruby 入門 第一次就上手Ruby 入門 第一次就上手
Ruby 入門 第一次就上手
Wen-Tien Chang
 
Ruby 程式語言入門導覽
Ruby 程式語言入門導覽Ruby 程式語言入門導覽
Ruby 程式語言入門導覽
Wen-Tien Chang
 
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
it-people
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPy
Daniel Neuhäuser
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
Dmitry Buzdin
 

Ähnlich wie Joshua Wehner - Tomorrows Programming Languages Today (20)

NUS iOS Swift Talk
NUS iOS Swift TalkNUS iOS Swift Talk
NUS iOS Swift Talk
 
Ruby 入門 第一次就上手
Ruby 入門 第一次就上手Ruby 入門 第一次就上手
Ruby 入門 第一次就上手
 
[EN] Ada Lovelace Day 2014 - Tampon run
[EN] Ada Lovelace Day 2014  - Tampon run[EN] Ada Lovelace Day 2014  - Tampon run
[EN] Ada Lovelace Day 2014 - Tampon run
 
Invertible-syntax 入門
Invertible-syntax 入門Invertible-syntax 入門
Invertible-syntax 入門
 
ScotRuby - Dark side of ruby
ScotRuby - Dark side of rubyScotRuby - Dark side of ruby
ScotRuby - Dark side of ruby
 
Music as data
Music as dataMusic as data
Music as data
 
Arduino creative coding class part iii
Arduino creative coding class part iiiArduino creative coding class part iii
Arduino creative coding class part iii
 
Snakes and ladders
Snakes and laddersSnakes and ladders
Snakes and ladders
 
Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009
 
Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009
 
Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009Ruby presentasjon på NTNU 22 april 2009
Ruby presentasjon på NTNU 22 april 2009
 
Bulletproofing your foot for Kotlin
Bulletproofing your foot for KotlinBulletproofing your foot for Kotlin
Bulletproofing your foot for Kotlin
 
Haskell in the Real World
Haskell in the Real WorldHaskell in the Real World
Haskell in the Real World
 
Ruby 程式語言入門導覽
Ruby 程式語言入門導覽Ruby 程式語言入門導覽
Ruby 程式語言入門導覽
 
Introduction to Ruby
Introduction to RubyIntroduction to Ruby
Introduction to Ruby
 
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
«Python на острие бритвы: PyPy project» Александр Кошкин, Positive Technologies
 
Building Interpreters with PyPy
Building Interpreters with PyPyBuilding Interpreters with PyPy
Building Interpreters with PyPy
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
あたかも自然言語を書くようにコーディングしてみる
あたかも自然言語を書くようにコーディングしてみるあたかも自然言語を書くようにコーディングしてみる
あたかも自然言語を書くようにコーディングしてみる
 
Perl6 a whistle stop tour
Perl6 a whistle stop tourPerl6 a whistle stop tour
Perl6 a whistle stop tour
 

Mehr von Refresh Events

Tamera Kremer - The Social Tools Won't Save You
Tamera Kremer - The Social Tools Won't Save YouTamera Kremer - The Social Tools Won't Save You
Tamera Kremer - The Social Tools Won't Save You
Refresh Events
 
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use ThemAubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Refresh Events
 
Lynette Latinsky - Can Lunch Be On Me Today?
Lynette Latinsky - Can Lunch Be On Me Today?Lynette Latinsky - Can Lunch Be On Me Today?
Lynette Latinsky - Can Lunch Be On Me Today?
Refresh Events
 
Tim Scollick - Flex, Seo And You
Tim Scollick - Flex, Seo And YouTim Scollick - Flex, Seo And You
Tim Scollick - Flex, Seo And You
Refresh Events
 
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Refresh Events
 
Ben Vinegar - 5 Tips For Better Javascript Applications
Ben Vinegar - 5 Tips For Better Javascript ApplicationsBen Vinegar - 5 Tips For Better Javascript Applications
Ben Vinegar - 5 Tips For Better Javascript Applications
Refresh Events
 
Jonathan Dunn - Talking You Down from the Bleeding Edge
Jonathan Dunn - Talking You Down from the Bleeding EdgeJonathan Dunn - Talking You Down from the Bleeding Edge
Jonathan Dunn - Talking You Down from the Bleeding Edge
Refresh Events
 
Justin Kozuch - Lessons Learned In Community Building
Justin Kozuch - Lessons Learned In Community BuildingJustin Kozuch - Lessons Learned In Community Building
Justin Kozuch - Lessons Learned In Community Building
Refresh Events
 
Jenmy Huynh - Finding Opportunities
Jenmy Huynh - Finding OpportunitiesJenmy Huynh - Finding Opportunities
Jenmy Huynh - Finding Opportunities
Refresh Events
 
Adil Dhalla - My City Lives
Adil Dhalla - My City LivesAdil Dhalla - My City Lives
Adil Dhalla - My City Lives
Refresh Events
 
Andy Walker - Little Geeks Foundation
Andy Walker - Little Geeks FoundationAndy Walker - Little Geeks Foundation
Andy Walker - Little Geeks Foundation
Refresh Events
 
Satish Kanwar - Entrepreneur Versus Employee
Satish Kanwar - Entrepreneur Versus EmployeeSatish Kanwar - Entrepreneur Versus Employee
Satish Kanwar - Entrepreneur Versus Employee
Refresh Events
 
Dre Labre - The Game Of Opposites
Dre Labre - The Game Of OppositesDre Labre - The Game Of Opposites
Dre Labre - The Game Of Opposites
Refresh Events
 
Evelyn So - A Few Social Media Stories
Evelyn So - A Few Social Media StoriesEvelyn So - A Few Social Media Stories
Evelyn So - A Few Social Media Stories
Refresh Events
 
Daniel Patricio: I Hope Mobile Kills Advertising
Daniel Patricio: I Hope Mobile Kills AdvertisingDaniel Patricio: I Hope Mobile Kills Advertising
Daniel Patricio: I Hope Mobile Kills Advertising
Refresh Events
 
Tom Purves: Designing for An Augmented Reality World
Tom Purves: Designing for An Augmented Reality WorldTom Purves: Designing for An Augmented Reality World
Tom Purves: Designing for An Augmented Reality World
Refresh Events
 
Jason Sadler: I Wear Your Shirt
Jason Sadler: I Wear Your ShirtJason Sadler: I Wear Your Shirt
Jason Sadler: I Wear Your Shirt
Refresh Events
 
Elaine Chen: Mobile Touchphone UI Design 101
Elaine Chen: Mobile Touchphone UI Design 101Elaine Chen: Mobile Touchphone UI Design 101
Elaine Chen: Mobile Touchphone UI Design 101
Refresh Events
 

Mehr von Refresh Events (20)

Tamera Kremer - The Social Tools Won't Save You
Tamera Kremer - The Social Tools Won't Save YouTamera Kremer - The Social Tools Won't Save You
Tamera Kremer - The Social Tools Won't Save You
 
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use ThemAubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
Aubrey Podolsky - Sysomos' Social Media Tools and How To Use Them
 
Lynette Latinsky - Can Lunch Be On Me Today?
Lynette Latinsky - Can Lunch Be On Me Today?Lynette Latinsky - Can Lunch Be On Me Today?
Lynette Latinsky - Can Lunch Be On Me Today?
 
Michael Burke
Michael BurkeMichael Burke
Michael Burke
 
Tim Scollick - Flex, Seo And You
Tim Scollick - Flex, Seo And YouTim Scollick - Flex, Seo And You
Tim Scollick - Flex, Seo And You
 
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
Colin Bowern - The Not So Scary Side Of Asp.Net – Model View Controller In Th...
 
Ben Vinegar - 5 Tips For Better Javascript Applications
Ben Vinegar - 5 Tips For Better Javascript ApplicationsBen Vinegar - 5 Tips For Better Javascript Applications
Ben Vinegar - 5 Tips For Better Javascript Applications
 
Jonathan Dunn - Talking You Down from the Bleeding Edge
Jonathan Dunn - Talking You Down from the Bleeding EdgeJonathan Dunn - Talking You Down from the Bleeding Edge
Jonathan Dunn - Talking You Down from the Bleeding Edge
 
Justin Kozuch - Lessons Learned In Community Building
Justin Kozuch - Lessons Learned In Community BuildingJustin Kozuch - Lessons Learned In Community Building
Justin Kozuch - Lessons Learned In Community Building
 
Jenmy Huynh - Finding Opportunities
Jenmy Huynh - Finding OpportunitiesJenmy Huynh - Finding Opportunities
Jenmy Huynh - Finding Opportunities
 
Adil Dhalla - My City Lives
Adil Dhalla - My City LivesAdil Dhalla - My City Lives
Adil Dhalla - My City Lives
 
Andy Walker - Little Geeks Foundation
Andy Walker - Little Geeks FoundationAndy Walker - Little Geeks Foundation
Andy Walker - Little Geeks Foundation
 
Satish Kanwar - Entrepreneur Versus Employee
Satish Kanwar - Entrepreneur Versus EmployeeSatish Kanwar - Entrepreneur Versus Employee
Satish Kanwar - Entrepreneur Versus Employee
 
Jason Schneider - What The Font?
Jason Schneider - What The Font?Jason Schneider - What The Font?
Jason Schneider - What The Font?
 
Dre Labre - The Game Of Opposites
Dre Labre - The Game Of OppositesDre Labre - The Game Of Opposites
Dre Labre - The Game Of Opposites
 
Evelyn So - A Few Social Media Stories
Evelyn So - A Few Social Media StoriesEvelyn So - A Few Social Media Stories
Evelyn So - A Few Social Media Stories
 
Daniel Patricio: I Hope Mobile Kills Advertising
Daniel Patricio: I Hope Mobile Kills AdvertisingDaniel Patricio: I Hope Mobile Kills Advertising
Daniel Patricio: I Hope Mobile Kills Advertising
 
Tom Purves: Designing for An Augmented Reality World
Tom Purves: Designing for An Augmented Reality WorldTom Purves: Designing for An Augmented Reality World
Tom Purves: Designing for An Augmented Reality World
 
Jason Sadler: I Wear Your Shirt
Jason Sadler: I Wear Your ShirtJason Sadler: I Wear Your Shirt
Jason Sadler: I Wear Your Shirt
 
Elaine Chen: Mobile Touchphone UI Design 101
Elaine Chen: Mobile Touchphone UI Design 101Elaine Chen: Mobile Touchphone UI Design 101
Elaine Chen: Mobile Touchphone UI Design 101
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

Joshua Wehner - Tomorrows Programming Languages Today

  • 1. Tomorrow’s Programming Languages Today Joshua Wehner, Unspace @jaw6, joshua@unspace.ca
  • 2. A story ‣ About a year ago... ‣ Working in Amsterdam ‣ Innovation Factory ‣ Sam Aaron (@samaaron)
  • 3. All About Ioke ‣ Sounds like Eye-Oh-Key ‣ Ola Bini: JRuby Core, ThoughtWorks ‣ Dynamic, strongly typed ‣ Hosted on the JVM ‣ Inspired by Io, Smalltalk, Self, Lisp ‣ Prototype-based, http://github.com/olabini/ioke/ homoiconic http://olabini.com/blog/
  • 4. Can your language do this? RPS = Origin mimic do( Player = Origin mimic Field = Origin mimic Field pass = macro( RPS Player with(name: call message name asText, field: self)) scores = {} withDefault(0) Player throws = macro( field plays << (self name => call message next name) call message -> call message next next ) win = method(p, scores[p key] += 1 "#{p key} wins" println) draw = method("Draw" println) play = macro( field = Field with(plays: []) call arguments[0] evaluateOn(field) p1 = field plays[0] p2 = field plays[1] case([p1 value, p2 value],
  • 5. Rock Paper Scissors.ik RPS play( Carlos throws paper Ola throws rock ) RPS play( Carlos throws scissors Ola throws rock ) RPS play( Carlos throws scissors Ola throws scissors )
  • 6. Rock Paper Scissors.rb RPS.play { Sam throws paper Ola shoots rock } RPS.play { Sam throws paper Ola shoots scissors } RPS.play { Sam throws rock Ola shoots rock }
  • 7. Rock Paper Scissors.rb def method_missing(method_name, object=nil) if [:paper, :rock, :scissors].include? method_name method_name.to_s RPS.play { elsif RPS.playing_with?(method_name) Sam throws paper RPS.play_as(Player.new(:name => method_name.to_s)) Ola shoots rock elsif [:throws, :shoots].include?(method_name) RPS.play_with(object) } else method_name.to_s RPS.play { end Sam throws paper end Ola shoots scissors } RPS.play { Sam throws rock Ola shoots rock }
  • 8. Don’t try this at home def method_missing(method_name, object=nil) if [:paper, :rock, :scissors].include? method_name method_name.to_s elsif RPS.playing_with?(method_name) RPS.play_as(Player.new(:name => method_name.to_s)) elsif [:throws, :shoots].include?(method_name) RPS.play_with(object) else method_name.to_s end end
  • 9. The shape of things to come ; set segment register: play = macro( mov ax, 0b800h field = Field with(plays: []) mov ds, ax call arguments[0] evaluateOn(field) p1 = field plays[0] ; print "hello world" p2 = field plays[1] ; first byte is ascii code, second byte is color code. mov [02h], 'h' case([p1 value, p2 value], mov [04h], 'e' [:paper, :rock], win(p1), mov [06h], 'l' [:rock, :scissors], win(p1), mov [08h], 'l' [:scissors, :paper], win(p1), mov [0ah], 'o' [:rock, :paper], win(p2), mov [0ch], ',' [:paper, :scissors], win(p2), mov [0eh], 'w' [:scissors, :rock], win(p2), mov [10h], 'o' else, draw) mov [12h], 'r' mov [14h], 'l' mov [16h], 'd' mov [18h], '!'
  • 10. [Hal open:[Doors getByLocation:podbay]] HAL.open(Door.find(:all, :podbay)) Open the pod bay doors, Hal.
  • 11. Hal, could you open those doors? Open the doors in the pod area, Hal. Open the pod bay doors, Hal.
  • 12. `Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!" He took his vorpal sword in hand: Long time the manxome foe he sought -- So rested he by the Tumtum tree,
  • 13. Language is tricky ‣ Until the police arrest the drug dealers control the street. ‣ The complex houses married and single students and their families. ‣ The cotton clothing is usually made of grows in Mississippi.
  • 14. Sub Shop DSL rye, size:regular, I’d like a ham and +cheese, +ham, cheese on rye, extra ++mayo, mayo, hold the pickles --pickles
  • 15. Cucumber.rb # language: en Feature: Addition In order to avoid silly mistakes As a math idiot I want to be told the sum of two numbers Scenario Outline: Add two numbers Given I have entered <input_1> into the calculator And I have entered <input_2> into the calculator When I press <button> Then the result should be <output> on the screen Examples: | input_1 | input_2 | button | output | | 20 | 30 | add | 50 | |2 |5 | add | 7 | |0 | 40 | add | 40 |
  • 16. Nobody says this “It was better writing ... NSString = @"String here"; for(i=0;i<=array.size();i++) than writing ... string = 'String here' for widget in container for our project.”
  • 17. Language is #4,891 • “It’s what the client demanded requested” • “It’s on the ‘approved` list” • Works with other library/API • It works with what we have already
  • 18. Bright, Shiny Future ‣ JVM: Ioke, JRuby, Clojure, Scala ‣ CLR: Ioke, IronRuby, IronScheme, IronLisp ‣ Perl6/Parrot
  • 19. Oh, Nothing Much, Just Inventing New Languages
  • 20. Credit where due Buck Rogers Toys - http://www.bergintoys.com/sp_vehicles/2005- Feb/index.html - Trinity College Library - http://www.flickr.com/ photos/ec-jpr/3493900135/ - Jabberwocky by Lewis Carroll - http://www.jabberwocky.com/carroll/jabber/jabberwocky.html - Soup Nazi / Hope by ThePeoplesCube.com - http:// thepeoplescube.com/red/viewtopic.php?t=1884 - Garden Path Sentences by Fun-With-Words.com - http://www.fun-with- words.com/ambiguous_garden_path.html - “Defendius door chain” by Art Lebedev studio - http://www.artlebedev.com/everything/ defendius/ - “Perils of Modern Science” by travis76/Threadless - http://www.threadless.com/submission/104911/ Perils_of_Modern_Science/showmore,designs - “Seven Wheel Drive” Thanks, Sam!