Ruby after 18+ months of Clojure

4,760 views

Published on

Slides for February 17 Groupon geekfest lunch

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,760
On SlideShare
0
From Embeds
0
Number of Embeds
115
Actions
Shares
0
Downloads
27
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Ruby after 18+ months of Clojure

  1. 1. Ruby After 18+ Months of Clojure -or- Functional Learnings of Clojure for Make Benefit of Glorious Language of Ruby* (a work in progress) Brian Marick, Path11 brian@path11.com, @marick 1 *Alternate title courtesy @infinitaryWednesday, January 18, 2012
  2. 2. Ladies and Gentlemen: The ComputerWednesday, January 18, 2012
  3. 3. Wednesday, January 18, 2012
  4. 4. Wednesday, January 18, 2012
  5. 5. Wednesday, January 18, 2012
  6. 6. Our Friend, the Class g() f() width color scofield_v h() height j() m() k() 4Wednesday, January 18, 2012
  7. 7. What Are Classes Good For? 5Wednesday, January 18, 2012
  8. 8. What Are Classes Good For? 5Wednesday, January 18, 2012
  9. 9. The Real World Has Fuzzy Categories 6Wednesday, January 18, 2012
  10. 10. The Real World Has Fuzzy Categories 6Wednesday, January 18, 2012
  11. 11. Classes Are For Finding Things g() f() width color scofield_v h() height j() m() k() 7Wednesday, January 18, 2012
  12. 12. Classes Are For Finding Things wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8Wednesday, January 18, 2012
  13. 13. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8Wednesday, January 18, 2012
  14. 14. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8Wednesday, January 18, 2012
  15. 15. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8Wednesday, January 18, 2012
  16. 16. Classes Are For Finding Things wsc wsc wsc {} [] () h h h wsc wsc wsc h h h wsc wsc wsc h h h wsc wsc wsc h h h 8Wednesday, January 18, 2012
  17. 17. Classes Are For Finding Things wsc wsc wsc {} [] () h h h But hAth scWhat Cost? wsc h wsc w wsc wsc wsc h h h wsc wsc wsc h h h 8Wednesday, January 18, 2012
  18. 18. 9Wednesday, January 18, 2012
  19. 19. Lookup 10Wednesday, January 18, 2012
  20. 20. Lookup 10Wednesday, January 18, 2012
  21. 21. 11Wednesday, January 18, 2012
  22. 22. Lookup Copy 12Wednesday, January 18, 2012
  23. 23. Lookup ?Copy 12Wednesday, January 18, 2012
  24. 24. Lookup ?Copy 12Wednesday, January 18, 2012
  25. 25. 13Wednesday, January 18, 2012
  26. 26. Do The Simplest Thing That Could Possibly Work 13Wednesday, January 18, 2012
  27. 27. Active Record 14Wednesday, January 18, 2012
  28. 28. Wait. What? Active Record 14Wednesday, January 18, 2012
  29. 29. id c Lookup timeslice uses Copy 15Wednesday, January 18, 2012
  30. 30. Lookup id uses c timeslice Copy 15Wednesday, January 18, 2012
  31. 31. Lookup id uses c timeslice Copy 16Wednesday, January 18, 2012
  32. 32. Lookup id c timeslice Copyuses 16Wednesday, January 18, 2012
  33. 33. Lookup id c c copy tim use id Copy c omitted_ animals id u ti c u ti 17Wednesday, January 18, 2012
  34. 34. Lookup copy c omitted_ id id tim use c animals c Copyid u ti c u ti 17Wednesday, January 18, 2012
  35. 35. Lookup id tim use c copy omitted_ c id animals c Copyid u ti c u ti 17Wednesday, January 18, 2012
  36. 36. Lookup id tim use c copy omitted_ c animals Copy id c u ti id c u ti 17Wednesday, January 18, 2012
  37. 37. Lookup id tim use c copy omitted_ c animals Copy id c u ti id c u ti 18Wednesday, January 18, 2012
  38. 38. Lookup Copy 18Wednesday, January 18, 2012
  39. 39. Lookup Copy 19Wednesday, January 18, 2012
  40. 40. Lookup Copy 19Wednesday, January 18, 2012
  41. 41. 20Wednesday, January 18, 2012
  42. 42. 20Wednesday, January 18, 2012
  43. 43. Lookup Copy 21Wednesday, January 18, 2012
  44. 44. Lookup Copy 21Wednesday, January 18, 2012
  45. 45. and... 22Wednesday, January 18, 2012
  46. 46. and... 22Wednesday, January 18, 2012
  47. 47. 23Wednesday, January 18, 2012
  48. 48. {} 23Wednesday, January 18, 2012
  49. 49. {} 23Wednesday, January 18, 2012
  50. 50. {} {} {} {} {} {} {} {} {} {} {} 24Wednesday, January 18, 2012
  51. 51. 25Wednesday, January 18, 2012
  52. 52. 25Wednesday, January 18, 2012
  53. 53. 26Wednesday, January 18, 2012
  54. 54. 27Wednesday, January 18, 2012
  55. 55. 27Wednesday, January 18, 2012
  56. 56. Immutability 28Wednesday, January 18, 2012
  57. 57. Immutability 28Wednesday, January 18, 2012
  58. 58. Immutability 28Wednesday, January 18, 2012
  59. 59. Hygiene 29Wednesday, January 18, 2012
  60. 60. Hygiene “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” 29Wednesday, January 18, 2012
  61. 61. Hygiene “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” 29Wednesday, January 18, 2012
  62. 62. Hygiene a= “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” 29Wednesday, January 18, 2012
  63. 63. Hygiene a= “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” a 29Wednesday, January 18, 2012
  64. 64. Hygiene a= “You’ve slept with everyone everyone you’ve ever slept with ever slept with.” “Your code might be infected by any code that has ever touched your data.” a 29Wednesday, January 18, 2012
  65. 65. Consequences 30Wednesday, January 18, 2012
  66. 66. Consequences 30Wednesday, January 18, 2012
  67. 67. Consequences 5 31Wednesday, January 18, 2012
  68. 68. Consequences 5 32Wednesday, January 18, 2012
  69. 69. Consequences 5 32Wednesday, January 18, 2012
  70. 70. Consequences 5 32Wednesday, January 18, 2012
  71. 71. 33Wednesday, January 18, 2012
  72. 72. In Short: Why Not? 34Wednesday, January 18, 2012
  73. 73. In Short: Why Not? • Removes one source of bugs 34Wednesday, January 18, 2012
  74. 74. In Short: Why Not? • Removes one source of bugs • Not harder than coding mutably • (once you’re used to it) 34Wednesday, January 18, 2012
  75. 75. In Short: Why Not? • Removes one source of bugs • Not harder than coding mutably • (once you’re used to it) • Knowing how to do more is better than knowing how to do less 34Wednesday, January 18, 2012
  76. 76. Ruby 35Wednesday, January 18, 2012
  77. 77. Ruby 35Wednesday, January 18, 2012
  78. 78. Ruby Haskell 35Wednesday, January 18, 2012
  79. 79. Ruby Haskell 35Wednesday, January 18, 2012
  80. 80. Ruby Haskell Always Lazy 35Wednesday, January 18, 2012
  81. 81. Ruby Mostly Eager Haskell Always Lazy 35Wednesday, January 18, 2012
  82. 82. Some Lazy Ruby 36Wednesday, January 18, 2012
  83. 83. Some Lazy Ruby 37Wednesday, January 18, 2012
  84. 84. Some Lazy Ruby Only a few special Ruby operators are lazy 37Wednesday, January 18, 2012
  85. 85. And Why Not? 38Wednesday, January 18, 2012
  86. 86. And Why Not? 39Wednesday, January 18, 2012
  87. 87. a= 40Wednesday, January 18, 2012
  88. 88. a= 40Wednesday, January 18, 2012
  89. 89. a= a a 40Wednesday, January 18, 2012
  90. 90. a= a a 40Wednesday, January 18, 2012
  91. 91. a= a a 40Wednesday, January 18, 2012
  92. 92. a= a a 40Wednesday, January 18, 2012
  93. 93. One Less Thing a= to Worry About a a 40Wednesday, January 18, 2012
  94. 94. 41Wednesday, January 18, 2012
  95. 95. a= a a free(a) 42Wednesday, January 18, 2012
  96. 96. a= a a 42Wednesday, January 18, 2012
  97. 97. a= a a 43Wednesday, January 18, 2012
  98. 98. 44Wednesday, January 18, 2012
  99. 99. OMG!!! As Big As Garbage Collection??? 44Wednesday, January 18, 2012
  100. 100. OMG!!! As Big As Garbage Collection??? Calculations You Trace Through Time 44Wednesday, January 18, 2012
  101. 101. OMG!!! As Big As Garbage Collection??? Calculations Resources You You Trace Consume Through Time As Needed 44Wednesday, January 18, 2012
  102. 102. Lazy Sequences 45Wednesday, January 18, 2012
  103. 103. Lazy Sequences 45Wednesday, January 18, 2012
  104. 104. Lazy Sequences 45Wednesday, January 18, 2012
  105. 105. What You Get With Lazy Sequences Don’t Like 46Wednesday, January 18, 2012
  106. 106. What You Get With Lazy Sequences Don’t Like How to Make the Next One 46Wednesday, January 18, 2012
  107. 107. What You Get With Lazy Sequences Don’t Like How to Make the Next One 46Wednesday, January 18, 2012
  108. 108. What You Get With Lazy Sequences Don’t Like Which Ones How to Make the Next One 46Wednesday, January 18, 2012
  109. 109. What You Get With Lazy Sequences Don’t Like Which Ones How to Make the Next One 46Wednesday, January 18, 2012
  110. 110. What You Get With Lazy Sequences LikeWednesday, January 18, 2012
  111. 111. What You Get With Lazy Sequences LikeWednesday, January 18, 2012
  112. 112. What You Get With Lazy Sequences Like How to Make the Next OneWednesday, January 18, 2012
  113. 113. What You Get With Lazy Sequences Like How to Make the Next One Which OnesWednesday, January 18, 2012
  114. 114. github.com/marick/stunted Google groups: rubyfoopers 48Wednesday, January 18, 2012
  115. 115. object.f(2, 3, 4) def Float, Integer ... def Integer, Float f.(2.0, 2) 49Wednesday, January 18, 2012
  116. 116. github.com/marick/stunted Google groups: rubyfoopers Expressiveness Efficiency Gems 50Wednesday, January 18, 2012

×