Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/curlpipe/psi

Ψ A minimal, sensible, scripting language for configuring, extending and controlling your application
https://github.com/curlpipe/psi

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        





Ψ


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](https://rust-lang.org) (Fast language to implement PSI in)
* [Lliw](https://github.com/curlpipe/lliw) (Provides colours and styles on the terminal)
* [Thiserror](https://github.com/dtolnay/thiserror) (Allows for easy custom error creation)
* [Unicode-rs](https://unicode-rs.github.io/) (For use to ensure unicode is supported)
* [Crafting Interpreters](https://craftinginterpreters.com) (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)

```sh
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

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

```sh
cargo build --release
```
4. Add the executable

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

## Usage

You can find a cheatsheet for the language over [here](https://docs.rs/psi-lang)

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](https://github.com/curlpipe/psi)