Genesis
by Nicolas Wu
Posted on 17 June 2010
Tags: Haskell
In the beginning was … well there wasn’t very much, just words, really. Or code. Was there a compiler?
Let’s try that again.
Hello Blogonauts! This is the first post on zenzike.com, where I hope I’ll be able to entertain you with thoughts about programming functionally.
My name is Nick Wu, I’m currently a DPhil student at the University of Oxford, working on my thesis at the Computing Laboratory. I’ve decided to share my enthusiasm about functional programming with the rest of the world by writing this blog. I first discovered functional programming in 2001 at the first programming course I attended at university, and have been hooked ever since. Here you’ll find articles about Haskell, a pure, lazy, functional programming language that I enjoy programming with.
This aim of this blog is to promote the use of Haskell and to encourage programmers to start thinking about the algebra of programming: how one can reason about programs in a calculational style.
I intend to post something about programming once a week on a Thursday, and to get things started I’ll be covering some of the basics of Haskell by going through the first twenty questions of Project Euler. If you don’t know about the project, then you should follow that link and start thinking about the first few questions there: it’s a lot of fun and a great way to get your brain-feed. The first few posts on this blog will serve as an introduction to Haskell, and will be pretty basic, but we’ll soon move onto challenging problems with more interesting programs.
To finish this first post, I thought I’d tell you a little about the website name. I encountered the word zenzike while on a hunt for the first use of the equality symbol with a friend. It turns out that it was invented by Robert Recorde, in his book The Whetstone of Witte, published in 1557, who conceived that these twin lines of one length denoted equality “bicaufe noe .2. thynges, can be moare equalle”. To our great joy, there was an original print held within the University! We found our way to the Queen’s College Library, and our excursion was a great success, where we spent a few hours investigating the book.
One of the curiosities we found there was the word zenzizenzizenzike, which turns out to be the word with the most Zs in the Oxford English Dictionary. The word is composed of a repeated prefix, zenzi, and followed by a root, zenzike. One occurrence of zenzike squares a number, and each prepended zenzi further squares the result. Here’s a point-free definition:
Integer → Integer
zenzike ∷ = uncurry (*) . id ▵ id
zenzike = zenzike zenzi
= zenzi . zenzi . zenzike zenzizenzizenzike
The definition of zenzizenzizenzike, then, is a function that returns its input to the power of eight. So there you have it: a quirky word with a catchy ring, and a pointless definition!
There should be a comments section at the bottom of every post, and I’d love to hear what you have to say, so please feel free to comment!