?

Log in

No account? Create an account
 
 
23 November 2005 @ 09:14 pm
Ruby  
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.
 
 
In the mood: geeky
 
 
 
Laurel Amberdineamberdine on November 24th, 2005 05:23 am (UTC)
*happy geek-talk squee*