Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Where do Rubyists go?

2,136 views

Published on

Many Rubyists branch out and take a look at other languages. What are similarities between those languages and ruby? What are differences? How does Ruby influence these languages?

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Where do Rubyists go?

  1. 1. Look at all these toys!
  2. 2. Help – it’s Ruby!
  3. 3. All alone
  4. 4. Is Ruby dying?
  5. 5. Where do Rubyists go?
  6. 6. Where do Rubyists go? Tobias Pfeiffer @PragTob pragtob.info
  7. 7. 673 Responses
  8. 8. First Rails Release
  9. 9. Rails 1.0
  10. 10. “I had written half of Rails in PHP. Then Rails was announced and it was like a cheat code to a working framework.” Why did you learn Ruby?
  11. 11. First Rails Girls Workshop
  12. 12. First Rails Girls Berlin Workshop
  13. 13. Surveys and Bias
  14. 14. Like some bias?
  15. 15. Like to do Ruby in 5 years?
  16. 16. Omissions
  17. 17. Tools
  18. 18. Disclaimer
  19. 19. Meet & Greet
  20. 20. 1990 1995 2000 2005 2010 2015
  21. 21. Name: Popular Rubyists: Known for: Self-assessment: Ruby All of them Metaprogramming, dynamic, Scripting, web A dynamic, open source programming language with a focus on simplicity and productivity.
  22. 22. FizzBuzz!
  23. 23. 1 2
  24. 24. 1 2 Fizz
  25. 25. 1 2 Fizz 4 Buzz
  26. 26. 1 2 Fizz 4 Buzz Fizz
  27. 27. 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14
  28. 28. 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz
  29. 29. 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 …
  30. 30. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  31. 31. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  32. 32. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  33. 33. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  34. 34. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  35. 35. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  36. 36. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  37. 37. Name: Popular Rubyists: Known for: Self-assessment: Crystal Erik Berlin, Piotr Szotkowski, Fabio Akita Ruby-like, Performance, Type Inference Fast as C, slick as Ruby
  38. 38. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)}
  39. 39. def fizzbuzz(n) if (n % 15).zero? "FizzBuzz" elsif (n % 5).zero? "Buzz" elsif (n % 3).zero? "Fizz" else n end end (1..100).each {|n| puts fizzbuzz(n)} cp fizzbuzz.rb fizzbuzz.cr
  40. 40. Name: Popular Rubyists: Known for: Self-assessment: Elixir José Valim, Dave Thomas, Xavier Noria Erlang VM, Actors, Functional, Phoenix dynamic, functional language designed for building scalable and maintainable applications.
  41. 41. defmodule FizzBuzz do def fizzbuzz(n) when rem(n, 15) == 0, do: "FizzBuzz" def fizzbuzz(n) when rem(n, 5) == 0, do: "Buzz" def fizzbuzz(n) when rem(n, 3) == 0, do: "Fizz" def fizzbuzz(n), do: n end Enum.each(1..100, fn i -> IO.puts(FizzBuzz.fizzbuzz(i)) end)
  42. 42. defmodule FizzBuzz do def fizzbuzz(n) when rem(n, 15) == 0, do: "FizzBuzz" def fizzbuzz(n) when rem(n, 5) == 0, do: "Buzz" def fizzbuzz(n) when rem(n, 3) == 0, do: "Fizz" def fizzbuzz(n), do: n end Enum.each(1..100, fn i -> IO.puts(FizzBuzz.fizzbuzz(i)) end)
  43. 43. Name: Popular Rubyists: Known for: Self-assessment: Haskell Chad Fowler Type System, Monads, Pure An advanced, purely functional programming language.
  44. 44. main = mapM_ (putStrLn . fizzbuzz) [1..100] fizzbuzz x | x `mod` 15 == 0 = "FizzBuzz" | x `mod` 3 == 0 = "Fizz" | x `mod` 5 == 0 = "Buzz" | otherwise = show x
  45. 45. main = mapM_ (putStrLn . fizzbuzz) [1..100] fizzbuzz x | x `mod` 15 == 0 = "FizzBuzz" | x `mod` 3 == 0 = "Fizz" | x `mod` 5 == 0 = "Buzz" | otherwise = show x
  46. 46. main = mapM_ (putStrLn . fizzbuzz) [1..100] fizzbuzz x | x `mod` 15 == 0 = "FizzBuzz" | x `mod` 3 == 0 = "Fizz" | x `mod` 5 == 0 = "Buzz" | otherwise = show x
  47. 47. Name: Popular Rubyists: Known for: Self-assessment: Go Katrina Owen, Evan Phoenix Goroutines, Simple, No Exceptions, No Generics open source programming language that makes it easy to build simple, reliable, and efficient software.
  48. 48. package main import "fmt" import "strconv" func FizzBuzz(i int) string { switch { case i%15 == 0: return "FizzBuzz" case i%3 == 0: return "Fizz" case i%5 == 0: return "Buzz" default: return strconv.Itoa(i) } } func main() { for i := 1; i <= 100; i++ { fmt.Println(FizzBuzz(i)) } }
  49. 49. package main import "fmt" import "strconv" func FizzBuzz(i int) string { switch { case i%15 == 0: return "FizzBuzz" case i%3 == 0: return "Fizz" case i%5 == 0: return "Buzz" default: return strconv.Itoa(i) } } func main() { for i := 1; i <= 100; i++ { fmt.Println(FizzBuzz(i)) } }
  50. 50. package main import "fmt" import "strconv" func FizzBuzz(i int) string { switch { case i%15 == 0: return "FizzBuzz" case i%3 == 0: return "Fizz" case i%5 == 0: return "Buzz" default: return strconv.Itoa(i) } } func main() { for i := 1; i <= 100; i++ { fmt.Println(FizzBuzz(i)) } }
  51. 51. Name: Popular Rubyists: Known for: Self-assessment: Rust Steve Klabnik, Yehuda Katz, Sean Griffin Memory Management, Compiler, Firefox Quantum a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety.
  52. 52. fn main() { (1..101).for_each(|n| println!("{}", fizzbuzz(n))) } fn fizzbuzz(n: i32) -> String { match (n % 3, n % 5) { (0, 0) => "FizzBuzz".to_string(), (0, _) => "Fizz".to_string(), (_, 0) => "Buzz".to_string(), _ => n.to_string(), } }
  53. 53. fn main() { (1..101).for_each(|n| println!("{}", fizzbuzz(n))) } fn fizzbuzz(n: i32) -> String { match (n % 3, n % 5) { (0, 0) => "FizzBuzz".to_string(), (0, _) => "Fizz".to_string(), (_, 0) => "Buzz".to_string(), _ => n.to_string(), } }
  54. 54. fn main() { (1..101).for_each(|n| println!("{}", fizzbuzz(n))) } fn fizzbuzz(n: i32) -> String { match (n % 3, n % 5) { (0, 0) => "FizzBuzz".to_string(), (0, _) => "Fizz".to_string(), (_, 0) => "Buzz".to_string(), _ => n.to_string(), } }
  55. 55. Name: Popular Rubyists: Known for: Self-assessment: JavaScript Yehuda Katz, Jeremy Ashkenas Quirks, Async, Compile to a lightweight interpreted or JIT- compiled programming language with first-class functions.
  56. 56. const fizzBuzz = n => { if (n % 15 === 0) { return "FizzBuzz"; } else if (n % 3 === 0) { return "Fizz"; } else if (n % 5 === 0) { return "Buzz"; } else { return n; } }; for (let n = 1; n <= 100; n += 1) { console.log(fizzBuzz(n)); }
  57. 57. const fizzBuzz = n => { if (n % 15 === 0) { return "FizzBuzz"; } else if (n % 3 === 0) { return "Fizz"; } else if (n % 5 === 0) { return "Buzz"; } else { return n; } }; for (let n = 1; n <= 100; n += 1) { console.log(fizzBuzz(n)); }
  58. 58. const fizzBuzz = n => { if (n % 15 === 0) { return "FizzBuzz"; } else if (n % 3 === 0) { return "Fizz"; } else if (n % 5 === 0) { return "Buzz"; } else { return n; } }; for (let n = 1; n <= 100; n += 1) { console.log(fizzBuzz(n)); }
  59. 59. Name: Popular Rubyists: Known for: Self-assessment: Clojure Russ Olsen, Bozhidar Batsov, Arne Brasseur Rich Hickey, Lisp, JVM, () a robust, practical, and fast programming language with a set of useful features that together form a simple, coherent, and powerful tool.
  60. 60. (defn fizzbuzz [n] (cond (zero? (mod n 15)) "FizzBuzz" (zero? (mod n 3)) "Fizz" (zero? (mod n 5)) "Buzz" :else n)) (run! println (map fizzbuzz (range 1 101)))
  61. 61. (defn fizzbuzz [n] (cond (zero? (mod n 15)) "FizzBuzz" (zero? (mod n 3)) "Fizz" (zero? (mod n 5)) "Buzz" :else n)) (run! println (map fizzbuzz (range 1 101)))
  62. 62. (defn fizzbuzz [n] (cond (zero? (mod n 15)) "FizzBuzz" (zero? (mod n 3)) "Fizz" (zero? (mod n 5)) "Buzz" :else n)) (run! println (map fizzbuzz (range 1 101)))
  63. 63. What you got?
  64. 64. Paradigm
  65. 65. Procedural Procedural Functional Functional Procedural Functional Object Object Functional Functional
  66. 66. Parallelism
  67. 67. Parallelism vs Concurrency
  68. 68. Yes Goroutines + channels Yes Agnostic Yes/No Webworkers+ Yes STM, pmap, Transducers Concurrent Concurrent Yes Actors Yes Mvar, par, STM
  69. 69. Performance!
  70. 70. Type System
  71. 71. Static Inferred Static Inferred Dynamic Optional Inferred++ Dynamic Optional Inferred++ Dynamic Static Inferred++ Dynamic Optional Inferred++ Static Inferred++
  72. 72. Compiled vs Interpreted
  73. 73. Compiled Compiled Interpreted Compiled Interpreted Compiled Compiled Compiled
  74. 74. Self-hosted
  75. 75. Show me your code
  76. 76. Yes Yes No No No Yes Yes Yes
  77. 77. Garbage- Collection
  78. 78. Yes No Yes Yes Yes Yes Yes Yes
  79. 79. Single File Distribution
  80. 80. Yes Yes No No No Yes Yes Yes
  81. 81. Ruby-like Syntax
  82. 82. No No No No Yes Yes Yes No
  83. 83. Parallel
  84. 84. Parallel Typing
  85. 85. Parallel Typing Fast
  86. 86. So, what?
  87. 87. Expand Your Mind
  88. 88. “Ruby's OO model was brain-expanding, and I was seeking more brain-expanding paradigms that would let me think entirely new thoughts.” Why did you learn a new language?
  89. 89. Joy
  90. 90. Domain
  91. 91. Tools
  92. 92. Where does Ruby go?
  93. 93. “Rails is strangling Ruby. In the same way that you don't quit because of a bad company, you quit because of a bad boss.”
  94. 94. Where does Ruby go?
  95. 95. Parallel Typing Fast
  96. 96. “Ruby is the best language I have used over my 30 years programming. I hope Ruby 3 puts an end to the Ruby is slow meme once and for all.”
  97. 97. “I really like Ruby for what it is, and don't think 'adding a type system' or something is the best way to keep Ruby relevant. Don't morph Ruby in to something it's not.”
  98. 98. We’re all great!
  99. 99. Explore some new lands!
  100. 100. Enjoy Coding & Learning in whatever language... Tobias Pfeiffer @PragTob pragtob.info

×