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:
- Souce:
- 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 Distributions
File details
Details for the file divspl-0.0.3.tar.gz
.
File metadata
- Download URL: divspl-0.0.3.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26cd5e150c4f9197884fd7194f03f55bb9e0e3450c1cf97806edbdb82754ac89 |
|
MD5 | 1fbcc507efb86dc572835259ff3b29a6 |
|
BLAKE2b-256 | 4ef462ddb82794dd3eaf8a3987142620d13c541ce80b6e7fc56db47b46f4e557 |
Provenance
File details
Details for the file divspl-0.0.3-py3.6.egg
.
File metadata
- Download URL: divspl-0.0.3-py3.6.egg
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 221cc3115b728a9d4c4ae0e9e1472c45e4fb49ca6c40c9976155a847c099b201 |
|
MD5 | 84901f0d3ab8525f44a7eda4a9d35641 |
|
BLAKE2b-256 | c2821e7881556e57cc56ccf496ba63a46a5fa142a1d522a884df2e390a3e82f8 |
Provenance
File details
Details for the file divspl-0.0.3-py2.7.egg
.
File metadata
- Download URL: divspl-0.0.3-py2.7.egg
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 497e45afe99af5f5bf84922bd21be3861bb271c6a11f4681631fa80986da4e4d |
|
MD5 | 05d9909288cf210e8e7ceb8ddfd825c2 |
|
BLAKE2b-256 | b8dfec5f74abdaa0900c48d52bb78360fa650ae453bb225081e747107d42e11e |