[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
SlideShare a Scribd company logo
SCALA VS RUBY
   Rémy-Christophe Schermesser
         rcs@octo.com
          @El_Picador



                                 1
2
3
4
5
6
7
<relationships>
 <ejb-relation>
   <ejb-relation-name>a-b</ejb-relation-name>
   <ejb-relationship-role>
     <!-- A => B -->
     <ejb-relationship-role-name>a2b</ejb-
relationship-role-name>
     <multiplicity>One</multiplicity>
     <relationship-role-source>
       <ejb-name>A</ejb-name>
     </relationship-role-source>
     <cmr-field>
       <cmr-field-name>b</cmr-field-name>
     </cmr-field>
   </ejb-relationship-role>
   <ejb-relationship-role>
     <!-- B => A -->
     <ejb-relationship-role-name>b2a</ejb-
relationship-role-name>
     <multiplicity>One</multiplicity>
     <relationship-role-source>
       <ejb-name>B</ejb-name>
     </relationship-role-source>
   </ejb-relationship-role>
 </ejb-relation>
</relationships>

                                                8
9
Functional
programming




              10
Functional   APIs
programming




                     10
Functional   APIs
programming


              gems


                     10
Functional   APIs
programming


Easy to use   gems


                     10
11
Functional
programming ?




                12
Functional
programming ?




                12
Functional    APIs ?
programming ?




                         12
Functional    APIs ?
programming ?




                         12
Functional     APIs ?
programming ?


                gems ?


                          12
Functional     APIs ?
programming ?


                gems ?


                          12
Functional     APIs ?
programming ?


Easy to use ?   gems ?


                          12
Functional     APIs ?
programming ?


Easy to use ?   gems ?


                          12
VS




     13
FIGHT
  VS




        13
DRAW
   VS



 Sort of ...
               13
WHY A DRAW ?




               14
WHY A DRAW ?

   let’s talk about languages




                                14
WHY A DRAW ?

             let’s talk about languages

let’s frameworkise




                                          14
WHY A DRAW ?

             let’s talk about languages

let’s frameworkise

                       let’s deploy


                                          14
WHY A DRAW ?

             let’s talk about languages

let’s frameworkise

                       let’s deploy
let’s meet people
                                          14
15
LET’S TALK ABOUT
  LANGUAGES



                   15
16
THE
BEST THING ABOUT
SCALA & RUBY
                   16
No

at the end of lines

                      17
No
        ;
at the end of lines

                      17
Scala No Ruby
 1     ; 1
at the end of lines

                      17
18
λ
    18
list.filter(_ % 2 == 0)

       list.filter {
         e: Int => (e % 2 == 0))
       }




                                   19
list.filter(_ % 2 == 0)

       list.filter {
         e: Int => (e % 2 == 0))
       }




             list.select do |e|
               e % 2 == 0
             end
                                   19
list.filter(_ % 2 == 0)


   Scala
       list.filter {

       }
                    Ruby
         e: Int => (e % 2 == 0))


    2                2
             list.select do |e|
               e % 2 == 0
             end
                                   19
TYPES !



          20
TYPES !   STATIC




                   20
TYPES !              STATIC


var hash =
  new HashMap[Int, String]




                               20
TYPES !              STATIC


var hash =
  new HashMap[Int, String]

                hash = Hash.new
                hash = 3
                                  20
TYPES !              STATIC


var hash =
  new HashMap[Int, String]

                hash = Hash.new
                hash = 3
                                  20
TYPES ! STATIC
  Scala Ruby
   2     2
var hash =
  new HashMap[Int, String]

                hash = Hash.new
                hash = 3
                                  20
PATTERN
MATCHING




           21
PATTERN
 MATCHING
def matchTest(x: Any): Any =
  x match {
    case 1 => "one"
    case "two" => 2
    case y: Int => "scala.Int"
    case 2 :: tail => tail
}

                                 21
gem install case




                   22
gem install case

require 'case'

