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.

Perl 5.16 and beyond

11,952 views

Published on

My YAPC::Europe 2011 keynote about my vision for the future of Perl 5.

Published in: Technology

Perl 5.16 and beyond

  1. 1. Perl 5.16 and beyondJesse Vincentjesse@perl.org@obra
  2. 2. Recovering Perl 6Project Manager
  3. 3. Recovering Perl 6Project Manager
  4. 4. Perl 5 Pumpking
  5. 5. Perl 5 Pumpking
  6. 6. Perl 5 Pumpking
  7. 7. Perl 5 Pumpking http://flic.kr/p/6StRmB
  8. 8. Perl 5 Pumpking
  9. 9. Whats a Pumpking?
  10. 10. BDFL
  11. 11. BDFL
  12. 12. BDFL
  13. 13. I make decisions
  14. 14. (the unpopular ones)
  15. 15. I delegate
  16. 16. (any real work)
  17. 17. I document
  18. 18. (process and policy)
  19. 19. I destress
  20. 20. (other people)
  21. 21. I’m a manager
  22. 22. So, who makes Perl?
  23. 23. Many awesome people
  24. 24. I just stand around looking pretty...
  25. 25. ...while other people do awesome stuff
  26. 26. Is your name in Perl’s AUTHORS file?
  27. 27. Are you aCPAN author?
  28. 28. You rock
  29. 29. You make Perl
  30. 30. The rules ofPerl Club
  31. 31. The REAL rules of Perl Club
  32. 32. commit e8cd7eae0498ecc1fd3801fe3160Author: Gurusamy Sarathy <gsar@cpan.org>Date: Sun Oct 10 23:48:07 1999 +0000add perlhack.pod from Nathan Torkington<gnat@frii.com>
  33. 33. That predates Damian’s talk
  34. 34. Yes, I know he’s capable of time travel
  35. 35. Rule 1
  36. 36. Larry is always right about howPerl should behave
  37. 37. Rule 2
  38. 38. Larry is allowed to change his mindabout any matter at a later date...
  39. 39. ...regardless of whether he previouslyinvoked Rule 1
  40. 40. I’m not Larry
  41. 41. I’m nowhere near as clever
  42. 42. My shirts arenowhere near as loud
  43. 43. My shirts arenowhere near as loud
  44. 44. The rules aren’tjust for Larry
  45. 45. The rules aren’tjust for the Pumpking
  46. 46. The rules also apply to the Perl 5 core.
  47. 47. What?
  48. 48. Rule 1
  49. 49. Perl is always right!
  50. 50. (TMTOWTDI)
  51. 51. Rule 2
  52. 52. The Perl 5 coreis allowed to...
  53. 53. change its mind?
  54. 54. Changing ourminds is easy
  55. 55. We are very good at it
  56. 56. Not flailing wildly whenwe do has been hard
  57. 57. ...and leads to problems
  58. 58. at least I haven’t heard this in a while...
  59. 59. Perl is Dead !
  60. 60. Perl is Dead !1!!
  61. 61. Perl is Dead !1!!one!
  62. 62. What I’ve beenhearing lately...
  63. 63. Where are we going?
  64. 64. It’s changing too fast.Can you slow down?
  65. 65. You made regexescrazier? /$#@!/l?
  66. 66. smartmatch isn’tnamed correctly...
  67. 67. we should call it psychoticmatch
  68. 68. Now that it’s undead,can we rename it?
  69. 69. I’ve been accused of lacking avision for Perl 5
  70. 70. What I lackis a flame-proof suit http://en.wikipedia.org/wiki/File:Dance_Dance_Immolation.jpg
  71. 71. What I lack pe rl5 -po rt e rsis a flame-proof suit http://en.wikipedia.org/wiki/File:Dance_Dance_Immolation.jpg
  72. 72. If I’d talked about myvision 2 years ago...
  73. 73. You would havelaughed at me
  74. 74. Improving Perl 5did not matter
  75. 75. We couldn’t evenput out a new release
  76. 76. In the past year...
  77. 77. Five StableReleases
  78. 78. A dozendevelopment releases
  79. 79. In metric, that’s1.2×10 1 releases
  80. 80. Perl 5.14.1 is thecurrent stablerelease of Perl 5
  81. 81. It came out in June
  82. 82. ...as did Perl 5.12.4
  83. 83. ..as did Perl 5.15.0
  84. 84. (all of them came out the same week)
  85. 85. It used to take us3 weeks to prepare a release
  86. 86. We made thePumpking do it
  87. 87. Now it takesless than a day
  88. 88. The 43 step process is documented
  89. 89. We have rotatingrelease engineers
  90. 90. Many of them arenew committers
  91. 91. Release engineersneed commit bits
  92. 92. Since the switch to git,we’ve nearly doubled our committer list
  93. 93. The worldhasn’t ended
  94. 94. Some of those releaseengineers have become prolific contributors
  95. 95. Now thatreleasesare easy...
  96. 96. A Vision for Perl 5
  97. 97. New versions of Perl 5should not breakyour existing software
  98. 98. Old syntax and semantics must not stopPerl 5 from evolving
  99. 99. We need to be able to make mistakes as we rebuild Perl 5
  100. 100. We will make mistakesas we rebuild Perl 5
  101. 101. We have made mistakesas we’ve rebuilt Perl 5
  102. 102. We need to be able torecover from mistakes as we rebuild Perl 5
  103. 103. The runtime istoo big and must be slimmed down
  104. 104. Perl should havesane defaults
  105. 105. We need to be able to recover from lastyear’s “sane defaults”
  106. 106. It should be possible to build more of Perl 5 in Perl 5
  107. 107. Perl should runeverywhere
  108. 108. Rule 2:Perl is allowed to change its mind
  109. 109. That’s already true
  110. 110. That hurts programs and programmers
  111. 111. When your code runs, you have no ideawhat semantics it’ll see
  112. 112. use v5.14;
  113. 113. “Can I have a Perl that’s 5.14 or newer?”
  114. 114. “Anything newer than 5.14.0 would be great!”
  115. 115. “Ok. I’m 5.30. Have fun!”
  116. 116. That is not useful
  117. 117. It needs to change
  118. 118. From now on, declare the version of Perl 5 you expect
  119. 119. use v5.16;
  120. 120. “I want a Perl 5 thatworks like 5.16”
  121. 121. The runtime shouldhonor that request
  122. 122. Perl should give yousemantics as close aspossible to what you request
  123. 123. New featuresshould not workunder ‘use v5.$older;’
  124. 124. It’s critical that we be able to evolve
  125. 125. We need anescape hatch
  126. 126. We needRule 2
  127. 127. If you declare an old version, you get old syntax and semantics
  128. 128. ...at least to thebest of our abilities
  129. 129. Perfection isnot possible
  130. 130. We can get far closer than we do now
  131. 131. Breaking existing code should be a last resort
  132. 132. In limitedcircumstances we will break backward compatibility
  133. 133. Some craziness can’t befixed in an “optional” or lexical way
  134. 134. This is going to be hard work
  135. 135. A lot of hard work
  136. 136. It’s not impossible
  137. 137. Deprecation
  138. 138. Our currentdeprecation cycle is 1 year
  139. 139. “It warns in 5.16.0”
  140. 140. “It’s gone in 5.18.0”
  141. 141. That’s turning outto be too short
  142. 142. Very few operatingsystems release that frequently
  143. 143. Declare by default means we can makesome changes sooner
  144. 144. If it still works in old code, we get to change it with nodeprecation cycle
  145. 145. Some misfeaturesneed to come outlest they block major improvements
  146. 146. If we can’t emulate an old feature for oldcode, we get a longer deprecation cycle
  147. 147. “It dies in code thatdeclares ‘use v5.16’”
  148. 148. “It warns in older code on 5.16.0”
  149. 149. “It still warns in old code on 5.18.0”
  150. 150. “It’s gone in 5.20.0”
  151. 151. Rule 2 andOld Modules
  152. 152. We haven’t just beendeprecating and yanking broken old features
  153. 153. We’ve been doing thesame to old modules
  154. 154. They all end up on CPAN
  155. 155. This hurts users who wrote code with“no non-core deps”
  156. 156. We need to make iteasier to ship two flavors of Perl 5
  157. 157. Hotel California
  158. 158. Last thing I remember, I wasRunning for the doorI had to find the passage backTo the place I was before’relax,’ said the night man,We are programmed to receive.You can checkout any time you like,But you can never leave!
  159. 159. aka Traditional Perl
  160. 160. The Times,TheyAre A-Changin’
  161. 161. The line it is drawnThe curse it is castThe slow one nowWill later be fastAs the present nowWill later be pastThe order is rapidly fadin’And the first one now will later be lastFor the times they are a-changin’
  162. 162. aka Bootstrappable Perl
  163. 163. There’s work going on to make this easier
  164. 164. Perl is a big language
  165. 165. There are bigger languages
  166. 166. Its harder to manage a big language
  167. 167. It’s harder to learn a big language
  168. 168. It’s harder to fix bugs in a big language
  169. 169. We’re ok, but notamazing at corelanguage dev
  170. 170. As a community, we’reawesome at modules
  171. 171. How do we make Perla smaller language?
  172. 172. It’s possible to loadmodules that inject new builtins
  173. 173. It’s possible to loadmodules that inject old builtins
  174. 174. Time to start...
  175. 175. ...refactoring
  176. 176. Lots of stuff in perl isnt necessarily part of Perl 5 the language
  177. 177. This stuff is part ofPerl 5 the chainsaw
  178. 178. I like our chainsaw
  179. 179. I’m not talking about deprecating this stuff
  180. 180. ...just aboutdecoupling it
  181. 181. SysV IPC functions
  182. 182. Socket IO functions
  183. 183. Unix user & groupinformation functions
  184. 184. Unix networkinformation functions
  185. 185. Process and process group functions
  186. 186. Formats
  187. 187. smartmatch
  188. 188. ...and probably a bunch of other stuff
  189. 189. If you don’t ‘use v5.16’,you’ll get whatever was in 5.14.
  190. 190. The implementation of SysV might be a module
  191. 191. As a Perl 5 user you won’t need to care
  192. 192. ..and shouldn’t be able to tell
  193. 193. In the future we mightfix a bug or two in the modularized code
  194. 194. You could take the update withouthaving to upgrade all of Perl 5
  195. 195. Someday we mightremove things from the default runtime
  196. 196. Every feature weexternalize reclaimsprecious memory
  197. 197. Every feature weexternalize reclaims precious sanity
  198. 198. That just means you’ll need to declare youwant an older feature
  199. 199. ...but only if you ask for v5.16
  200. 200. ...but only if you ask for v5.18
  201. 201. ...but only if you ask for v5.20
  202. 202. Existing codewon’t break
  203. 203. There are many, many unanswered questions
  204. 204. But it’s doable
  205. 205. I have proof!
  206. 206. Case study:Smartmatch
  207. 207. After YAPC::NA RJBS(and others) raised the issue of smartmatch
  208. 208. Perl has a history of borrowing from other languages
  209. 209. Perl has a history of thieving from other languages
  210. 210. We stolesmartmatchfrom Perl 6
  211. 211. It’s very clever
  212. 212. It’s very clever
  213. 213. It’s nearlyimpossible to explain
  214. 214. It’s nearlyimpossible tounderstand
  215. 215. RJBS proposed a saner, much less clever, smart match
  216. 216. I don’t want to breakexisting code that uses “smartmatch”
  217. 217. Jesse Luehrs (DOY)was sitting in the back of my YAPC talk
  218. 218. All guys namedJesse are crazy
  219. 219. He...
  220. 220. ...threw himself at the problem
  221. 221. He extractedsmartmatch into an XS module
  222. 222. He reimplemented itentirely in pure perl
  223. 223. It’s slower, but it’sunderstandable and hackable
  224. 224. He implementedRicardo’s saner smartmatch as an alternative
  225. 225. I’m hoping that 5.16 ships DOY’s smartmatchimplementations
  226. 226. use v5.16; shouldload the new one in your scope
  227. 227. use v5.14; should load the old one in your scope
  228. 228. no “use v5.x;” line should load the old one in your scope.
  229. 229. We need a modulehierarchy for such things in core
  230. 230. The Test Suite
  231. 231. (Keeping us honest)
  232. 232. We have anamazing test suite
  233. 233. Over time, we need to tease apart (at least) 3 kinds of tests
  234. 234. Language tests
  235. 235. Bug-fix tests
  236. 236. Implementation tests
  237. 237. To hold us to thecompatibility promises we make, we need a new test harness
  238. 238. “Run the test suites we shipped with allprevious releases...”
  239. 239. Weve been moving pretty fast
  240. 240. We’ve done some things I...
  241. 241. would notdo again
  242. 242. I’m going to be a lotmore skeptical about new features
  243. 243. ...at least ones thatdon’t make it easier to have fewer features
  244. 244. We should havesane defaults
  245. 245. There’s lots of crazy in Perl 5
  246. 246. Syntactic Crazy
  247. 247. Semantic Crazy
  248. 248. Internal Crazy
  249. 249. Module Crazy
  250. 250. It may be time toconsider doing away with some of that
  251. 251. We’ve starteddown this road
  252. 252. “use v5.12” includes“use strict;”
  253. 253. Where do we go next?
  254. 254. warnings on by default
  255. 255. autodie-esque defaults
  256. 256. autodie does good for your code
  257. 257. using deep, scary evil
  258. 258. I will not show you the evil
  259. 259. Ask Paul Fenwick
  260. 260. You’re safe today. He’s not here
  261. 261. We should throwexceptions rather than just return on failure
  262. 262. I don’t want us to bikeshed anexception hierarchy
  263. 263. Heck, I’d be happy if westarted with dying with well-defined strings
  264. 264. (I’d love an exception hierarchy)
  265. 265. 2-arg open()gone by default
  266. 266. 1-arg open()gone by default
  267. 267. No more package separator
  268. 268. Latin-1autopromote off by default
  269. 269. utf-8 everything by default
  270. 270. A clean, simplemeta-model with classesand methods
  271. 271. No indirect object syntax by default
  272. 272. But only if you declare “use v5.16”
  273. 273. But only if you declare “use v5.18”
  274. 274. But only if you declare “use v5.20”
  275. 275. Perl needs to becleaner, simpler and easier to work with
  276. 276. For users...
  277. 277. ...and forimplementers
  278. 278. Perl should runeverywhere
  279. 279. Not just on everykind of hardware
  280. 280. Not just on everyOperating System
  281. 281. Every VM
  282. 282. Every Browser
  283. 283. Every Phone
  284. 284. Why isn’t Perl 5 onother runtimes?
  285. 285. “There’s no spec”
  286. 286. That didn’t stop Ruby
  287. 287. “Only Perl 5 can parse Perl 5”
  288. 288. That didnt stop PPI
  289. 289. To survive, a desperate hacker needs to be ableto reimplement Perl 5
  290. 290. Thanks!
  291. 291. How do we make this happen faster?
  292. 292. Perl 5 Maint Fund
  293. 293. perlfoundation.org
  294. 294. Questions/Tomatoes?http://blog.fsck.comjesse@perl.org@obra
  295. 295. So, you want to changethe name?
  296. 296. To something like Perl 7?
  297. 297. Or Raptor?
  298. 298. Our language is called Perl 5
  299. 299. Perl 6 is our precocious kid sister
  300. 300. I’m happy to talk about renaming Perl 5...
  301. 301. ...if you write me asecond implementation
  302. 302. ...that passes the test suite

×