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:
- Source:
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e126ff17175e38d8ac51ad2dce54b063126eae4fbc169396dac825530442f962
|
|
| MD5 |
3dbee90ff58d4e8d24bd9774eb7dd915
|
|
| BLAKE2b-256 |
9070fe4b7f19440da78823dad8caf52e2471c3bb0a68d658bfb63e1b48101427
|
File details
Details for the file divspl-0.0.4-py3-none-any.whl.
File metadata
- Download URL: divspl-0.0.4-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ebfc9a76ea636e05907f19ef4b8814989605345cc698ddaa35c8cc3fe52b4ba
|
|
| MD5 |
b05653f8b32a9cea0d085d388204f528
|
|
| BLAKE2b-256 |
91379a5fa96752f8201fb1452f7c880aff6a5e9dc978570dd2b6676e1aab4262
|