Skip to main content

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

Release files for divspl 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for divspl 0.0.4
File Size Uploaded
divspl-0.0.4.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for divspl 0.0.4
File Interpreter ABI Platform
divspl-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 9.4 kB

Release files / divspl-0.0.4.tar.gz

Download URL divspl-0.0.4.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e126ff17175e38d8ac51ad2dce54b063126eae4fbc169396dac825530442f962
BLAKE2b-256 checksum
How to use checksums
9070fe4b7f19440da78823dad8caf52e2471c3bb0a68d658bfb63e1b48101427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / divspl-0.0.4-py3-none-any.whl

Download URL divspl-0.0.4-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ebfc9a76ea636e05907f19ef4b8814989605345cc698ddaa35c8cc3fe52b4ba
BLAKE2b-256 checksum
How to use checksums
91379a5fa96752f8201fb1452f7c880aff6a5e9dc978570dd2b6676e1aab4262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3.1

1 release file

0.0.3

3 release files

0.0.2

2 release files

0.0.1.2

1 release file

0.0.1.1

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page