Thursday, September 16, 2010

Yet another version of the Cognitive Profile

It seems like ten years ago that the first version of the CPI was launched on a JavaScript server named Rhinojetty. And then the second version of the CPI was launched on a prototype of the Syntelos SX server.

Tonight the latest iteration of this venerable educational app is launched in Googleland, with the server on Google App Engine, the website on Google Sites, and the engineering on Google Code.

In the service of this latest production I put together a graphics renderer now found at Pisces Graphics. The GAE platform doesn't include the usual "headless" graphics packages found in most Java server side environments, and I couldn't find a reasonable replacement. One possibility was PulpCore, which is a software renderer, however this package doesn't support the breadth of graphics operations needed for the CPI result image.

Reworking Pisces required sorting its S15.16 fixed point math into a floating point user space package. The current result, in version 1.0.1, has some notable omissions in its API. The pisces.Graphics API exposes the path operators moveTo, lineTo, cubicTo and friends but missed the close operator and the beginRendering and endRendering methods.

The good part is the Path, available as

public class Graphics {

public Graphics draw(Path p)

public Graphics fill(Path p)
}


I think this at least the third time I've done Font unpacking and rendering. In this case there's yet another approach, foresaking the usual abstraction in the choice to simply name the font for its file.

Font font = new Font("sun12x22.psfu");

I like it. Results in a simple and effective package.

Here's the CPI code that uses Pisces, Profile Image. It's in a state between having been disassembled from the previous version, and possibly opening up to scaling the image.

Many thanks to Google and Sun and David Eisenberg for lots of fun and interesting code to use in this project.

Friday, September 3, 2010

Notes on the address domain in the C programming language

Preliminary work towards a new programming language, S, examines pointer arithmetic in C.

Transparent reference programming languages like S are based on the principle of all names are references, and the identical equivalence between a named address of value and a named value. In this case the address of operator is not required, the only dereferencing operation is for the named members of a structured region, and the type cast operation is simplified to one mode of operation over equivalent sizes.

This work endeavors to create a language with the highly readable syntax of Java and the transparency of C.