Risp
A rusty lisp inspired by Clojure for usage as simple configuration language.
Usage in Rust
extern crate risp;
use eval_risp_script;
use Int;
use create_core_environment;
Risp example showing every existing language feature
; The risp kitchen sink - yes this line is a single line comment.
(def my_int 2)
(def my_vector [1 my_int 3])
(def repeated (rep 2 1 2 3)) ; repeat [1 2 3] 2 times => [1 2 3 1 2 3]
(comment
(this is not evaluated)
(it can have multiple lines)
(but must have valid risp syntax))
; This last expression (it's a map in this case) will be returned.
{:yes true
:no false
:added (+ my_int 20)
:multiplied (* my_int 20)
:repeated repeated
:my_vector my_vector
:my_map {:key my_int}
:my_string "Hello"
:my_do_result (do
(def my_int_2 20)
(+ my_int my_int_2))}
Convert evaluated Risp to Rust
extern crate risp;
use eval_risp_script;
use create_core_environment;
Goals
- Simple configuration language
- Subset of Clojure, well... a kind of
Secret Real Goal
- Usable for configuring patches in my pet project https://github.com/shybyte/rust-midi-patcher
Non-Goals
- Performance
- Completeness