Category Archives: Computer Science

Functional Programming on Android

I’ve integrated CAL with a variety of Java based frameworks/environments: Tapestry, GWT and Google AppEngine for instance.

Recently someone asked on the CAL Google Group whether CAL programs could run on Android mobile devices. Android doesn’t use a standard JVM, it uses Dalvik, and it provides a subset of the normal JRE library.

I have put together [...]

Reconsidering my Combinators

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 [...]

CAL Hangman on GAE Part 2 — The Datastore

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 [...]

CAL Hangman on Google AppEngine, Part 1

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 [...]

Functional Programming on Google AppEngine

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 [...]

Computer Scientists as an ethical elite

… every culture … needs a kind of self-questioning, ethical elite … Perhaps you see very little link between the Charles of 1267 with all his newfangled French notions of chastity and chasing after Holy Grails, the Charles of 1867 with his loathing of trade and the Charles of today, a computer scientist deaf to the [...]

bash command completion for jstack/jps

I’ve only recently become aware of jps and jstack, Sun’s tools for listing Java processes and for producing a thread dump from them. They beat the old ps | fgrep java and kill -3 (and then try to find the log file your thread dump went into…).

You still have to use jps, copy the appropriate [...]

Books from India Update

I received the ‘Eastern Economy Edition’ of “Advanced Topics in Types and Programming Languages” last week.

It’s a well constructed hardcover.

The negative points are: - It has an ‘inky’ smell. - The paper is thinner than usual, so you can see the printing on the other side of the page.

Neither is a real problem.

Laptop design stupidity

A relative of mine has a recent HP Pavillion laptop. (I suggested that she get a Mac, but she was concerned about MS Office compatibility).

I was doing some telephone support trying to reattach it to her wireless network tonight. I was ultimately unsuccessful, but I did learn two reasons why HP laptops suck.

HP has their [...]

ICFP2008 Programming Contest

Along with some colleagues I entered the ICFP programming contest this year.

You can read some more about our experience at Matt’s blog.

I thought the problem — guiding a Mars rover to a goal amongst obstacles — was very well chosen. It was possible to navigate the example maps with very simple software, so everyone could [...]