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 ...
Can your language do this?
RPS = Origin mimic do(
  Player = Origin mimic
  Field = Origin mimic

  Field pass = macro(
  ...
Rock Paper Scissors.ik
    RPS play(
      Carlos throws paper
      Ola throws rock
    )

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

RPS.play {
  Sam throws paper
  Ola shoots sciss...
Rock Paper Scissors.rb
                        def method_missing(method_name, object=nil)
                          if [:...
Don’t try this at home
def method_missing(method_name, object=nil)
  if [:paper, :rock, :scissors].include? method_name
  ...
The shape of things to come
; set segment register:       play = macro(
mov     ax, 0b800h            field = Field with(p...
[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
...
Language is tricky
‣ Until the police arrest the drug dealers control the street.
‣ The complex houses married and single ...
Sub Shop DSL
                         rye, size:regular,
I’d like a ham and
                          +cheese, +ham,
chees...
Cucumber.rb
# language: en
Feature: Addition
 In order to avoid silly mistakes
 As a math idiot
 I want to be told the sum...
Nobody says this
“It was better writing ...
      NSString = @"String here";
      for(i=0;i<=array.size();i++)

than writ...
Language is #4,891
• “It’s what the client demanded
  requested”

• “It’s on the ‘approved` list”
• Works with other libra...
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 ...
Upcoming SlideShare
Loading in …5
×

Joshua Wehner - Tomorrows Programming Languages Today

3,631 views

Published on

Published in: Technology, Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
3,631
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Joshua Wehner - Tomorrows Programming Languages Today

  1. 1. Tomorrow’s Programming Languages Today Joshua Wehner, Unspace @jaw6, joshua@unspace.ca
  2. 2. A story ‣ About a year ago... ‣ Working in Amsterdam ‣ Innovation Factory ‣ Sam Aaron (@samaaron)
  3. 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. 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. 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. 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. 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. 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. 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. 10. [Hal open:[Doors getByLocation:podbay]] HAL.open(Door.find(:all, :podbay)) Open the pod bay doors, Hal.
  11. 11. Hal, could you open those doors? Open the doors in the pod area, Hal. Open the pod bay doors, Hal.
  12. 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. 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. 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. 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. 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. 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. 18. Bright, Shiny Future ‣ JVM: Ioke, JRuby, Clojure, Scala ‣ CLR: Ioke, IronRuby, IronScheme, IronLisp ‣ Perl6/Parrot
  19. 19. Oh, Nothing Much, Just Inventing New Languages
  20. 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!

×