Skip to main content

Dustin Ingram's Very Special Programming Language.

Project description

divspl (Dustin Ingram’s Very Special Programming Language)

An implementation of a FizzBuzz DSL using rply.

Description

divspl is an interpreter for the DIVSPL DSL (Dustin Ingram’s Very Special Programming Language Domain Specific Language), which is used for implementing FizzBuzz-like programs. For more information, see http://promptworks.com/blog/the-fastest-fizzbuzz-in-the-west.

Installation

$ pip install divspl

Or for local development:

$ virtualenv env
$ source env/bin/activate
$ python setup.py install

Usage

$ divspl [filename]

Where:

filename            A *.divspl filename to execute

Example

Use the interpreter to execute valid DIVSPL code:

$ divspl fizzbuzz.divspl

Or use it as a shebang:

#!env/bin/divspl
1...15
fizz=3
buzz=5

Then:

$ ./fizzbuzz.divspl

Compiling with RPython

divspl is compatible with RPython. To compile:

$ pip install rply
$ mkdir -p pypy
$ wget https://bitbucket.org/pypy/pypy/get/default.tar.bz2
$ tar -xvvf default.tar.bz2 -C pypy --strip-components=1
$ mkdir -p bin
$ python pypy/rpython/bin/rpython --output=bin/divspl divspl/target.py

You now have a compiled divspl binary in ./bin, which you can use as follows:

$ bin/divspl fizzbuzz.divspl

Contact

On PyPI:

http://pypi.python.org/pypi/divspl/

Source:

https://github.com/di/divspl

Issues:

https://github.com/di/divspl/issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

divspl-0.0.4.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

divspl-0.0.4-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file divspl-0.0.4.tar.gz.

File metadata

  • Download URL: divspl-0.0.4.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for divspl-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e126ff17175e38d8ac51ad2dce54b063126eae4fbc169396dac825530442f962
MD5 3dbee90ff58d4e8d24bd9774eb7dd915
BLAKE2b-256 9070fe4b7f19440da78823dad8caf52e2471c3bb0a68d658bfb63e1b48101427

See more details on using hashes here.

Provenance

File details

Details for the file divspl-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for divspl-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7ebfc9a76ea636e05907f19ef4b8814989605345cc698ddaa35c8cc3fe52b4ba
MD5 b05653f8b32a9cea0d085d388204f528
BLAKE2b-256 91379a5fa96752f8201fb1452f7c880aff6a5e9dc978570dd2b6676e1aab4262

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page