|
|
4 weeks ago | |
|---|---|---|
| cases | 3 years ago | |
| examples | 6 years ago | |
| rosetta | 6 years ago | |
| src | 4 weeks ago | |
| .gitignore | 3 months ago | |
| Cargo.lock | 3 months ago | |
| Cargo.toml | 3 months ago | |
| Makefile | 4 years ago | |
| Makefile.toml | 3 months ago | |
| README.md | 4 weeks ago | |
| build.rs | 3 years ago | |
README.md
The Oskar Graphics Programming Language
Oskar is a programming language for graphics and animation designed by computer animation pioneer Larry Cuba. It compiles to Python using the py5 Processing wrapper.
Usage
$ cargo install --force cargo-make # oskar uses cargo make
$ git clone https://code.emma.coop/ramsey/oskar # clone the repository
$ cd oskar # enter folder
$ cargo make clone-ruff # clone ruff (see below)
$ cargo build --release # build compiler
$ ./target/release/oskar compile in.osk # use compiler
A manual for the language is being written.
Implementation
The compiler is written in Rust and uses pest to parse Oskar code.
Since Oskar embeds Python and compiles to Python, a Python parser and code generator is required to function. The current implementation uses unpublished internals crates from Ruff, a Python linter and code formatter. The cargo make clone-ruff step described above clones the ruff repository and sets up local dependencies on its internal crates.
Older versions of the compiler used Python itself via pyo3 for parsing and code generation but Python version headaches between Linux and Windows proved painful enough to abandon this approach in favor of an all-Rust solution.
History
The earliest experiments with Oskar go back to Larry's experimenting in Python in the mid-1990s. The first compiler for the language was written by Bryce Summers in 2017 who handed off the work to Ramsey Nasser in 2018. There have been five major versions of the compiler targeting different languages and animation systems.
v5started Jan 8 2026 by Ramsey Nasser at the EMMA Technology Cooperative. Compiles to Python and targets py5.v4started Apr 18 2023 by Ramsey Nasser. Compiles to Python and targets Blender.v3started Jul 11 2018 by Ramsey Nasser. Compiles to Python and targets Houdini.v1andv2started Jan 14 2017 Bryce Summers. Compiles to OpenSCAD.
Name
Oskar is named after early animation pioneer Oskar Fischinger.