SKIio
This repository implements an interpreter for SKIio and a compiler from a higher level language Purr to SKIio. A description of Purr can be found below.
SKIio is an extremely minimal programming language that's an extension of SKI Combinator Calculus for I/O. Here's what it looks like:
; Repeat forever: Read and print a byte of user input
S(K(S(S(S)(K(S(K(S(K(S(S(K(o))(i))))))(S(K(S(S)(K(K))))
(S(K(K))(S(K(S(S)))(K)))))))(K(S(S(K(S))(K))))))(S(K(K)
)(S(S)(K(K(K(I))))))(S(S(K(S(S)(K(S(I)(I)))))(K))(S(K(S
(S)(K(S(I)(I)))))(K)))
SKIio consists of 5 combinators: S, K, I, as defined in the original SKI Combinator Calculus, and i and o, which does input and output.
i(x): Reads a byte of input at indexxxis a church encoded integer- Returns a church encoded integer
o(x): Prints the bytexxis a church encoded integer- Returns
I.
E.g. The program o(i(K(I))) reads a byte of user input and prints it.
To see the Purr spec read PURR.md.
To see the SKIio spec read SKIIO.md
For more information about how SKIio and Purr is implemented, see DETAILS.md
Quickstart
Installation
pip install skiio
Running
You could write an SKIio program in a file, say test.ski, and run it with:
python -m skiio run -i test.ski
You could also write a Purr program in a file, say test.purr, and compile it:
python -m skiio compile -i test.purr -o test
python -m skiio run -i test.ski
More options (e.g. optimizations, debugging) can be found with
python -m skiio -h
Full usage:
usage: SKIio [-h] {compile,c,run,r} ...
SKIio interpreter and compiler, command-line interface
positional arguments:
{compile,c,run,r} Action
compile (c) Compile Purr code
run (r) Run SKIio code
optional arguments:
-h, --help show this help message and exit
usage: SKIio {compile, c} [-h] -i INFILE -o OUTFILE [-opt OPTIMIZE] [-m INTERMEDIATE]
optional arguments:
-h, --help show this help message and exit
-i INFILE, --infile INFILE
Input filename with Purr code
-o OUTFILE, --outfile OUTFILE
Output filename (without extension)
-opt OPTIMIZE, --optimize OPTIMIZE
Toggle off optimization (default: True)
-m INTERMEDIATE, --intermediate INTERMEDIATE
Output intermediate representation (default: False)
usage: SKIio {run, r} [-h] -i INFILE [-v] [-vv]
optional arguments:
-h, --help show this help message and exit
-i INFILE, --infile INFILE
Input filename with SKIio code
-v, --verbose Prints debugging info (default: None)
-vv, --veryverbose Steps through execution (default: None)
Examples
Examples can be found in the examples folder
Purr:
SKIio:
Metadata
Release files for skiio 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skiio-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for skiio-1.0.2-py3-none-any.whl |
Release files / skiio-1.0.2-py3-none-any.whl
| Download URL | skiio-1.0.2-py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bbe0fafa362d3c3cfb77cadccc3d1128117d8b8f3feb0112b7bc7876ff5fdf69
|
|
BLAKE2b-256 checksum How to use checksums |
13b9caf612a4eafa7a4e95529b3e501a7eff5f4dd0caad956a061aed3012726d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.3 Windows/10
|
Security for skiio 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.