Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Scientific Computing with Pure
While Pure is a state-of-the-art functional programming language with advanced symbolic computation capabilities, by itself it only provides basic facilities for scientific computing. However, by interfacing to excellent existing open source solutions for computer algebra (Reduce), numeric computation and visualization (Octave) and scientific typesetting (TeXmacs), the language becomes a workhorse for scientific computing which pulls all the different tools together.
Using Pure with Reduce
Reduce is one of the oldest computer algebra systems which has been around since the 1960s and is widely recognized as a state-of-the-art, powerful and efficient CAS. It is free/open source software distributed under a BSD-style license, actively maintained on its SourceForge website, and implementations exist for all major computing platforms.
The pure-reduce module embeds Reduce in Pure, so that the functionality of Reduce becomes available in Pure in a seamless way. More background information and a discussion of the interface can be found in the Embedding REDUCE thread on the Pure mailing list.
Using Pure with Octave
Octave is a high-level interpreted language for numerical computations. While the LLVM-based, JIT-compiled Julia language may eventually take its crown, Octave's comprehensive set of matrix functions, its powerful plotting capabilities and the extensive collection of available addon packages has made it the premier open source language for doing numerical computations available right now.
The pure-octave module embeds the Octave interpreter into your Pure programs. You can execute arbitrary Octave code, exchange data between Pure and Octave, execute Octave functions directly from Pure (including support for Octave "inline" functions), and also call Pure functions from Octave. The mapping between Pure and Octave data such as matrices and strings is straightforward and handled automatically. An interface to Octave's plotting functions is also available.
Using Pure with TeXmacs
Pure 0.56 and later have full support for TeXmacs, the free scientific text editor from the GNU Project. Pure can be run as a plugin inside TeXmacs, which allows you to use TeXmacs as an alternative frontend to the Pure interpreter. The distributed plugin can also be used with the mathematical input and output capabilities that TeXmacs provides. Using Pure along with the Pure Octave and Reduce modules in TeXmacs provides you with a fairly comprehensive scientific computing tool. It also adds an entirely new dimension to Pure programming, since Pure programs can now be written in customary mathematical notation and the results can be directly incorporated into high-quality mathematical typesetting.
Please check the installation instructions for information on how to install the TeXmacs plugin. A description of the interface can be found in "The Pure TeXmacs Plugin" article (pdf, texmacs). Some further Octave/Gnuplot examples are also available (pdf, texmacs).