Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Peri.dot (Pre-06)

Peri.dot Logo

Peri.dot is a strongly typed interpreted language, with type inference, implemented in Python. The file extension is ".peri"

Setup

This project uses poetry for dependency management.

git clone https://github.com/toto-bird/Peri.dot.git
cd Peri.dot
poetry install

Usage

python peridot file.peri

Documentation

Peri.dot Language Docs

Running Unit Tests

Unit tests expect pytest. (pip install pytest) From the top level directory pytest

Current Features

  • Basic REPL
  • Types:
    • Null/None: Null
    • Numbers: Int, Float
    • Strings: Str
    • Arrays: Array
    • Tuples: Tuple
    • Dictionaries: Dict
    • Booleans: Bool
    • Functions: Function
    • Built-in functions: Built-In Function
    • Exceptions: Exception
    • Ids: Id
    • Namespaces: Namespace
  • Types must be explicitely cast:
    • 1 + 1 -> 2
    • 1 + 1.0 -> OperationError('Float can not be added to Int')
  • Including other files: var operations = include('./operations.peri')
  • Variables:
    • Creation/Initialization: var x = 2
    • Assignment: x = 5
    • Accessing: x
  • Arithmetic:
    • Addition: 1 + 2
    • Subtraction: 5 - 1
    • Multiplication: 10 * 2
    • Division: 25 / 5
    • Exponents: 2 ^ 3
  • Global comparisons:
    • Equals: ==
    • Not Equals: !=
  • Numeric comparisons:
    • Greater than: >
    • Less than: <
    • Greater than or equal to: >=
    • Less than or equal to <=
  • Boolean operations: and, or and not
  • Functions:
    • Creation: var add = func(a, b) {a + b}
    • Calling: add(2, 6)
  • Built-In Functions:
    • Printing to console: print('Hello World!')
    • Testing: assert(x == 10, 'x is not 10')
  • Exception handler: var x = handler {10 / 0}
  • Assert / in-peri.dot testing: assert(x == 9, 'x is not equal to 9')
  • Flow control:
    • If statements: if (x == 1) {var y = 3} elif (x == 2) {var y = 2} else {var y = 1}
    • Switch statements: switch (var x in a) {case (x == 10) {print('10')} else {print('Hmm...')}}
    • For loops: for (var i in [True, True, False]) {print(i)}
    • While loops: while (x < 100) {x = x + 1}

Coming Soon

  • Improved repl
  • Classes for general use: var Test = class() {a = 'hello'}

Possible Features

  • Formatted strings 'Hello World{suffix}'
  • More operations:
    • Add and assign +=
    • Subtract and assign -= etc.

Metadata

Release files for peridot 6rc0

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

Source distribution (sdist)

Source distribution for peridot 6rc0
File Size Uploaded Provenance
peridot-6rc0.tar.gz 37.6 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 79.7 kB

Release files / peridot-6rc0.tar.gz

Download URL peridot-6rc0.tar.gz
Size 37.6 kB
Tags Source
SHA-256 checksum
How to use checksums
56414a103e40a87ed35d9ae4f417fbbe809f6ba7118caa4a261fdca8bf6640d4
BLAKE2b-256 checksum
How to use checksums
e0a6cf0527f48a1ece6b0e0cf25c474251c4deb1f5031e02a7a2b38a6c9b5469
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.7.14-1-ck-piledriver

Release files / peridot-6rc0-py3-none-any.whl

Download URL peridot-6rc0-py3-none-any.whl
Size 42.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b602b858dc76c3b32117d741fae9e943c8bd25bdc22d6527dfd240018e061850
BLAKE2b-256 checksum
How to use checksums
c73ed1d5fc64c02c407a95944e18ff2c3b504d226df683747bf88b5b6754702c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.7.14-1-ck-piledriver

Security for peridot 6rc0

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.

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