Category Archives: Functional

Posts about functional programming

Tools Geek

I think I’m becoming a bit of a programming tools geek, spent a bit of time over the weekend reading Understanding Darcs over on Wiki Books.

I found the section on patch theory interesting and I’m looking at using Darcs for my personal projects for a while, see how I get on.

I also engaged in several discussions at work last week about source and version control tree structure. I was eventually convinced that our existing vc tree is the right one for us, but only once each of my arguments had been justified. It’s a pretty non-traditional source tree structure which represents our need to rapidly release full, up-to date, builds at the drop of a hat. Nightlies are not enough!

At one stage I was contemplating overhauling the whole build process; have the subcomponents in separate trees, build bot with code coverage, nightly builds, etc. Unfortunately this is a massive job and will involve a big time commitment with the only real gain being a little more developer convenience with a slightly more logical vc tree.

Unfortunately it being an interesting project and tidying up the developer work flows is not enough of a reason when we have so much work and so little time. I agree from a business standpoint but I’m a programmer, so the missed opportunity to construct a system is a little disappointing.

Literate Haskell & Currying

I stumbled across this literate Haskell program on Reddit earlier: Link.lhs

Literate Haskell is where the whole file is the codes comments and and you use a character (>) at the beginning of a line to mark that line as code. Kinda nifty especially in cases such as this.

The literate module linked to above explains some core Haskell concepts and compares them to how most languages work. I particularly enjoyed the section on Currying, which I’ve heard mentioned but not learnt about yet:

In that case, Haskell does what is called Currying, and
a function starved of arguments will return a function
that takes the remaining arguments. So,

	map 		--	Takes two arguments.
	map null 	--	Takes one argument.
	(map null) []	--	Takes no arguments -
				is the result of the 

That is how currying works.

Fantastic !

I’m keen to get learning Haskell properly rather than just reading around it. Must check some more things off my ToDo list first though …

My intention is to be working through the Haskell School of Expression before years end.