Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (21 sloc) 0.903 kb

The Clojure Gem

github.com/technomancy/clojure-gem

Description

Use Clojure's immutable data structures and Software Transactional Memory from Ruby. Don't be afraid of concurrency.

Requires JRuby. Tested with 1.4.0+.

Supports all four persistent collection types (lists, vectors, maps, and sets). Many enumerable methods still return Ruby arrays instead of the original type; this will be fixed. Lazy sequences are not yet supported.

Issues

JRuby's way of nesting exceptions means that the exceptions used for transaction retries in dosync are not caught correctly. This may necessitate shipping a patched version of Clojure to fix. See the test_threaded_refs test in test_ref.rb for details; changing “commute” to “alter” makes it fail.

Examples

TODO: write examples

License

Copyright © Phil Hagelberg 2009

Released under the Eclipse Public License. See file COPYING.

Jump to Line
Something went wrong with that request. Please try again.