Metadata-Version: 1.0
Name: pyLisp-NG
Version: 2.0.0
Summary: A very simple implementation of Lisp in Python that is perfectly suitable for Python projects needing Lisp-like capabilities.
Home-page: https://launchpad.net/pylist-ng
Author: William S. Annis, Duncan McGreggor
Author-email: duncan@adytum.us
License: LGPL 2.1
Description: ~~~~~~~~~
        pyLisp-NG
        ~~~~~~~~~
        
        .. contents::
        :depth: 1
        
        
        ============
        Introduction
        ============
        
        pyLisp-NG is an immediate descendant of PyLisp, which had its accidental birth
        as a result of William Annis' desire to build a CLIPS-like [#]_ syntax for a
        simple expert system intended for the monitoring tool, Mom. As a result of Lisp
        interest on the Python news group [#]_, William released the software an
        announced it to the group [#]_.
        
        PyLisp is a very idiosyncratic creation. For example, the booleans are true and
        false and it doesn't follow the convention that everything that isn't false is
        true (common to many lisps). In fact, all booleans in PyLisp are based on
        fuzzy logic, so you can do trickier things. Macros are, quite strangely, first
        class objects in PyLisp which maybe novel to Lisps [#]_::
        
        lisp> (setq foo 22)
        22
        lisp> ((macro (x) `(setq ,x (+ ,x 1))) foo)
        23
        
        Several years later, the Evolver [#]_ and txEvolver [#]_ projects needed a
        functional programming language implementation in Python, as inspecting
        Python's AST was too much of a hassle. The author wanted to distribute,
        process, and manage evolutionary algorithms/programms across multiple remote
        Twisted servers, and manipulating permutations of partial programs was much
        easier to integrate with Twisted if the programs themselves could be evaluated
        and introspected easily with Python.
        
        pyLisp-NG, like its predecessor, has no intent of becomming a full-fledged,
        robust Lisp implementation. All progress is governed solely by the interest of
        contributing developers; right now, that's strictly for use as a genetic
        programming tool.
        
        
        ============
        Installation
        ============
        
        pyLisp-NG is setuptools-friendly; you can install it with the following:
        
        $ easy_install pyLisp-NG
        
        You can get the full source code from Launchpad:
        
        $ bzr lp:pylisp-ng
        
        This is greatly encouraged for interested users, as the repository contains
        extra files that are not included in the ditribution tarballs.
        
        
        =====
        Usage
        =====
        
        To use the interpretter from a full checkout, do this:
        
        $ cd <branch directory>
        $ ./bin/pylisp-ng
        
        If you've installed with easy_install, and your Python scripts directory is in
        your PATH, all you'll need to do is this:
        
        $ pylisp-ng
        
        At this point, you'll be able to enter Lisp expressions::
        
        lisp> ((lambda (x) (* x x)) 2)
        4
        lisp>
        
        You can use the s-expression code from Python::
        
        >>> from pylispng import lisp
        >>> l = lisp.SExpression('((lambda (x) (* x x)) 2)')
        >>> str(l)
        '((lambda (x) (* x x)) 2)'
        >>> l.eval()
        4
        
        Building an expression one symbol at a time or by adding chunks at a time::
        
        >>> l = lisp.SExpression()
        >>> l.append('+')
        >>> l.append('3')
        >>> l.append('5')
        >>> l.append('(* 3 3)')
        >>> str(l)
        '(+ 3 5 (* 3 3))'
        
        You can examine various properties of the s-expression::
        
        >>> l.eval()
        17
        >>> l.getDepth()
        2
        >>> len(l)
        4
        >>> l.getSize()
        2
        
        
        ========
        Features
        ========
        
        * A tiny Lisp dialect, easy to integrate into other Python projects.
        
        * Includes an interactive Lisp interpreter.
        
        * Expression introspection specifically designed for use in genetic
        programming.
        
        
        
        ==========
        Known Bugs
        ==========
        
        None currently known.
        
        
        ====
        TODO
        ====
        
        * support testing .l files
        * support lisp interpreter tests in doctests?
        * add http://www.biostat.wisc.edu/~annis/creations/PyLisp/tests.txt to tests
        * split up monolithic lisp.py file into separate files
        * replace fragile interpreter that originally came with PyLisp with one based
        on the Python interpreter
        - graceful quit
        - command history
        - auto-completion
        * add support for getting expressions by index (and thus slicing as well)
        * add support for getting sub-expressions
        
        
        =======
        Changes
        =======
        
        From PyLisp 1.17 to 2.0.0 (pyLisp-NG)
        -------------------------------------
        
        * Added introspection code that's useful for genetic programming.
        
        * A couple small bug fixes and some code cleanup.
        
        From PyLisp 0.0 to 1.17
        -----------------------
        
        There doesn't seem to be any history from which to extract code changes between
        versions prior to 1.17.
        
        
        
        
        ==========
        References
        ==========
        
        .. [#] http://clipsrules.sourceforge.net/
        
        .. [#] http://mail.python.org/pipermail/python-list/2001-May/thread.html, search
        the page for "lisp"
        .. [#] http://mail.python.org/pipermail/python-list/2001-May/084087.html
        
        .. [#] Taken from http://www.biostat.wisc.edu/~annis/creations/PyLisp/
        
        .. [#] https://launchpad.net/evolver
        
        .. [#] https://launchpad.net/txevolver
        
        
        
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python
Classifier: Programming Language :: Lisp
Classifier: Topic :: Software Development :: Interpreters
Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
