Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Matz - Be a language designer

B338e877fffff7a61d90a799c081c85b?s=47 Daniel Lv
November 17, 2012

Matz - Be a language designer

Matz先生在RubyConfChina2012上的主题分享PPT。

B338e877fffff7a61d90a799c081c85b?s=128

Daniel Lv

November 17, 2012
Tweet

More Decks by Daniel Lv

Other Decks in Programming

Transcript

  1. Powered by Rabbit 1.0.8 Be a language designer Yukihiro "Matz"

    Matsumoto @yukihiro_matz
  2. Powered by Rabbit 1.0.8   Ruby started February 1993 1/185

  3. Powered by Rabbit 1.0.8   as a scripting language for

    UNIX 2/185
  4. Powered by Rabbit 1.0.8   to replace Perl 3/185

  5. Powered by Rabbit 1.0.8   But not really 4/185

  6. Powered by Rabbit 1.0.8   I just wanted to create

    my own language 5/185
  7. Powered by Rabbit 1.0.8   Just for Fun 6/185

  8. Powered by Rabbit 1.0.8   Recently, a guy came and

    blamed me on Twitter 7/185
  9. Powered by Rabbit 1.0.8   “Why did you invented Ruby,

    where we had Perl?” 8/185
  10. Powered by Rabbit 1.0.8   “It was redundant, reinvention of

    the wheel” 9/185
  11. Powered by Rabbit 1.0.8   “It was waste of man-power

    that is limited resource” 10/185
  12. Powered by Rabbit 1.0.8   “So, many IT people feel

    negative about your work” 11/185
  13. Powered by Rabbit 1.0.8   What do you think? 12/185

  14. Powered by Rabbit 1.0.8   Give me a break 13/185

  15. Powered by Rabbit 1.0.8   Indeed we have limited resources

    14/185
  16. Powered by Rabbit 1.0.8   Only 7 Billion people on

    Earth 15/185
  17. Powered by Rabbit 1.0.8   Very few among them code

    16/185
  18. Powered by Rabbit 1.0.8   But it's not a bottleneck

    17/185
  19. Powered by Rabbit 1.0.8   We have more rare resource

    18/185
  20. Powered by Rabbit 1.0.8   It's Motivation 19/185

  21. Powered by Rabbit 1.0.8   We are not machines 20/185

  22. Powered by Rabbit 1.0.8   We need driving force to

    accomplish great things 21/185
  23. Powered by Rabbit 1.0.8   What's your motivation? 22/185

  24. Powered by Rabbit 1.0.8   Fun? 23/185

  25. Powered by Rabbit 1.0.8   Profit? 24/185

  26. Powered by Rabbit 1.0.8   My motivation is love toward

    programming languages 25/185
  27. Powered by Rabbit 1.0.8   I love all programming languages

    on earth 26/185
  28. Powered by Rabbit 1.0.8   Including Fortran 27/185

  29. Powered by Rabbit 1.0.8   Perl 28/185

  30. Powered by Rabbit 1.0.8   Even PHP 29/185

  31. Powered by Rabbit 1.0.8   It might sound spooky 30/185

  32. Powered by Rabbit 1.0.8   to LOVE programming languages 31/185

  33. Powered by Rabbit 1.0.8   No one should laugh at

    motivation 32/185
  34. Powered by Rabbit 1.0.8   Some may call it reinventing

    the wheel 33/185
  35. Powered by Rabbit 1.0.8   Go ahead, if you are

    motivated 34/185
  36. Powered by Rabbit 1.0.8   You may invent the better

    wheel 35/185
  37. Powered by Rabbit 1.0.8   If not, it's OK. 36/185

  38. Powered by Rabbit 1.0.8   As long as you follow

    your motivation 37/185
  39. Powered by Rabbit 1.0.8   And it will introduce diversity

    38/185
  40. Powered by Rabbit 1.0.8   Diversity is Good 39/185

  41. Powered by Rabbit 1.0.8   It may require cost 40/185

  42. Powered by Rabbit 1.0.8   It may waste your time

    41/185
  43. Powered by Rabbit 1.0.8   But the world without diversity

    is unpleasant 42/185
  44. Powered by Rabbit 1.0.8   What if we force people

    to focus on Perl? 43/185
  45. Powered by Rabbit 1.0.8   Like the world of 1984

    44/185
  46. Powered by Rabbit 1.0.8   Diversity is the cost for

    innovation 45/185
  47. Powered by Rabbit 1.0.8   No one understands Innovation 46/185

  48. Powered by Rabbit 1.0.8   Succeeded people don't 47/185

  49. Powered by Rabbit 1.0.8   Failed people don't 48/185

  50. Powered by Rabbit 1.0.8   No one 49/185

  51. Powered by Rabbit 1.0.8   We try 50/185

  52. Powered by Rabbit 1.0.8   Again and again 51/185

  53. Powered by Rabbit 1.0.8   until we make innovation 52/185

  54. Powered by Rabbit 1.0.8   But we`d better predict the

    future 53/185
  55. Powered by Rabbit 1.0.8   To raise the possibility of

    success 54/185
  56. Powered by Rabbit 1.0.8   55/185

  57. Powered by Rabbit 1.0.8   人们做的事情,但昂贵 的小众”和“开发编程 语言和环境,”在未来 的职业生存 by

    Google Translation 56/185
  58. Powered by Rabbit 1.0.8   IT survives will be: language

    designers dev env implementers and high valued niche players 57/185
  59. Powered by Rabbit 1.0.8   Language designers? 58/185

  60. Powered by Rabbit 1.0.8   Sounds weird? 59/185

  61. Powered by Rabbit 1.0.8   His outline: Programming will be

    fundamental literacy Easy tasks can be done by everybody Professionals (like us) should do harder tasks 60/185
  62. Powered by Rabbit 1.0.8   Fair enough 61/185

  63. Powered by Rabbit 1.0.8   But how can we be

    language designers? 62/185
  64. Powered by Rabbit 1.0.8   How many language designers do

    you know? 63/185
  65. Powered by Rabbit 1.0.8   me (Ruby) 64/185

  66. Powered by Rabbit 1.0.8   Guido (Python) 65/185

  67. Powered by Rabbit 1.0.8   Larry (Perl) 66/185

  68. Powered by Rabbit 1.0.8   Rasmus (PHP) 67/185

  69. Powered by Rabbit 1.0.8   ? 68/185

  70. Powered by Rabbit 1.0.8   Language Designer or Serial Killer?

    69/185
  71. Powered by Rabbit 1.0.8   70/185

  72. Powered by Rabbit 1.0.8   Language designers, raise your hand

    71/185
  73. Powered by Rabbit 1.0.8   Language implementers, raise your hand

    72/185
  74. Powered by Rabbit 1.0.8   It's not as hard as

    you may think 73/185
  75. Powered by Rabbit 1.0.8   You may not start making

    a popular programming language 74/185
  76. Powered by Rabbit 1.0.8   You may not implement a

    programming language 75/185
  77. Powered by Rabbit 1.0.8   How can we be language

    designers? 76/185
  78. Powered by Rabbit 1.0.8   You code 77/185

  79. Powered by Rabbit 1.0.8   You design 78/185

  80. Powered by Rabbit 1.0.8   You design code 79/185

  81. Powered by Rabbit 1.0.8   You design API 80/185

  82. Powered by Rabbit 1.0.8   You design interface 81/185

  83. Powered by Rabbit 1.0.8   They are languages 82/185

  84. Powered by Rabbit 1.0.8   Dave Thomas 83/185

  85. Powered by Rabbit 1.0.8   Programming is a process of

    designing your own DSL -- Dave Thomas 84/185
  86. Powered by Rabbit 1.0.8   In that sense, you can

    be language designers 85/185
  87. Powered by Rabbit 1.0.8   Too few people care about

    design 86/185
  88. Powered by Rabbit 1.0.8   Too many people create software

    without care 87/185
  89. Powered by Rabbit 1.0.8   Care about them 88/185

  90. Powered by Rabbit 1.0.8   Care about your users 89/185

  91. Powered by Rabbit 1.0.8   Care about your team members

    90/185
  92. Powered by Rabbit 1.0.8   Care about yourself 91/185

  93. Powered by Rabbit 1.0.8   Care about future yourself 92/185

  94. Powered by Rabbit 1.0.8   Choose the vocabulary 93/185

  95. Powered by Rabbit 1.0.8   Mind names you use 94/185

  96. Powered by Rabbit 1.0.8   Analyze the structure 95/185

  97. Powered by Rabbit 1.0.8   Block is your friend 96/185

  98. Powered by Rabbit 1.0.8   Block can represent the strucuture

    97/185
  99. Powered by Rabbit 1.0.8   or scope 98/185

  100. Powered by Rabbit 1.0.8   Pull Ruby to your domain

    99/185
  101. Powered by Rabbit 1.0.8   Design your DSL 100/185

  102. Powered by Rabbit 1.0.8   Write small code in your

    DSL 101/185
  103. Powered by Rabbit 1.0.8   To experiment 102/185

  104. Powered by Rabbit 1.0.8   To prototype 103/185

  105. Powered by Rabbit 1.0.8   To test 104/185

  106. Powered by Rabbit 1.0.8   To build your final application

    105/185
  107. Powered by Rabbit 1.0.8   Part II 106/185

  108. Powered by Rabbit 1.0.8   mruby 107/185

  109. Powered by Rabbit 1.0.8   Matz's 108/185

  110. Powered by Rabbit 1.0.8   eMbeddable 109/185

  111. Powered by Rabbit 1.0.8   Minimalistic 110/185

  112. Powered by Rabbit 1.0.8   Ruby 111/185

  113. Powered by Rabbit 1.0.8   Ruby for small devices 112/185

  114. Powered by Rabbit 1.0.8   small memory footprint 113/185

  115. Powered by Rabbit 1.0.8   Small (<500K) 114/185

  116. Powered by Rabbit 1.0.8   Embedding API 115/185

  117. Powered by Rabbit 1.0.8   a la Lua 116/185

  118. Powered by Rabbit 1.0.8   Soft realtime 117/185

  119. Powered by Rabbit 1.0.8   Incremental GC 118/185

  120. Powered by Rabbit 1.0.8   Small devices 119/185

  121. Powered by Rabbit 1.0.8   SAKURA Board 120/185

  122. Powered by Rabbit 1.0.8 SAKURA Board 121/185

  123. Powered by Rabbit 1.0.8   CPU: RX63N (96MHz) 122/185

  124. Powered by Rabbit 1.0.8   1MB Flash 123/185

  125. Powered by Rabbit 1.0.8   128KB RAM 124/185

  126. Powered by Rabbit 1.0.8   16,800JPY (≒1,300元) 125/185

  127. Powered by Rabbit 1.0.8   Board LCD Text CD-ROM 126/185

  128. Powered by Rabbit 1.0.8   127/185

  129. Powered by Rabbit 1.0.8   128/185

  130. Powered by Rabbit 1.0.8   129/185

  131. Powered by Rabbit 1.0.8   Mobile 130/185

  132. Powered by Rabbit 1.0.8   MobiRuby mruby for iOS 131/185

  133. Powered by Rabbit 1.0.8   mruby for Android 132/185

  134. Powered by Rabbit 1.0.8   Server side 133/185

  135. Powered by Rabbit 1.0.8   mod_mruby Apache mruby extension 134/185

  136. Powered by Rabbit 1.0.8   mruby_nginx Nginx mruby extension 135/185

  137. Powered by Rabbit 1.0.8   mruby-libuv Async I/O for mruby

    136/185
  138. Powered by Rabbit 1.0.8   Server side 137/185

  139. Powered by Rabbit 1.0.8   mruby extensions for languages 138/185

  140. Powered by Rabbit 1.0.8   JavaScript Lua Go Ruby 139/185

  141. Powered by Rabbit 1.0.8   Real world app 140/185

  142. Powered by Rabbit 1.0.8   Solar panel controller 141/185

  143. Powered by Rabbit 1.0.8   Intelligent Internet router 142/185

  144. Powered by Rabbit 1.0.8   Vending machine controller 143/185

  145. Powered by Rabbit 1.0.8   Possibility 144/185

  146. Powered by Rabbit 1.0.8   Smart appliance 145/185

  147. Powered by Rabbit 1.0.8   Automobiles 146/185

  148. Powered by Rabbit 1.0.8   Games 147/185

  149. Powered by Rabbit 1.0.8   Editors 148/185

  150. Powered by Rabbit 1.0.8   Cloud 149/185

  151. Powered by Rabbit 1.0.8   Part III 150/185

  152. Powered by Rabbit 1.0.8   Ruby 2.0 151/185

  153. Powered by Rabbit 1.0.8   for Web 2.0 152/185

  154. Powered by Rabbit 1.0.8   in 1993 153/185

  155. Powered by Rabbit 1.0.8   Almost 20 years ago 154/185

  156. Powered by Rabbit 1.0.8   I had been happy for

    last 20 years 155/185
  157. Powered by Rabbit 1.0.8   It always had been more

    than expected 156/185
  158. Powered by Rabbit 1.0.8   I will try to make

    the world better place 157/185
  159. Powered by Rabbit 1.0.8   by making Ruby even better

    158/185
  160. Powered by Rabbit 1.0.8   On February 24th 2013 159/185

  161. Powered by Rabbit 1.0.8   Ruby's 20th birthday 160/185

  162. Powered by Rabbit 1.0.8   We will release Ruby 2.0

    161/185
  163. Powered by Rabbit 1.0.8   finally 162/185

  164. Powered by Rabbit 1.0.8   But it is progressing steadily

    163/185
  165. Powered by Rabbit 1.0.8   It will be faster 164/185

  166. Powered by Rabbit 1.0.8   It will be more reliable

    165/185
  167. Powered by Rabbit 1.0.8   More fun to use 166/185

  168. Powered by Rabbit 1.0.8   keyword formal argument 167/185

  169. Powered by Rabbit 1.0.8 keyword formal argument def downto(from, to,

    step: n) ... end 168/185
  170. Powered by Rabbit 1.0.8   Enumerable#lazy 169/185

  171. Powered by Rabbit 1.0.8 Enumerable#lazy (1..Float::INFINITY).lazy.map {|i| i.to_s }.select{|s| /3/

    === s }.first(5) 170/185
  172. Powered by Rabbit 1.0.8   Module#prepend 171/185

  173. Powered by Rabbit 1.0.8 Module#prepend class Foo def foo; p

    :foo; end end module Prepend def foo p :before super p :after end end class Foo prepend Prepend end Foo.new.foo 172/185
  174. Powered by Rabbit 1.0.8   Refinement 173/185

  175. Powered by Rabbit 1.0.8 Refinement module R refine String do

    def foo ... end end end "".foo # => error! using R "".foo 174/185
  176. Powered by Rabbit 1.0.8   Come join us 175/185

  177. Powered by Rabbit 1.0.8   By using trunk 176/185

  178. Powered by Rabbit 1.0.8   By reporting bugs 177/185

  179. Powered by Rabbit 1.0.8   By fixing bugs 178/185

  180. Powered by Rabbit 1.0.8   By sending pull-request 179/185

  181. Powered by Rabbit 1.0.8   By porting your project to

    2.0 180/185
  182. Powered by Rabbit 1.0.8   We can make it better

    181/185
  183. Powered by Rabbit 1.0.8   We can make the world

    better 182/185
  184. Powered by Rabbit 1.0.8   mruby 183/185

  185. Powered by Rabbit 1.0.8   Happy hacking! 184/185

  186. Powered by Rabbit 1.0.8   Thank you 185/185