Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Clojure implemented on top of Python
Python
branch: master

This branch is 3 commits ahead, 2 commits behind eigenhombre:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
pyclojure
.gitignore
AUTHORS
CHANGES.txt
CNAME
LICENSE.txt
MANIFEST.in
README
guidelines.txt
setup.py

README

Primary contact: John Jacobsen, NPX Designs, Inc. john@mail.npxdesigns.com
(See AUTHORS for complete list of contributors)

Started: December, 2011

This project consists of the very first steps of an implementation of
the Clojure language in Python.  At the moment it is merely interpreted
and does very little (see file test_lisp.py for examples).  I probably
shouldn't even call it PyClojure at this point, but the name at least
serves to indicate my intentions....

DEPENDENCIES

- PLY [1] (for lexing and parsing)
- Nose [2] (to run unit tests)
- Python 2.6+

WHY DO THIS?

The long JVM startup time makes use of Clojure for scripting common
system tasks somewhat unworkable, or at least irritating.  NewLISP[3]
would be an option, but this particular implementation is meant to
eventually be syntax-compatible with Clojure (as currently implemented 
on the JVM).  The goal is to provide a real Lisp with macros, and Clojure's
syntactic goodness, as well as immutable data structures, which can 
coexist with Python and make use of its extensive, 'batteries included'
libraries.

There has been some discussion[4] as well about getting Clojure running
under PyPy, something which I think would be quite interesting.

Feel free to join in!  For next steps, see Issues list on GitHub.
Please see the file guidelines.txt for contribution guidelines.


WHAT'S THERE NOW:

- REPL with history and readline support
- Parsing and storage of trees of lists, vectors, atoms, integers, floats
- 'def' and simple evaluation
- A few builtin functions and access to functions in Python's main namespace
- setup.py packaging



[1] http://www.dabeaz.com/ply/.  It turns out Python is actually quite serviceable
    for writing compilers, particularly for prototyping, and I'm curious how far
    one can push this.
[2] http://readthedocs.org/docs/nose/en/latest/
[3] http://www.newlisp.org/
[4] http://groups.google.com/group/clojure/browse_thread/thread/d910983a4c9ed3f5
Something went wrong with that request. Please try again.