Douglas Triggs (doubt72) wrote,
Douglas Triggs

  • Mood:


For reasons that I probably shouldn't go into too much detail about (let's just say, it's one of the things making a PowerBook affordable), I've been diving into a new language recently -- Ruby.

Of course, when I started, I was pretty much just thinking to myself "ho, hum, another language," and I really wasn't that excited about it (not that I'm particularly resistant to learning new languages, if there's any reason at all to do it -- it's really not that hard picking them up, after all). But now... Well, Ruby is just cool. I never really understood why people were getting all that excited about Python, but if it's half as cool as Ruby, it's pretty cool, and maybe now I understand.

It seems fairly obvious to me that the person who wrote Ruby had been a Scheme programmer in a previous life. A lot of the nomenclature is the same (the ! and ? notation for methods immediately jumped out at me when I saw them), and it has a lot of the same features I hadn't seen since, continuations and lambdas in particular. In fact, the coolest (and most Scheme-like feature) of Ruby is the fact that it's completely typeless... A given "variable" can be any object, including an expression or a function. It's the sort of language that would make the computer science purists I've known happy (the sort of people that hate types and love garbage collection) and still work for the practical hackers like me (who tend to like the fact that you can do the same things in TCL, which achieves practical typelessness by storing absolutely everything in a string, including expressions. Ugly, yet powerfully useful for abstraction at times). While I'm more hacker than purist, getting both makes me unreasonably happy.

In fact... I'm planning on rewriting all of my Japanese drill programs in Ruby at some point. One of the reasons for doing that, of course, is just getting practice using the language. Despite the large amounts of time I've sunk into working on my drill programs, the truth of the matter is that a very small percentage of that time has actually been spent writing the programs themselves -- most of the time has been spent building datasets for the programs to work with (albeit sometimes writing programs in TCL or Perl to help me build those datasets). I imagine that if I wasn't working on anything else -- which, of course, I am -- I could rewrite and finish the whole set of programs in well under a week (finishing up my vocabulary dataset -- well, we're still talking months). Another reason is that TCL is kind of ugly and hard to maintain... And this is the first language that's tempted me enough to try using TK in it.

Maybe, just maybe, I'd even port the programs over to Rails and stick those datasets in a database. To tell the truth, it's actually kind of disturbing how easy that looks like it would be.

  • Grays Peak

    So, climbed Grays Peak today. Bailed on Torreys Peak, but that's a difference of only about a mile and 600 feet of vertical in addition to the eight…

  • Andrews Glacier

    So, hiked up to Andrews Glacier today. Six hours, maybe nine miles round trip, maybe 2,750 feet total vertical (got some extra distance and altitude…

  • Windy Peak

    Did a quick 3.5 hour hike this morning in Golden Gate Canyon State Park, probably about five or six miles, ~1500 vertical feet (up to only a bit over…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment