Giter VIP home page Giter VIP logo

pyclojure's Introduction

Author: John Jacobsen, NPX Designs, Inc. [email protected]

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!

DONE

- Parsing and storage of trees of lists, vectors, atoms, and integers
- 'def' and simple evaluation
- A few builtin functions

NEXT STEPS

- Maps
- Sets
- Lambda / fn / (# ...)
- Python interop
- Macros
- Quote (do w/ macro...?)
- loop/recur
- Defn
- Namespaces
- Real immutable, persistent data structures (currently Python lists are used)
- 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

pyclojure's People

Stargazers

Sean avatar

Watchers

Sean avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.