# \[ANN\] Pure: Language-level support for automatic parallelism

**URL:** <https://www.ruby-forum.com/t/ann-pure-language-level-support-for-automatic-parallelism/177755>\
**Category:** Ruby\
**Created:** [October 23, 2009, 5:41am UTC](https://www.ruby-forum.com/t/ann-pure-language-level-support-for-automatic-parallelism/177755 "2009-10-23T05:41:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![noagenda](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/8c91f0/32.png) [@noagenda](https://www.ruby-forum.com/u/noagenda)\
**Post date:** [October 23, 2009, 5:41am UTC](https://www.ruby-forum.com/t/ann-pure-language-level-support-for-automatic-parallelism/177755/1 "2009-10-23T05:41:22Z")

</div>

= Pure

== Summary

Language-level support for automatic parallelism and lazy evaluation.

== Synopsis

require ‘pure’

geometry = Pure.define do  
def area(width, height)  
width\*height  
end

```
def width(border)
  7 + border
end

def height(border)
  5 + border
end

def border
  2
end

```

end

# Compute the area using 3 parallel threads.

puts geometry.compute(3).area

# =\> 63

# We’ve done this computation.

puts((7 + 2)\*(5 + 2))

# =\> 63

== Install

% gem install pure

Or for the (non-gem) .tgz package,

% ruby install.rb [–uninstall]

== Description

Pure imports aspects of the pure functional paradigm into Ruby.

Method and argument names have literal meaning within a Pure.define  
block. In the above example, the _width_ argument to _area_  
corresponds, by its literal name, to the _width_ method.

== Links

- Documentation: [http://purefunctional.rubyforge.org](http://purefunctional.rubyforge.org)
- Download: [http://rubyforge.org/frs/?group\_id=8324](http://rubyforge.org/frs/?group_id=8324)
- Rubyforge home: [http://rubyforge.org/projects/purefunctional](http://rubyforge.org/projects/purefunctional)
- Repository: [GitHub - quix/pure: Automatic parallelism and lazy evaluation using pure functional programming in Ruby.](http://github.com/quix/pure)

== Author

- James M. Lawrence [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