def matchTest x
  case x
  when 1
    "one"
  when "two"
    2
  when Case::All[Integer]
    "ruby.Integer"
  when Case::Array[2, Case::Any]
    x[1..-1]
  end
end
                                   22
gem install case

require 'case'

def matchTest x
  case x
  when 1
    "one"
  when "two"
    2
  when Case::All[Integer]
    "ruby.Integer"
  when Case::Array[2, Case::Any]
    x[1..-1]
  end
end
                                   22
gem install case

require 'case'


 Scala
def matchTest x
  case x
  when 1
                        Ruby
  3                      2
    "one"
  when "two"
    2
  when Case::All[Integer]
    "ruby.Integer"
  when Case::Array[2, Case::Any]
    x[1..-1]
  end
end
                                   22
MONKEY
PATCHING




           23
puts "a".to_s # => a




                       24
puts "a".to_s # => a

class String
  def to_s
    "Monkey !"
  end

  def my_method
    "Patch !"
  end
end




                       24
puts "a".to_s # => a

class String
  def to_s
    "Monkey !"
  end

  def my_method
    "Patch !"
  end
end

puts "a".to_s # => Monkey !



                              24
puts "a".to_s # => a

class String
  def to_s
    "Monkey !"
  end

  def my_method
    "Patch !"
  end
end

puts "a".to_s # => Monkey !

puts "a".my_method # => Patch !

                                  24
25
Implicit !




             25
Implicit !

class MySuperString(original: String) {
  def myMethod = "Patch !"
}




                                          25
Implicit !

class MySuperString(original: String) {
  def myMethod = "Patch !"
}

implicit def string2super(x: String) =
  new MySuperString(x)




                                          25
Implicit !

class MySuperString(original: String) {
  def myMethod = "Patch !"
}

implicit def string2super(x: String) =
  new MySuperString(x)



println("a".myMethod) // => Patch !


                                          25
Implicit !

  Scala                  Ruby
class MySuperString(original: String) {

}
  def myMethod = "Patch !"



   3                      3
implicit def string2super(x: String) =
  new MySuperString(x)



println("a".myMethod) // => Patch !


                                          25
Dynamic calls




                26
Dynamic calls
class Animal

  def method_missing name, *args
    if args.empty?
      puts "Animal says " + name.to_s
    else
      puts "Animal wants to " + name.to_s + args.join(", ")
    end
    self
  end

end




                                                              26
Dynamic calls
class Animal

  def method_missing name, *args
    if args.empty?
      puts "Animal says " + name.to_s
    else
      puts "Animal wants to " + name.to_s + args.join(", ")
    end
    self
  end

end


         animal = Animal.new

         animal.qualk # => Animal says : qualks !
         animal.say("hello") # => Animal wants to say hello


                                                              26
27
Scala 2.9




            27
Scala 2.9
class Animal extends Dynamic {
  def _select_(name: String) = println("Animal says " + name)

    def _invoke_(name: String, args: Any*) = {
      println("Animal wants to " + name + args.mkString(", "))
      this
    }

}




                                                                 27
Scala 2.9
class Animal extends Dynamic {
  def _select_(name: String) = println("Animal says " + name)

    def _invoke_(name: String, args: Any*) = {
      println("Animal wants to " + name + args.mkString(", "))
      this
    }

}




         val animal = new Animal
         animal.qualk // => Animal says qualk
         animal.say("hello") // => Animal wants to say hello




                                                                 27
Scala 2.9
class Animal extends Dynamic {
  def _select_(name: String) = println("Animal says " + name)

    def _invoke_(name: String, args: Any*) = {
      println("Animal wants to " + name + args.mkString(", "))
      this
    }

}




         val animal = new Animal
         animal.qualk // => Animal says qualk
         animal.say("hello") // => Animal wants to say hello




                                                                 27
Scala 2.9
        Scala
class Animal extends Dynamic {

                                          Ruby
  def _select_(name: String) = println("Animal says " + name)

