Stok Footage

Continually experimenting with new ideas and techniques — Reconstructing, Developing, Modernising.

Rediscovering Interests

One of my favourite courses in Computing at university was compiler writing, and nearly three decades after taking it I am still in touch with the person who taught the course. That course fuelled my interest in programming languages, which has survived the decades reasonably intact.

Recently I picked up Tom Stuart’s Understanding Computation book, and I’m working trough it with a pry window open alongside the electronic book. It takes me back a bit, and makes me realize how much I’ve forgotten. If you’re interested then he did an interview on the Ruby Rogues podcast recently, and it is entertaining and enlightening listen.

If I tell the truth, I bought the book a while ago with the intent of reading it before the Ruby Rogues episode. Good intentions, good intentions…

One of the parts of the Ruby Rogues episode which most interested me was Tom’s explanation of why he used Ruby. I found it interesting because I haven’t been able to express why I like using Ruby as well as he does:

I did start doing it with Ruby because that was the language I wanted to do it in, but I was definitely open to the idea of I might get halfway through this book and realize it would be much better to do it in JavaScript or to do it in a language like standardml for example, which has got much better support for functional programming and pattern matching and a load of features that I wish I had to be able to explain stuff, or doing it all in Lisp and then maybe the stuff about syntax I wouldn’t have to say so much because I could just represent everything with S-expressions. I was definitely on the fence about whether Ruby was the right thing. But then the more I got into it and the more of it I wrote, the more I felt like, in a way that I can’t quite put my finger on, it felt like Ruby was being strangely cooperative.

The notion of a program as like a roiling pop of collaborating objects that are all just sending messages to each other and being able to go in and modify the method tables of those objects and put new implementations of methods into them whenever I wanted to meant that I could do this slightly weird thing where we’re walking through a chapter and it’s really just an annotated IRB session where I’m just, “Now if you paste this in on the console then all of your objects have this new method and you can actually call that method on those objects.” It felt like a natural way of explaining stuff and I was really happy with that because it helped me solidify some of the things that I really enjoy about Ruby. And actually, since writing the book I feel more enthusiastic about Ruby now.

I’m a few pages into the book and I’m glad I bought it!

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *