Wednesday, July 27, 2011

New Location

I've decided to move all my blogging activities to This will allow me to not only continue to write blog posts, but also to actually *build* the blog. It'll be a fun experiment with Google App Engine.

Tuesday, May 31, 2011

Nested Go Templates with Dtemplate

Lately I have been playing around with Google's relatively new programming language, Go. So far, I am fairly impressed with the language. It has been pretty easy to pick up. I started playing with it mostly because Google App Engine recently added support. The idea of a compiled language to run a web app seemed appealing. Especially in an environment like App Engine where you pay for CPU time.

While Go as a language is quite capable (and really easy to learn), the template package is somewhat lacking (imo). Specifically, there's no way to nest templates without resorting to a somewhat convoluted method outlined here:

In a web application, it is pretty vital to be able to nest templates. So I created dtemplate. A simple package to allow a user of Go to nest templates in a way that is very similar to how Django handles nested templates. Check out dtemplate on github: You'll find basic documentation on how to use it there as well.

I haven't yet specified a license, but feel free to use or modify as you please.