/psi

Ψ A minimal, sensible, scripting language for configuring, extending and controlling your application

Primary LanguageRustGNU General Public License v2.0GPL-2.0


Ψ

PSI

A minimal, sensible, scripting language for configuring, extending and controlling your application
Explore the docs »

View Examples · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Installation
  3. Usage
  4. License
  5. Contact

About The Project

PSI is a scripting language with the following aims:

  • Be fast enough to be embedded with little slowdown
  • Simple enough to use, but powerful enough to be practical
  • Potentially be used as a general purpose scripting language
  • Can be learnt in under 1 hour with prior experience.

Built With

  • Rust (Fast language to implement PSI in)
  • Lliw (Provides colours and styles on the terminal)
  • Thiserror (Allows for easy custom error creation)
  • Unicode-rs (For use to ensure unicode is supported)
  • Crafting Interpreters (Where I learnt to build it)

Installation

Source (Directly from Cargo)

  1. Ensure you have an up-to-date Rust compiler toolchain (https://rust-lang.org)

  2. Build from source (use a nightly compiler for potential performance improvements)

    cargo install psi-lang

Source (Manually)

  1. Ensure you have an up-to-date Rust compiler toolchain (https://rust-lang.org)

  2. Clone the repo and enter the directory

    git clone https://github.com/curlpipe/psi.git
    cd psi/compiler
  3. Build from source (use a nightly compiler for potential performance improvements)

    cargo build --release
  4. Add the executable

    mv target/release/psi_compiler /usr/bin/psi

Usage

You can find a cheatsheet for the language over here

You can also use the --learn or -l flag for an interactive learning environment to get yourself up to scratch on the langauge very quickly.

Here is the usage for the command line application itself:

  • psi -h - Show help message
  • psi -r - Access a REPL for trying out the language (a great environment to get to know it)
  • psi example.psi - Run code from a file
  • psi example.psi -v - Run code from a file (and show the internal workings of PSI)
  • psi -rv or psi -r -v - Combine the repl and verbose argument to interactively show the internal workings
  • psi -l - Access an interactive learning environment to learn the language quickly

License

Distributed under the GPLv2 License. See LICENSE for more information.

Contact

Project Link: https://github.com/curlpipe/psi