Toy Drawing System That Teaches Programming
ChaiScript is a toy application that lets you draw shapes using the programming language ChaiScript. It's simple enough to use to teach basic programming principles to children and complex enough to practice with functional programming.
License: free
| Sound: | Play in X: | Play in Console: | Multiplayer: | Network Play: | 3D Acceleration: | Source Available: |
|---|---|---|---|---|---|---|
| no | yes | no | no | no | no | yes |
Submitted by lefticus on 2009-08-26.

A more interesting example might be:
use("draw.chai"); context.draw_grid(drawingarea); def draw_function(context, f, plot, color) { for (var i = -100; i < 100; i += 10) { color(i, f(i)); plot(i, f(i)); } } context.draw_function(fun(x) { x * x / 20 }, bind(draw_circle, context, _, _, 15), bind(fun(c, x, y) { c.set_color(min(1, x/30.0), min(1,y/30.0), 0, .85); }, context, _, _) );Which uses a flair of functional programming to draw a parabola that gradients from green to yellow, passing through black as it reaches the saddle point.