Plush
Minimalistic dynamically-typed language for fun, teaching and creative programming.
Install / Use
/learn @maximecb/PlushREADME
The Plush Programming Language
<p align="center"> <img src="media/city.png" height=180> <img src="media/mondrian.png" height=180> <img src="media/amigaball.png" height=180> </p>Plush is a toy programming language and virtual machine for fun, teaching and creative programming. It follows a minimalistic design philosphy and draws inspiration from JavaScript, Lox, Lua, Python and Rust. Plush supports actor-based parallelism and is designed such that there is no global VM lock. The language has straightforward semantics and is built around a simple stack-based interpreter. The codebase is well-commented, has very few depencencies, and good cross-platform support. It has been tested on Linux, Mac and Windows. Please do note however that this project is very much a fun side-project and a work in progress. You could run into bugs and missing features.
To get a feel for what Plush code looks like, have a look at the programs in the /examples directory. For a detailed guide to the Plush language, please see the Plush Language Guide.
Build Instructions
Dependencies:
- The Rust toolchain
- The SDL2 libraries
Installing Rust and SDL2 on macOS
Install the SDL2 package:
brew install sdl2
Add this to your ~/.zprofile:
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib"
Install the Rust toolchain:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Installing Rust and SDL2 on Debian/Ubuntu
Install the SDL2 package:
sudo apt-get install libsdl2-dev
Install the Rust toolchain:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Installing Rust and SDL2 on Windows
Follow the Windows-specific instructions to install the Rust toolchain.
Get SDL2.dll from one of SDL2 Releases.
Copy SDL2.dll (unzip) to the root of your cloned repo.
Compiling the Project
cargo build
To run the test suite:
cargo test
To run a plush script:
# See example programs under /examples, /benchmarks and /tests
cargo run examples/helloworld.psh
cargo run examples/plasma.psh
Open Source License
The code for Plush, its VM and associated tools is shared under the Apache-2.0 license. The example code in the /examples directory is shared under the Creative Commons CC0 license to encourage sharing and remixing.
Contributing
There is a lot of work to be done to get this project going and contributions are welcome.
A good first step is to look at open issues and read the available documentation. Another easy way to contribute is to create new example programs showcasing cool things you can do with Plush, or to report any bugs and issues you encounter. If you do report bugs, please provide as much context as possible, and the smallest reproduction you can come up with.
You can also search the codebase for TODO or FIXME notes:
grep -IRi "todo" .
In general, smaller pull requests are easier to review and easier to iterate on. If you would like to add a complex feature or make significant refactorings the design of Plush, I recommend opening an issue or starting a discussion about your proposed changes first.
Please keep in mind that one of the core principles of Plush is to minimize dependencies to keep the VM easy to install and easy to port. Opening a PR that adds dependencies to multiple new packages and libraries is unlikely to get merged.
If you think that Plush is cool, you can support my work via GitHub Sponsors :heart:
Related Skills
node-connect
351.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