    def _invoke_(name: String, args: Any*) = {




         4                                 4
      println("Animal wants to " + name + args.mkString(", "))
      this
    }

}




         val animal = new Animal
         animal.qualk // => Animal says qualk
         animal.say("hello") // => Animal wants to say hello




                                                                 27
Traits !
 trait PimpMyClass {
   def myMethod = println("myMethod")
 }

 class IncludeTrait extends PimpMyClass

 (new IncludeTrait).myMethod




                                          28
Traits !
 trait PimpMyClass {
   def myMethod = println("myMethod")
 }

 class IncludeTrait extends PimpMyClass

 (new IncludeTrait).myMethod




                                          28
Modules !
    module PimpMyClass
      def my_method
        puts "my_method"
      end
    end

    class IncludeModule
      include PimpMyClass
    end

    IncludeModule.new.my_method


                                  29
Modules !
  Scala
    module PimpMyClass
      def my_method   Ruby
        puts "my_method"


   5                   5
      end
    end

    class IncludeModule
      include PimpMyClass
    end

    IncludeModule.new.my_method


                                  29
DUCK
TYPING




         30
DUCK
              TYPING



It quacks !




                       30
DUCK
              TYPING



It quacks !
It walks !



                       30
DUCK
              TYPING



It quacks !
It walks !



                       30
class Duck
  def quack; end
  def walk; end
end




                   31
class Duck
  def quack; end
  def walk; end    class Platypus
end                  def quack; end
                     def walk; end
                   end




                                      31
class Duck
   def quack; end
   def walk; end       class Platypus
 end                     def quack; end
                         def walk; end
                       end


def act_as_a_duck animal
  animal.quack
  animal.walk
end




                                          31
class Duck
   def quack; end
   def walk; end        class Platypus
 end                      def quack; end
                          def walk; end
                        end


def act_as_a_duck animal
  animal.quack
  animal.walk      duck = Duck.new
end                platypus = Platypus.new

                    act_as_a_duck(duck)
                    act_as_a_duck(platypus)


                                              31
class Duck {
  def quack = ...
  def walk = ...
}




                    32
class Duck {
  def quack = ...
  def walk = ...    class Platypus {
}                     def quack = ...
                      def walk = ...
                    }




                                        32
class Duck {
   def quack = ...
   def walk = ...     class Platypus {
 }                      def quack = ...
                        def walk = ...
                      }

def ActAsADuck(a: { def quack; def walk })= {
  a.quack
  a.walk
}




                                            32
class Duck {
   def quack = ...
   def walk = ...     class Platypus {
 }                      def quack = ...
                        def walk = ...
                      }

def ActAsADuck(a: { def quack; def walk })= {
  a.quack
  a.walk
}                val duck = new Duck
                 val platypus = new
                 Platypus

                ActAsADuck(duck)
                ActAsADuck(platypus)
                                            32
class Duck {
   def quack = ...
   def walk = ...

    Scala                 Ruby
                      class Platypus {
 }                      def quack = ...
                        def walk = ...
                      }




}
     6
  a.quack
  a.walk
                           6
