# YREA SLS
*Kyler Olsen*  
*October 2025*

SLS is a statically-typed, stack-based language with pure postfix notation
combining the execution model of HP's RPL, the type system of C and Rust, and
modern array operations from Uiua.

## Build Commands

**Linux**

C
```bash
cd SLS_C
python3 build.py build
./bin/sls
```

Python run module
```bash
cd SLS_Python
python3 -m sls_py
python3 -m sls_py.calc
```

Python Setup
```bash
cd SLS_Python
python -m venv .venv
source .venv/bin/activate
pip install build wheel "setuptools>=61.0"
pip install -e sls_build_backend
```

Python build module
```bash
cd SLS_Python
source .venv/bin/activate
python3 -m build --no-isolation
pip install ./dist/sls_python-0.0.2a0-py3-none-any.whl
python3 -m sls_py
python3 -m sls_py.calc
```

Rust
```bash
cd SLS_Rust/sls
cargo build
./target/debug/sls_rs
```

**Windows**

C (Using Visual Studio Developer PowerShell)
```shell
cd SLS_C
python build.py build
.\bin\sls.exe
```

Python run module
```bat
cd SLS_Python
python -m sls_py
python -m sls_py.calc
```

Python Setup
```bat
cd SLS_Python
python -m venv .venv
.venv\Scripts\activate.bat
pip install build wheel "setuptools>=61.0"
pip install -e sls_build_backend
```

Python build module
```bat
cd SLS_Python
.venv\Scripts\activate.bat
python -m build --no-isolation
pip install .\dist\sls_python-0.0.2a0-py3-none-any.whl
python -m sls_py
python -m sls_py.calc
```

Rust
```bat
cd SLS_Rust\sls
cargo build
.\target\debug\sls_rs.exe
```

**MacOS**

Reference Linux build instructions.

For C there is the `python3 build.py macos` command, but it is untested as I
didn't test it on a Mac. I also don't know if `python3 build.py build` would also
work on a Mac.

Python and Rust should just be the same or similar to Linux.

**RP2040**

Only tested on Linux. Only SLS_C supports RP2040.

Install Pico SDK to `~/pico/pico-sdk`, or set environment variable
`PICO_SDK_PATH` to your installation path. You will also need to install the
appropriate compiler.

Debian GNU/Linux
```bash
sudo apt install gcc-arm-none-eabi
```

```shell
cd SLS_C
python3 build.py rp2040
```

Flash Raspberry Pi Pico:  
Copy `.\build_pico\sls.elf.uf2` to your Pico in BOOTSEL mode

## Contributing

[sls.purplecello.org/contributing](https://sls.purplecello.org/contributing.html)
