Since writing my set of function combinators for matching HTTP requests I’ve realised that there are better approaches.
While the combinators read nicely, once you start extracting attributes from the request things become messy, due to the hAnd combinator composing results as nested pairs.
Here’s an example:
skitchPutHandler =
let
[...]
Introduction
My implementation of Hangman has only very simple data storage requirements, so my CAL module Datastore doesn’t cover the entire capabilities of Bigtable.
All the application needs is to be able to save a Game instance, put the key of that instance into a cookie in the user’s browser, and then retrieve and update that instance [...]
This post describes a simple implementation of the game ‘Hangman’, written in CAL for Google Appengine.
Introduction
Hangman is a simple word guessing game — the computer chooses a word, telling you only how many letters it has. You that it contains a particular letter. Correct guesses fill in those letters in the word, until you have [...]
I’ve always hoped that Java would be the next Google App Engine language. Google have provided a solid platform with a ‘real’ JVM and few restrictions.
I deployed the sample application created with the Eclipse plugins a few minutes after my account was upgraded to support Java, and then I went on to deploy an application [...]
I’m much happier with the second version:
out3 a =
let
renderGroup g =
let
char = head g;
[...]
My colleague Matt Ryall wrote about this simple algorithm for marking up a series of letters — which is complex enough to be interesting.
I wrote a version in CAL:
arr = ['a', 'b', 'c', 'c', 'd', 'e', 'e', 'e', 'e', 'e',
'f', 'e', 'f', 'e', 'f', 'a', [...]
March 27, 2008 – 10:24 pm
aka, attack of the TLAs.
This webapp’s architecture is depicted below:
The browser runs a Javascript thick client compiled from Java by GWT. Some of the classes have CAL annotations. These don’t affect the client, but allow the server side of the GWT RPC protocol to call CAL functions.
The CAL functions store persistent data using Software Transactional [...]
I’ve been interested in GWT as a way of building rich Internet applications since it appeared, and I’m very pleased to see it getting better and better.
So it’s natural that I’d want to try using it with CAL, a functional language quite similar to Haskell which runs on the JVM.
I used a similar approach to [...]
October 3, 2007 – 5:29 am
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 [...]
September 24, 2007 – 10:13 pm
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 [...]