Skip to content

ScientificComputing

Albert Graef edited this page Feb 28, 2018 · 1 revision

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.

Reduce can be used conveniently along with Pure's Octave module in the TeXmacs environment. In particular, the Reduce module also provides the math output capabilities for Pure's TeXmacs plugin.

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.

Octave can be used conveniently along with Pure's Reduce module in the TeXmacs environment. In particular, the Octave module also provides the plotting capabilities for Pure's TeXmacs plugin.

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).

The plugin has been tested as is known to work with TeXmacs versions 1.0.7.17+. Mac users please check the Pure on Mac OS X, Windows users the Pure on Windows wiki page.

TeXmacs

Clone this wiki locally