Home

Awesome

BlueSpace

BlueSpace is an interpreter for the Whitespace programming language.

Whitespace

Whitespace is an esoteric programming language that was created by Edwin Brady and Chris Morris and is based at http://compsoc.dur.ac.uk/whitespace/ (archived version from 2015-07-15). Its syntax consists entirely of invisible characters: space, tab and line feed.

BlueSpace

This interpreter is written in Python 3 and boasts the following features:

To run a Whitespace program, simply execute ./bspace.py source.ws; to see other options, use ./bspace.py --help.

Assembly Syntax

Each line of the source must match one of the following forms, where number is any decimal integer and label is any string of s and t characters with an optional trailing n. Each line maps to a single Whitespace instruction. A # begins a comment; it and any subsequent characters on the same line are ignored.

<pre> Push <i>number</i> Duplicate Copy <i>number</i> Swap Discard Slide <i>number</i> Add Subtract Multiply Divide Modulo Store Retrieve Label <i>label</i> Call <i>label</i> Jump <i>label</i> JumpZero <i>label</i> JumpNegative <i>label</i> Return End OutputChar OutputNum ReadChar ReadNum </pre>

Compatibility

Known incompatibilities between BlueSpace 1.1 and WSpace 0.3:

Programs

Here is some code I've written in Whitespace.

Name

Why BlueSpace? It is, in fact, named after Sir Lancelot's favourite colour; anyone who is familiar with the Python documentation should be sufficiently conditioned to expect such silliness.

More

I have another page about Whitespace and BlueSpace which includes some of my own Whitespace programs at http://cpjsmith.co.uk/whitespace