Wednesday, September 01, 2010

Old habits die hard, if ever

I've taken a bit of a break from electronics, and have been having great fun with Clojure.

In the distant past I spent about 19 years programming in a (fairly) functional programming language, so Closure feels very comfortable. The thing I miss most is a Romilly-friendly multi-dimensional array library.

There are high-performance numeric libraries in Java, and some of them have been wrapped in Clojure, but their authors don't think the way I do.What I want is a library that works like the array engines in APL or J wrapped in a Clojure API.

For now I value expressiveness more than performance, and it looks as if I can implement a useful subset of APL primitives in a couple of days.

When performance becomes an issue there are two tempting possibilities. Closure allows you to use native Java arrays performantly; and a Clojure wrapper for OpenGL looks as if it may allow easy access to a workstation's GPU. This might permit array operations that run faster than they would in Java or C++.

No comments: