Hacker News new | past | comments | ask | show | jobs | submit login
The Pure programming language (code.google.com)
43 points by mbrubeck on July 24, 2009 | hide | past | favorite | 12 comments



This looks pretty cool. I don't know much about term rewriting, but I get the impression that it provides a unified way of implementing some neat features such as pattern-matching on arbitrary expressions, macros, and other symbolic stuff.


It's not the same thing, in the same sense that "Lazy Evaluation" is not the same thing as "Non-strict Semantics", but "Term Re-Writing" is closely allied with "Graph Reduction. Simon Peyton-Jones' books "The Implementation of Functional Programming Languages" and "Implementing Functional Languages: a tutorial" are excellent works. Now out of print, they can both be found on-line.

The following references also help ...

http://www.google.com/search?q=implementing+functional+langu...

http://www.google.com/search?q=graph+reduction+term+rewritin...


It sounds like you certainly know more about term rewriting than I do. Do you know of a decent introductory source? I'd like to get a gist of it, but the Pure site seems to prefer reference/appendix style documentation. That stuff is great to have, but I'm looking for an litmus test for my interests.


You might start with wikipedia - it's surprisingly good for introductions to mathematical computer science ideas. http://en.wikipedia.org/wiki/Term_rewriting

The "see also" includes JIT compilation and lambda calculus, for some applications.


"Term rewriting and all that". It's not easy going, however; make sure your category theory and universal algebra are top-notch before touching the burgundy book.


The Maude project [1] (and its documentation) may be of interest; they use term rewriting in a formal modeling and model-checking tool. There's an introductory course at [2].

1. http://maude.cs.uiuc.edu/

2. http://heim.ifi.uio.no/~peterol/inf3230-lecturenotes.html


I can't add much to what others have already recommended, other than Functional Programming by Field and Harrison (out of print, I believe). It covers graph reduction, which I believe is a generalization of term rewriting.


I played a bit with Q (the predecessor language from the same author) a couple of years ago and I found it really interesting.

As far as I remember you couldn't define functions interactively but just recall them.

This one has a proper REPL environment. You can see all the definitions by evaluating 'show' and dump them all on a file with 'dump'.


There's a lot of promise here; I wish there was a "this is why I did it and this is what place it fills in the ecosystem" page somewhere. It'll be interesting to see how this develops.


Don't know how much this helps you, but from the PDF of the book on the page above:

This book is about the functional programming language Pure. Pure’s distinguishing features are that it is based on term rewriting (a computational model for algebraic ex- pression manipulation), that it provides built-in support for MATLAB-like matrices in addition to the usual list and algebraic data structures, that it uses LLVM (the “Low Level Virtual Machine”, see http://llvm.org) to compile source programs to fast native code on the fly, and that it makes interfacing to C very easy.

On the surface, Pure looks similar to functional languages of the Miranda and Haskell variety, but under the hood it is a much more dynamic language, offering an interactive interpreter environment and metaprogramming capabilities more akin to Lisp. Pure’s algebraic programming style probably appeals most to mathematically inclined pro- grammers who need an advanced tool for solving problems in domains which can be described conveniently in terms of algebraic models. While languages like Haskell and ML already occupy that niche, we think that Pure’s feature set is sufficiently different to turn it into a worthwhile alternative. In particular, Pure’s interpreter environment and easy extensibility also make it usable as a kind of (compiled) scripting language in a variety of application areas, including system, database, graphics and multimedia programming.


"Pure’s algebraic programming style probably appeals most to mathematically inclined pro-grammers"

False. It appeals to mathematical simpletons like muhself.


That does not contradict.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: