After being somewhat disenfranchised with the Windows build of Io I grabbed a copy of VirtualBox and built Ubuntu mini up with a barebones, just-enough-for-io-and-a-little-more set of libraries. I added KDE4, Konqueror and Konsole for a little bit of visual pleasure.

Thankfully I was able, after several hours, get Io running with *most* of the addons compiled and installed. It took a little bit of hackery but I finally got the $%@#% thing built. And because most of my programming is done on the web I wanted to play with the new(ish) webserver tools that were built into Io.

Rich Collins did some great work with his HttpServer implementation. However some of the code I found on the Internet was a little outdated. Cliff Wells, another Io hacker, had run some benchmarks with apache’s benchmarking tool ‘ab’. This was done back in October.

However, as I’ve found out – a lot of things change quickly with relatively young languages. If you grab Cliff’s code and get a couple of errors, I’ve done the hard work for you and fingered it out. A couple of the changes are as follows:

server := HTTPServer do(

… should be changed to

server := HttpServer do (

The same goes for two lines down where you see HTTPResponse should be changed to HttpResponse After you do this, you need to add a single method to get the server to start outputting data to your browser.

renderResponse := method ( request, response,
response body = ( createBody )

)

This should get you current with the latest (as of the date of this post).

Have fun!

p.s. I really hate how the wordpress editor busts your $@#% up swapping between HTML and Visual.

Sphere: Related Content