Skip to main content

Interpreter for the Shrug Programming Language

Project description

ShrugProgrammingLanguage Build Status Coverage Status

Interpreter for the Shrug Programming Language

Shrug is a imperative, dynamically-typed, very very high-level, general-purpose programming language

Example

>> a 10
>> b 11
>>
>> # Arithmetic operations
>> ¯\_()_/¯ a 3
13
>> ¯\_()_/¯ "str" "ing"
string
>> ¯\_()_/¯ a ¯\_()_/¯ 3
7
>> ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ b
110
>> ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ 3
3
>> ¯\_()_/¯ b ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ 4
3
>>
>> # Comparisons
>> ¯\_()_/¯ ¯\_()_/¯ a b
False
>> ¯\_()_/¯ ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ b
False
>> ¯\_()_/¯ ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ b
True
>>
>> # Conditional statements
>> ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ True
>>  "printed"
printed
>> ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ False
>>  "not printed"
>> ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ a ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ ¯\_()_/¯ b
>>  "a is less than b"
a is less than b

Usage

Requires Python 3.6+

Install

pip install shrug-lang

Start interpreter

shruglang

To run a file:

cat program.shrug | shruglang

Language spec

Language spec can be found here

Syntax highlighting

Syntax highlighting for sublime can be found here

Shrug sublime syntax highlighting

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

shrug-lang-0.1.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shrug_lang-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file shrug-lang-0.1.0.tar.gz.

File metadata

  • Download URL: shrug-lang-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for shrug-lang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 feb063e4b74c0ae12a9fa49b727890b20ecc80c714df0f7c82709e8dcd1e8f5c
MD5 93ff4c1bd791924723d9afdb34f867ab
BLAKE2b-256 efa3ed05fa8ea717bef9a6030015f2d16f334e2457b0ebe2e39316433f4b25cb

See more details on using hashes here.

File details

Details for the file shrug_lang-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shrug_lang-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for shrug_lang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e7c47563099c0d184390bf06bb2e4bebe615ec15f24923970595a016d2ee369
MD5 d42e047267d24ae80ba28896605e9a0a
BLAKE2b-256 0ef878331840215ae9eb61f5f5d5d8eda229f43b8874b4f5e31f726e1ee71ab5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page