I am really getting into this OSL thing and I like to share a second shader with you all. Detailed instructions and an example noodle can be found here:
I have called it a scales texture but it can be used for things like roof tiles (or shingles) or perhaps for a pine cone as well. I have built in a neat trick to output a random-but-constant vector for each scale so by plugging that vector into a noise texture you can give each scale its own, unique color or texture. In the image below I have used that to color the scales on this abstract Koi carp (yeah I know, it takes some imaganition ) Anyway, the example noodle in the article is the one that produced this image so you can have a look at how it was done.