My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

The Pure Programming Language

Pure is a modern-style functional programming language based on term rewriting. It offers equational definitions with pattern matching, full symbolic rewriting capabilities, dynamic typing, eager and lazy evaluation, lexical closures, built-in list and matrix support and an easy-to-use C interface. The interpreter uses LLVM as a backend to JIT-compile Pure programs to fast native code.

Pure is the successor of the author's Q language. It offers many new and powerful features and programs run much faster than their Q equivalents.

A little code sample that prints the first 1000 Fibonacci numbers:

extern int puts(char*);
do (puts.str) (take 1000 (fibs 0L 1L)) with fibs a b = a : fibs b (a+b) & end;

You can execute this snippet by typing or pasting it at the Pure interpreter prompt. It uses the C 'puts' function to do the printing. Note that if you remove the 'take 1000', all Fibonacci numbers will be printed (press 'Ctrl-C' when you get bored). An explanation of this example can be found in the Pure manual. More examples can be found here.

Supported Systems

  • FreeBSD
  • GNU/Linux
  • Mac OS X
  • Windows

Porting to other POSIX platforms should be a piece of cake. In principle Pure should be able to run on any system which is supported by LLVM.

License

GNU Lesser General Public License V3 or later. Please see the README file for details.

Documentation and Examples

Selected wiki pages:

Mailing List

Pure development and use is discussed on the mailing list. Join us there to discuss Pure and ask whatever questions you have.

Source Code

Packages and Ports

  • Windows installers for Pure and several addons.
  • The MacPorts collection includes Ryan Schmidt's Mac OS X port of Pure. Ports of many addon modules are also available.
  • The Homebrew package manager for Mac OS X also has a recipe a.k.a. formula by Michael Kohl for building Pure.
  • The Packman project offers Toni Graffy's rpm packages for SUSE Linux.
  • Fedora packages by Michel Salim are available in the usual repositories, see here.
  • The Gentoo ebuild by Álvaro Castro Castilla is available here.
  • Arch Linux packages by Mikko Sysikaski, asitdepends and others are available here.
  • A FreeBSD port by Zhihao Yuan is available here.

Pure on the Web

Other interesting items such as programming modes and syntax highlighting files can be found on the Grab Bag page.

Author

Albert Gräf <Dr.Graef at t-online.de>, Dept. of Computer Music, Johannes Gutenberg University of Mainz (Germany)

Powered by Google Project Hosting