I would like to announce Clojuratica,
a high-performance, seamless Clojure interface to Wolfram Mathematica
Mathematica will be familiar to many on this list already. It is probably the world's most powerful integrated software package for numerics, symbolic mathematics, optimization, statistics, and visualization. It is built around a robust, Lisp-like functional programming language. If you are unfamiliar with Mathematica or haven't encountered the most recent version, I encourage you to learn more about it
The union of Clojure and Mathematica
will be useful and potentially transformational for anyone who works in scientific
computing, parallelized simulation, finance, or other areas where
Clojure's strengths in concurrency and parallelism are complemented by
Mathematica's array of numerical routines and visualization tools.
I wrote Clojuratica for my own research involving
CPU-intensive simulation and Bayesian inference. I strongly believe
that Clojure and Mathematica could outshine the existing crop of
scientific computation packages, including NumPy, MATLAB, and R.
Clojure's own Incanter
is a terrific piece of software, but it will be some time until it can match Mathematica feature-for-feature.
The following is a list of Clojuratica's core capabilities, copied from the new Clojuratica web site
. On the web site you will also find a Clojuratica tutorial
and Clojuratica Google group
enables the seamless translation of native data structures between
Clojure and Mathematica, including high-precision numbers, matrices,
N-dimensional arrays, and arbitrary Java objects.
makes it easy to evaluate Mathematica expressions from Clojure. Now
Clojure programs can take advantage of Mathematica's enormous range of
numerical and symbolic algorithms and its fast matrix algebra routines.
- Clojuratica offers an elegant syntax that integrates closely with Clojure.
builds a bridge between Clojure's state-of-the-art concurrency features
and Mathematica's existing parallel-computing capabilities. It adds a
high-performance, non-blocking concurrency queue that mediates
communication between Clojure and Mathematica. Now it is easy to run a
simulation in Clojure with 10,000 independent threads, each
asynchronously evaluating processor-intensive expressions in
Mathematica. The computations will be farmed out adaptively to however
many Mathematica kernels are available on any number of processor cores
— either locally or across a cluster, grid, or network. The result is the "Clojurization" of Mathematica's existing parallel-computing
I encourage you to look at the Clojuratica web site
, and Google group
. I hope you find Clojuratica's syntax easy and intuitive.
If you think you may find Clojuratica useful, please let me know. The level of interest will dictate whether I write more complete documentation and add new features.
I would also be very glad to hear comments, constructive pieces of criticism, and kudos on the design and implementation. Feature suggestions and bug reports are welcome. Please use the Google group
. This is beta software with all the usual caveats.
P.S. For those interested in implementation details: The heart of
Clojuratica is a Clojure-written Java class called CExpr that implements ISeq and wraps the
homoiconic Mathematica expression object (similar to the Lisp
s-expression). Implementing CExpr was a breeze thanks to the sequence
library, and everything else followed quickly from there. Implementing
the concurrency queue was also easy thanks to STM. Clojure strikes again.