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 and Chat

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

There's also a #pure-lang IRC channel on freenode where Pure developers and users hang out, which is archived here (thanks, yano!). To use this, point your IRC client at irc.freenode.net, or else use the page at http://webchat.freenode.net from your browser.

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 used to offer Toni Graffy's rpm packages for openSUSE Linux. (Unfortunately, while the Pure project is still listed there, the packages haven't been updated for a long time.)
  • Fedora packages by Michel Salim are available in the usual repositories, see here. Additional packages for Fedora users by Fernando Lopez-Lezcano can be found in the Planet CCRMA repositories.
  • The Gentoo ebuild by Álvaro Castro Castilla is available here.
  • A fairly complete set of Pure packages by Björn Lindig, Deokjae Lee and Alastair Pharo for Arch Linux is available here.
  • A FreeBSD port by Zhihao Yuan is available here.

Pure on the Web

  • pure-lang-extras provides additional libraries for Pure as well as a project template for Pure module developers, by Michael Maul.
  • pure-vision is an OpenCV module for Pure, by Kay-Uwe Kirstein.
  • Interesting bits of Pure code including an Ogg Vorbis player at Bluish Coder blog, by Chris Double.
  • An interview with the creator of Pure conducted by Nick Mudge can be found on his blueparen website.

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