Ruby Creator Matz on How Emacs Changed My Life
This is at LibrePlanet 2012 conference at the University of Massachusetts, Boston, around . Also, Matz is given FSF's “Award for the Advancement of Free Software” for 2011.
Here's a transcript of the slide. (with added photos and annotations)
1. How Emacs changed my Life Yukihiro “Matz” Matsumoto @yukihiro_matz
3. I started programming
4. (picture of a Sharp PC-1211 programmable calculator)
Xah Note: see also: HP-28S Advanced Scientific Calculator (1988)
6. 400 steps
8. I met Emacs
9. on Sun-3
Xah Note: Sun-3 series launched in 1985.
Xah Note: the keyboard is precursor to Sun Microsystem's Type 6 Keyboard. The mouse is a optical mouse, but requires a special grid-pattern mirror mouse pad. This optical mouse is standard with Sun Microsystems at the time.
10. shared by 200 undergraduates
11. I tried Emacs
12. but I never used
13. Emacs was prohibited
14. It consumed too much precious memory
15. We are free to download free software
16. We are free to read the source code
17. I downloaded Emacs source code
18. and investigated
19. Emacs was my first Lisp interpreter
20. I learned a lot about language implementation from Emacs
21. Embedding integers in pointers
22. Mark and sweep garbage collection
23. Calling convention between Lisp and C
24. I really understood how Lisp work
25. I was fascinated by Lisp objects
26. Lisp objects implemented by C
27. Then I got a Sparc Station
Xah Note: the SPARCstation (aka Sun-4) series was introduced in 1989.
28. I started to use Emacs
29. Emacs become part of me
30. If I didn't like anything in Emacs, I could change it
31. Emacs is totally configurable
32. Emacs made me realize anything can be changed by a programmer
33. It is total freedom
34. I could edit without thinking key binding
35. I didn't want to write anything without Emacs
36. Programs, Documents and Mails
37. so I wrote my own mail client
38. named “cmail”
39. in Emacs lisp
Xah Note: [see Emacs Lisp Basics]
40. It was my first non-trivial (Emacs) Lisp program
41. I used it everyday
1993 Xah Notes
around 1993, Desktop publishing revolution lead by Apple is at its heyday, with mouse, WYSIWYG GUI, LaserWriter printer (opposed to Dot matrix printer), software such as PageMaker, FrameMaker, QuarkXPress, Photoshop, Illustrator, Freehand, and Macintosh II series was very popular.
Microsoft Windows 3.0 is released in 1990, and Microsoft Windows 95 in 1995. DOS programs were still very popular. Laughter at mouse and GUI from programers were still common.
GNU Emacs 18.59 was released in 1992. XEmacs, called Lucid Emacs at the time, was perhaps more popular than GNU Emacs at the time. [see GNU Emacs and XEmacs Schism, by Ben Wing]
Perl started in 1987, but the major change Perl 4, was released in 1993, Perl 5, almost a complete rewrite, was released in 1994. [see Perl Basics by Example]
By 1993, the web, internet, was starting to become mainstream. People connected to internet thru modem and services such as AOL. More popular were Bulletin board system, and private online services such as CompuServe.
43. I started Ruby development
44. with influence from Emacs implementation
45. Integers are coded in tagged pointers
46. It uses simple mark and sweep garbage collector
47. It uses similar object model to Lisp
Note: the “object” of lisp object just means a internal representation of code, not the sense of “object oriented programing”. (info "(elisp) Lisp Data Types")
48. Then I put Smalltalk-like OO system on top
50. But as an Emacs addict,I needed a language mode
51. auto-indent was a must
52. Back in 1993, there was no auto-indenting language mode for a language with such syntax
53. So I tried to write experimental ruby-mode.el
Note: as of , the ruby mode shipped with GNU Emacs is still the one written by Matz.
54. fighting with emacs lisp and regular expression,
55. for almost whole week
56. I somehow succeeded to implement auto-indentation
57. for a language with “end” delimiters
58. If I couldn't make ruby-mode to work
59. the syntax of Ruby would have changed
60. to more C-like one
61. too similar to other scripting languages
62. as a result, Ruby would not have gained current popularity
64. 1. Emacs taught me freedom for software
65. 2. Emacs taught me how to read code
66. 3. Emacs taught me power of Lisp
67. 4. Emacs taught me how to implement a language core
68. 5. Emacs taught me how to implement a garbage collector
69. 6. Emacs helped me to code and debug
70. 7. Emacs helped me to write and edit text/mails/documents
71. 8. Emacs helped me to be a effective programmer
72. 9. Emacs made me a hacker
73. 10. Emacs has changed my life
75. Thank you
in the slide, Matz indicated that he learned a lot about language implementation from emacs, and how many concepts in Ruby are borrowed from emacs lisp.
at first i was skeptical. I wasn't sure how much of it is politeness.
after studying Ruby for a while, one can see a lot similarity between emacs lisp. For example, chars datatype in ruby are just integers, same as in emacs lisp, and Ruby also has a “symbols” datatype, same as emacs lisp. … what else i missed? (note: character datatype as integer was a mistake. Ruby 1.9 changed that. XEmacs also changed that.)
so, Matz's remark that he learned/created Ruby from reading emacs source code is genuine.
If you have a question, put $5 at patreon and message me.