graphix-stdlib 0.3.1

A dataflow language for UIs and network programming, standard library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use tui;
use tui::canvas;

let clock = time::timer(duration:0.1s, true);
let x = 0.0;
x <- {
    let new_x = (clock ~ x) + 0.1;
    select new_x > 10.0 { true => 0.0, false => new_x }
};

let moving_circle = `Circle({color: `Red, x, y: 5.0, radius: 1.0});

canvas(
    #x_bounds: &{min: 0.0, max: 10.0},
    #y_bounds: &{min: 0.0, max: 10.0},
    &[&moving_circle]
)