def ActAsADuck(a: { def quack; def walk })= {


                 val duck = new Duck
                 val platypus = new
                 Platypus

                ActAsADuck(duck)
                ActAsADuck(platypus)
                                            32
≃
    33
≃
Only learn the
   syntax
                 33
34
LET’S FRAMEWORKISE




                     34
35
Test::Unit


    rSpec




             35
UNIT TESTING




               36
test "my test" do
  array = [1, 2, 3]
  assert_equal 1, array.first
end


         UNIT TESTING




                                36
test "my test" do
  array = [1, 2, 3]
  assert_equal 1, array.first
end


         UNIT TESTING
    @Test def myTest() {
        val array = List(1, 2, 3)
        assert(array(0) === 1)
    }
                                    36
SPEC TESTING




               37
describe "Get of Array" do
  it "first returns the first element" do
    array = [1, 2, 3]
    array.first.should == 1
  end
end



            SPEC TESTING




                                            37
describe "Get of Array" do
  it "first returns the first element" do
    array = [1, 2, 3]
    array.first.should == 1
  end
end



            SPEC TESTING
      describe("Get of List") {
        it("(0) returns the first element") {
          val array = List(1, 2, 3)
          array(0) should be 1
        }
      }
                                            37
BDD TESTING

Feature: The user can get an element off an array
 Scenario: first is invoked on the array
  Given a non-empty array
  When first is invoked on the array
  Then the first element should be returned




                                                    38
BDD TESTING

Feature: The user can get an element off an array
 Scenario: first is invoked on the array
  Given a non-empty array
  When first is invoked on the array
  Then the first element should be returned




                                                    38
Test::Unit


    rSpec




             39
Test::Unit

Scala   Ruby
          rSpec
 7       7

                     39
40
40
40
40
41
24 000
 gems
         41
for Rails

12 000
 gems
             41
for Rails

12 000
 gems
             41
for Rails
Scala 000
  12    Ruby
 7       8
    gems
               41
42
Actors in Ruby ?

                   43
Don’t try this at
   home !
                    43
Scala try Ruby
Don’t      this at
  8home ! 8

                     43
44
45
LET’S DEPLOY




               45
46
rails new myapp
heroku create myapp
git push heroku master




                         46
rails new myapp
heroku create myapp
git push heroku master

  http://myapp.heroku.com

                            46
Scala              Ruby
 8
 rails new myapp
 heroku create myapp9
 git push heroku master

   http://myapp.heroku.com

                             46
47
47
47
47
47
47
47
47
80




                                            60




                                          40
                        70,74
                39,74                  20

         2,07
                                      0

Average performance
   (less is better)             Source : http://shootout.alioth.debian.org
                                                                         48
Scala        JRuby           Ruby 1.9
                                                   80




                                                60




                                              40
                            70,74
                  39,74                    20

           2,07
                                          0

Average performance
   (less is better)                 Source : http://shootout.alioth.debian.org
                                                                             48
Scala        JRuby           Ruby 1.9
                                                   80




    Scala                    Ruby               60




     9            39,74
                              9
                            70,74

                                           20
                                              40




           2,07
                                          0

Average performance
   (less is better)                 Source : http://shootout.alioth.debian.org
                                                                             48
Do not talk of
     Ruby
 to an admin
                 49
Do not talk of
     Ruby
 to an admin
    Neither of Java
                      49
50
LET’S MEET PEOPLE




                    50
51
51
52
52
«Most Java Programmers
     are Morons»


                         53
«Most Java Programmers
     are Morons»

      © Rails community
                          53
Scala   Ruby
 9       9

               54
?


    ?
        55
?


    ?
        55
56

More Related Content

Scala vs Ruby

  • 1. SCALA VS RUBY Rémy-Christophe Schermesser rcs@octo.com @El_Picador 1
  • 2. 2
  • 3. 3
  • 4. 4
  • 5. 5
  • 6. 6
  • 7. 7
  • 8. <relationships> <ejb-relation> <ejb-relation-name>a-b</ejb-relation-name> <ejb-relationship-role> <!-- A => B --> <ejb-relationship-role-name>a2b</ejb- relationship-role-name> <multiplicity>One</multiplicity> <relationship-role-source> <ejb-name>A</ejb-name> </relationship-role-source> <cmr-field> <cmr-field-name>b</cmr-field-name> </cmr-field> </ejb-relationship-role> <ejb-relationship-role> <!-- B => A --> <ejb-relationship-role-name>b2a</ejb- relationship-role-name> <multiplicity>One</multiplicity> <relationship-role-source> <ejb-name>B</ejb-name> </relationship-role-source> </ejb-relationship-role> </ejb-relation> </relationships> 8
  • 9. 9
  • 11. Functional APIs programming 10
  • 12. Functional APIs programming gems 10
  • 13. Functional APIs programming Easy to use gems 10
  • 14. 11
  • 17. Functional APIs ? programming ? 12
  • 18. Functional APIs ? programming ? 12
  • 19. Functional APIs ? programming ? gems ? 12
  • 20. Functional APIs ? programming ? gems ? 12
  • 21. Functional APIs ? programming ? Easy to use ? gems ? 12
  • 22. Functional APIs ? programming ? Easy to use ? gems ? 12
  • 23. VS 13
  • 24. FIGHT VS 13
  • 25. DRAW VS Sort of ... 13
  • 26. WHY A DRAW ? 14
  • 27. WHY A DRAW ? let’s talk about languages 14
  • 28. WHY A DRAW ? let’s talk about languages let’s frameworkise 14
  • 29. WHY A DRAW ? let’s talk about languages let’s frameworkise let’s deploy 14
  • 30. WHY A DRAW ? let’s talk about languages let’s frameworkise let’s deploy let’s meet people 14
  • 31. 15
  • 32. LET’S TALK ABOUT LANGUAGES 15
  • 33. 16
  • 35. No at the end of lines 17
  • 36. No ; at the end of lines 17
  • 37. Scala No Ruby 1 ; 1 at the end of lines 17
  • 38. 18
  • 39. λ 18
  • 40. list.filter(_ % 2 == 0) list.filter { e: Int => (e % 2 == 0)) } 19
  • 41. list.filter(_ % 2 == 0) list.filter { e: Int => (e % 2 == 0)) } list.select do |e| e % 2 == 0 end 19
  • 42. list.filter(_ % 2 == 0) Scala list.filter { } Ruby e: Int => (e % 2 == 0)) 2 2 list.select do |e| e % 2 == 0 end 19
  • 43. TYPES ! 20
  • 44. TYPES ! STATIC 20
  • 45. TYPES ! STATIC var hash = new HashMap[Int, String] 20
  • 46. TYPES ! STATIC var hash = new HashMap[Int, String] hash = Hash.new hash = 3 20
  • 47. TYPES ! STATIC var hash = new HashMap[Int, String] hash = Hash.new hash = 3 20
  • 48. TYPES ! STATIC Scala Ruby 2 2 var hash = new HashMap[Int, String] hash = Hash.new hash = 3 20
  • 50. PATTERN MATCHING def matchTest(x: Any): Any = x match { case 1 => "one" case "two" => 2 case y: Int => "scala.Int" case 2 :: tail => tail } 21
  • 52. gem install case require 'case' def matchTest x case x when 1 "one" when "two" 2 when Case::All[Integer] "ruby.Integer" when Case::Array[2, Case::Any] x[1..-1] end end 22
  • 53. gem install case require 'case' def matchTest x case x when 1 "one" when "two" 2 when Case::All[Integer] "ruby.Integer" when Case::Array[2, Case::Any] x[1..-1] end end 22
  • 54. gem install case require 'case' Scala def matchTest x case x when 1 Ruby 3 2 "one" when "two" 2 when Case::All[Integer] "ruby.Integer" when Case::Array[2, Case::Any] x[1..-1] end end 22
  • 56. puts "a".to_s # => a 24
  • 57. puts "a".to_s # => a class String def to_s "Monkey !" end def my_method "Patch !" end end 24
  • 58. puts "a".to_s # => a class String def to_s "Monkey !" end def my_method "Patch !" end end puts "a".to_s # => Monkey ! 24
  • 59. puts "a".to_s # => a class String def to_s "Monkey !" end def my_method "Patch !" end end puts "a".to_s # => Monkey ! puts "a".my_method # => Patch ! 24
  • 60. 25
  • 62. Implicit ! class MySuperString(original: String) { def myMethod = "Patch !" } 25
  • 63. Implicit ! class MySuperString(original: String) { def myMethod = "Patch !" } implicit def string2super(x: String) = new MySuperString(x) 25
  • 64. Implicit ! class MySuperString(original: String) { def myMethod = "Patch !" } implicit def string2super(x: String) = new MySuperString(x) println("a".myMethod) // => Patch ! 25
  • 65. Implicit ! Scala Ruby class MySuperString(original: String) { } def myMethod = "Patch !" 3 3 implicit def string2super(x: String) = new MySuperString(x) println("a".myMethod) // => Patch ! 25
  • 67. Dynamic calls class Animal def method_missing name, *args if args.empty? puts "Animal says " + name.to_s else puts "Animal wants to " + name.to_s + args.join(", ") end self end end 26
  • 68. Dynamic calls class Animal def method_missing name, *args if args.empty? puts "Animal says " + name.to_s else puts "Animal wants to " + name.to_s + args.join(", ") end self end end animal = Animal.new animal.qualk # => Animal says : qualks ! animal.say("hello") # => Animal wants to say hello 26
  • 69. 27
  • 70. Scala 2.9 27
  • 71. Scala 2.9 class Animal extends Dynamic { def _select_(name: String) = println("Animal says " + name) def _invoke_(name: String, args: Any*) = { println("Animal wants to " + name + args.mkString(", ")) this } } 27
  • 72. Scala 2.9 class Animal extends Dynamic { def _select_(name: String) = println("Animal says " + name) def _invoke_(name: String, args: Any*) = { println("Animal wants to " + name + args.mkString(", ")) this } } val animal = new Animal animal.qualk // => Animal says qualk animal.say("hello") // => Animal wants to say hello 27
  • 73. Scala 2.9 class Animal extends Dynamic { def _select_(name: String) = println("Animal says " + name) def _invoke_(name: String, args: Any*) = { println("Animal wants to " + name + args.mkString(", ")) this } } val animal = new Animal animal.qualk // => Animal says qualk animal.say("hello") // => Animal wants to say hello 27
  • 74. Scala 2.9 Scala class Animal extends Dynamic { Ruby def _select_(name: String) = println("Animal says " + name) def _invoke_(name: String, args: Any*) = { 4 4 println("Animal wants to " + name + args.mkString(", ")) this } } val animal = new Animal animal.qualk // => Animal says qualk animal.say("hello") // => Animal wants to say hello 27
  • 75. Traits ! trait PimpMyClass { def myMethod = println("myMethod") } class IncludeTrait extends PimpMyClass (new IncludeTrait).myMethod 28
  • 76. Traits ! trait PimpMyClass { def myMethod = println("myMethod") } class IncludeTrait extends PimpMyClass (new IncludeTrait).myMethod 28
  • 77. Modules ! module PimpMyClass def my_method puts "my_method" end end class IncludeModule include PimpMyClass end IncludeModule.new.my_method 29
  • 78. Modules ! Scala module PimpMyClass def my_method Ruby puts "my_method" 5 5 end end class IncludeModule include PimpMyClass end IncludeModule.new.my_method 29
  • 80. DUCK TYPING It quacks ! 30
  • 81. DUCK TYPING It quacks ! It walks ! 30
  • 82. DUCK TYPING It quacks ! It walks ! 30
  • 83. class Duck def quack; end def walk; end end 31
  • 84. class Duck def quack; end def walk; end class Platypus end def quack; end def walk; end end 31
  • 85. class Duck def quack; end def walk; end class Platypus end def quack; end def walk; end end def act_as_a_duck animal animal.quack animal.walk end 31
  • 86. class Duck def quack; end def walk; end class Platypus end def quack; end def walk; end end def act_as_a_duck animal animal.quack animal.walk duck = Duck.new end platypus = Platypus.new act_as_a_duck(duck) act_as_a_duck(platypus) 31
  • 87. class Duck { def quack = ... def walk = ... } 32
  • 88. class Duck { def quack = ... def walk = ... class Platypus { } def quack = ... def walk = ... } 32
  • 89. class Duck { def quack = ... def walk = ... class Platypus { } def quack = ... def walk = ... } def ActAsADuck(a: { def quack; def walk })= { a.quack a.walk } 32
  • 90. class Duck { def quack = ... def walk = ... class Platypus { } def quack = ... def walk = ... } def ActAsADuck(a: { def quack; def walk })= { a.quack a.walk } val duck = new Duck val platypus = new Platypus ActAsADuck(duck) ActAsADuck(platypus) 32
  • 91. class Duck { def quack = ... def walk = ... Scala Ruby class Platypus { } def quack = ... def walk = ... } } 6 a.quack a.walk 6 def ActAsADuck(a: { def quack; def walk })= { val duck = new Duck val platypus = new Platypus ActAsADuck(duck) ActAsADuck(platypus) 32
  • 92. 33
  • 93. ≃ Only learn the syntax 33
  • 94. 34
  • 96. 35
  • 97. Test::Unit rSpec 35
  • 99. test "my test" do array = [1, 2, 3] assert_equal 1, array.first end UNIT TESTING 36
  • 100. test "my test" do array = [1, 2, 3] assert_equal 1, array.first end UNIT TESTING @Test def myTest() { val array = List(1, 2, 3) assert(array(0) === 1) } 36
  • 102. describe "Get of Array" do it "first returns the first element" do array = [1, 2, 3] array.first.should == 1 end end SPEC TESTING 37
  • 103. describe "Get of Array" do it "first returns the first element" do array = [1, 2, 3] array.first.should == 1 end end SPEC TESTING describe("Get of List") { it("(0) returns the first element") { val array = List(1, 2, 3) array(0) should be 1 } } 37
  • 104. BDD TESTING Feature: The user can get an element off an array Scenario: first is invoked on the array Given a non-empty array When first is invoked on the array Then the first element should be returned 38
  • 105. BDD TESTING Feature: The user can get an element off an array Scenario: first is invoked on the array Given a non-empty array When first is invoked on the array Then the first element should be returned 38
  • 106. Test::Unit rSpec 39
  • 107. Test::Unit Scala Ruby rSpec 7 7 39
  • 108. 40
  • 109. 40
  • 110. 40
  • 111. 40
  • 112. 41
  • 113. 24 000 gems 41
  • 114. for Rails 12 000 gems 41
  • 115. for Rails 12 000 gems 41
  • 116. for Rails Scala 000 12 Ruby 7 8 gems 41
  • 117. 42
  • 118. Actors in Ruby ? 43
  • 119. Don’t try this at home ! 43
  • 120. Scala try Ruby Don’t this at 8home ! 8 43
  • 121. 44
  • 122. 45
  • 124. 46
  • 125. rails new myapp heroku create myapp git push heroku master 46
  • 126. rails new myapp heroku create myapp git push heroku master http://myapp.heroku.com 46
  • 127. Scala Ruby 8 rails new myapp heroku create myapp9 git push heroku master http://myapp.heroku.com 46
  • 128. 47
  • 129. 47
  • 130. 47
  • 131. 47
  • 132. 47
  • 133. 47
  • 134. 47
  • 135. 47
  • 136. 80 60 40 70,74 39,74 20 2,07 0 Average performance (less is better) Source : http://shootout.alioth.debian.org 48
  • 137. Scala JRuby Ruby 1.9 80 60 40 70,74 39,74 20 2,07 0 Average performance (less is better) Source : http://shootout.alioth.debian.org 48
  • 138. Scala JRuby Ruby 1.9 80 Scala Ruby 60 9 39,74 9 70,74 20 40 2,07 0 Average performance (less is better) Source : http://shootout.alioth.debian.org 48
  • 139. Do not talk of Ruby to an admin 49
  • 140. Do not talk of Ruby to an admin Neither of Java 49
  • 141. 50
  • 143. 51
  • 144. 51
  • 145. 52
  • 146. 52
  • 147. «Most Java Programmers are Morons» 53
  • 148. «Most Java Programmers are Morons» © Rails community 53
  • 149. Scala Ruby 9 9 54
  • 150. ? ? 55
  • 151. ? ? 55
  • 152. 56