Monday November 3, 2008How I arrived at RubyI've used interpreted languages for several decades, starting with the Lisp and command language interpreters I found on Stanford's WYLBUR (really, ORVYL) system in the early 70's. Most of my early programming, however, was done in compiled languages (eg, Assembler, C, COBOL, Fortran). I didn't get into serious scripting until I started using Unix.The Bourne shell, combined with a mix of "data filters" (eg, awk, sed), is a very powerful toolbox for writing batch-mode applications. Unix pipes (foo|bar) and back-ticks (foo=`bar`) are particularly handy for simple data-flow programming. The shell also supports a version of metaprogramming, allowing its variables to be dynamically expanded into (say) AWK scripts. Although the syntactic details of fancy shell scripts could be a challenge at times, I was basically quite happy with this approach. It ran out of steam for me, however, when I needed to index some free software collections. The scripts were taking three hours each to run; clearly, something had to give. Because I'd been hearing Good Things about Perl, I decided to give it a try. PerlWhat a revelation! After a simple transliteration, my scripts looked much the same, but they ran five times faster. It was also clear that Perl's level of integration was much higher, so it would let me write much cleaner code. It also gave me convenient access to Unix system calls, etc. Over time, I switched to Perl for all new projects, using it quite productively for a decade or so.Eventually, however, I began to find Perl annoying. Yes, I could write readable code in Perl, but it was a struggle. Also, the Perl 6 effort seemed to have stalled in the mud, while sucking all of the air out of Perl 5 development. Worse yet, I wasn't even convinced I'd like the resulting language. RubySo, I found myself commiserating about Perl with a friendly neighborhood computer scientist. He suggested that I give Ruby a try. I already knew about Ruby ("It's big in Japan." :-), but his recommendation made me take a much closer look.I soon found that I was in for another revelation. The more I looked at Ruby, the more things I found to like. In general, Ruby seemed to provide all the things I liked about Perl (eg, directness, well-integrated regular expressions), while avoiding the things I disliked (eg, line noise). I also discovered that Ruby made it convenient to do things (eg, introspection, metaprogramming, OO programming) that I'd found awkward in Perl. In a word, I was hooked. The thing that struck me most strongly about Ruby was how much I admired Matz's taste. Matz has managed to pick through a variety of languages, putting together a set of features that is large enough to do the things I need, yet small enough to be comprehensible. Knowing what to put in is important, but so is knowing what to leave out. There were some problems, to be sure. For example, the language wasn't formally defined and the interpreter was embarrassingly slow. However, it was clear that these problems were being addressed. Better yet, some of the proposed solutions (eg, MacRuby, Rubinius, RubySpecs) were themselves quite fascinating. CommunityRuby had attracted a collection of bright and productive coders, drawing on a variety of other language communities (eg, Lisp, Perl, SmallTalk). Having lots of smart people in a software community is very important to me. Aside from providing interesting people to converse with and validating my decisions ("if they think it's good..."), the community serves as a self-fulfilling prophecy of coming goodness. These folks will find things that need to be done, then figure out ways to do them.In fact, the current Ruby community reminds me a lot of the Unix community I encountered in the early 80's. The Murray Hill folks (and friends) were creating nifty tools and languages and giving them away (modulo some AT&T licensing hassles :-/) for folks like me to play with. The spirit of Unix is alive and well throughout the Open Source community. However, I find it particularly well represented in the Ruby community. With so many cool projects emerging, it's hard to know which ones to explore. Surely, this is a wonderful problem to have...
How I arrived at Ruby
in
Computers
,
Technology
- posted at Mon, 03 Nov, 17:55 Pacific
| «e»
| TrackBack
|