Tuesday, 30 November 2010

I-o, I-o, It’s Off To Work We Go

Language number 2 of the 7 is Io. When Bruce Tate was picking the languages for inclusion in this book he discounted JavaScript due to its ubiquity. Io takes its place as a prototype based language, and in the intro Bruce tells us that learning Io helped his understanding of JS. In my web developmenty day job I tend to spend more time on the back end, so don’t hit JavaScript too much, but from time to time I have the odd job to do in it. I can muddle through, but I’d certainly not claim any major expertise with it and I’m always happy to get back server-side. So despite not having heard of Io prior to discovering this book, the promise being able to apply some of the principles learnt here to my work has some allure. Additionally, at the Io’s home website, http://iolanguage.com/, the overview mentions that it was inspired by Smalltalk, a language that seems to be the starting point of every good idea in the industry right now. Admittedly, plenty of other languages are probably inspired by it as well, but it’s nice to see the reference in black and white :)

At this point I screeched into my first blocker. There doesn’t seem to be a download of the binaries available. It’s an old-school, unix-style, build-it-yourself job. That wouldn’t be sooo bad, but I’ve not installed Xcode on this box yet, so I don’t have the tools installed to do so. So to run what is described as a teeny tiny little interpreter, I’ve now got a few gig of Xcode install running. Waiting…

…And there we go. With Xcode installed I now have the ability to run make. Unfortunately the instructions for installing Io also require cmake. Another download, more installing…

…And finally, I can build the app. The Readme.txt file instructs me to run the following:
   mkdir build && cd build
   cmake ..
   make install
which, of course fails part way through the final step. A bit of googling and I find that a better command would be:
   sudo make install

…And at long last I can fire it up. Hoorah! The intro to the book states that we are on our own when it comes to installing the languages due to the wide variety of platforms etc. that readers might be using, which is fair enough. However, after all the hassle getting to this stage I decided to just run the hello world app as a quick test and take a break from it. Page 1 of Day 1 has taken me far longer than I feel like dealing with right now.

No comments:

Post a Comment