Where do Rubyists go?

Where do Rubyists go?

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?

8480daec7137f28565bc2d2e666b915a?s=128

Tobias Pfeiffer

January 26, 2018
Tweet

Transcript

  1. Look at all these toys!

  2. Help – it’s Ruby!

  3. All alone

  4. Is Ruby dying?

  5. Where do Rubyists go?

  6. Where do Rubyists go? Tobias Pfeiffer @PragTob pragtob.info

  7. None
  8. 673 Responses

  9. None
  10. None
  11. First Rails Release

  12. Rails 1.0

  13. “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?
  14. First Rails Girls Workshop

  15. First Rails Girls Berlin Workshop

  16. Surveys and Bias

  17. Like some bias?

  18. Like to do Ruby in 5 years?

  19. None
  20. None
  21. None
  22. Omissions

  23. Tools

  24. Disclaimer

  25. Meet & Greet

  26. 1990 1995 2000 2005 2010 2015

  27. 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.
  28. FizzBuzz!

  29. 1 2

  30. 1 2 Fizz

  31. 1 2 Fizz 4 Buzz

  32. 1 2 Fizz 4 Buzz Fizz

  33. 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz

    11 Fizz 13 14
  34. 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz

    11 Fizz 13 14 FizzBuzz
  35. 1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz

    11 Fizz 13 14 FizzBuzz 16 …
  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. 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)}
  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. 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)}
  40. 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)}
  41. 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)}
  42. 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)}
  43. 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
  44. 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)}
  45. 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
  46. 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.
  47. 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)
  48. 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)
  49. Name: Popular Rubyists: Known for: Self-assessment: Haskell Chad Fowler Type

    System, Monads, Pure An advanced, purely functional programming language.
  50. 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
  51. 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
  52. 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
  53. 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.
  54. 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)) } }
  55. 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)) } }
  56. 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)) } }
  57. 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.
  58. 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(), } }
  59. 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(), } }
  60. 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(), } }
  61. 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.
  62. 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)); }
  63. 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)); }
  64. 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)); }
  65. 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.
  66. (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)))
  67. (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)))
  68. (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)))
  69. What you got?

  70. Paradigm

  71. Procedural Procedural Functional Functional Procedural Functional Object Object Functional Functional

  72. Parallelism

  73. Parallelism vs Concurrency

  74. Yes Goroutines + channels Yes Agnostic Yes/No Webworkers+ Yes STM,

    pmap, Transducers Concurrent Concurrent Yes Actors Yes Mvar, par, STM
  75. Performance!

  76. Type System

  77. Static Inferred Static Inferred Dynamic Optional Inferred++ Dynamic Optional Inferred++

    Dynamic Static Inferred++ Dynamic Optional Inferred++ Static Inferred++
  78. Compiled vs Interpreted

  79. Compiled Compiled Interpreted Compiled Interpreted Compiled Compiled Compiled

  80. Self-hosted

  81. Show me your code

  82. Yes Yes No No No Yes Yes Yes

  83. Garbage- Collection

  84. Yes No Yes Yes Yes Yes Yes Yes

  85. Single File Distribution

  86. Yes Yes No No No Yes Yes Yes

  87. Ruby-like Syntax

  88. No No No No Yes Yes Yes No

  89. None
  90. Parallel

  91. Parallel Typing

  92. Parallel Typing Fast

  93. So, what?

  94. Expand Your Mind

  95. “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?
  96. Joy

  97. Domain

  98. Tools

  99. Where does Ruby go?

  100. “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.”
  101. Where does Ruby go?

  102. Parallel Typing Fast

  103. “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.”
  104. “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.”
  105. We’re all great!

  106. Explore some new lands!

  107. Enjoy Coding & Learning in whatever language... Tobias Pfeiffer @PragTob

    pragtob.info