This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

NOT YET SUITABLE FOR PUBLIC USE

Parthial

Parthial is a simple Python implementation of a generic Lisp interpreter. It is intended for use in user-scriptable server-side applications such as IRC bots.

Features

Safe evaluation

Evaluation puts (configurably) strict limitations on recursion depth, number of allocated values, and number of steps taken. The set built-in cannot mutate parent scopes (so closures are immutable), and every other language feature available in the package is purely functional.

Simple API

Lisp values are represented by directly analogous Python objects; (a b c) is just LispList([LispSymbol('a'), LispSymbol('b'), LispSymbol('c')]). It’s easy to define new built-ins, too:

# part of the default_globals scope
# suppresses evaluation of its arguments (quotes them)
@built_in(default_globals, 'if', quotes=True)
def lisp_if(self, ctx, cond, i, t):
    cond = ctx.eval(cond)
    if cond:
        return ctx.eval(i)
    else:
        return ctx.eval(t)

Serialization

PyYAML serializers and deserializers are provided for all Lisp value types, as well as for definition environments (built-ins are serialized by name, so a global scope must be supplied at deserialization). Allocation limitations are kept track of across serializtion, so it’s safe and easy to give users a persistent mutable environment.

Shortcomings

No optimizations

Parthial is not a general-purpose interpreter. There is no compilation or optimization. It probably shouldn’t be used to run any program that wouldn’t be appropriate, performance-wise, to implement as a shell script.

No code reviews (yet)

Nobody other than the original author has looked the code yet. For now, it’d be unwise to actually expose an interpreter to the Internet at large, in case of security holes.

No[t much] documentation (so far)

Working on it…

No tests (for now)

The warning at the top is there for a reason.

Release History

Release History

0.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
parthial-0.2.2-py3-none-any.whl (11.3 kB) Copy SHA256 Checksum SHA256 py3 Wheel Mar 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting