Author Archives: Tom Davies

The Tyranny of Distance

Apple ships good developer documentation with OS X, and Xcode provides a good UI for searching it, but as I’m a beginner I like to read the conceptual documentation all the way through.

I don’t like reading long documents on a screen, so I print out the documents I want to read 2-up on single sided [...]

The Language of The Year for 2008 is Scala

Last week a colleague pointed my at this post by Steve Yegge. It discusses ‘code’s worst enemy’ (size) and asks which new language, by being more expressive, can reduce line count.

Dijkstra said (via Overcoming Bias):

“If we wish to count lines of code, we should not regard them as ‘lines produced’ but as ‘lines [...]

Confluence, Spotlight and Hessian

My choice for the highlight of OS X 10.5, Leopard, is that Spotlight is worth using. It’s fast enough that it’s replaced Quicksilver (I was never a power Quicksilver user) as my application launcher.

I’ve also found it useful for general searching for emails, contacts, PDF documents and so on.

This inspired my second current spare-time project, [...]

EC2, Confluence, S3 and PostgreSQL

Update: EC2 will have persistent storage!

My side projects at the moment are both work related — that is, they’re related to Confluence, our enterprise Wiki. Even though I don’t work on that team any more the product still has a lot of mindshare with me.

My latest spare time project is running Confluence on EC2.

Amazon announced [...]

CAL and Tapestry 5, Part 2: Algebraic Types and Forms

In my previous post I described how to use a CAL function as part of the implementation of a Java class.

This post looks at interfacing CAL to Tapestry 5 using the ‘Java Bean’ conventions of getter and setter methods for the fields in an object.

Tapestry 5 provides a BeanEditForm component which simplifies providing CRUD operations [...]

Simplifying Code

In the course of trying to adapt an ANTLR lexer to be used in an Intellij IDEA language plugin, I found that I’d written this:

token = lexer.nextToken(); if (token != null) { tokenStart = findCharPos(token.getLine(), token.getColumn());

if (token.getText() == null) { [...]

CAL and the Tapestry 5 Tutorial

The technique described in my previous post can be used to create Tapestry 5 pages which call CAL functions. Tapestry also uses Javassist to enhance pages, so adding CAL integration requires that Tapestry is reconfigured to apply the CAL transformations in addition to its own — I wasn’t able to find a way to transparently [...]

Javassist and Annotations for Interfacing Java to CAL

In order for CAL to interoperate with Java frameworks we need to provide a Java class which delegates method calls to CAL functions. The framework sees only the Java class, and is unaware of the delegation which is taking place.

How we do this depends on a number of factors:

How easy it is to hook into [...]

Quote of the day, Tyler Cowen on Google

“Everyone is smart and beautiful, and I didn’t want to leave.”

Interfacing CAL to Java Frameworks — Part 1

This article discusses the differences between CAL as a client of Java libraries and CAL modules as clients of Java frameworks.

CAL is a functional programming language which runs on the JVM. One of the advantages of a language which compiles to Java bytecode is that it is simple to call any of the many available [...]